码迷,mamicode.com
首页 > 其他好文 > 详细

doker网络

时间:2020-01-07 00:41:11      阅读:95      评论:0      收藏:0      [点我收藏+]

标签:ttl   ash   known   data   连接   doc   pack   loss   byte   

单向连接 --link

docker run -d --name centos-test-1

[root@master ~]# docker run -d --name centos-test-1 centos ping 114.114.114.114
bd4aa8b35c8d6e85dbf653574368ef2e2062648398ca36a1d8bcfdf4fb32ee91
[root@master ~]# docker run -d --name centos-test-2 --link centos-test-1 centos ping 114.114.114.114
4157e80f41850bf5babfc264d6d049ed51faa2d6a851b402532817eb6cc754e1
[root@master ~]# docker exec -it centos-test-2 bash
[root@4157e80f4185 /]# ping centos-test-1
PING centos-test-1 (172.17.0.5) 56(84) bytes of data.
64 bytes from centos-test-1 (172.17.0.5): icmp_seq=1 ttl=64 time=0.113 ms
64 bytes from centos-test-1 (172.17.0.5): icmp_seq=2 ttl=64 time=0.168 ms
^C
--- centos-test-1 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1000ms
rtt min/avg/max/mdev = 0.113/0.140/0.168/0.029 ms
[root@4157e80f4185 /]#
[root@bd4aa8b35c8d /]# ping centos-test-2
ping: centos-test-2: Name or service not known
[root@bd4aa8b35c8d /]#

doker网络

标签:ttl   ash   known   data   连接   doc   pack   loss   byte   

原文地址:https://www.cnblogs.com/xie123/p/12159102.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!