How to configure bridges with high availability and Vlan in CentOS7
Configure a highly available bridge with Vlan on CentOS7
The virtualized network is configured on CentOS7.6. On the basis of two network cards, team, Vlan and bridge are configured to realize the connection of physical machine and virtual machine to Vlan for virt virtualization of Linux.
Test environment:
Two network cards: ens1f0 and ens1f1
The Vlan ID of vlan68 is 68
The IP of the physical machine is 192.168.68.121
The IP of virtual machine is 192.168.68.102
1. Configure Ethernet
Run nmtui, configure 2 Ethernet network cards, deactivate IPv4, ignore IPv6, and cancel the automatic connection option.
two。 Configure Team
Run nmtui, add Team, and edit the name "team0". Edit the Json configuration and fill in {"runner": {"name": "activebackup"}}.
Team deactivates IPv4, ignores IPv6, and cancels the automatic connection option.
Add 2 slave devices to Team, edit the names "team0slave1", "slave2" and so on. Device is the Ethernet network card "ens1f0", "ens1f1" and so on.
3. Configure Bridge
Run nmtui, add the Bridge virtual bridge, and edit the name "virbr1".
Add a Vlan slave to bridge, change the vlan name "vlan68", take team0 as the parent device of vlan68, and modify VlanID "68".
Configure IP 192.168.68.121 and gateway for the bridge. Close IPv6.
[OK] Save
Restart reboot.
Ping from other machines to the native IP 192.168.68.121.
[complete]