Proxmox Network Configuration for Beginners including VLANs
Letโs look at Proxmox network configuration for beginners and see how you can get jump started with using it for virtualization.
Table of contents
Overview of Proxmox network configuration
By default, Proxmox comes with a basic networking stack when you install it on your Proxmox VE host. It uses the Linux network stack, which includes a Linux bridge setup. The default Linux bridge is automatically configured to use one of the physical network interfaces on your Proxmox host.
You can view this default configuration in the web interface after logging into your Proxmox host. Additionally, you can check or edit the default settings by accessing the following file:
/etc/network/interfaces
The IP address assigned to your Proxmox VE host is set up by default during the installation process when you install Proxmox from the installation media.
As the installation media boots, the Proxmox host will try to reach out for an IP address and attempt to autoconfigure it. This happens before you have the option to manually set a static private IP address.
This IP address that you set during the installation of Proxmox is assigned to the default Linux bridge.
What is the Linux Bridge?
Letโs take a closer look at the Linux bridge. The Linux bridge is built into the Linux kernel and allows you, as the admin, to create a network bridge connecting your Proxmox virtual environment to the physical network.
A bridge functions like a physical network switch, complete with MAC address tables, but itโs implemented in software. You can have all virtual machines share a single bridge or create multiple bridges to separate different network domains.
The Proxmox Linux Bridge
You can see this default bridge when you look at the Proxmox host administration interface then System > Network. You will see the default bridge listed as vmbr0.
You can modify the default Linux bridge configuration. When editing it, youโll see the name, the currently assigned private network IP address and mask, and the gateway. Youโll also notice it is set to autostart, with an option for VLAN aware, which weโll cover in more detail below. In most cases, this IP address will not be a public IP, as exposing your Proxmox VE server directly to the internet is not recommended.
You can change the IP address that is configured in your Proxmox host from the web UI and then restart networking.
Changing your IP via the command line
You can edit the /etc/network/interfaces
file to configure networking settings. Below is an example of the /etc/network/interfaces
file from a mini PC running Proxmox VE 8.2.4. The IP address is defined under iface vmbr0 inet static
, indicating it is a static address. The specific address is configured within the block below it. Youโll also see the loopback interface defined as iface lo inet loopback
.
Below, you also see the wireless network adapter found in the mini PC.
auto lo
iface lo inet loopback
iface enp1s0 inet manual
auto vmbr0
iface vmbr0 inet static
address 10.1.149.52/24
gateway 10.1.149.1
bridge-ports enp1s0
bridge-stp off
bridge-fd 0
iface wlp2s0 inet manual
source /etc/network/interfaces.d/*
To do that from the command line you can use the following command with out a reboot:
systemctl restart networking
Making your Linux Bridge VLAN aware
Once you start experimenting with Proxmox VE using a basic VLAN1 untagged configuration, youโll likely want to configure working with VLANs. VLANs are a great way to segment and secure your network as part of your Proxmox setup.
Even in a home lab, you might already have a few VLANs configured. Personally, I like to separate servers from clients, IoT devices, and wireless networks, just to name a few. You may want to place virtual machines on these different VLANs or connect them to specific networks using Layer 2 (L2) connectivity rather than Layer 3 (L3), so they remain on the same subnet without being routed.
Making your Linux Bridge VLAN aware is the simple tick box we saw in the Linux Bridge properties earlier.
Now, we just need to apply the VLAN aware configuration. We can see in the new version of the config config file that we have the addition of the two lines:
bridge-vlan-aware yes
bridge-vids 2-4094
So, essentially the bridge can now trunk vlans across.
Linux Bridge VLAN configuration
If you want to VLAN tag your management interface on the Linux bridge in your Proxmox network configuration, there are some changes youโll need to make in the configuration to set this up.
First, youโll need to remove the IP address configuration from the iface vmbr0
or iface eno1 inet manual
section. Leave the VLAN-related configuration intact in the file. Itโs important to ensure you donโt assign multiple IP addresses on the same subnet to your host.
Next, youโll create something similar to a subinterface, like you might see in Cisco networking or firewall configurations. It will look something like this:
vmbr0.<vlan tag>
This is a new interface where we will configure the IP address information for the Linux bridge network device.
Now we have the IP address configured on the new โsubinterfaceโ for VLAN 333 configured off the default Linux bridge device.
auto vmbr0
iface vmbr0 inet manual
bridge-ports ens192
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 2-4094
auto vmbr0.333
iface vmbr0.333 inet static
address 10.3.33.28/24
gateway 10.3.33.1
Physical network switch
Keep in mind that after configuring your new Linux Bridge virtual interface, when you enable VLANs in Proxmox on the host and tag traffic, your upstream physical switch needs to be tagged with those VLANs to pass the traffic. Make sure you have trunked your Proxmox VE server uplink ports so the VLAN traffic will be passed as expected.
VM with VLAN tag
You can configure virtual machines to use a VLAN tag in their network settings, allowing the VM to pass VLAN tags. For this to work, your Linux bridge must be set to VLAN aware, and the physical switch connected to your Proxmox VE host must have its ports configured as trunk ports on the uplink, not access ports.
In the screenshot below, on the Network tab of the new virtual machine’s network interface dialog, you can see the field for VLAN Tag.
Proxmox Software Defined Networking
Proxmox 8.1 introduced Proxmox Software Defined Networking (SDN) as part of the available Proxmox network configuration, which brings a great new set of networking tools. With Proxmox SDN, you can configure everything from basic virtual networks (vnets) to advanced VXLAN setups.
For example, you can quickly set up a simple SDN network that NATs all traffic using the Proxmox host’s IP address as the source. This is a convenient way to create new networks without needing to configure routing or add routes on your upstream router for internet access.
Install DNSMasq
Before configuring SDN, we need to install dnsmasq:
apt update
apt install dnsmasq
# disable default instance
systemctl disable --now dnsmasq
Add an SDN zone
Now we can begin doing the work we need to do inside the Proxmox interface. Click Datacenter > SDN > Zones, then click add a Simple zone.
Below is how I have my zone setup. Choose your node and then select automatic DHCP if you want to use DHCP for the zone.
Add a VNet
Next we will add a VNET. Click the VNets menu and then click Create.
Name the VNet and attach the zone we created in the step before. Click Create.
Add a Subnet and DHCP scope
Now, add a subnet. Click the VNet to highlight it and then you should have the Create button activate under Subnets.
Enter your subnet and gateway. Also, here we are adding SNAT. It means all the VMs or containers running on this network will have their network settings automatically configured and will appear as the IP address of the Proxmox host on the network.
Click Create to create the new Subnet and DHCP scope for the subnet.
Apply the SDN changes
Now, go back to SDN and click Apply under the status field in that window. This will apply the changes we have made.
After applying the configuration, the new SDN network will appear after the networking services restart.
Wrapping up
As you can tell, Proxmox network configuration has a lot of great built-in network features that build on top of the Linux networking stack found in the modern Linux kernel. We can use the default linux bridge for the initial Proxmox network setup and getting things running with a basic networking configuration in Proxmox that is akin to the vSwitch0 of VMware ESXi to start getting things connected to the network and VMs connected and working. The new Proxmox SDN feature is also a great tool to use when you need to quickly spin up networks and have more advanced network configurations.