registry和虚拟机之间ping不通

来源:3-8 镜像的发布

黯淡_0001

2019-09-27

	[vagrant@docker-hello ~]$ ip addr
	1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
	    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
	    inet 127.0.0.1/8 scope host lo
	       valid_lft forever preferred_lft forever
	    inet6 ::1/128 scope host
	       valid_lft forever preferred_lft forever
	2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
	    link/ether 52:54:00:8a:fe:e6 brd ff:ff:ff:ff:ff:ff
	    inet 10.0.2.15/24 brd 10.0.2.255 scope global noprefixroute dynamic eth0
	       valid_lft 86324sec preferred_lft 86324sec
	    inet6 fe80::5054:ff:fe8a:fee6/64 scope link
	       valid_lft forever preferred_lft forever
	3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
	    link/ether 08:00:27:71:36:aa brd ff:ff:ff:ff:ff:ff
	    inet 192.168.205.44/24 brd 192.168.205.255 scope global noprefixroute eth1
	       valid_lft forever preferred_lft forever
	    inet6 fe80::a00:27ff:fe71:36aa/64 scope link
	       valid_lft forever preferred_lft forever
	
	[vagrant@docker-hello ~]$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 52:54:00:8a:fe:e6 brd ff:ff:ff:ff:ff:ff
    inet 10.0.2.15/24 brd 10.0.2.255 scope global noprefixroute dynamic eth0
       valid_lft 86324sec preferred_lft 86324sec
    inet6 fe80::5054:ff:fe8a:fee6/64 scope link
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:71:36:aa brd ff:ff:ff:ff:ff:ff
    inet 192.168.205.44/24 brd 192.168.205.255 scope global noprefixroute eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe71:36aa/64 scope link
       valid_lft forever preferred_lft forever      
  
  如何设置ip 才能让两台机器ping通,上面是我的两个centos的机器。
写回答

2回答

麦兜搞IT

2019-09-28

192.168.205.10  192.168.205.44 这两个地址ping不通么

0
0

黯淡_0001

提问者

2019-09-27

另一台机器的ip是

    [vagrant@docker-host ~]$ ip addr

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000

        link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00

        inet 127.0.0.1/8 scope host lo

           valid_lft forever preferred_lft forever

        inet6 ::1/128 scope host

           valid_lft forever preferred_lft forever

    2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

        link/ether 52:54:00:8a:fe:e6 brd ff:ff:ff:ff:ff:ff

        inet 10.0.2.15/24 brd 10.0.2.255 scope global noprefixroute dynamic eth0

           valid_lft 80670sec preferred_lft 80670sec

        inet6 fe80::5054:ff:fe8a:fee6/64 scope link

           valid_lft forever preferred_lft forever

    3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000

        link/ether 08:00:27:26:f4:90 brd ff:ff:ff:ff:ff:ff

        inet 192.168.205.10/24 brd 192.168.205.255 scope global noprefixroute eth1

           valid_lft forever preferred_lft forever

        inet6 fe80::a00:27ff:fe26:f490/64 scope link

           valid_lft forever preferred_lft forever

    4: docker0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default

        link/ether 02:42:49:c3:d3:90 brd ff:ff:ff:ff:ff:ff

        inet 172.17.0.1/16 brd 172.17.255.255 scope global docker0

           valid_lft forever preferred_lft forever

        inet6 fe80::42:49ff:fec3:d390/64 scope link

           valid_lft forever preferred_lft forever

    8: veth88a6e4b@if7: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master docker0 state UP group default

        link/ether 4a:09:9d:5b:ea:6e brd ff:ff:ff:ff:ff:ff link-netnsid 0

        inet6 fe80::4809:9dff:fe5b:ea6e/64 scope link

           valid_lft forever preferred_lft forever

    

0
0

系统学习Docker 践行DevOps理念

无论你是开发、测试还是运维,Docker都是你的必备技能。

3297 学习 · 1895 问题

查看课程