How to get internet access inside the VM

Bug #1309453 reported by sajuptpm
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Invalid
Undecided
Unassigned

Bug Description

I created a floating ip and associated to the running vm. But i can''t see that ip inside the VM with #ifconfig command

a)
$ ssh -i heat_key.priv root@10.0.0.2
Last login: Fri Apr 18 05:51:54 2014 from 10.0.0.1
[root@(none) ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255
        inet6 fe80::f816:3eff:feb8:240d prefixlen 64 scopeid 0x20<link>
        ether fa:16:3e:b8:24:0d txqueuelen 1000 (Ethernet)
        RX packets 7402 bytes 638182 (623.2 KiB)
        RX errors 0 dropped 11 overruns 0 frame 0
        TX packets 1039 bytes 161658 (157.8 KiB)
        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 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

[root@(none) ~]#

b)
$ nova --os-tenant-name invisible_to_admin floating-ip-list
+----+-----------+----------+------+
| Ip | Server Id | Fixed Ip | Pool |
+----+-----------+----------+------+
+----+-----------+----------+------+

c)
$ nova --os-tenant-name invisible_to_admin floating-ip-pool-list
+--------+
| name |
+--------+
| public |
| test |
+--------+

d)
$ nova --os-tenant-name invisible_to_admin floating-ip-create public
+--------------+-----------+----------+--------+
| Ip | Server Id | Fixed Ip | Pool |
+--------------+-----------+----------+--------+
| 172.24.4.225 | | - | public |
+--------------+-----------+----------+--------+

e)
$ nova --os-tenant-name invisible_to_admin list
+--------------------------------------+----------------------------------------------+--------+------------+-------------+------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+----------------------------------------------+--------+------------+-------------+------------------+
| 3ca3c01b-97bb-4d53-be82-5bd3c31bdf84 | my-wordpress-stack-WikiDatabase-3pufd4hqlzko | ACTIVE | - | Running | private=10.0.0.2 |
+--------------------------------------+----------------------------------------------+--------+------------+-------------+------------------+

f)
$nova --os-tenant-name invisible_to_admin floating-ip-associate 3ca3c01b-97bb-4d53-be82-5bd3c31bdf84 172.24.4.225

g)
$ nova --os-tenant-name invisible_to_admin list
+--------------------------------------+----------------------------------------------+--------+------------+-------------+--------------------------------+
| ID | Name | Status | Task State | Power State | Networks |
+--------------------------------------+----------------------------------------------+--------+------------+-------------+--------------------------------+
| 3ca3c01b-97bb-4d53-be82-5bd3c31bdf84 | my-wordpress-stack-WikiDatabase-3pufd4hqlzko | ACTIVE | - | Running | private=10.0.0.2, 172.24.4.225 |
+--------------------------------------+----------------------------------------------+--------+------------+-------------+--------------------------------+

h)
$ nova --os-tenant-name invisible_to_admin floating-ip-list
+--------------+-----------+----------+--------+
| Ip | Server Id | Fixed Ip | Pool |
+--------------+-----------+----------+--------+
| 172.24.4.225 | | 10.0.0.2 | public |
+--------------+-----------+----------+--------+

i)
$ ssh -i heat_key.priv root@10.0.0.2
Last login: Fri Apr 18 05:51:54 2014 from 10.0.0.1
[root@(none) ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255
        inet6 fe80::f816:3eff:feb8:240d prefixlen 64 scopeid 0x20<link>
        ether fa:16:3e:b8:24:0d txqueuelen 1000 (Ethernet)
        RX packets 7402 bytes 638182 (623.2 KiB)
        RX errors 0 dropped 11 overruns 0 frame 0
        TX packets 1039 bytes 161658 (157.8 KiB)
        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 0 bytes 0 (0.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 0 bytes 0 (0.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

[root@(none) ~]#

Revision history for this message
sajuptpm (sajuptpm) wrote :

I am not using nova-network, devstack (havana), ubuntu 12.04

Revision history for this message
Dean Troyer (dtroyer) wrote :

Floating IPs do not appear inside the VM, they are a pure NAT in the host. So far, you have not shown an error that I can see.

Changed in devstack:
status: New → Invalid
Revision history for this message
sajuptpm (sajuptpm) wrote :

Here is the error, I can't do #ping www.google.com and #wget www.google.com

a)
[root@my-wordpress-stack-wikidatabase-bgc6qylts4oh ~]# ping www.google.com
PING www.google.com (173.194.36.50) 56(84) bytes of data.

^C
--- www.google.com ping statistics ---
8 packets transmitted, 0 received, 100% packet loss, time 6999ms

b)
[root@my-wordpress-stack-wikidatabase-bgc6qylts4oh ~]# wget www.google.com
--2014-04-18 10:09:06-- http://www.google.com/
Resolving www.google.com (www.google.com)... 173.194.36.52, 173.194.36.51, 173.194.36.48, ...
Connecting to www.google.com (www.google.com)|173.194.36.52|:80... failed: Connection refused.
Connecting to www.google.com (www.google.com)|173.194.36.51|:80... failed: Connection refused.
Connecting to www.google.com (www.google.com)|173.194.36.48|:80... failed: Connection refused.
Connecting to www.google.com (www.google.com)|173.194.36.49|:80... failed: Connection refused.
Connecting to www.google.com (www.google.com)|173.194.36.50|:80... failed: Connection refused.
Connecting to www.google.com (www.google.com)|2404:6800:4009:803::1014|:80... failed: Network is unreachable.
[root@my-wordpress-stack-wikidatabase-bgc6qylts4oh ~]#

c)
[root@my-wordpress-stack-wikidatabase-bgc6qylts4oh ~]# ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
        inet 10.0.0.2 netmask 255.255.255.0 broadcast 10.0.0.255
        inet6 fe80::f816:3eff:fea2:93d5 prefixlen 64 scopeid 0x20<link>
        ether fa:16:3e:a2:93:d5 txqueuelen 1000 (Ethernet)
        RX packets 14699 bytes 1030837 (1006.6 KiB)
        RX errors 0 dropped 13 overruns 0 frame 0
        TX packets 13920 bytes 1130224 (1.0 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 4 bytes 200 (200.0 B)
        RX errors 0 dropped 0 overruns 0 frame 0
        TX packets 4 bytes 200 (200.0 B)
        TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

d)
[root@my-wordpress-stack-wikidatabase-bgc6qylts4oh ~]# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
default 10.0.0.1 0.0.0.0 UG 0 0 0 eth0
10.0.0.0 * 255.255.255.0 U 0 0 0 eth0

e)
[root@my-wordpress-stack-wikidatabase-bgc6qylts4oh ~]# 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 0 0 0 eth0
10.0.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0

f)
[root@my-wordpress-stack-wikidatabase-bgc6qylts4oh ~]# brctl show
bridge name bridge id STP enabled interfaces
[root@my-wordpress-stack-wikidatabase-bgc6qylts4oh ~]#

Revision history for this message
sajuptpm (sajuptpm) wrote :

Hi dtroyer,

I thee any command to see NAT configuration details in the Host. I am using ubuntu 12.04.
I think, we should look at Host's NAT configuration to debug this issue.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.