Proxmox Networking

gcc+

New Member
Nov 22, 2023
8
0
1
I have spend nearly a week trying to make it work. Followed several guide but nothing my VM does not access to internet. I am installed proxmox on machine and created a VM running archlilnux. The IP of the machine is assigned with DHCP. The configuration below does not work. I have tried to assing a static IP to eno1 but did not work. I have tried to assign the same MAC as eno1 to the vmbr0 still no access to internet. I have tried routed configuration as in proxmox guide and still no luck. What am I doing wrong?

auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
address 10.91.193.105/19
gateway 10.91.192.1
bridge-ports eno1
bridge-stp off
bridge-fd 0
bridge-disabel-mac-learning 1
 
Last edited:
Hi,

can you please post the output of pveversion -v and qm config <vmid>? (Replacing <vmid> with the actual numeric ID of the VM.)
Also, please post the output of ip address and ip route inside the VM.

my VM does not access to internet.
What is the exact error message? Where/when does it occur?

bridge-disabel-mac-learning 1
First of, there's a typo here? Second, why did you add this? (Since it's not part of the default configuration)
 
Thanks for the reply cheiss.

pveversion -v output is:

Code:
root@em-vm:~# pveversion -v
proxmox-ve: 8.0.2 (running kernel: 6.2.16-19-pve)
pve-manager: 8.0.4 (running version: 8.0.4/d258a813cfa6b390)
pve-kernel-6.2: 8.0.5
proxmox-kernel-helper: 8.0.3
proxmox-kernel-6.2.16-19-pve: 6.2.16-19
proxmox-kernel-6.2: 6.2.16-19
pve-kernel-6.2.16-3-pve: 6.2.16-3
ceph-fuse: 17.2.6-pve1+3
corosync: 3.1.7-pve3
criu: 3.17.1-2
glusterfs-client: 10.3-5
ifupdown2: 3.2.0-1+pmx5
ksm-control-daemon: 1.4-1
libjs-extjs: 7.0.0-4
libknet1: 1.28-pve1
libproxmox-acme-perl: 1.4.6
libproxmox-backup-qemu0: 1.4.0
libproxmox-rs-perl: 0.3.1
libpve-access-control: 8.0.5
libpve-apiclient-perl: 3.3.1
libpve-common-perl: 8.0.9
libpve-guest-common-perl: 5.0.5
libpve-http-server-perl: 5.0.4
libpve-rs-perl: 0.8.5
libpve-storage-perl: 8.0.2
libspice-server1: 0.15.1-1
lvm2: 2.03.16-2
lxc-pve: 5.0.2-4
lxcfs: 5.0.3-pve3
novnc-pve: 1.4.0-2
proxmox-backup-client: 3.0.4-1
proxmox-backup-file-restore: 3.0.4-1
proxmox-kernel-helper: 8.0.3
proxmox-mail-forward: 0.2.0
proxmox-mini-journalreader: 1.4.0
proxmox-widget-toolkit: 4.0.9
pve-cluster: 8.0.4
pve-container: 5.0.5
pve-docs: 8.0.5
pve-edk2-firmware: 3.20230228-4
pve-firewall: 5.0.3
pve-firmware: 3.8-3
pve-ha-manager: 4.0.2
pve-i18n: 3.0.7
pve-qemu-kvm: 8.0.2-7
pve-xtermjs: 4.16.0-3
qemu-server: 8.0.7
smartmontools: 7.3-pve1
spiceterm: 3.3.0
swtpm: 0.8.0+pve1
vncterm: 1.8.0
zfsutils-linux: 2.1.13-pve1

qm config 100 output is:

Code:
root@em-vm:~# qm config 100
boot: order=scsi0;ide2;net0
cores: 1
cpu: x86-64-v2-AES
ide2: local:iso/archlinux-x86_64.iso,media=cdrom,size=826700K
kvm: 0
memory: 2048
meta: creation-qemu=8.0.2,ctime=1700673084
net0: virtio=e0:d5:5e:ae:32:90,bridge=vmbr0,firewall=1
numa: 0
ostype: l26
scsi0: local-lvm:vm-100-disk-0,iothread=1,size=32G
scsihw: virtio-scsi-single
smbios1: uuid=861a748d-9403-4148-a206-f6d8aedd4977
sockets: 1
vmgenid: 7dbf39ce-452a-483b-b794-0b90a3b60c80

