Ask Your Question
0

Network Configuration for Virtual Box

asked 2015-03-02 11:23:50 -0500

oscar gravatar image

updated 2015-03-10 20:44:21 -0500

smaffulli gravatar image

Hi I have the following interfaces for network node:

#loopback
auto lo
iface lo inet loopback

#internet access
auto eth0
iface inet dhcp

#Management 
auto eth1
iface eth1 inet static
address 10.0.0.21
netmask 255.255.255.0

#tunnels
auto eth2
iface eth2 inet static
address 10.0.1.21
netmask 255.255.255.0

Im deploying open stack on a three node configuration system using virtualbox. The dhcp is a bridged adapter and the other two are set to internal network.

I have installed Identity, Image, Compute and Networking services. Everything works fine. But I am confused as of what to do with the "Create Initial Networks" section of the installation guide for ubuntu 14.04 Im following (specifically: http://docs.openstack.org/juno/instal... neutron)

Specifically for the allocation pool start and end IP.

Should I create another network interface so that a range of ips can be assigned to VMS? I have no experience in setting networks up.

OK, This is really driving me crazy... I have no idea of whats going on... I'll edit the question with more details hoping somebody could further assist me...

~$ neutron agent-list
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| id                                   | agent_type         | host     | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| 6d71c73c-0d3f-4de8-90b4-b96d6ab72613 | Open vSwitch agent | compute1 | :-)   | True           | neutron-openvswitch-agent |
| ad4485a3-8ee3-4fa1-bcdc-01c35feeb8ff | DHCP agent         | network  | :-)   | True           | neutron-dhcp-agent        |
| d440b578-f75f-48d9-84c4-d3566d91a47a | Open vSwitch agent | network  | :-)   | True           | neutron-openvswitch-agent |
| edd494b6-c2ed-436d-95f3-d0cb92ed4ead | Metadata agent     | network  | :-)   | True           | neutron-metadata-agent    |
| f3e034ed-29c9-4d6d-aaff-03d15e7360df | L3 agent           | network  | :-)   | True           | neutron-l3-agent          |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+

~$ neutron net-list
+--------------------------------------+----------+-------------------------------------------------------+
| id                                   | name     | subnets                                               |
+--------------------------------------+----------+-------------------------------------------------------+
| ee238171-4fd4-4b8d-8f74-6fa401ba56b2 | demo-net | c54785ee-25ee-4348-804e-6851512dcb9d 192.168.1.0/24   |
| 36f371ae-3347-496f-9814-b13a1e9b0f95 | ext-net  | d685bf66-ce39-4fd7-a5fb-3d31919c03bc 192.168.101.0/24 |
|                                      |          | 42b5e6a1-e41e-4c32-b40c-177d397a485e 192.168.1.0/24   |
+--------------------------------------+----------+-------------------------------------------------------+

~$ neutron subnet-list
+--------------------------------------+-------------+------------------+------------------------------------------------------+
| id                                   | name        | cidr             | allocation_pools                                     |
+--------------------------------------+-------------+------------------+------------------------------------------------------+
| c54785ee-25ee-4348-804e-6851512dcb9d | demo-subnet | 192.168.1.0/24   | {"start": "192.168.1.2", "end": "192.168.1.254"}     |
| d685bf66-ce39-4fd7-a5fb-3d31919c03bc | ext-subnet  | 192.168.101.0/24 | {"start": "192.168.101.2", "end": "192.168.101.254"} |
| 42b5e6a1-e41e-4c32-b40c-177d397a485e | ext-subnet  | 192.168.1.0/24   | {"start": "192.168.1.2", "end": "192.168.1.254"}     |
+--------------------------------------+-------------+------------------+------------------------------------------------------+

#on network node

~$ovs-vsctl show
2f8c7fc0-a955-4031-a7c5-d4128d7a449a
    Bridge br-ex
        Port br-ex
            Interface br-ex
                type: internal
        Port phy-br-ex
            Interface phy-br-ex
        Port "qg-c350daea-fc"
            Interface "qg-c350daea-fc"
                type: internal
        Port "eth3"
            Interface "eth3"
    Bridge br-int
        fail_mode: secure
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
        Port int-br-ex
            Interface int-br-ex
        Port "qr-1a912e9e-cd"
            tag: 1
            Interface "qr-1a912e9e-cd"
                type: internal
        Port br-int
            Interface br-int
                type: internal
    Bridge br-tun
        Port br-tun
            Interface br-tun
                type: internal
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
        Port "gre-0a00011f"
            Interface "gre-0a00011f"
                type: gre
                options: {in_key=flow, local_ip="10.0.1.21", out_key=flow, remote_ip="10.0.1.31"}
    ovs_version: "2.0.2"

~$ ifconfig
br-ex     Link encap:Ethernet  HWaddr 08:00:27:9f:68:b5  
          inet6 addr: fe80::f4ed:baff:fe64:f039/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:305 errors:0 dropped:0 overruns:0 frame:0
          TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:63039 (63.0 KB)  TX bytes:648 (648.0 B)

br-int    Link encap:Ethernet  HWaddr ce:18:d7:88:e2:40  
          inet6 addr: fe80::d89a:3eff ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-03 02:52:42 -0500

updated 2015-03-10 20:42:26 -0500

smaffulli gravatar image

The network interface for external network should be in a NAT, this NAT have a IP range and Gateway, use this network information provided by VirtualBox to assign IPs and pools.

In your VBox configuration change the interface config to NAT, this is the interface referred as external network in the OpenStack Guides. Go to Network preferences in vbox and select the NAT used by your machine. You can see the IP CIDR used by the NAT.

Gateway will be the next free IP in the range you are using, usually is .1 or .2. Also you should configure NAT rules to enable connections from outside networks

In VBox main screen go to file--> preferences--> Network- Select your NAT or create a new one. Edit that NAT, there is the CIDR.

edit flag offensive delete link more

Comments

HI thank you for your answer. Could you please be a little bit more specific? So I should change eth0? or create another NAT interface for external network. And How do i assign the IP range?

oscar gravatar imageoscar ( 2015-03-03 08:37:01 -0500 )edit

Hi I have an interface set to NAT but still not sure about how to get the IP CIDR, is it the hosts ip? ANd as it uses network translation can i assign whichever subnet I want?

oscar gravatar imageoscar ( 2015-03-04 14:29:30 -0500 )edit

In VBox main screen go to file--> preferences--> Network- Select your NAT or create a new one. Edit that NAT, there is the CIDR.

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2015-03-05 05:16:11 -0500 )edit

When use the command to create a new external subnet, neutron subnet-create ext-net --name ext-subnet \ --allocation-pool start= FLOATING_IP_START ,end= FLOATING_IP_END \ --disable-dhcp --gateway EXTERNAL_NETWORK_GATEWAY (NAT GATEWAY) EXTERNAL_NETWORK_CIDR (NAT CIDR)

Eduardo Gonzalez gravatar imageEduardo Gonzalez ( 2015-03-05 05:17:09 -0500 )edit

Thanks Eduardo, I`ll try it out and let you know if it works...

oscar gravatar imageoscar ( 2015-03-06 07:50:06 -0500 )edit

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

2 followers

Stats

Asked: 2015-03-02 11:23:50 -0500

Seen: 1,290 times

Last updated: Mar 10 '15