Ask Your Question
0

unable to access internet on VM using Devstack

asked 2013-12-16 01:35:41 -0600

Ajitpals gravatar image

updated 2014-01-22 15:12:32 -0600

Evgeny gravatar image

Hi All,

I have setup a ubuntu server with devstack running on laptop for first time. The laptop have two connection Ethernet and Wifi. I using Wifi for internet. So in my network interface, it has following configuration [I have given static address to the eth0]

# The loopback network interface
    auto lo
    iface lo inet loopback

    #The primary network interface
    auto wlan0
    iface wlan0 inet static
                address 192.168.1.201
                netmask 255.255.255.0
                gateway 192.168.1.1
                dns-nameservers 192.168.1.1 8.8.8.8
                wpa-ssid demo
                wpa-psk  demo

     auto eth0
     iface eth0 inet static
               address 172.10.10.10
               netmask 255.255.255.0

I have created a windows 2012 VM, I can ping the machine and can take remote access via assigning floating IP address to it. But the Windows VM have no internet connection.

My Devstack localrc has following configuration

FLOATING_RANGE=192.168.1.224/27
FIXED_RANGE=10.11.12.0/24
FIXED_NETWORK_SIZE=256
FLAT_INTERFACE=eth0
ADMIN_PASSWORD=supersecret
MYSQL_PASSWORD=iheartdatabases
RABBIT_PASSWORD=flopsymopsy
SERVICE_PASSWORD=iheartksl
SERVICE_TOKEN=f0fa4797939b91ed8207

Before this set up, I have implemented the Flat_Interface on wlan0. Everything worked perfectly but once the VM is created, we are not able to ping the laptop. So I have reinstalled the devstack but with Flat_Interface on eth0, still not able to access the internet.

The windows VM ipconfig is

Windows IP Configuration  
Ethernet adapter Ethernet:

   Connection-specific DNS Suffix  . : novalocal
   Link-local IPv6 Address . . . . . : fe80::954:14a2:4bfb:f247%12
   IPv4 Address. . . . . . . . . . . : 10.11.12.2
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.11.12.1

Tunnel adapter isatap.novalocal:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : novalocal

Tunnel adapter Teredo Tunneling Pseudo-Interface:

   Connection-specific DNS Suffix  . :
   IPv6 Address. . . . . . . . . . . : 2001:0:9d38:90d7:20bb:17db:f5f4:f3fd
   Link-local IPv6 Address . . . . . : fe80::20bb:17db:f5f4:f3fd%14
   Default Gateway . . . . . . . . . : ::

I have also tried following command to setup default gateway

sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

How can i resolve the following issue?

Thanks.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2013-12-16 10:25:40 -0600

Ajitpals gravatar image

I had resolved the following problem. I had done the mistake by calling eth0 it should be wlan0

sudo iptables -t nat -A POSTROUTING -o  wlan0 -j MASQUERADE
edit flag offensive delete link more
0

answered 2014-10-28 22:45:04 -0600

drolfe_au gravatar image

Hi,

Yeah the nat didn't sound like a good answer to me as the neutron router should be looking after the nat for the network it looks after, as longs as it's been linked to an external network.

my devstack install, ubuntu14.04 , juno

I just needed to add a physical interface into the ovs br_ex

My my 10g interface is call em1 under ubuntu14

    Bridge br-ex
    Port "qg-1fb6b173-12"
        Interface "qg-1fb6b173-12"
            type: internal
    Port br-ex
        Interface br-ex
            type: internal
    Port "qg-1cd63bd8-d2"
        Interface "qg-1cd63bd8-d2"
            type: internal
ovs_version: "2.0.2"

So there isn't a physical interface attached to the external bridge

Changed the em1 interface config to look like below:

auto em1
iface em1 inet manual
up ifconfig $IFACE 0.0.0.0 up
up ip link set $IFACE promisc on
down ip link set $IFACE promisc off
down ifconfig $IFACE down

Then run the below:

sudo ifdown em1
sudo ifup em1
sudo ovs-vsctl add-port br-ex em1

Check the bridge:

Bridge br-ex
    Port "em1"
        Interface "em1"
    Port "qg-1fb6b173-12"
        Interface "qg-1fb6b173-12"
            type: internal
    Port br-ex
        Interface br-ex
            type: internal
    Port "qg-1cd63bd8-d2"
        Interface "qg-1cd63bd8-d2"
            type: internal
ovs_version: "2.0.2"

Confirm it's working from the VM:

stack@enc2-blade01:~$ ssh cirros@10.0.0.2
cirros@10.0.0.2's password:
$ uname -a
Linux test1 3.2.0-60-virtual #91-Ubuntu SMP Wed Feb 19 04:13:28 UTC 2014 x86_64 GNU/Linux

$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=51 time=8.273 ms
64 bytes from 8.8.8.8: seq=1 ttl=51 time=6.664 ms
64 bytes from 8.8.8.8: seq=2 ttl=51 time=6.458 ms
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 6.458/7.131/8.273 ms

$ id
uid=1000(cirros) gid=1000(cirros) groups=1000(cirros)

$ ifconfig eth0
eth0      Link encap:Ethernet  HWaddr FA:16:3E:08:AF:CA
          inet addr:10.0.0.2  Bcast:10.0.0.255  Mask:255.255.255.0
          inet6 addr: fe80::f816:3eff:fe08:afca/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:614 errors:0 dropped:0 overruns:0 frame:0
          TX packets:419 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:59794 (58.3 KiB)  TX bytes:47489 (46.3 KiB)
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2013-12-16 01:35:41 -0600

Seen: 3,364 times

Last updated: Dec 16 '13