[fedora-virt] question on bridging and vlans

Gianluca Cecchi gianluca.cecchi at gmail.com
Thu Nov 25 14:41:56 UTC 2010


Hello,
I have a test rh el 6 server where I have 6 network adapters, but I
think my idea could also cover for example an F13 server with
virt-preview repo...
eth0 and eth1 are dedicated for bond0 and main ip for kvm host
eth4 and eth5 are dedicated as multipath iSCSI initiators for
configuring storage pools on disks presented by an iSCSI SAN array

I would like to dedicate eth2 and eth3 to network for my guests, but I
want to cover multiple vlans.
Suppose I want to cover vlanid=1 and vlanid=2

Here is my planned approach

1) configure bond1 with eth1 and eth2 as slaves
Something like
# cat ifcfg-eth2
DEVICE="eth2"
HWADDR="xxxxxxxxxxxxx"
NM_CONTROLLED="no"
ONBOOT="yes"
SLAVE=yes
MASTER=bond1
MTU=9000

--> is it ok to put MTU line here or do I have to put it at bond
interface definition level?

2) bond1 is without ip/netmask information; something like
DEVICE=bond1
BOOTPROTO=none
ONBOOT=yes
TYPE=Ethernet

3) create bond1.1 script something like this:
DEVICE=bond1.1
ONBOOT=yes
BOOTPROTO=none
VID=1
VLAN=yes
IPADDR=myip.1
NETMASK=mynet.1
BROADCAST=mybroadcast.1
BRIDGE=brvlan1

4) create bond1.2 script something like this:
DEVICE=bond1.2
ONBOOT=yes
BOOTPROTO=none
VID=2
VLAN=yes
IPADDR=myip.2
NETMASK=mynet.2
BROADCAST=mybroadcast.2
BRIDGE=brvlan2

5) create brvlan1 script
DEVICE=brvlan1
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes
DELAY=0

6) create brvlan2 script
DEVICE=brvlan2
TYPE=Bridge
BOOTPROTO=dhcp
ONBOOT=yes
DELAY=0

QUESTION: is it necessary to put BOOTPROTO=dhcp for bridge interfaces?
Can I put a static ip or better no ip at all?

7) service network restart with eventually adjustments fro iptables

8) service libvirtd reload

If the steps above make sense

9) If I want a guest on vlan1 I have to assign it
shared physical device --> brvlan1

QUESTION: in guest do I have to tag the lan or should it be
transparent with the guest?

Otherwise: waht would be a correct different way of proceeding?

If my approach is correct, would it make sense to have similar
approache for bond0, so that I can use this bond interface for guests
too?

Thanks in advance.

Gianluca


More information about the virt mailing list