talos icon indicating copy to clipboard operation
talos copied to clipboard

Provide MAC Address During Install

Open phreed opened this issue 1 month ago • 4 comments

Feature Request

Provide a mechanism for getting the MAC (along with the (currently provided) IP address):

  • Via a special OS which can be used to obtain the MAC addresses and determine which port is connected (without triggering DHCP)
  • On the Talos Dashboard show the MAC with the IP address

Description

When installing Talos on bare metal it is important to assign a stable IP address. See https://www.youtube.com/watch?v=VKfE5BuqlSc&t=568s for an example of not having a stable IP address. Typically, this assignment is via reserved leases, where the IP address is associated with a MAC address. While it is easy enough to use a live USB OS, or via the BIOS setup, to acquire the MAC, it would be convenient if this capability were available in the metal-*.iso. The problem with approaches mentioned, which trigger DHCP, is that (some) DHCP servers will persist the dynamic leases.

I would like the default Talos not install the OS, rather have a version which presents a Dashboard. The Dashboard would show:

  • the MAC addresses and which have a cable attached
  • parted to make it easier to make sure the target disk is properly clean and configured.

Note: Currently, I have VenToy with the SystemRescue ISO to perform these tasks. I does trigger the dynamic DHCP. So, instead I am looking at the BIOS setup, but that does not tell me which port is plugged in.

The current list of choices presented is:

>            Talos (v1.11.5)
    Talos (v1.11.5 ) (Reset system disk)
      Reboot Into Firmware Interface
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
              Boot in  7 s.

What I would like is something like:

>           Pre-Talos (v1.0.0)
             Talos (v1.11.5)
    Talos (v1.11.5 ) (Reset system disk)
      Reboot Into Firmware Interface
  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
              Boot in  7 s.

phreed avatar Dec 05 '25 17:12 phreed

It looks like all the information I am interested in is available via two commands:

  • lsblk : all the disks and their partioning
  • lshw : all the hardware, particularly the ethernet interface
    • lshw -class network

The DHCP lease can be released with: dhclient -r eth0

phreed avatar Dec 05 '25 19:12 phreed

I think this makes sense, but just to point out that most of the information is already available via the API.

After booting the ISO, and while the machine is maintenance mode, one could use talosctl get links -n <IP> --insecure and similar to learn about the hardware.

Also https://github.com/siderolabs/omni-infra-provider-bare-metal/ helps to maintain inventory of bare-metal machines.

smira avatar Dec 08 '25 08:12 smira

I think this makes sense, but just to point out that most of the information is already available via the API.

After booting the ISO, and while the machine is maintenance mode, one could use talosctl get links -n <IP> --insecure and similar to learn about the hardware.

Also siderolabs/omni-infra-provider-bare-metal helps to maintain inventory of bare-metal machines.

That is a good point, I really do not need a separate OS to do the link interrogation to get the MAC. Is there a way, using talosctl, to release the DHCP licenses? Or release and reacquire the IP address after updating the DHCP reservations (on the router)? Obviously, this would cause the IP address (used by talosctl -n) to change, but that would be fine.

As a bit of background... Depending on the router, restarting the client does not necessarily cause the release of the DHCP, IP address lease. It is the responsibility of the client to release its lease, e.g.:

dhcpclient -r

phreed avatar Dec 08 '25 16:12 phreed

It is the responsibility of the client to release its lease, e.g.:

No, today there is no support to release the lease at the moment.

smira avatar Dec 08 '25 17:12 smira