Hi all,
I would like to configure a guest VM which will have two network interfaces in different VLANs (106,711).
the host configuration looks as follows:
/etc/sysconfig/network-scripts/ifcfg-eth0 (connected to a trunk port)
Code:
DEVICE=eth0
BOOTPROTO=none
HWADDR=00:22:19:D4:25:A8
IPV6INIT=no
IPV6_AUTOCONF=no
ONBOOT=yes
TYPE=Ethernet
/etc/sysconfig/network-scripts/ifcfg-eth0.106
Code:
DEVICE=eth0.106
BOOTPROTO=none
HWADDR=00:22:19:D4:25:A8
ONBOOT=yes
TYPE=Ethernet
VLAN=yes
/etc/sysconfig/network-scripts/ifcfg-eth0.711
Code:
DEVICE=eth0.711
BOOTPROTO=none
HWADDR=00:22:19:D4:25:A8
ONBOOT=yes
TYPE=Ethernet
VLAN=yes
Then I added two bridges for both VLANs
Code:
brctl addbr br0
brctl addif br0 eth0.711
ifconfig br0 10.56.2.2 netmask 255.255.255.240 up
brctl addbr br1
brctl addif br1 eth0.106
ifconfig br1 10.238.22.8 netmask 255.255.255.0
and created two tap interfaces and added them to the corresponding bridges.
Code:
tunctl -b -u root
ifconfig tap0 up
brctl addif br0 tap0
tunctl -b -u root
ifconfig tap1 up
brctl addif br1 tap1
The
brctl show command output looks fine:
Code:
brctl show
bridge name bridge id STP enabled interfaces
br0 8000.002219d425a8 no tap0
eth0.711
br1 8000.002219d425a8 no tap1
eth0.106
The virtual machine is started
Code:
/usr/libexec/qemu-kvm -hda /data/disk.raw -smp 2 -m 2G -net nic,macaddr=52:54:00:12:34:55 -net tap,ifname=tap0,script=no -net nic,macaddr=52:54:00:12:34:75 -net tap,ifname=tap1,script=no
The guest has 2 interfaces (eth0=tap0,eth1=tap1)
The problem I have is that even though the tap1 interface is bridged to the VLAN 106 the eth1 interface in the guest still gets an IP address from the VLAN 711. Is my setup correct or am I missing anything?
I use CentOS 5.6 as the host system.
Thanks for your help
Tomas