vlan-enabled network

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

vlan-enabled network

Myungjin Lee
Hello,

I try to run nova a vlan-enabled network.

Basic setting is that a machine has two interfaces.
One is connected to public network and the other is used internally with
vlan-enabled setting.

Basically I want to communicate VMs via vlan-enabled interface.

The following show /etc/network/interfaces
-------------------
# The loopback network interface
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto br100
iface br100 inet static
        bridge_ports eth1.416
        bridge_stp off
        bridge_maxwait 0
        bridge_fd 0
        address 192.168.32.184
        netmask 255.255.248.0
        broadcast 192.168.39.255
-------------------
eth1.416 is vlan-interface.

nova.conf looks as follows.

-------
--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--verbose
--s3_host=x.y.32.184
--rabbit_host=x.y.32.184
--cc_host=x.y.32.184
--ec2_host= x.y.32.184
--ec2_url=http://x.y.32.184:8773/services/Cloud
--fixed_range=10.10.0.0/16
--network_size=65536
--FAKE_subdomain=ec2
--routing_source_ip=x.y.32.184
--verbose
--sql_connection=mysql://root:nova at x.y.32.184/nova
--network_manager=nova.network.manager.FlatDHCPManager
--flat_interface=eth1.416
--public_interface=eth0

-------

# brctl show
bridge name     bridge id               STP enabled     interfaces
br100           8000.00237d963199       no              eth1.416
virbr0          8000.000000000000       yes
------

Since VMs are running on the bridge interface (br100) and vlan-tagging will
be taken care of by eth1.416, should communication between VMs in different
hosts work fine?

If this is not right configuration, do I have to configure VlanManager mode?

Thanks,
-Myungjin Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-operators/attachments/20110722/770543b3/attachment.html>

Reply | Threaded
Open this post in threaded view
|

vlan-enabled network

Jeff Kramer
Lee,

If you're only intending to use nova on this one machine, you can
setup the server with the vlan mode.  It would be easier if you had a
static IP for your eth0, otherwise you'll need to run all the services
on 127.0.0.1.  You can use the vlan mode on a single machine with two
ethernet interfaces without having a vlan capable switch, because all
the nova internal network traffic between VMs and nova-network happens
inside of the server.

The setup for vlan mode is simpler than FlatDHCP, I've found that the
instructions on http://docs.openstack.org are pretty good:

http://docs.openstack.org/cactus/openstack-compute/admin/content/setting-flags-in-nova-conf-file.html

Here's a sample nova.conf file that works on a single machine with
glance installed, assuming you followed the general documentation
above:

--dhcpbridge_flagfile=/etc/nova/nova.conf
--dhcpbridge=/usr/bin/nova-dhcpbridge
--logdir=/var/log/nova
--state_path=/var/lib/nova
--lock_path=/var/lock/nova
--verbose
--sql_connection=mysql://nova:notnova at 127.0.0.1/nova
--glance_api_servers=127.0.0.1:9292
--image_service=nova.image.glance.GlanceImageService

If you want to run compute nodes on more than just one machine, you'll
need to either have a vlan capable switch or get the FlatDHCP
configuration to work.  If you want to create floating IPs, you'll
need to know what they are ahead of time and create them with
nova-manage floating create, so if your eth0 network only does DHCP
and you can't assign static IPs, that may be a problem.

On Fri, Jul 22, 2011 at 5:03 PM, Myungjin Lee <myungjin.lee at gmail.com> wrote:

> Hello,
> I try to run nova a vlan-enabled network.
> Basic setting is that a machine has two interfaces.
> One is connected to public network and the other is used internally with
> vlan-enabled setting.
> Basically I want to communicate VMs via vlan-enabled interface.
> The following show /etc/network/interfaces
> -------------------
> # The loopback network interface
> auto lo
> iface lo inet loopback
> auto eth0
> iface eth0 inet dhcp
> auto br100
> iface br100 inet static
> ? ? ? ? bridge_ports eth1.416
> ? ? ? ? bridge_stp off
> ? ? ? ? bridge_maxwait 0
> ? ? ? ? bridge_fd 0
> ? ? ? ? address 192.168.32.184
> ? ? ? ? netmask 255.255.248.0
> ? ? ? ? broadcast 192.168.39.255
> -------------------
> eth1.416 is vlan-interface.
> nova.conf looks as follows.
> -------
> --dhcpbridge_flagfile=/etc/nova/nova.conf
> --dhcpbridge=/usr/bin/nova-dhcpbridge
> --logdir=/var/log/nova
> --state_path=/var/lib/nova
> --lock_path=/var/lock/nova
> --verbose
> --s3_host=x.y.32.184
> --rabbit_host=x.y.32.184
> --cc_host=x.y.32.184
> --ec2_host= x.y.32.184
> --ec2_url=http://x.y.32.184:8773/services/Cloud
> --fixed_range=10.10.0.0/16
> --network_size=65536
> --FAKE_subdomain=ec2
> --routing_source_ip=x.y.32.184
> --verbose
> --sql_connection=mysql://root:nova at x.y.32.184/nova
> --network_manager=nova.network.manager.FlatDHCPManager
> --flat_interface=eth1.416
> --public_interface=eth0
> -------
> # brctl show
> bridge name ? ? bridge id ? ? ? ? ? ? ? STP enabled ? ? interfaces
> br100 ? ? ? ? ? 8000.00237d963199 ? ? ? no ? ? ? ? ? ? ?eth1.416
> virbr0 ? ? ? ? ?8000.000000000000 ? ? ? yes
> ------
> Since VMs are running on the bridge interface (br100) and vlan-tagging will
> be taken care of by eth1.416, should communication between VMs in different
> hosts work fine?
> If this is not right configuration, do I have to configure VlanManager mode?
> Thanks,
> -Myungjin Lee
>
> _______________________________________________
> Openstack-operators mailing list
> Openstack-operators at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-operators
>
>



--
Jeff Kramer
jeffkramer at gmail.com
http://www.jeffkramer.org/