NetBSD-Bugs archive

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

kern/57830: Xennet devices don't work properly with other NetBSD10 clients



>Number:         57830
>Category:       kern
>Synopsis:       Xennet devices don't work properly with other NetBSD10 clients
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jan 08 08:25:00 +0000 2024
>Originator:     Dean Anderson
>Release:        10.0 Beta, 10.0RC1, 10.0RC2
>Organization:
na
>Environment:
NetBSD ansible1.av8.net 10.0_RC1 NetBSD 10.0_RC1 (GENERIC) #0: Sun Nov  5 18:30:08 UTC 2023  mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64

>Description:
Under xen 4.17 running on Kali Linux, netbsd 10x clients use xennet0 even when running as hvm guests.  This is a change from 9.3, which would have used re0 emulated interfaces.

The problem is rather strange, in that dhcp works, but no other IP works, and since ARP times out, I'm not clear how dhcp worked between them.  And it has no problem with other kinds of guests: Netbsd93,92, Freebsd, and linux.   Kali has some quirks, as can be observed by the interfaces file. This setup runs in an off-network lab with a Cisco router and real servers under test.

Anyway, as an HVM client, I would expect they're using emulated devices. I'm not a big fan of detecting XEN and then trying to use a XEN driver. If I wanted that behavior, I'd have used a PV configuration.

I suspect I can build a kernel that will disable the xennet device, and my problem will be solved. But I thought you should know.
>How-To-Repeat:
Xen 4.17
Kali Linux 6.3.0

cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
auto eth0
#auto br1
auto eth0.700
auto br700
auto eth0.10
auto br10
auto eth0.11
auto br11
auto dummy0

iface dummy0 inet manual
        pre-up modprobe dummy
        pre-up ip link add dummy0 type dummy
        pre-up ifconfig $IFACE up arp
        pre-up ifconfig $IFACE hw ether 40:22:aa:44:bb:04
        pre-up ifconfig $IFACE 198.3.136.2 netmask 0xffffffe0
        post-up route del -net 198.3.136.0 netmask 255.255.255.224 dev dummy0
        post-up route add -net 198.3.136.0 netmask 255.255.255.224 dev br700
        post-up brctl addif br700 dummy0
        post-down ifconfig $IFACE down
        post-down ip link delete dummy0

iface lo inet loopback

iface eth0 inet manual
        pre-up ifconfig $IFACE up
        post-down ifconfig $IFACE down

#VLANS


iface eth0.700 inet manual
        pre-up ifconfig $IFACE up
        post-down ifconfig $IFACE down

#vlan 10 hypervisors
iface eth0.10 inet manual
        pre-up ifconfig $IFACE up
        post-down ifconfig $IFACE down

#vlan 11 ilo
iface eth0.11 inet manual
        pre-up ifconfig $IFACE up
        post-down ifconfig $IFACE down


#BRIDGES
#iface br1 inet manual
        #bridge_ports eth0

iface br700 inet manual
        bridge_ports dummy0 eth0.700
        bridge_stp on
        bridge_fd 0
        bridge_maxwait 5
        post-up route del -net 198.3.136.0 netmask 255.255.255.224 dev dummy0
        post-up route add -net 198.3.136.0 netmask 255.255.255.224 dev br700
        #address 198.3.136.2
        #netmask 255.255.255.224
        #post-up route add -net 198.3.136.0 netmask 0xfffff800 gw 198.3.136.1

iface br10 inet manual
        bridge_ports eth0.10
        bridge_stp on
        bridge_fd 0
        bridge_maxwait 1
        #address 198.3.136.71
        #netmask 255.255.255.192
        #post-up route add -net 198.3.136.64 netmask 255.255.255.192 dev br10

iface br11 inet manual
        bridge_ports eth0.11
        bridge_stp on
        bridge_fd 0
        bridge_maxwait 1
        #address 198.3.136.135
        #netmask 255.255.255.192
        #post-up route add -net 198.3.136.128 netmask 255.255.255.192 dev br11



Typical xen config:

cat DDns1.cfg
name="DDns1"

disk=[
#123456789
#NETBSD93#'file:/space/isos/NetBSD-9.3-amd64.iso,hdc:cdrom,r',
#NETBSD10RC1#'file:/space/isos/NetBSD-10.0_RC1-amd64.iso,hdc:cdrom,r',
#'file:/space/isos/NetBSD-10.0_RC2-amd64.iso,hdc:cdrom,r',
'tap:aio:qcow2:/space/images/DDns1.qcow2,hda,w',
'tap:aio:qcow2:/space/images/DDns1-space.qcow2,hdb,w'
]

vif=[
'mac=00:16:3e:00:00:10,type=ioemu,model=rtl8139,bridge=br700'
]

memory=256

type='hvm'

vcpus=2

boot='c'

serial='pty'


>Fix:
Disable xennet on hvm kernel.



Home | Main Index | Thread Index | Old Index