Reputation: 11
The launched VM instance on the compute node can access all the external internet websites except the C-Class IPs. The controller and compute nodes had been installed successfully according to the openstack liberty guide on ubuntu.
[root@vm3 ~]# wget http://www.sina.com.cn Resolving www.sina.com.cn... 202.108.33.60 Connecting to www.sina.com.cn|202.108.33.60|:80... failed: No route to host.
However, both A-CLass and B-Class external IP can be accessed successfully:
[root@vm3 ~]# wget http://www.163.com Resolving www.163.com... 60.207.246.98, 124.202.166.57 Connecting to www.163.com|60.207.246.98|:80... connected. HTTP request sent, awaiting response... 200 OK Length: unspecified [text/html] Saving to: “index.html.1”
The VM's interfaces are:
[root@vm3 ~]# ifconfig eth1 Link encap:Ethernet HWaddr FA:16:3E:57:1B:57
inet addr:192.168.0.215 Bcast:255.255.255.255 Mask:192.0.0.0 inet6 addr: fe80::f816:3eff:fe57:1b57/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1450 Metric:1 RX packets:46213 errors:0 dropped:0 overruns:0 frame:0 TX packets:42118 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:13492902 (12.8 MiB) TX bytes:39875879 (38.0 MiB)lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:58630 errors:0 dropped:0 overruns:0 frame:0 TX packets:58630 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:44931488 (42.8 MiB) TX bytes:44931488 (42.8 MiB) virbr0 Link encap:Ethernet HWaddr 52:54:00:D2:F5:28 inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Routes on VM are:
[root@vm3 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 169.254.169.254 192.168.0.200 255.255.255.255 UGH 0 0 0 eth1 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 192.0.0.0 0.0.0.0 192.0.0.0 U 1 0 0 eth1 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth1
I created the public network with which the VM is launched. The public network is 192.168.0.0/24 and private is 10.0.0.0/24. controller: 192.168.0.12/10.0.0.11 compute: 192.168.0.10/10.0.0.31
If I add the route for 202.108.33.60 explicitly, wget can work:
route add 202.108.33.60 gw 192.168.0.1
[root@vm3 ~]# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 202.108.33.60 192.168.0.1 255.255.255.255 UGH 0 0 0 eth1 169.254.169.254 192.168.0.200 255.255.255.255 UGH 0 0 0 eth1 192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0 192.0.0.0 0.0.0.0 192.0.0.0 U 1 0 0 eth1 0.0.0.0 192.168.0.1 0.0.0.0 UG 0 0 0 eth1
Does anybody know the cause or give some help on how to debug this problem? Thanks a lot!
Upvotes: 1
Views: 427
Reputation: 11
After several days' analysis and digging, eventually I found the cause is the route entry "192.0.0.0 0.0.0.0 192.0.0.0 U 1 0 0 eth1" which will filter all the C-Class IPs as the LAN(neighbor network) and occasionally www.sina.com.cn is such a host. After I changed it to be as below, www.sina.com.cn can be accessed.
192.0.0.0 0.0.0.0 255.0.0.0 U 1 0 0 eth1
Upvotes: 0