Web lists-archives.com

Ethernet card locking up when acting as virtual bridge




Im trying to use a 3Com Etherlink Model 3C905C to provide network access for some virtual machines running under QEMU.

The machine has a Realtek Gigabit Ethernet controller on the motherboard which I use solely for the hosts network interface. I've added a 3Com PCI card to act as the interface solely for the VMs allowing them to have IPs on the real network rather than using QEMUs NAT.

My configuration is below. Initially it worked fine, except that once in a while the card would seemingly 'lock up' i.e no VMs could get network access but unplugging and replugging the Cat 5 cable fixed it.

Recently however the issue has been occuring more and more, sometimes some VMs can get network access and not others. Ive tried swapping the card for an identical model but its made no difference. Im not sure if it something to do with my config (maybe the made up MAC addresses?) or if its a bug in the cards driver or firmware.

Config is below eth0 is the hosts Realtek port, enp3s0 is the 3Com used for the VMs

The host OS is Stretch
Am I doing something wrong or is this a bug?

Many thanks

======================
/etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback




auto eth0
iface eth0 inet static
        address 192.168.253.201
        netmask 255.255.255.0
        broadcast 192.168.253.255
        dns-nameservers 192.168.253.254
        up /sbin/route add default gw 192.168.253.254 dev eth0



auto enp3s0
auto br1
iface br1 inet dhcp
        bridge_ports enp3s0
        bridge_stp off
        bridge_fd 0
        bridge_maxwait 0
======================

The script I use to start QEMU contains lines like this for each VM:

#host debian9test vnc on port 5902, give it virtual hub port br1p1
tunctl -u root -t br1p1 #create TAP device br1p1
brctl addif br1 br1p1 #add br1p1 as a port on bridge br1
kvm -hda /var/qemuvm/debian9test.img  -m 1024 -usb \
-net nic,macaddr=52:54:00:00:00:02 -net tap,ifname=br1p1 -vnc 192.168.253.201:2 &


#host bitsafe vnc on port 5904, give it virtual hub port br1p2
tunctl -u root -t br1p2  #create TAP device br1p2
brctl addif br1 br1p2  # add br1p2 as a port on bridge br1
kvm -hda /dev/disk/by-id/ata-TOSHIBA_HDWJ110_37K1P2AET \
-hdb /dev/disk/by-id/ata-TOSHIBA_HDWJ110_37UNTL5IT \
-m 1024 -usb -net nic,macaddr=52:54:00:00:00:04  \
-net tap,ifname=br1p2 -vnc 192.168.253.201:4 &


#host gatekeeper (RADIUS) vnc on port 5905, give it virtual hub port br1p3
tunctl -u root -t br1p3 #create TAP device br1p3
brctl addif br1 br1p3 #add br1p3 as a port on bridge br1
kvm -hda /var/qemuvm/debian-gatekeeper.img \
-m 1024 -usb -net nic,macaddr=52:54:00:00:00:05 \
-net tap,ifname=br1p3 -vnc 192.168.253.201:5 &


======================
Output from ifconfig:

br1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.253.80  netmask 255.255.255.0  broadcast 192.168.253.255
        inet6 fe80::250:daff:fe3b:9a4d  prefixlen 64  scopeid 0x20<link>
        ether 00:50:da:3b:9a:4d  txqueuelen 1000  (Ethernet)
        RX packets 22633  bytes 1224397 (1.1 MiB)
        RX errors 0  dropped 9  overruns 0  frame 0
        TX packets 159  bytes 18064 (17.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br1p1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 76:73:87:89:3c:f1  txqueuelen 1000  (Ethernet)
        RX packets 1391  bytes 97413 (95.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 22130  bytes 1514391 (1.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br1p2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 82:e0:2d:0d:d8:26  txqueuelen 1000  (Ethernet)
        RX packets 4416  bytes 337769 (329.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 25436  bytes 1728395 (1.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

br1p3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 26:67:8d:04:5c:b9  txqueuelen 1000  (Ethernet)
        RX packets 329  bytes 38930 (38.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 22583  bytes 1553522 (1.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

enp3s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:50:da:3b:9a:4d  txqueuelen 1000  (Ethernet)
        RX packets 27632  bytes 2188088 (2.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6303  bytes 493295 (481.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 20  base 0x5000

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.253.201  netmask 255.255.255.0  broadcast 192.168.253.255
        inet6 fe80::21f:d0ff:fe08:8bc6  prefixlen 64  scopeid 0x20<link>
        ether 00:1f:d0:08:8b:c6  txqueuelen 1000  (Ethernet)
        RX packets 22949  bytes 20198348 (19.2 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 24046  bytes 1880515 (1.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1  (Local Loopback)
        RX packets 26302  bytes 1783961 (1.7 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 26302  bytes 1783961 (1.7 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0