Jump to content

Recommended Posts

Posted

I have a server that I'm going to start trialling KVM, it's running Ubuntu 9.0.4 & I have KVM

running OK but I'm having trouble getting my brain round how Ubuntu decides which netcard gets which

ip address & then how to setup bridging.

 

The server has 6 Gb cards, two onboard(currently eth0,eth1)that I'd like to keep for management etc

& a quad port card that I'd like to bridge two for virtual machines & bond two for access to our new

SAN when it arrives.

 

Currently I have configured the server with the two onboard ports (see interfaces file below) but I

can't get my brain round is how it's know's what IP address to give to each card (used to go by MAC

address) & how to setup the bridging & bonding bit for the quad port card, the server sees them OK

in /var/log/messages as eth2,3,4,5 but they aren't configured.

 

I have looked at loads on setting up the bridging but only on single cards not multiples so if

anyone could point me in the right direction I'd be very appreciative.

 

Thanks

Brian Chivers

 

 

# This file describes the network interfaces available on your system

# and how to activate them. For more information, see interfaces(5).

 

# The loopback network interface

auto lo eth0 eth1

iface lo inet loopback

 

# The primary network interface

iface eth0 inet static

address 192.168.210.1

netmask 255.255.0.0

network 192.168.0.0

broadcast 192.168.255.255

gateway 192.168.0.2

# dns-* options are implemented by the resolvconf package, if installed

dns-nameservers 192.168.0.1

dns-search portsmouth-college.ac.uk

 

iface eth1 inet static

address 192.168.210.2

netmask 255.255.0.0

broadcast 192.168.255.255

network 192.168.0.0

Posted
I have looked at loads on setting up the bridging but only on single cards not multiples so if anyone could point me in the right direction I'd be very appreciative.

 

A quick Google for "ubuntu port bonding" brought up this:

 

https://wiki.ubuntu.com/LinkAggregation

 

Which seems quite simple. Forget "bridging", that's something else entirely (a software version of a network switch), you want "bonding", which from the link above should simply be a case of defining a "bond" interface (i.e. "bond0", like "eth0") and listing the eth interfaces you want in it, along with giving it wahtever IP address you want:

 

auto bond0
iface bond0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.254
dns-nameservers 192.168.1.254
post-up ifenslave bond0 eth0 eth1
pre-down ifenslave -d bond0 eth0 eth1

 

You might need to install a bonding driver (ifenslave) before you start, and the documentation there doesn't seem too keen on Ubuntu's network manager, recommending you remove it. IEEE 802.3ad support on the switch is also handy, seemingly.

 

This related thread from a couple of months ago might have some useful information in it:

 

http://www.edugeek.net/forums/thin-client-virtual-machines/39439-drbd-nic-bonding-load-balancing-openfiler.html

 

--

David Hicks

Posted

Currently I have configured the server with the two onboard ports (see interfaces file below) but I

can't get my brain round is how it's know's what IP address to give to each card (used to go by MAC

address) & how to setup the bridging & bonding bit for the quad port card, the server sees them OK

in /var/log/messages as eth2,3,4,5 but they aren't configured.

 

If Ubuntu works the same as Debian (which it normally does) and you are using udev (which you probably are) your device names are defined by MAC in /etc/udev/rules.d/70-persistent-net.rules and then mapped to IP addresses in /etc/network/interfaces.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...