Proxmox VMs do not get an IP from my DHCP server

siryarbles

New Member
Mar 20, 2023
3
1
3
Hi all,

I am new to Proxmox and have run into an issue where none of my VMs are getting an IP from my DHCP server. I am running PFSense on my router and have 16 port smart switch configured with VLANs.

My proxmox host is on an intel NUC and it can ping my gateway and access the internet. The gateway is also the DHCP server so there should be no issues getting an IP from it. The proxmox host has successfully been given a static IP from my PFSense DHCP Server. Here is my current config:

Code:
auto lo
iface lo inet loopback

iface enp89s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.20.2/24
        gateway 192.168.20.1
        bridge-ports enp89s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes

auto vmbr1
iface vmbr1 inet dhcp
        bridge-ports none
        bridge-stp off
        bridge-fd 0

iface wlo1 inet manual

I created vmbr1 just for testing purposes but when I assign either vmbr0 or vmbr1 to the VM it has the same effect. No IP is given to the VM and it cant route or reach the host either. Any help would be greatly appreciated.
 
Have you enabled IPv4 forwarding on your host?

You can enable it this way:
Bash:
echo 1 > /proc/sys/net/ipv4/ip_forward

To really ensure it's always enabled, add it to your network configuration; something like this:
Code:
auto lo
iface lo inet loopback

iface enp89s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.20.2/24
        gateway 192.168.20.1
        bridge-ports enp89s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes

auto vmbr1
iface vmbr1 inet dhcp
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward

iface wlo1 inet manual

That way IP forwarding always gets enabled when vmbr1 goes online. You can also add post-down echo 0 > /proc/sys/net/ipv4/ip_forward if you want to disable it once the bridge goes offline again. Note that IP forwarding isn't limited to just that bridge there; it really just gets enabled once the bridge is brought online.
 
Have you enabled IPv4 forwarding on your host?

You can enable it this way:
Bash:
echo 1 > /proc/sys/net/ipv4/ip_forward

To really ensure it's always enabled, add it to your network configuration; something like this:
Code:
auto lo
iface lo inet loopback

iface enp89s0 inet manual

auto vmbr0
iface vmbr0 inet static
        address 192.168.20.2/24
        gateway 192.168.20.1
        bridge-ports enp89s0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes

auto vmbr1
iface vmbr1 inet dhcp
        bridge-ports none
        bridge-stp off
        bridge-fd 0
        post-up echo 1 > /proc/sys/net/ipv4/ip_forward

iface wlo1 inet manual

That way IP forwarding always gets enabled when vmbr1 goes online. You can also add post-down echo 0 > /proc/sys/net/ipv4/ip_forward if you want to disable it once the bridge goes offline again. Note that IP forwarding isn't limited to just that bridge there; it really just gets enabled once the bridge is brought online.
So I finally got this to work by selecting the Realtek Drivers when selecting the interface for the VMs. Which is strange cause I am using an intel nuc lol
 
  • Like
Reactions: venquessa
Thank you. I had exactly this issue.

DHCP running in VM 100 working fine.
Installing Windows10 on VM 101 and "No network".
Found this post and thank you returning to give your solutions.
Changed the adapter driver from VirtIO to RT8139 and it works.
 

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!