hwaddr of host side veth pair interface
hi,
I have noticed that even with a fixed name for the host interface ( lxc.net.0.veth.pair ) the mac addr of the interface appears to be random. I would like to set a fixed hwaddr so that the link local ipv6 address is predictable. I have found no documentation on how to achieve this, trying the logical lxc.net.0.veth.pair.hwaddr = 52:54:00:04:32:02 fails because 52:54:00:04:32:02 is not a valid interface name.
I can't use lxc.net.[i].ipv6.gateway because the interface is configured in the container.
Required information
- Distribution: Debian
- Distribution version: 10
- The output of
lxc-start --version: 3.0.3lxc-checkconfigeverything enabled,uname -a: 4.19.0-6-amd64 #1 SMP Debian 4.19.67-2+deb10u2 (2019-11-11) x86_64 GNU/Linux
Information to attach
Unprivileged container started by root.
lxc.include = /usr/share/lxc/config/common.conf
lxc.include = /usr/share/lxc/config/userns.conf
lxc.arch = amd64
lxc.uts.name = foo
lxc.idmap = u 0 1869472 65536
lxc.idmap = g 0 1869472 65536
lxc.rootfs.path = dir:/vmroots/foo-container/rootfs
lxc.rootfs.path = lvm:/dev/vg0/foo-container
lxc.cap.drop = audit_read
lxc.start.auto = 1
lxc.net.0.type = veth
lxc.net.0.link = foo
lxc.net.0.name = eth0
lxc.net.0.hwaddr = 52:54:00:08:32:02
lxc.net.0.veth.pair = h_foo
lxc.cgroup.memory.limit_in_bytes = 4294967296
lxc.apparmor.profile = generated
lxc.apparmor.allow_nesting = 1
@tomponline you may be interested in this one.
@stgraber taking a look now
@stgraber ah just read this more closely and its a feature request for controlling the host-side MAC address, will leave for now until prioritised.