[one-users] bridging for opennebula in ubuntu

tedbs tedbs at gtsum.com
Wed Jul 14 20:19:24 PDT 2010


Does the ifconfig output give you any clues about the external IP address? Are you using a firewall on the external interface? Can you show a copy of your /etc/network/interfaces file?

Getting an address using DHCP should not be a problem.

Please remember to reply to the group so that everybody can see and perhaps benefit from the information. And perhaps someone knows how to set up a bridge without an IP address on the bridge - just IP addresses on the virtual machines.

Ted Bodfish

-----Original Message-----
From: Ross Nordeen [mailto:rjnordee at mtu.edu] 
Sent: July-14-10 6:26 PM
To: tedbs
Subject: Re: [one-users] bridging for opennebula in ubuntu

Hi thanks so much for your help with this bridging.  I used your configuration and it was exactly what i needed, however when i rebooted i did not get an address on my external bridge interface even though it is statically defined...this may be an issue with my dhcp servers here, is there any trouble in using dhcp for the external bridge?  or does that screw it up?   Thanks

--
Ross Nordeen
Computer Networking And Systems Administration
Michigan Technological University
http://www.linkedin.com/in/rjnordee

----- Original Message -----
From: "tedbs" <tedbs at gtsum.com>
To: users at lists.opennebula.org, "Ross Nordeen" <rjnordee at mtu.edu>
Sent: Thursday, July 8, 2010 9:20:26 AM GMT -07:00 US/Canada Mountain
Subject: RE: [one-users] bridging for opennebula in ubuntu

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