guest MAC leaking into world, packets don't return

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

 



My quick search thru the archives didn't turn up a match. I didn't see anything obvious in bugzilla.redhat.com either. Hopefully my search-foo was sufficient to not offend.

In the interst of keeping this short, I have a longer writeup with various 'virsh' output over at http://www.linux-kvm.com/content/how-configure-kvm-host-network-using-vlan-virtual-machine. Hmmm, unfortunately it seems to have eaten important parts of the post since they looked like HTML tags. sorry about that.

My KVM host is v0.9.10 on CentOS. I have 2 interfaces bonded. The switch side is set to TRUNK mode and requires VLAN tags. On the host I have added bond0 as a bound interface to bridge 'shared' and several bond0.NN defined (but NOT slaved to the bridge) to support a variety of VLANs. Works great.

The guest's network must naturally use VLAN tags or it won't get past the switch. So I've defined 'eth0.NN' just like I've done on the host via ifcfg-* files.

The short and long is 'brctl showmacs' shows the guest's MAC as 52:54:00:c9:8d:d1. It's on port #2, marked local=no and eventually ages out. But there is another MAC on port 2 that is the same except it starts with 'fe'. My understanding is that this latter one is expected and normal.

What I can't explain is that when I tcpdump on bond0 or bond0.NN I'm seeing the guest's private MAC being used instead of the mangled 'fe:' one. It is my guess that since the packet is written incorrectly it can't return to the guest thru 'vnet0' because the the tap is looking for 'fe:'

Wasn't the host supposed to rewrite the MAC address as they enter/leave vnet0 in a manner similar to NAT?


I defined a Qemu Network:
<network>
  <name>bridge-shared</name>
  <uuid>0824e08b-bb0e-452a-e2c9-dcca52af2341</uuid>
  <forward mode='bridge'/>
  <bridge name='shared' />
</network>

This is the interface section from my guest's XML.
    <interface type='bridge'>
      <mac address='52:54:00:c9:8d:d1'/>
      <source bridge='shared'/>
      <model type='virtio'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </interface>

[root@kvm1b ~]# virsh domiflist test
Interface  Type       Source     Model       MAC
-------------------------------------------------------
vnet0      bridge     shared     virtio      52:54:00:c9:8d:d1


[root@kvm1b networks]# virsh iface-dumpxml shared
<interface type='bridge' name='shared'>
  <protocol family='ipv6'>
    <ip address='fe80::225:90ff:fe4c:ba92' prefix='64'/>
  </protocol>
  <bridge>
    <interface type='bond' name='bond0'>
      <bond>
        <interface type='ethernet' name='eth0'>
          <mac address='00:25:90:4c:ba:92'/>
        </interface>
        <interface type='ethernet' name='eth1'>
          <mac address='00:25:90:4c:ba:92'/>
        </interface>
      </bond>
    </interface>
    <interface type='ethernet' name='vnet0'>
      <mac address='fe:54:00:c9:8d:d1'/>
    </interface>
  </bridge>
</interface>

--
Cloud Services Architect, Senior System Administrator
InfoRelay Online Systems (www.inforelay.com)
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux