Setup Proxmox environment with two network bridges

To set up your Proxmox environment with two network bridges—one for an untagged network and another for a tagged VLAN (VLAN 51)—you need to configure the /etc/network/interfaces file directly. Below is a step-by-step guide to achieve this configuration.

Configuration Steps

  1. Access the Proxmox Console: You need to log into the console of your Proxmox server. You can do this via SSH or directly through the server’s terminal.

  2. Edit the Network Interfaces File: Open the network interfaces configuration file with a text editor like nano:

    nano /etc/network/interfaces
    
  3. Configure the Bridges: You will need to add configurations for two bridges. Here’s an example configuration assuming your network interface is enp0s3:

    auto lo
    iface lo inet loopback
    
    # Main network interface
    auto enp0s3
    iface enp0s3 inet manual
    
    # Bridge for untagged traffic
    auto vmbr0
    iface vmbr0 inet dhcp
        bridge-ports enp0s3
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
    
    # Bridge for VLAN 51
    auto vmbr1
    iface vmbr1 inet manual
        bridge-ports enp0s3
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        # VLAN 51 configuration
        post-up ip link add link enp0s3 name enp0s3.51 type vlan id 51
        post-up ip link set enp0s3.51 up
        post-up ip link set vmbr1 up
        pre-down ip link delete enp0s3.51
    

    In this configuration:

    • vmbr0 is set up for untagged traffic and will receive an IP via DHCP.
    • vmbr1 is configured for VLAN 51. It creates a VLAN interface (enp0s3.51) for the tagged traffic.
  4. Restart Networking: After saving your changes, restart the networking service to apply the new configuration:

    systemctl restart networking
    

    Alternatively, you can reboot the Proxmox server.

  5. Configure Virtual Machines: When you create or configure your virtual machines, assign them to the appropriate bridge:

    • For VMs that need access to the untagged network, select vmbr0.
    • For VMs that need access to VLAN 51, select vmbr1 and ensure the VM’s network interface is set to use VLAN tagging with ID 51.

Additional Considerations

  • Managed Switch: Ensure that your switch is configured to handle VLANs correctly. The port connecting to your Proxmox server should be set to trunk mode, allowing both untagged and tagged traffic.

  • Firewall Settings: If you have a firewall enabled on Proxmox, make sure it allows traffic from the VLANs and the management network.

  • Testing: After configuration, test connectivity from your VMs to ensure they can reach the intended networks.

This setup should allow you to use both untagged and tagged VLAN traffic on your Proxmox server effectively. If you encounter issues, check the switch configuration and ensure that Proxmox is receiving the correct VLAN tags.

1 Like