Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • physical host interface,
  • to a TAP interface connected to a virtual bridge on the host, or
  • (starting with planned for Charon-PAR version 3.0.9) a MACVTAP interface linked to a host NIC via an implicitly created TAP interface.

...

Please note: at the time of writing, this feature is not yet available for nftables.

Div
classpagebreak


Supplemental Information: MACVTAP Interfaces (planned for version 3.0.9

...

)

In some cloud environments, interface settings on the Linux level are not passed properly to the NIC on the cloud level. This can cause problems with network connectivity and, in particular, with network performance. The problem can be solved by using a virtual bridge between host and guest, and by configuring routing or NAT to allow guest communication with other systems. However, such configurations are often complex due to the fact that only the cloud-assigned MAC and IP addresses can be used. On a virtual bridge to which host and guest are attached, this condition cannot be met.
MACVTAP interfaces provide an alternative solution - they are linked to a host NIC and are TAP based. However, when used in passthrough mode, they can use the same MAC and IP address as assigned by the cloud provider.

Basic configuration of a MACVTAP interface on the Linux host system:

Activate the NIC that is dedicated to the emulator:

# ip link set <nic-name> up

Remove IPv4 and IPv6 addresses from the NIC:

# ip addr flush <nic-name>

# ip -6 addr flush <nic-name>

Create a MACVTAP interface linked to the host NIC:

# ip link add link <nic-name> name <macvtap0> type macvtap mode passthru

Configure the correct MTU on the new interface:

# ip link set dev macvtap0 mtu 1500

Activate the new interface:

# ip link set macvtap0 up

Set the correct permissions on the underlying TAP interface:

# chown ${USER} /dev/tap`cat /sys/class/net/macvtap0/ifindex`

...