Docker容器互联
[root@docker ~]
REPOSITORY TAG IMAGE ID CREATED SIZE
centos 7 8652b9f0cb4c 4 months ago 204MB
[root@docker ~]
f643995baac18cd6871fcad776e1d658888aa76f9b42bd151352ccf71a41ea30
[root@docker ~]
[root@f643995baac1 /]
[root@f643995baac1 /]
eth0: flags=4163<UP, BROADCAST, RUNNING, MULTICAST> mtu 1500
inet 172. 17. 0. 3 netmask 255. 255. 0. 0 broadcast 172. 17. 255. 255
ether 02:42:ac :11:00:03 txqueuelen 0 ( Ethernet)
RX packets 9914 bytes 14383824 ( 13. 7 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 5282 bytes 288809 ( 282. 0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP, LOOPBACK, RUNNING> mtu 65536
inet 127. 0. 0. 1 netmask 255. 0. 0. 0
loop txqueuelen 1000 ( Local Loopback)
RX packets 0 bytes 0 ( 0. 0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 ( 0. 0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@docker ~]
[root@docker ~]
[root@e1ded49884b2 /]
[root@e1ded49884b2 /]
eth0: flags=4163<UP, BROADCAST, RUNNING, MULTICAST> mtu 1500
inet 172. 17. 0. 5 netmask 255. 255. 0. 0 broadcast 172. 17. 255. 255
ether 02:42:ac :11:00:05 txqueuelen 0 ( Ethernet)
RX packets 3030 bytes 14007918 ( 13. 3 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2168 bytes 120899 ( 118. 0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP, LOOPBACK, RUNNING> mtu 65536
inet 127. 0. 0. 1 netmask 255. 0. 0. 0
loop txqueuelen 1000 ( Local Loopback)
RX packets 0 bytes 0 ( 0. 0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 ( 0. 0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
[root@e1ded49884b2 /]
PING 172. 17. 0. 3 ( 172. 17. 0. 3) 56( 84) bytes of data .
64 bytes from 172. 17. 0. 3: icmp_seq=1 ttl=64 time=0. 068 ms
64 bytes from 172. 17. 0. 3: icmp_seq=2 ttl=64 time=0. 037 ms
64 bytes from 172. 17. 0. 3: icmp_seq=3 ttl=64 time=0. 054 ms
^C
-- - 172. 17. 0. 3 ping statistics -- -
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/ avg/ max/ mdev = 0. 037/ 0. 053/ 0. 068/ 0. 012 ms