[SOLVED]KVM VM not passing traffic to network

Issues related to configuring your network
Post Reply
jabster
Posts: 2
Joined: 2018/02/23 00:15:13

[SOLVED]KVM VM not passing traffic to network

Post by jabster » 2018/02/23 00:44:40

Hello All
I have been trying to get a Multiple Bridge, Multiple VLAN, and Bond Configuration working. As of right now i have only tried a single vlan with no success. The KVM host is connected to a Cisco switch. When i do a tcpdump from the KVM host for the br20 interface i can see the traffic making it at least that far but not to the VM. On the switch I can see the VMs mac address for the vlan. Below is some output and the configurations for the interfaces.

VM's mac address on the switch

Code: Select all

Vlan    Mac Address       Type        Ports
----    -----------       --------    -----
  20    5254.004a.f01b    DYNAMIC     Po2
Total Mac Addresses for this criterion: 1
Cisco Switch port channel config

Code: Select all

interface Port-channel2
 switchport trunk allowed vlan 20
 switchport trunk encapsulation dot1q
 switchport mode trunk
 switchport nonegotiate
 ip arp inspection trust
 macro description TRUNK
 spanning-tree bpdufilter enable
 ip dhcp snooping trust
end
ip link

Code: Select all

6: enp11s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:e0:4c:69:65:a6 brd ff:ff:ff:ff:ff:ff
7: enp12s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:e0:4c:69:65:a6 brd ff:ff:ff:ff:ff:ff
8: enp13s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:e0:4c:69:65:a6 brd ff:ff:ff:ff:ff:ff
9: enp14s0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond0 state UP mode DEFAULT qlen 1000
    link/ether 00:e0:4c:69:65:a6 brd ff:ff:ff:ff:ff:ff
10: enp19s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT qlen 1000
    link/ether 40:16:7e:20:8e:d2 brd ff:ff:ff:ff:ff:ff
11: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT qlen 1000
    link/ether 00:e0:4c:69:65:a6 brd ff:ff:ff:ff:ff:ff
12: bond0.20@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master br20 state UP mode DEFAULT qlen 1000
    link/ether 00:e0:4c:69:65:a6 brd ff:ff:ff:ff:ff:ff
13: br20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT qlen 1000
    link/ether 00:e0:4c:69:65:a6 brd ff:ff:ff:ff:ff:ff
14: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master br20 state UNKNOWN mode DEFAULT qlen 1000
    link/ether fe:54:00:4a:f0:1b brd ff:ff:ff:ff:ff:ff
/etc/sysconfig/network-scripts/ifcfg-enp11s0

Code: Select all

NM_CONTROLLED=no
BOOTPROTO=none
DEVICE="enp11s0"
ONBOOT="yes"
MASTER="bond0"
SLAVE="yes"
/etc/sysconfig/network-scripts/ifcfg-enp12s0

Code: Select all

NM_CONTROLLED=no
DEVICE="enp12s0"
ONBOOT="yes"
MASTER="bond0"
SLAVE="yes"
/etc/sysconfig/network-scripts/ifcfg-enp13s0

Code: Select all

NM_CONTROLLED=no
BOOTPROTO=none
DEVICE="enp13s0"
ONBOOT="yes"
MASTER="bond0"
SLAVE="yes"
/etc/sysconfig/network-scripts/ifcfg-enp14s0

Code: Select all

NM_CONTROLLED=no
BOOTPROTO=none
DEVICE="enp14s0"
ONBOOT="yes"
MASTER="bond0"
SLAVE="yes"
/etc/sysconfig/network-scripts/ifcfg-bond0

Code: Select all

DEVICE="bond0"
NM_CONTROLLED=no
USERCTL=no
BOOTPROTO=none
BONDING_OPTS="mode=4 miimon=100"
TYPE=Ethernet
/etc/sysconfig/network-scripts/ifcfg-bond0.20

Code: Select all

DEVICE=bond0.20
VLAN=yes
BOOTPROTO=none
NM_CONTROLLED=no
BRIDGE=br20
/etc/sysconfig/network-scripts/ifcfg-br0.20

Code: Select all

TYPE=Bridge
NM_CONTROLLED=no
BOOTPROTO=none
DEVICE=br20
ONBOOT=yes
VLAN=yes
virsh iface-dumpxml br20

Code: Select all

<interface type='bridge' name='br20'>
  <protocol family='ipv6'>
    <ip address='fe80::2e0:4cff:fe69:65a6' prefix='64'/>
  </protocol>
  <bridge>
    <interface type='ethernet' name='vnet0'>
      <link state='unknown'/>
      <mac address='fe:54:00:4a:f0:1b'/>
    </interface>
    <interface type='vlan' name='bond0.20'>
      <link speed='1000' state='up'/>
      <vlan tag='20'>
        <interface name='bond0'/>
      </vlan>
    </interface>
  </bridge>
</interface>

Last edited by jabster on 2018/03/07 03:30:22, edited 1 time in total.

hunter86_bg
Posts: 2019
Joined: 2015/02/17 15:14:33
Location: Bulgaria
Contact:

Re: KVM VM not passing traffic to network

Post by hunter86_bg » 2018/02/27 05:31:13

Have you tried with untagged traffic. I beleive that linux bridges do not work very well with vlans.
Maybe you should consider using open vswitch.

Devourer
Posts: 12
Joined: 2018/01/29 10:15:59

Re: KVM VM not passing traffic to network

Post by Devourer » 2018/02/27 08:18:38

I have done it before, it is working fine with vlans I can confirm that, doesn't your VM xml should be on "bridge" ? Can't remember exactly

jabster
Posts: 2
Joined: 2018/02/23 00:15:13

Re: KVM VM not passing traffic to network

Post by jabster » 2018/03/07 03:29:02

Yes i checked untagged traffic as well i had the same problem. I am still not sure what my problem was but i ended up using openvswitch and that worked without any problems.

Post Reply