[one-users] bridging for opennebula in ubuntu

tedbs tedbs at gtsum.com
Thu Jul 8 08:20:26 PDT 2010


I have had some success setting up bridging in ubuntu, although I still have some unresolved issues. Here's what I have working so far:

On the host machines:

Edit /etc/udev/rules.d/70-persistent-net.rules to ensure that it
has the correct adapter name (eth0/eth1) for each NIC's MAC address.

Make sure you have installed bridging.

 $ sudo apt-get install bridge-utils

Edit /etc/network/interfaces to have the correct settings for the NICs and the bridges. My settings are as follows (substitute your own network addresses):

# Primary (internal) network interface
auto eth0
iface eth0 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

# Primary (internal) cloud bridge interface
auto clbrint
iface clbrint inet static
	address <internal IP address>
	netmask 255.255.255.0
	network <internal network address>
	broadcast <internal broadcast address>
	gateway <internal gateway address>
	bridge_ports eth0
	bridge_fd 9
	bridge_hello 2
	bridge_maxage 12
	bridge_maxwait 5
	bridge_stp off

# Secondary (external) network interface
auto eth1
iface eth1 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

# Secondary (external) cloud bridge interface
auto clbrext
iface clbrext inet manual
	address <external IP address>
	netmask 255.255.255.0
	network <external network address>
	broadcast <external broadcast address>
	gateway <external gateway address>
	bridge_ports eth1
	bridge_fd 9
	bridge_hello 2
	bridge_maxage 12
	bridge_maxwait 5
	bridge_stp off

Edit /etc/sysctl.conf to make sure you have the line
net.ipv4.ip_forward=1
uncommented and add the lines
# cloud bridge
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0

I'm using libvirt and KVM to manage my virtual machines. I removed the default bridge as follows:

 $ sudo rm /etc/libvirt/qemu/networks/autostart/default.xml
 $ sudo ifconfig virbr0 down
 $ sudo brctl delbr virbr0

After all of this, reboot the host machine.

It all works for me but I am still having a difficulty. I wish to remove the ip address from the external bridge clbrext. However, when I do that, the virtual machines cannot be reached on the network. Anybody have any ideas how to make that work?

Ted Bodfish

-----Original Message-----
From: Ross Nordeen [mailto:rjnordee at mtu.edu] 
Sent: July-07-10 12:48 PM
To: users at lists.opennebula.org
Subject: [one-users] bridging for opennebula in ubuntu

What is the best way to set up bridges in ubuntu to work with opennebula?

i did:

brctl addbr br0
brctl addif br0 eth0

and have the bridge an ip and brought it up but i still dont think its right because when i turn it on i can no longer list my nodes with onevm list

also I have 2 interfaces on both my head and compute nodes, eth0 is connected to a private lan and eth1 is connected directly to the internet.

-Ross



More information about the Users mailing list