[systemd-devel] MAC address of host0 interface for --network-bridge

Lennart Poettering lennart at poettering.net
Thu Mar 30 15:26:29 UTC 2017

On Thu, 16.03.17 00:27, Bhasker C V (bhasker at unixindia.com) wrote:

> Hi all,
>  I am using --network-bridge option to setup my container systemd-nspawn.
>  I however dont see any option in man systemd-nspawn to specify a MAC
> Address for the host0 interface. Is there a way to do this ?
>  I see that when using --network-bridge option, the host0 interface
> MAC is fairly constant but does this get auto-generated  ? if yes, is
> there a chance for this MAC to change ?

You can change the MAC address via the ip tool during runtime.

That said, we derive the MAC by default as hash from the host machine ID
and the container name, so that it is effectively random, but stable,
and different on each instance of the container and host.


Lennart Poettering, Red Hat

More information about the systemd-devel mailing list