[ovs-discuss] Guest network interface with model type virtio defined in libvirt on openvswitch has no network connectivity

Vincent Li vincent.mc.li at gmail.com
Wed Aug 2 20:16:20 UTC 2017


Hi,

I compiled and installed openvswitch openvswitch-2.7.1 on my ubuntu 16.04
server, I noticed I would have network connectivity problem on KVM guest
with network interface model type virtio, ping between KVM guest and
another physical Dell R210 server appears to be working, but tcp type of
connections not working, SYN from KVM guest to Dell R210 appears to be
ignored by Dell R210.

tcpdump on Dell R210:

root at r210:~# tcpdump -nn -i em2

tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on em2, link-type EN10MB (Ethernet), capture size 65535 bytes


10:47:45.832640 IP 10.2.72.2.56286 > 10.2.72.86.9877: Flags [S], seq
3850831329, win 29200, options [mss 1460,sackOK,TS val 183908 ecr
0,nop,wscale 7], length 0
10:47:46.834635 IP 10.2.72.2.56286 > 10.2.72.86.9877: Flags [S], seq
3850831329, win 29200, options [mss 1460,sackOK,TS val 184910 ecr
0,nop,wscale 7], length 0
10:47:48.836547 IP 10.2.72.2.56286 > 10.2.72.86.9877: Flags [S], seq
3850831329, win 29200, options [mss 1460,sackOK,TS val 186912 ecr
0,nop,wscale 7], length 0


my lab as below:

two servers connected with direct 10G fiber cable

Dell R710: Ubuntu 16.04 +  OVS 2.7.1 <----->Dell R210 Ubuntu 14.04



OVS config:

root at dell710:/mnt/sdb1# ovs-vsctl show

7344de6e-8717-4a32-a883-7f6743a730fd
    Bridge "ovs-br2"
        Port "vnet3"
            Interface "vnet3"
        Port "vnet1"
            Interface "vnet1" <====vnet1 correlate to guest network
interface
        Port "enp4s0f1"
            Interface "enp4s0f1"
        Port "ovs-br2"
            Interface "ovs-br2"
                type: internal
    Bridge "ovs-br1"
        Port "ovs-br1"
            Interface "ovs-br1"
                type: internal
        Port "enp4s0f0"
            Interface "enp4s0f0"

root at dell710:/mnt/sdb1# ip link list

7: enp4s0f0: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc mq
state UP mode DEFAULT group default qlen 1000
    link/ether e8:ea:6a:06:1b:1a brd ff:ff:ff:ff:ff:ff
8: enp4s0f1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc mq
state UP mode DEFAULT group default qlen 1000
    link/ether e8:ea:6a:06:1b:1b brd ff:ff:ff:ff:ff:ff


21: ovs-netdev: <BROADCAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether 22:82:24:8f:73:d4 brd ff:ff:ff:ff:ff:ff
22: ovs-br2: <BROADCAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether e8:ea:6a:06:1b:1b brd ff:ff:ff:ff:ff:ff
23: ovs-br1: <BROADCAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether e8:ea:6a:06:1b:1a brd ff:ff:ff:ff:ff:ff
60: vnet2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master br0 state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:54:00:55:47:05 brd ff:ff:ff:ff:ff:ff
61: vnet3: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:54:00:0e:6f:7c brd ff:ff:ff:ff:ff:ff
72: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master br0 state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:54:00:29:c2:0e brd ff:ff:ff:ff:ff:ff
73: vnet1: <BROADCAST,MULTICAST,PROMISC,UP,LOWER_UP> mtu 1500 qdisc
pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:54:00:69:86:22 brd ff:ff:ff:ff:ff:ff

A test (tcp connection failed):

guest libvirt network interface with <model type='virtio'/> defined, guest xml
dump:

    <interface type='bridge'>
      <mac address='52:54:00:69:86:22'/>
      <source bridge='ovs-br2'/> <=========
      <virtualport type='openvswitch'>
        <parameters interfaceid='958ae1a6-1ee4-4f10-ac45-d43f12696ad7'/>
      </virtualport>
      <target dev='vnet1'/>
      <model type='virtio'/> <=====has network connectivity problem with
Dell R210
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </interface>

guest lspci:

00:04.0 Ethernet controller: Red Hat, Inc Virtio network device

B test (tcp connection works):

guest libvirt network interface xml without model type='virtio' defined,
guest dumpxml result as below

   <interface type='bridge'>
      <mac address='52:54:00:69:86:22'/>
      <source bridge='ovs-br2'/>
      <virtualport type='openvswitch'>
        <parameters interfaceid='958ae1a6-1ee4-4f10-ac45-d43f12696ad7'/>
      </virtualport>
      <target dev='vnet1'/>
      <model type='rtl8139'/> <====rtl8139 is automatically picked up,
networks works fine
      <alias name='net1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04'
function='0x0'/>
    </interface>

guest lspci:


00:04.0 Ethernet controller: Realtek Semiconductor Co., Ltd.
RTL-8100/8101L/8139 PCI Fast Ethernet Adapter (rev 20)

I initially thought I need to load virtio_net driver on guest  Ubuntu 14.04
qcow2 since I see no virtio_net driver loaded in guest, then I tried Centos
7 qcow2 image with virtio_net driver loaded, still have same problem.

is there anything I am missing with the guest libvirt network interface
model type virtio definition?


Regards,

Vincent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20170802/42f80acc/attachment-0001.html>


More information about the discuss mailing list