bottlerocket icon indicating copy to clipboard operation
bottlerocket copied to clipboard

`net.toml`: Support configuration using MAC instead of device name

Open zmrow opened this issue 3 years ago • 2 comments

Currently the only way to configure a network device in net.toml is by device name:

[eno1]
...

It would be nice to be able to use MAC address as the key since many organizations already have the information and may not know how the device will be named.

[ab:cd:ef:gh:ij]
...

zmrow avatar Jul 22 '22 15:07 zmrow

It feels oddly specific to know the MAC address but not know or care what network device is the "primary" one for the purposes of getting DHCP leases, setting the hostname, or registering the node with the Kubernetes cluster.

What's the larger architectural context here?

bcressey avatar Jul 22 '22 21:07 bcressey

This initiative seems to be interesting. Let me add our use case: EKS-A bare metal requires to define the MAC address at first place so, the built-in DHCP server will reply on the DHCP request from the new HW. The MAC is normally written on the HW/Server with a sticker. In the next step, one needs to define the net.toml in a template file which will work for the node. But as hinted above, no one knows the Linux interface name for a new HW before it booted a Linux... So, what we do now is that we boot a Ubuntu Live and check the interface name so we can create the net.toml file in the EKS-A bare metal config.

Personally, I am not sure if using the MAC here is the best solution (as one normally is able to change a MAC of a given interface through network config) but who knows :)

Cajga avatar Aug 23 '22 11:08 Cajga