bridge-disabel-mac-learning 1
I wanted the vm to have the same mac as eno1 to trick the dhcp. Thanks for sporring the typo.
 
So the only way for me to have the vm to access to internet is either to request a static ip and use the routed configuration or ask IT to add the vm to the list of allowed devices?
 
What is the exact error message? Where/when does it occur?
You did not answer that question.

I wanted the vm to have the same mac as eno1 to trick the dhcp.
That's not possible.
In simple setups, you have the virtual vmbr0 interface, to which the physical eno1 interface is attached. Through this, they will share the MAC address and IP address. So no more configurations needed there.

To have VMs still access the network without separate addresses, you can use masquerading - the linked guide described that extensively.
 
  • Like
Reactions: _gabriel
You did not answer that question.


That's not possible.
In simple setups, you have the virtual vmbr0 interface, to which the physical eno1 interface is attached. Through this, they will share the MAC address and IP address. So no more configurations needed there.

To have VMs still access the network without separate addresses, you can use masquerading - the linked guide described that extensively.
The error message is network is unrechable.

I admit I have not tried masquerading. Does it mean I need to ask for a static IP address or I can use the DHCP one?
 
sorry but it's bad start if you ask the question about the dhcp.
for information, to start :
Masquerading is like your host become a second router, so it can get its ip from dhcp, then your VMs will need to be another vmbrX bridge + a on an another subnet, they will be not seen by your dhcp server.
 
Last edited:
sorry but it's bad start if you ask the question about the dhcp.
for information, to start :
Masquerading is like your host become a second router, so it can get its ip from dhcp, then your VMs will need to be another vmbrX bridge + a on an another subnet, they will be not seen by your dhcp server.
sorry but it's bad start if you ask the question about the dhcp.
Thanks for the comment although very useless.

Masquerading is like your host become a second router, so it can get its ip from dhcp, then your VMs will need to be another vmbrX bridge + a on an another subnet, they will be not seen by your dhcp server.
Is there a guide? Proxmox networking is not really helping at this point.
 
Is there a guide? Proxmox networking is not really helping at this point.
If you are willing to upgrade to 8.1 you could also try our SDN feature that supports Masquerading + DHCP out of the box. You can read more about it in this wiki article. Just be aware that DHCP is currently a tech preview (although Simple zone + SNAT/Masquerading alone is considered stable with 8.1)
 
Last edited:
  • Like
Reactions: gcc+
For those newbies like me who are struggling with VM connection (seems a pretty common issue) here the soluiton:

Code:
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet manual      

auto vmbr0
iface vmbr0 inet static
        address 10.91.193.105/19
        gateway 10.91.192.1
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0

auto vmbr1
iface vmbr1 inet static
        address  192.168.1.1
        netmask  255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0

        post-up echo 1 > /proc/sys/net/ipv4/ip_forward
        post-up   iptables -t nat -A POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE
        post-down iptables -t nat -D POSTROUTING -s '192.168.1.0/24' -o vmbr0 -j MASQUERADE

in your vm set a static ip. Here is what I did in my vm archlinux

Code:
[Match]
Name=ens* # this is the name of you net interphas. ip addr shall give you that

[Network]
Address=192.162.1.2/24 # the ip your vm will have
Gateway=192.168.1.1 # vmbr1 is the router which allows to connect to internet via vmbr0
DNS=8.8.8.8

Sadly the official Proxmox guide is not really helpful as some experienced member on this forum.

Forgot... for every new vm you will have to set the ip manually... 192.168.1.3 up to 255.
 
Last edited:
If you are willing to upgrade to 8.1 you could also try our SDN feature that supports Masquerading + DHCP out of the box. You can read more about it in this wiki article. Just be aware that DHCP is currently a tech preview (although Simple zone + SNAT/Masquerading alone is considered stable with 8.1)
Thanks for the link.
 

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!