Prepare a network interface for a configuration as direct
MacVTap connection.
Before you begin
libvirt will automatically create a MacVTap interface when
you configure a direct connection.
Make sure that the MacVTap
kernel modules are loaded, for example by using the lsmod
| grep macvtap command.
Procedure
- Create a bonded interface to provide high availability.
- Optional: Create a virtual LAN (VLAN) interface.
VLAN interfaces provide an isolated communication between
the virtual servers that
are connected to it.
Use the
ip link add command
to create a VLAN on a network interface and to specify a VLAN ID:
# ip link add link <base-network-if-name> name <vlan-network-if-name>
type vlan id <VLAN-ID>
Example: Create a virtual LAN interface with VLAN ID
623.
# ip link add link bond0 name bond0.623 type vlan id 623
# ip link show bond0.623
17: bond0.623@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500
qdisc noqueue state UP mode DEFAULT group default
link/ether 02:00:00:f7:a7:c2 brd ff:ff:ff:ff:ff:ff