Fedora 27 network bridge vlan

I’m connecting VM’s to two nets, but I have only one physical interface on the host. So VLAN comes into play. I put my eth0 under the control of my bridge “external”, I create a vlan interface eth0.4 and put it under br-maas. Here’s a quick writeup on the files, as most examples/tutorials from others include a bunch of settings that really aren’t needed.

#/etc/sysconfig/network-scripts/ifcfg-eth0
TYPE=Ethernet
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
BRIDGE=br-external
#/etc/sysconfig/network-scripts/ifcfg-external
TYPE=Bridge
DEVICE=br-external
ONBOOT=yes
BOOTPROTO=dhcp
#/etc/sysconfig/network-scripts/ifcfg-eth0.4
TYPE=Vlan
DEVICE=eth0.4
VLAN=yes
ONBOOT=yes
BOOTPROTO=none
BRIDGE=br-maas
#/etc/sysconfig/network-scripts/ifcfg-maas
TYPE=Bridge
DEVICE=br-maas
ONBOOT=yes
BOOTPROTO=none

#IPADDR=172.16.0.33
#NETMASK=255.255.255.0

Now you can connect your VMs to the bridges, and optionally add an IP for the host to access the net as well.

Leave a Reply

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