| Different option for Networking in Docker
Well there are different option available for Networking in Docker. And in Docker instead of relying on default network, i will prefer you to create a custom network for my containers. And this custom network will grants me great control and enable stricter isolation between containers. Well below are different Networking option we can do:-
(1)Bridge Network:-Well this is the default network mode which creates an internal private network. And this network allows containers to communicate with each other using internal IP addresses. And we alos use this mainly.
(2)Host Network:-Well as the name suggest Host. Here container share the host network stack. Which make them accessible directly on the hosts networks which is just like your home network. This mode will offers optimal network performance but will may limit isolation.
(3)None Network:-Well here we have none network means will isolates containers from the exteranl networks completely. And we mainly use this for secuirty and for the testing purpose.
(4)Overlay Network:-Well this network will mianly used in Docker Swarm. This will facilitates communication between containers across different hosts, creating a virtual network that spans multiple nodes. This is a big description for overlay network we will discuss that in separate article.
(5)Macvlan Network:-Here we have the containers with a unique MAC address, which allow them to behave like physical devices on the network which is useful for scenarious requiring direct network access. Will discuss this in another article.
(6)IPvlan Network:-This is similar to Macvlan which allows containers to connect directly to physical networks, but with different characteristics suited to specific use cases. | | |