分享

centos7 kilo 虚拟机实例ping外网,ping不通三节点的管理IP

a5525510 发表于 2015-9-19 01:23:06 [显示全部楼层] 只看大图 回帖奖励 阅读模式 关闭右栏 3 15633
centos7 kilo 虚拟机实例可以ping通三节点管理IP的网关 10.0.0.1
$ ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1): 56 data bytes
64 bytes from 10.0.0.1: seq=0 ttl=252 time=9.452 ms
64 bytes from 10.0.0.1: seq=1 ttl=252 time=8.294 ms
64 bytes from 10.0.0.1: seq=2 ttl=252 time=7.350 ms
也可以ping 外网
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=43 time=84.601 ms
64 bytes from 8.8.8.8: seq=1 ttl=43 time=86.143 ms
64 bytes from 8.8.8.8: seq=2 ttl=43 time=83.620 ms

但是无法ping通三节点的IP

vmware 3个网卡的设置
vmnat1 nat 模式 ,网关是10.0.0.1 ip地址端 10.0.0.0
vmnat2 hostonly模式 ,   网关是(vmnat2网卡的IP)10.0.1.1 ip地址段 10.0.1.0 255.255.255.0
vmnat3 hostonly模式 ,   网关是(vmnat3网卡的IP)203.0.113.1   ip地址段 203.0.113.0 255.255.255.0
外网是无线网卡,共享了vmnat3
117.png

openstack 三节点设置:
控制节点 1个网卡
   eth0网卡 通过nat链接vmnet1  10.0.0.11 网关
[root@controller ~]# ifconfig
eno16777736: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.0.11  netmask 255.255.255.0  broadcast 10.0.0.255
        inet6 fe80::250:56ff:fe39:4805  prefixlen 64  scopeid 0x20<link>
        ether 00:50:56:39:48:05  txqueuelen 1000  (Ethernet)
        RX packets 63727  bytes 12190536 (11.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 55013  bytes 20618754 (19.6 MiB)
        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
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 208359  bytes 62877759 (59.9 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 208359  bytes 62877759 (59.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[root@controller ~]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.0.1        0.0.0.0         UG    100    0        0 eno16777736
10.0.0.0        0.0.0.0         255.255.255.0   U     100    0        0 eno16777736


网络节点,3个网卡
    eth0网卡 通过nat链接vmnet1 10.0.0.21
    eth1网卡 通过hostonly链接vmnet2 10.0.1.21

    eth2网卡 通过hostonly链接vmnet3 没有设置IP
[root@network ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    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: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:3b:c3:c2 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.21/24 brd 10.0.0.255 scope global eno16777736
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe3b:c3c2/64 scope link
       valid_lft forever preferred_lft forever
3: eno33554984: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:61:c2:9e brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.21/24 brd 10.0.1.255 scope global eno33554984
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fe61:c29e/64 scope link
       valid_lft forever preferred_lft forever
4: eno50332208: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
    link/ether 00:0c:29:61:c2:a8 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::20c:29ff:fe61:c2a8/64 scope link
       valid_lft forever preferred_lft forever
5: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether ca:d7:ad:fc:77:31 brd ff:ff:ff:ff:ff:ff
6: br-ex: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 00:0c:29:61:c2:a8 brd ff:ff:ff:ff:ff:ff
7: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 66:d5:38:09:1a:44 brd ff:ff:ff:ff:ff:ff
8: br-tun: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether aa:d3:82:ab:57:46 brd ff:ff:ff:ff:ff:ff

[root@network ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.0.1        0.0.0.0         UG    100    0        0 eno16777736
10.0.0.0        0.0.0.0         255.255.255.0   U     100    0        0 eno16777736
10.0.1.0        0.0.0.0         255.255.255.0   U     100    0        0 eno33554984



计算节点,2个网卡
    eth0网卡 通过nat链接vmnet1 10.0.0.31
    eth1网卡 通过nat链接vmnet2 10.0.1.31



[root@compute1 ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
    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: eno16777736: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:50:56:3c:34:f6 brd ff:ff:ff:ff:ff:ff
    inet 10.0.0.31/24 brd 10.0.0.255 scope global eno16777736
       valid_lft forever preferred_lft forever
    inet6 fe80::250:56ff:fe3c:34f6/64 scope link
       valid_lft forever preferred_lft forever
3: eno33554984: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
    link/ether 00:0c:29:e1:09:80 brd ff:ff:ff:ff:ff:ff
    inet 10.0.1.31/24 brd 10.0.1.255 scope global eno33554984
       valid_lft forever preferred_lft forever
    inet6 fe80::20c:29ff:fee1:980/64 scope link
       valid_lft forever preferred_lft forever
4: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether de:22:a1:30:cd:80 brd ff:ff:ff:ff:ff:ff
5: br-int: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 9e:dd:e9:e0:35:47 brd ff:ff:ff:ff:ff:ff
6: br-tun: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
    link/ether 92:ab:09:8f:b1:45 brd ff:ff:ff:ff:ff:ff
11: qbr798f1390-53: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP
    link/ether 86:de:58:b6:bb:cc brd ff:ff:ff:ff:ff:ff
    inet6 fe80::84de:58ff:feb6:bbcc/64 scope link
       valid_lft forever preferred_lft forever
12: qvo798f1390-53: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master ovs-system state UP qlen 1000
    link/ether e6:7c:11:a8:11:aa brd ff:ff:ff:ff:ff:ff
    inet6 fe80::e47c:11ff:fea8:11aa/64 scope link
       valid_lft forever preferred_lft forever
13: qvb798f1390-53: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbr798f1390-53 state UP qlen 1000
    link/ether 86:de:58:b6:bb:cc brd ff:ff:ff:ff:ff:ff
    inet6 fe80::84de:58ff:feb6:bbcc/64 scope link
       valid_lft forever preferred_lft forever
15: tap798f1390-53: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master qbr798f1390-53 state UNKNOWN qlen 500
    link/ether fe:16:3e:21:80:1a brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc16:3eff:fe21:801a/64 scope link
       valid_lft forever preferred_lft forever

[root@compute1 ~]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         10.0.0.1        0.0.0.0         UG    100    0        0 eno16777736
10.0.0.0        0.0.0.0         255.255.255.0   U     100    0        0 eno16777736
10.0.1.0        0.0.0.0         255.255.255.0   U     100    0        0 eno33554984


已有(3)人评论

跳转到指定楼层
s060403072 发表于 2015-9-19 11:37:33
三节点能上外网吗?

回复

使用道具 举报

a5525510 发表于 2015-9-19 11:57:13
s060403072 发表于 2015-9-19 11:37
三节点能上外网吗?

三个节点可以上外网
回复

使用道具 举报

s060403072 发表于 2015-9-19 20:30:00
a5525510 发表于 2015-9-19 11:57
三个节点可以上外网




网络是很复杂的,推荐这个资料
openstack (2015)neutron最新英文资料【推荐】
http://www.aboutyun.com/thread-12084-1-1.html
(出处: about云开发)


回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

推荐上一条 /2 下一条