Unable to get ip from DHCP for VMs and LXCs

tolrahC

New Member
Sep 30, 2022
2
0
1
Hi all,

I just installed a new Proxmox server and created a cluster with my other Proxmox server, only for the ease of migrating VM from one server to an other. I have an issue with the new one, VMs and containers doesn't get IP from the DHCP.

TCPDUMP on the VM output nothing, it output the following from the host (Vlan 30 is the right one):
Code:
21:12:36.961810 xx:xx:xx:xx:f7:e2 (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 346: vlan 30, p 0, ethertype IPv4 (0x0800), 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from xx:xx:xx:xx:f7:e2 (oui Unknown), length 300
21:12:37.989921 xx:xx:xx:xx:f7:e2 (oui Unknown) > Broadcast, ethertype 802.1Q (0x8100), length 346: vlan 30, p 0, ethertype IPv4 (0x0800), 0.0.0.0.bootpc > 255.255.255.255.bootps: BOOTP/DHCP, Request from xx:xx:xx:xx:f7:e2 (oui Unknown), length 300

I can see from the router logs that he receive the request and offer an IP, but there is no acknowledge:
Code:
Oct 5 21:12:36    dhcpd    68635    DHCPDISCOVER from xx:xx:xx:xx:f7:e2 via vtnet3.30
Oct 5 21:12:36    dhcpd    68635    DHCPOFFER on 10.90.0.28 to xx:xx:xx:xx:f7:e2 via vtnet3.30

Here are the different network config files from the host:

Code:
cat /etc/network/intefaces

auto lo
iface lo inet loopback

iface ens6 inet manual

iface enp1s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.1.3/28
        gateway 192.168.1.1
        bridge-ports ens6
        bridge-stp off
        bridge-fd 0

auto vmbr1
iface vmbr1 inet manual
        bridge-ports enp1s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 2-4094

Code:
cat /etc/pve/qemu-server/104.conf
 
boot: order=scsi0;ide2;net0
cores: 2
ide2: Misc:iso/debian-11.5.0-amd64-netinst.iso,media=cdrom,size=382M
memory: 4096
meta: creation-qemu=7.0.0,ctime=1664644247
name: InfluxDB
net0: virtio=xx:xx:xx:xx:F7:E2,bridge=vmbr1,firewall=1,tag=30
numa: 1
onboot: 1
ostype: l26
scsi0: Misc:104/vm-104-disk-0.qcow2,size=200G
scsi1: Misc:104/vm-104-disk-1.qcow2,size=32G
scsihw: virtio-scsi-pci
smbios1: uuid=f5887e47-05ae-46a3-a5c5-c2aab93c037a
sockets: 2
startup: order=2
vmgenid: 7ce70eb7-d400-4145-97a6-ad8975eacf95

Here's the config from my switch port (Cisco 2940):
Code:
interface FastEthernet0/8
 switchport trunk native vlan 30
 switchport trunk allowed vlan 1,30
 switchport mode trunk

Hope I provided enough information, thanks for your help.
 
I got it working by removing the vlan tag in the configuration. So far it's not a big concern, since I only plan to user this vlan for the VMs that will be running, but I'd like to understand how I could have multiple vlan working together.
 
I think you may need to either remove the tag (as you've done) or change the PVID on the switch to 1. If both are set the same, the switch is likely to remove the tag and the frame will end up in vlan 1 on the router. I have a similar issue where the dhcprequest comes in tagged on a proxmox interface but is not further propagated to an Opnsense interface in a VM. Strange thing is that is only happening on 3 of the 5 vlans I've configured. The setting are really all the same. Very frustrating.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!