Proxmox: Configure a network bridge for internal networking

Usually, you want to cluster your Proxmox containers and VMs in subnets that are different from your real local area network, e.g. because some services should only be accessible inside of Proxmox. But after initial installation, Proxmox has one network bridge interface called “vmbr0”. It provides a virtual switch which connects all VMs and containers to the host gateway.

Virtual machines behave as if they were directly connected to the physical network. The local network sees each virtual machine as a system with its own MAC, even though there is only one network cable connecting the Proxmox host (= all of the VMs) to the network. The Proxmox documentation defines bridges like this: “Bridges are like physical network switches implemented in software. All virtual guests can share a single bridge, or you can create multiple bridges to separate network domains.”

In this post, we will configure a new network interface which can later be assigned to different containers and machines.

The configuration

Select your Proxmox node in the left panel, and in the menu go to System -> Network. Click on “Create” and choose “Linux Bridge”. We will use these settings:

  • IPv4/CIDR: The IP subnet you want your VMs to use for internal networking
  • Comment: Optional. You can add some reminder text about the purpose of the interface
  • Gateway: It is important, to leave this empty.

Why does this work?

We can assign this bridge to VMs / containers, and assign a static IP in the range of our bridge to the interfaces of each of these machines. Then they can communicate internally. To reach the machines in that subnet from the host, you can also assign an IP address out of that range to the host machine.

If you need internet access through NAT

Accessing the internet through NAT is a bit more complicated. For this, you could check out this nice blog post in german (english translation with google).

References

Leave a Reply