Problem with a Bridge and TUN & Vlan interfaces attached
Hello,
i have two dedicated server with two public ip. My dedicated provider has configured a vlan on tag 2019 between those two servers. So i have my physical hosts configured like this : PHYHOST1 eth0 : address : my.pub.lic.ip gw : my.provider.gate.way vlan2019 (attached to eth0 like this eth0.2019): address : 192.168.0.1 PHYHOST2 eth0 : address : another.pub.lic.ip gw : my.provider.gate.way vlan2019 (attached to eth0 like this eth0.2019): address : 192.168.0.2 now, pinging PHYHOST1 to PHYHOST2 on public ip and vlan ip is ok ie : PHYHOST1# ping 192.168.0.2 64 bytes from 192.168.0.2: icmp_seq=1 ttl=63 time=0.273 ms from host2 to host1 is ok too. Si my vlan seems to work correctly. After that i setup this thing on PHYHOST1 PHYHOST1 : eth0 : address : my.pub.lic.ip gw : my.provider.gate.way vlan2019 (attached to eth0 like this eth0.2019): address : null br0 : address : 192.168.0.1 tap0: address : null PHYHOST1# brctl show bridge name bridge id STP enabled interfaces br0 8000.525400123456 no vlan2019 tap0 So here, i create a bridge with vlan2019 and a tap interface connected. I remove the ip address for vlan and put it on the bridge. Everything's working fine. Code:
PHYHOST1# ifconfig Code:
PHYHOST1# route Code:
PHYHOST1# ping 192.168.0.2 And now i want to connect a VM on this bridge. The goal is to have this VM connected to the vlan network, so i can access it directly from any physical or virtual host connected the vlan. So i want to attach 192.168.0.3 to my VM NIC and be able to ping any other machine on the vlan. So as previously said i added vlan2019 and tap0 interface to the bridge. I'm running a KVM virtual machine with this in my starting command Code:
-net nic,model=virtio,macaddr=08:ef:50:b5:bd:03 -net tap,ifname=tap0,script=no,downscript=no eth0 : address : 192.168.0.3 gateway : 192.168.0.1 (i configure tap interface with VM a lots of time without any problem before) In my VM i can ping 192.168.0.1 (br0 ip address) but i can't ping 192.168.0.2 (PHYHOST2). ON PHYSHOST1, i can ping PHYHOST2, VM (192.168.0.3), and myself (192.168.0.1). So, how can i have my packet going from tap0 on br0 outgoing through vlan2019 to PHYHOST2. How can any packet going in this bridge be routed correctly. On my PHYHOST1 (with bridge and virtualisation) i hve ip_forward enabled. Does anybody has any clue on this ? thanks in advance |
All times are GMT -5. The time now is 04:16 PM. |