
bridge mode (default mode, the most commonly used mode).


The MAC VLAN network will monopolize the physical network card, that is, a physical network card can only create one MAC VLAN networkĪccording to the communication mode between macvlan sub interfaces, macvlan has four network modes: Therefore, the mac VLAN (except the bridge) can only send messages to the external network and accept the messages destined for the local mac. The mac VLAN interface will monitor and receive the messages arriving at the local mac address on the link. From the outside, it is equivalent to multiple hosts. After the Host receives the data packet, it forwards the data packet from to different sub interfaces according to different MAC addresses. Macvlan is to create multiple subnet cards on the Host network card, assign independent IP address and MAC address, and assign the subnet card to the container instance to realize the direct connection between the instance and the physical network, while maintaining the isolation of the container instance. View container IP $ docker exec -it busybox_mybridge_net ifconfigģ, Custom macvlan network (physical network card is equivalent to switch) $ docker run -name=busybox_mybridge_net -net=mybridge_net -td busybox – subnet 172.19.0.0/16 indicates that subnet ip can be allocated from 172.19.0.2 to 172.19.255.255Ĭreate a container using the newly created network $ docker run -name=busybox_mybridge_net -net=mybridge_net -td busybox

Docker mac address driver#
– driver bridge indicates that the bridge mode is used This bridge is similar to the bridge in the default networkĬreate custom network command: docker network create $ docker network create -driver bridge -subnet 172.19.0.0/16 -gateway 172.19.0.1 mybridge_net Overlay and macvlan are used to create cross host networks 2, Custom bridge network Docker provides three network drivers: bridge, MAC VLAN and overlay
