Proxmox

Proxmox Network Configuration for Beginners including VLANs

Learn how to configure your Proxmox network configuration for virtualization, including Linux bridge, VLANs, and SDN

Letโ€™s look at Proxmox network configuration for beginners and see how you can get jump started with using it for virtualization.

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.

Reaching out for a dhcp address in proxmox
Reaching out for a dhcp address in proxmox

This IP address that you set during the installation of Proxmox is assigned to the default Linux bridge.

Configuring ip during installation of proxmox
Configuring ip during installation of proxmox

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.

Default linux bridge in proxmox
Default linux bridge in proxmox

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.

Editing the default linux bridge
Editing the default linux bridge

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/*
Editing the etc network interfaces file in proxmox
Editing the etc network interfaces file in proxmox

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.

Making bridge vlan aware
Making bridge vlan aware

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.

Applying the vlan aware configuration
Applying the vlan aware configuration

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.

Physical switch configuration for proxmox network setup
Physical switch configuration for proxmox network setup

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.

Virtual machine vlan tagging in proxmox
Virtual machine vlan tagging in proxmox

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
Installing dnsmasq in proxmox
Installing dnsmasq in proxmox

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.

Beginning proxmox sdn setup
Beginning proxmox sdn setup

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.

Simple zone setup in proxmox sdn
Simple zone setup in proxmox sdn

Add a VNet

Next we will add a VNET. Click the VNets menu and then click Create.

Creating a new vnet in proxmox sdn
Creating a new vnet in proxmox sdn

Name the VNet and attach the zone we created in the step before. Click Create.

Configuring a new vnet in proxmox sdn
Configuring a new vnet in proxmox sdn

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.

Creating a new subnet in proxmox sdn
Creating a new subnet in proxmox sdn

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.

General subnet configuration in proxmox sdn
General subnet configuration in proxmox sdn

Click Create to create the new Subnet and DHCP scope for the subnet.

Adding a dhcp range to the new proxmox sdn subnet
Adding a dhcp range to the new proxmox sdn 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.

Apply the proxmox sdn changes
Apply the proxmox sdn changes

After applying the configuration, the new SDN network will appear after the networking services restart.

The new sdn network will appear under the vnets after the network reload
The new sdn network will appear under the vnets after the network reload

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.

Subscribe to VirtualizationHowto via Email ๐Ÿ””

Enter your email address to subscribe to this blog and receive notifications of new posts by email.



Brandon Lee

Brandon Lee is the Senior Writer, Engineer and owner at Virtualizationhowto.com, and a 7-time VMware vExpert, with over two decades of experience in Information Technology. Having worked for numerous Fortune 500 companies as well as in various industries, He has extensive experience in various IT segments and is a strong advocate for open source technologies. Brandon holds many industry certifications, loves the outdoors and spending time with family. Also, he goes through the effort of testing and troubleshooting issues, so you don't have to.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.