1 網絡通訊docker
容器與容器的交互網絡
docker0 網橋, 至關於交換機, 不一樣容器的數據通訊經過它交換, spa
vetchx 一段固定容器的虛擬網卡, 一段固定在docker0. 每一個容器有一個3d
[root@izwz97j0sus9exlvpgweqpz ~]# ifconfig docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 172.17.0.1 netmask 255.255.0.0 broadcast 0.0.0.0 ether 02:42:fd:b5:e3:6b txqueuelen 0 (Ethernet) RX packets 28766 bytes 14584874 (13.9 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 28408 bytes 6915699 (6.5 MiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.250 netmask 255.255.255.0 broadcast 192.168.1.255 ether 00:16:3e:04:a1:55 txqueuelen 1000 (Ethernet) RX packets 17713096 bytes 3710239255 (3.4 GiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 15783439 bytes 5332758803 (4.9 GiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 vetha91557d: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether 7e:8d:64:f7:24:6a txqueuelen 0 (Ethernet) RX packets 782 bytes 116368 (113.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1029 bytes 153360 (149.7 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 vethee6ce6c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 ether fa:fe:74:84:92:fe txqueuelen 0 (Ethernet) RX packets 1025 bytes 110190 (107.6 KiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 1308 bytes 98128 (95.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
容器網絡訪問經過NAT實現code
2 網絡模式修改blog
3 網絡隔離io