Default Bridge Network on Docker Networking

Default bridge network

source image : deploybot.com

In terms of networking, a bridge network is a Link Layer device which forwards traffic between network segments. A bridge can be a hardware device or a software device running within a host machine’s kernel.

In terms of Docker, a bridge network uses a software bridge which allows containers connected to the same bridge network to communicate, while providing isolation from containers which are not connected to that bridge network. The Docker bridge driver automatically installs rules in the host machine so that containers on different bridge networks cannot communicate directly with each other.

Bridge networks apply to containers running on the same Docker daemon host. For communication among containers running on different Docker daemon hosts, you can either manage routing at the OS level, or you can use an overlay network.

When you start Docker, a default bridge network (also called bridge) is created automatically, and newly-started containers connect to it unless otherwise specified. You can also create user-defined custom bridge networks. User-defined bridge networks are superior to the default bridge network. source: https://docs.docker.com/network/bridge/

view docker network

run apline container

view container list

view network bridge details

Enter to the alpine1 container

see ip address

Test ping to the internet

Test to alpine2 container

Exit the alpine1 container without close the shell

press the ctrl+p, ctrl+q button

Remove the two containers

reference : https://docs.docker.com/network/bridge/

--

--

Cloud DevOps Enthusiast

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store