Re: Packet "leakage" between two bridges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 28, 2011 at 10:39 AM, Arun Khan <knura9@xxxxxxxxx> wrote:
> Ben and Jarrod thanks very much for sharing your thoughts.   I will
> try Jarrod's suggestion first.
>
> On Fri, Jan 28, 2011 at 2:02 AM, J L <lists@xxxxxxxx> wrote:
>
> Although the usage of VLAN is documented in the kvm man page, this did
> not strike me because my mind was set with the above assumption :)
> I will give it a shot and post my results here.
>

Success!

Here is part of the KVM script that does the trick (replace
nic_mac_addr?  with your own):

-net nic,vlan=1,model=rtl8139,macaddr=${nic_mac_addr0} \
-net tap,vlan=1,ifname=tap0,script=no,downscript=no \
-net nic,vlan=2,model=e1000,macaddr=${nic_mac_addr1} \
-net tap,vlan=2,ifname=tap1,script=no,downscript=no \

I removed eth0 from br0 and no DHCP IP on eth0 of the Guest OS.
I added eth0 back to br0: Guest OS got IP address only on eth0, eth1
was unassigned; manually assigned 172.16.0.1 to eth1

Started another KVM Guest OS with one NIC on br1 (tap2).  I assigned
172.16.0.2 to the NIC with 172.16.0.1 as the gw.  I was able to ping
172.16.0.1 but nothing on the 192.168.1.0 network.  Then I enabled NAT
on the GW and I was able to ping any host beyond the GW.

>From the "WAN" side I was able to ping only the IP on the WAN port.
Without any DNAT  rules, I could not ssh to the 172.16.0.2 box.  After
adding the relevant DNAT rule, I was able to ssh into the 172.16.0.2
Guest from my desktop (192.168.1.69).   So it turned out to be a KVM
config. issue; not with the bridge.

Jarrod thanks for pointing me in the right direction.  Your analogy
about the Linux KVM treating all the bridge and associated interfaces
as one big "switch" is excellent.  In other words the KVM becomes a
super bridge for all the net interfaces that are given to it's purview
through the various instances of VMs.

-- Arun Khan
_______________________________________________
Bridge mailing list
Bridge@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/bridge



[Index of Archives]     [Netdev]     [AoE Tools]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]     [Video 4 Linux]

  Powered by Linux