criu

Mac-VLAN

Mac-VLAN is a Linux network driver that allows creating multiple virtual interfaces with unique MAC addresses on top of a single physical interface. These virtual interfaces act as standalone devices on the network, each with its own IP and MAC address.

Checkpoint and Restore of Mac-VLAN

CRIU identifies Mac-VLAN interfaces by monitoring netlink messages (specifically RTM_NEWLINK) and inspecting their attributes.

1. Checkpointing

During a dump, CRIU extracts the following attributes for each Mac-VLAN device:

2. Restoration

To recreate a Mac-VLAN interface exactly as it was, CRIU performs the following:

External Interface Mapping

Since the parent physical interface may have a different name or index on the destination host during migration, CRIU provides the --external option to map these dependencies:

# Example mapping of an internal macvlan interface to a host physical interface
criu restore --external macvlan[eth0]:phys0 ...

This tells CRIU that the Mac-VLAN interface which was originally attached to eth0 should now be attached to the physical interface phys0 on the current host.

See also