Chapter 2. VirtualBox Basics in OpenStack Training Guides ---> NAT network doesn't work
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Training Guides |
Invalid
|
Undecided
|
Unassigned |
Bug Description
First of all: sorry for my english as it isn't my native language.
on this section:
From your VM Instance, Use ping command to see whether Internet is on.
$ping www.google.com
If its not connected, restart networking service-
$sudo service networking restart
$ping www.google.com
of the OpenStack web http://
the problem doesn't solve just restarting the network service. The same problem happens on all virtual box VMs, and is (at least that's what i think), inside every VM, ubuntu starts NICs in the exact order they are declared. So that leads to an incorrect routing table, where it assumes that the first NIC (eth0) will be the default gateway so all the trafic goes to 10.10.10.1. that's why ping doesn't work.
this is what i get from command route -n
juan@Control-
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.10.10.1 0.0.0.0 UG 100 0 0 eth0
10.0.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
juan@Control-
so, in order to allow the NAT network adapter to work, i have to delete the default gateway and add the correct one (based on the previous output)
juan@Control-
juan@Control-
now the command route -n shows the correct information for this setup (again, based on the previous output)
root@Control-
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.4.2 0.0.0.0 UG 0 0 0 eth2
10.0.4.0 0.0.0.0 255.255.255.0 U 0 0 0 eth2
10.10.10.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.100.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
and now i can ping google
root@Control-
PING www.google.com (173.194.42.51) 56(84) bytes of data.
64 bytes from eze03s06-
summarizing:
the problem is: the NAT adapter is set by DHCP, and thus, the gateway depends on the network given to that particular MV by virtual Box. I don't know how to set up the ubuntu in order to take the as default gateway, the one that belongs to a especific NIC and it's given address space.
i haven't tried this, but i think maybe setting NAT NIC, as the first NIC adapter on every VM, could solve the problem. maybe that way ubuntu sees as eth0, the NAT adapter, and creates the right routing table.
I just hope to be helpful, and sorry for my poor english.
Regards from Argentina,
Juan M. Sierra.
-------
Built: 2014-02-01T02:08:38 00:00
git SHA: 6c21ae8135000d5
URL: http://
source File: file:/home/
xml:id: lab000-
affects: | openstack-manuals → openstack-training-guides |
This is due to incorrect default gateway. You need to delete the gateway in your case, which works for you.
# route -n
# route del -net 0.0.0.0 gw <IP corresponding to 0.0.0.0>
# route add -net 0.0.0.0 gw <IP of NAT interface>
This issue has been fixed earlier. It happens due to gateways set for vboxnet in the network interfaces configuration file.