AJNOURI / COA

Openstack Foundation Openstack Certified Administrator exam Preparation
MIT License
45 stars 37 forks source link

Cannot ping outside world from instance #69

Open AJNOURI opened 7 years ago

AJNOURI commented 7 years ago

[root@devstack1 ~]# ip netns exec qdhcp-267ed855-d615-4197-973d-ab843359889f ping 192.168.0.150

PING 192.168.0.150 (192.168.0.150) 56(84) bytes of data. 64 bytes from 192.168.0.150: icmp_seq=1 ttl=63 time=0.140 ms 64 bytes from 192.168.0.150: icmp_seq=2 ttl=63 time=0.108 ms 64 bytes from 192.168.0.150: icmp_seq=3 ttl=63 time=0.100 ms 64 bytes from 192.168.0.150: icmp_seq=4 ttl=63 time=0.116 ms 64 bytes from 192.168.0.150: icmp_seq=5 ttl=63 time=0.065 ms 64 bytes from 192.168.0.150: icmp_seq=6 ttl=63 time=0.088 ms 64 bytes from 192.168.0.150: icmp_seq=7 ttl=63 time=0.094 ms ^C --- 192.168.0.150 ping statistics --- 7 packets transmitted, 7 received, 0% packet loss, time 6513ms rtt min/avg/max/mdev = 0.065/0.101/0.140/0.024 ms

selection_0165

AJNOURI commented 7 years ago

Openstack host uses NAT (192.168.149.0/24) interface, supposed to be used for Openstack management instead of br-ex interface (192.168.0.150) bridged to external network 192.168.0.0/24:

[root@devstack1 ~]# ip r

default via 192.168.149.2 dev ens36 10.20.20.0/24 dev ens37 proto kernel scope link src 10.20.20.129 169.254.0.0/16 dev ens33 scope link metric 1002 169.254.0.0/16 dev ens36 scope link metric 1003 169.254.0.0/16 dev ens37 scope link metric 1004 169.254.0.0/16 dev br-ex scope link metric 1008 192.168.0.0/24 dev br-ex proto kernel scope link src 192.168.0.150 192.168.149.0/24 dev ens36 proto kernel scope link src 192.168.149.128 [root@devstack1 ~]# ping 192.168.0.254 PING 192.168.0.254 (192.168.0.254) 56(84) bytes of data. 64 bytes from 192.168.0.254: icmp_seq=1 ttl=64 time=3.91 ms 64 bytes from 192.168.0.254: icmp_seq=2 ttl=64 time=0.422 ms 64 bytes from 192.168.0.254: icmp_seq=3 ttl=64 time=0.346 ms 64 bytes from 192.168.0.254: icmp_seq=4 ttl=64 time=0.911 ms ^C --- 192.168.0.254 ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 0.346/1.399/3.918/1.470 ms [root@devstack1 ~]#

--------------------- br-ex is already configured for IP and GW:

cat /etc/sysconfig/network-scripts/ifcfg-br-ex

DEFROUTE="yes" PEERDNS="yes" PEERROUTES="yes" UUID="da67051d-85ca-4841-b877-b9ff16e935a3" ONBOOT="yes" DEVICE=br-ex NAME=br-ex DEVICETYPE=ovs OVSBOOTPROTO="none" TYPE=OVSBridge OVS_EXTRA="set bridge br-ex fail_mode=standalone" IPADDR=192.168.0.150 NETMASK=255.255.255.0 GATEWAY=192.168.0.254 DNS1=192.168.0.254