What is the purpose of UUIDs for NICs?

42,997

Ethernet cards might have (supposedly) unique MAC addresses, but what about virtual interfaces like aliases (e.g. eth0:0), bridges or VPNs? They need an ID too, so an UUID would be a good fit.

By the way, since the question is about NetworkManager and NetworkManager deals with connections, there are scenarios where you can have multiple connections for a device. For example you have a laptop with an Ethernet card which you use both at home and at work. At home you're using only IPv4 like most home users, but at work you're using only IPv6 because the company managed to migrate to it. So you have two different connections which need different IDs, so the MAC address of the Ethernet card can't be used by itself. Therefore an UUID is again a good fit for an ID.

Share:
42,997
Microsoft Linux TM
Author by

Microsoft Linux TM

Updated on September 18, 2022

Comments

  • Microsoft Linux TM
    Microsoft Linux TM over 1 year

    On Fedora/RHEL/CentOS there is a line in /etc/sysconfig/network-scripts/ifcfg-x files which defines UUID:

    UUID=30fcd648-ad1e-4428-as6f-951e8e4d16df
    

    NICs have MAC addresses by them selves, so what is the purpose of pointing UUIDs to NICs when there is already an identification number (MAC) and also unlike file systems UUIDs they can't be stored on device itself?

    • derobert
      derobert almost 10 years
      Not all network interfaces are Ethernet. Serial interfaces and TUN interfaces (and probably many more) do not have MACs. Though, I'm not sure what RedHat uses those UUIDs for.
  • Microsoft Linux TM
    Microsoft Linux TM almost 10 years
    Virtual Adapters Have Virtual MAC too, seems that is used by network manager itself: centos.org/forums/viewtopic.php?t=8524
  • mcr
    mcr almost 8 years
    how is the uuid for the ethernet created? How is the UUID in the ifcfg-eth0 file for home and work related to the device itself?
  • Cristian Ciupitu
    Cristian Ciupitu almost 8 years
    @mcr, I don't think it matters what kind the UUID is, as long as it's an UUID. So you could use the command line program uuidgen (from util-linux) to generate one.