You are not logged in.

#1 2020-08-27 21:50:06

krizzo
Member
Registered: 2020-08-26
Posts: 2

KVM vm DHCP Discover not going out Bond/VLAN interface.

I have a basic arch install where the host has 2 interfaces bonded (802.3ad) and right now only a single tagged VLAN between the switch and host. I can ssh to the server as it gets an IP from my DHCP server on the VLAN bridge interface. My question is what might I be missing with the setup that isn't forwarding the Discovery packets out the bonded interface and to my network. I feel like it's something to do with my bridge settings as that seems to be were the packet gets lost.

Here is my setup trying to get an arch install iso to request an IP via DHCP.

Installed packages and enabled services for kvm.

sudo pacman -S libvert bridge-utils ebtables dnsmasq
sudo systemctl enable --now libvirtd

When doing a TCPdump on the interfaces I see the discovery packets going out the vnet0 interface and on the vlan10-bridge interface. I don't see the packets on the bond1/vlan10/eno* interfaces though.

My /etc/systemd/network/ files.

eno1.network

[Match]
Name=eno1

[Network]
Bond=bond1

eno2.network

[Match]
Name=eno2

[Network]
Bond=bond1

bond1.netdev

[NetDev]
Name=bond1
Kind=bond

[Bond]
Mode=802.3ad
TransmitHashPolicy=layer3+4
LACPTransmitRate=fast
MIIMonitorSec=1s
UpDelaySec=2s
DownDelaySec=8s

bond1.network

[Match]
Name=bond1

[Network]
BindCarrier=eno1 eno2
VLAN=vlan10

vlan10.netdev

[NetDev]
Name=vlan10
Kind=vlan

[VLAN]
Id=10

vlan10.network

[Match]
Name=vlan10

[Network]
Bridge=vlan10-bridge
DHCP=no

vlan10-bridge.netdev

[NetDev]
Name=vlan10-bridge
Kind=bridge

vlan10-bridge.network

[Match]
Name=vlan10-bridge

[Network]
DHCP=yes

[Link]
MACAddress=00:00:00:12:34:56

I set allow vlan10-bridge in /etc/qemu/bridge.conf.

The bonding interface is showing as up and working on the switch as well as the server.

cat /proc/net/bonding/bond1
Ethernet Channel Bonding Driver: v5.7.9-arch1-1

Bonding Mode: IEEE 802.3ad Dynamic link aggregation
Transmit Hash Policy: layer3+4 (1)
MII Status: up
MII Polling Interval (ms): 1000
Up Delay (ms): 2000
Down Delay (ms): 8000
Peer Notification Delay (ms): 0

802.3ad info
LACP rate: fast
Min links: 0
Aggregator selection policy (ad_select): stable

Slave Interface: eno1
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 5
Permanent HW addr: 00:00:00:12:34:56
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 1
Partner Churned Count: 1

Slave Interface: eno2
MII Status: up
Speed: 1000 Mbps
Duplex: full
Link Failure Count: 8
Permanent HW addr: 00:00:00:12:34:57
Slave queue ID: 0
Aggregator ID: 1
Actor Churn State: none
Partner Churn State: none
Actor Churned Count: 0
Partner Churned Count: 1

Interface status the bridge gets an IP from the DHCP server.

2: eno1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
    link/ether 2e:2b:ba:fd:a3:fe brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:12:34:56
    altname enp6s0f0
3: eno2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc mq master bond1 state UP group default qlen 1000
    link/ether 2e:2b:ba:fd:a3:fe brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:12:34:57
    altname enp6s0f1
4: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 2e:2b:ba:fd:a3:fe brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2c2b:baff:fefd:a3fe/64 scope link
       valid_lft forever preferred_lft forever
5: vlan10-bridge: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 00:00:00:12:34:56 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.22/24 brd 192.168.1.255 scope global dynamic vlan10-bridge
       valid_lft 76893sec preferred_lft 76893sec
    inet6 fe80::ec4:7aff:fe35:ea4/64 scope link
       valid_lft forever preferred_lft forever
6: vlan10@bond1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vlan10-bridge state UP group default qlen 1000
    link/ether 2e:2b:ba:fd:a3:fe brd ff:ff:ff:ff:ff:ff
22: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel master vlan101-bridge state UNKNOWN group default qlen 1000
    link/ether fe:54:00:36:2a:d5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc54:ff:fe36:2ad5/64 scope link
       valid_lft forever preferred_lft forever

brctl is showing both vnet0 (the guest VM) and vlan10 as part of the bridge.

brctl show vlan10-bridge
bridge name     bridge id               STP enabled     interfaces
vlan10-bridge   8000.0cc47a350ea4       no              vlan10
                                                        vnet0

Creating the VM for testing. When starting it you have to press the up arrow multiple time quickly as you need to modify the grub command before starting the install to include console=ttyS0 at the end so arch doesn't hang at a blank prompt after Loading boot/x86_64/archiso.img...ok. IF you know a better method of doing this please let me know.

wget --show-progress --progress=bar https://mirrors.xmission.com/archlinux/iso/2020.06.01/archlinux-2020.06.01-x86_64.iso -O /tmp/arch_installer.iso

sudo virt-install \
  --connect qemu:///system \
  --name arch-test \
  --memory 16384 \
  --vcpus=2,maxvcpus=8 \
  --cpu host \
  --cdrom /tmp/arch_installer.iso \
  --disk path=/var/lib/libvirt/images/arch-test.img,size=50,format=raw \
  --network bridge:vlan10-bridge \
  --virt-type kvm \
  --accelerate \
  --nographics \
  --noautoconsole && sudo virsh console arch-test

Simple TCPdump command to see the dhcp packets.

sudo tcpdump -i EACH_HOST_INTERFACE -v -s 0 port bootps or bootpc

Last edited by krizzo (2020-08-28 13:47:45)

Offline

#2 2020-08-28 13:31:05

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,916

Re: KVM vm DHCP Discover not going out Bond/VLAN interface.

--network bridge:vlan101-bridge \

Looks like the VM is trying to use a non-existent interface.

Disclaimer : I never user virt-install or systemd-networkd and could misunderstand the option.

(qemu from cli or script. VDE2 for qemu networking are what I use)

Last edited by Lone_Wolf (2020-08-28 13:32:27)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2020-08-28 14:53:00

krizzo
Member
Registered: 2020-08-26
Posts: 2

Re: KVM vm DHCP Discover not going out Bond/VLAN interface.

Thanks for pointing that out that was a typo on my part the actual command I ran is vlan10-bridge I've corrected the typo.

What's interesting is I see other DHCP DORA packets on the bond1 which are from a host in the same vlan but I don't see those packets on the vlan10-bridge. I'm still reading up on vlans and bridges it has to be something with that.

Offline

Board footer

Powered by FluxBB