You are not logged in.

#1 2020-11-19 20:24:03

mb720
Member
Registered: 2020-01-03
Posts: 7

How is the IPv6 link-local unicast address generated?

The MAC address of my WLAN interface is 08:11:96:cd:d5:d4.
The IPv6 link-local unicast address is fe80::391b:f5b5:5824:3b1b.

According to https://ben.akrin.com/?p=1347, on some systems the link-local address can be calculated from the MAC address. But if that method were applicable to Arch Linux, the IPv6 link-local address would be fe80::a11:96ff:fecd:d5d4 on my system.

This Stack Overflow answer states that the IPv6 address can be based on the MAC address or randomly generated.

Is it right to assume that on Arch Linux, the link-local address is randomly generated?

Offline

#2 2020-11-19 20:37:51

regid
Member
Registered: 2016-06-06
Posts: 184

Re: How is the IPv6 link-local unicast address generated?

I don't know.
Do tell us if
https://wiki.archlinux.org/index.php/IP … on_(SLAAC)
and
https://wiki.archlinux.org/index.php/IP … extensions
are related. I hope they are. I don't know. I hope this post is not completely out of scope.


pantum-p1000-p2000-p3000-m5100-m5200-ppd-driver (AUR): PPDs, drivers, for Pantum P1000, P2000, P3000, M5100, M5200 printers.
powerofforreboot.efi (AUR): Utilities to be used from within a UEFI boot manager or shell.

Offline

#3 2020-11-19 21:09:37

Zod
Member
From: Hoosiertucky
Registered: 2019-03-10
Posts: 432

Re: How is the IPv6 link-local unicast address generated?

oracle sys docs wrote:

Stateless autoconfiguration requires no manual configuration of hosts, minimal (if any) configuration of routers, and no additional servers. The stateless mechanism enables a host to generate its own addresses. The stateless mechanism uses local information as well as nonlocal information that is advertised by routers to generate the addresses.

You can implement temporary addresses for an interface, which are also autoconfigured. You enable a temporary address token for one or more interfaces on a host. However, unlike standard, autoconfigured IPv6 addresses, a temporary address consists of the site prefix and a randomly generated 64 bit number. This random number becomes the interface ID portion of the IPv6 address. A link-local address is not generated with the temporary address as the interface ID.

Routers advertise all prefixes that have been assigned on the link. IPv6 hosts use Neighbor Discovery to obtain a subnet prefix from a local router. Hosts automatically create IPv6 addresses by combining the subnet prefix with an interface ID that is generated from an interface's MAC address. In the absence of routers, a host can generate only link-local addresses. Link-local addresses can only be used for communication with nodes on the same link.

https://docs.oracle.com/cd/E18752_01/ht … r1-42.html

https://tools.ietf.org/html/rfc4291#section-2.5.6

Last edited by Zod (2020-11-19 21:26:01)

Offline

#4 2020-11-20 11:21:20

rsmarples
Member
Registered: 2009-05-12
Posts: 254

Re: How is the IPv6 link-local unicast address generated?

mb720 wrote:

Is it right to assume that on Arch Linux, the link-local address is randomly generated?

That depends on what software you use on arch.

For example, dhcpcd will generate a Stable Private Address, RFC 7217 by default rather than one based on the MAC address.

Offline

#5 2020-11-20 14:02:08

mb720
Member
Registered: 2020-01-03
Posts: 7

Re: How is the IPv6 link-local unicast address generated?

rsmarples wrote:
mb720 wrote:

Is it right to assume that on Arch Linux, the link-local address is randomly generated?

That depends on what software you use on arch.

For example, dhcpcd will generate a Stable Private Address, RFC 7217 by default rather than one based on the MAC address.

Good point, I should have made it clear that I'm using NetworkManager and that my

/etc/NetworkManager/NetworkManager.conf

is empty.

Addendum after searching NetworkManager's source code and commit messages:

This function of NetworkManager does the following:

Constructs an interface identifier in "Modified EUI-64" format which is suitable for constructing IPv6 addresses.

This commit from November 2015 "adds support for RFC7217 stable privacy addressing".

It can be used alongside RFC 4941 privacy extensions (temporary addresses) and replaces the use of RFC 4862 interface identifiers.

The address creation mode is controlld by ip6.addr_gen_mode property (ADDR_GEN_MODE in ifcfg-rh), with values of "stable-privacy" and "eui-64", defaulting to "eui-64" if unspecified.

Last edited by mb720 (2020-11-20 14:23:55)

Offline

Board footer

Powered by FluxBB