[SOLVED] VLAN configuration

Jan 16, 2024
11
0
1
I'm trying to set the management IP to 172.16.2.5 and assign VLAN10 to a VM but now the host internal IP address is 172.16.10.101 and it’s unreachable when I try to ping a site

auto lo
iface lo inet loopback

iface enp2s0f0 inet manual


auto vmbr0.10
iface vmbr0.10 inet static
address 172.16.10.101/24
gateway 172.16.10.1

auto vmbr0
iface vmbr0 inet manual
address 172.16.2.5/24
bridge-ports enp2s0f0
bridge-stp off
bridge-fd 0
bridge-vlan-aware yes
bridge-vids 10,20,30,40



iface enp2s0f1 inet manual
 
I use the following in production. YMMV. Then in the VM's Network VLAN Tag field, put in either 20, 30, 40 and using Bridge 'vmbr1'.

Code:
    # Configure Dell rNDC X540/I350 4P NIC card with 10GbE active and 1GbE as backup
    # VLAN 10 = Management network traffic
    # VLAN 20 30 40 = VM network traffic
    #
    auto lo
    iface lo inet loopback
   
    iface eno1 inet manual
    #10GbE
   
    iface eno2 inet manual
    #10GbE

    iface eno3 inet manual
    #1GbE

    iface eno4 inet manual
    #1GbE
   
    auto bond0
    iface bond0 inet manual
        bond-slaves eno1 eno3
        bond-miimon 100
        bond-mode active-backup
        bond-primary eno1
    #Mgmt Bond Interface
   
    auto vmbr0
    iface vmbr0 inet manual
        bridge-ports bond0
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 10
    #Mgmt VLAN Bridge Interface
   
    auto vmbr0.10
    iface vmbr0.10 inet static
        address 192.168.1.10/24
        gateway 192.168.1.1
    #Mgmt Web Interface
   
    auto bond1
    iface bond1 inet manual
        bond-slaves eno2 eno4
        bond-miimon 100
        bond-mode active-backup
        bond-primary eno2
    #VM Bond Interface
   
    auto vmbr1
    iface vmbr1 inet manual
        bridge-ports bond1
        bridge-stp off
        bridge-fd 0
        bridge-vlan-aware yes
        bridge-vids 20 30 40
    #VM VLAN Bridge Interface
 
Last edited: