I'm trying to setup an VLAN setup, on my KVM "box", which should look something like this.
(guestvms)<->KVMBOX<-SWITCH->IP-cam
The Guests on the KVM box, should actually be able to talk to the IPcam, on the same VLAN(100).
I have an setup on the KVM box like so, which, is what should be done (of what I can read online) ??.
Maybe there is another approach?
Code:
#auto eth0
iface eth0 inet manual
#create vlan interface
auto eth0.100
iface eth0.100 inet manual
vlan_raw_device eth0
auto vbr100
iface vbr100 inet static
hwaddress ether xx:xx:xx:xx:xx:xx
address 192.168.10.11
netmask 255.255.255.0
network 192.168.10.0
gateway 192.168.10.1
bridge_ports eth0.100
bridge_stp off
bridge_fd 0
The interface of the guest(s) is set like so.
Code:
<source bridge='vbr100'/>
I actually have two KVM guests, and these machines can ping each other (but hey, as long they are part of the same KVM interface, it does not really matter), so far so good.
But how can I detect that these are in fact VLAN "enabled" guests ?
If i set the interface on guests as below, and try to ping between the two guests, I can detect the vlan id from the KVM host, with tcpdump "tcpdump -i vbr100 -e |grep 'vlan 100'"
Code:
auto eth0.100
iface eth0.100 inet static
address 192.168.10.99
network 192.168.10.0
netmask 255.255.255.0
gateway 192.168.10.1
But not if I do it like so
Code:
auto eth0
iface eth0 inet static
address 192.168.10.99
network 192.168.10.0
netmask 255.255.255.0
gateway 192.168.10.1
I find my self kinda stuck, on how to proceed, to be sure that the guests are actually working in VLAN100, so they would be able to talk to the IPCam which is also part of VLAN100 (on the switch)?