[CentOS-virt] VLAN bridge config for xen - Was: Controlling allocation of ethernet devices and KVM

Christopher G. Stach II cgs at ldsys.net
Fri Nov 27 23:14:51 UTC 2009


----- "Tait Clarridge" <tait at clarridge.ca> wrote:

> Interesting, thanks for the info. Can I specify which VLANs it is
> going
> to configure and bridge?

Example bridge interface:

/etc/sysconfig/network-scripts/ifcfg-br10:
DEVICE=br10
TYPE=Bridge
BOOTPROTO=none
ONBOOT=yes
DELAY=0
STP=on

Example vlan interface on a bridge (you can do this with physical interfaces, as well):

/etc/sysconfig/network-scripts/ifcfg-bond0.10:
DEVICE=bond0.10
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
VLAN=yes
BRIDGE=br10

Example bonded slave physical interface:

/etc/sysconfig/network-scripts/ifcfg-eth0:
DEVICE=eth0
BOOTPROTO=none
HWADDR=xx:xx:xx:xx:xx:xx
ONBOOT=yes
TYPE=Ethernet
MASTER=bond0
SLAVE=yes
USERCTL=no

Example master for bonding:

/etc/sysconfig/network-scripts/ifcfg-bond0:
DEVICE=bond0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no

The bonding parameters are set in /etc/modprobe.conf. e.g.:

alias bond0 bonding
options bond0 mode=balance-rr miimon=100 updelay=1000

-- 
Christopher G. Stach II




More information about the CentOS-virt mailing list