On Fedora 25 Workstation, NetworkManager (NM) configures all network interfaces, by default. That means also the wired ones. And the NetworkManager doesn't create EUI-64 derived IPv6 addresses. Instead it generates so called 'stable-privacy' ones. Apparently to not disclose the MAC address to each IPv6 destination.
This can be changed for a given interface $i
via changing the IPV6_ADDR_GEN_MODE
key in the /etc/sysconfig/network-scripts/ifcfg-$i
configuration file. For example via:
sed -i 's/^IPV6_ADDR_GEN_MODE=stable-privacy/IPV6_ADDR_GEN_MODE=eui64/' \
/etc/sysconfig/network-scripts/ifcfg-$i
The change is effective after NetworkManager rereads its configuration and after a reconnect:
nmcli con reload
nmcli con down $i
nmcli con up $i
Notes
- this option isn't exposed via the NM settings GUI
- the interface configuration files under
/etc/sysconfig/network-scripts
read by NM are Fedora/Redhat specific, but the configuration key is not - i.e. on other distributions NM just reads the interface configurations from different locations/configuration files
Fedora also comes with systemd-networkd which doesn't disable EUI64 generation, by default. Thus, a simpler way to get stable IPv6 addresses under Fedora is just to remove NetworkManager and configure/enable systemd-networkd, instead.
Or one can set the interface in question to unmanaged in NetworkManager and then configure it in systemd-networkd.
In any case, the networkd config is pretty minimal then, e.g.:
cat /etc/systemd/network/20-wired.network
[Match]
# manage all matching interfaces
#Name=en*
# just manage one:
Name=eno1
[Network]
DHCP=ipv4
Best Answer
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.