Adding link local address

Maddy picture Maddy · Feb 29, 2012 · Viewed 21.5k times · Source

If the IPv6 link-local address is manually deleted on an interface, is there a way to obtain the link-local address back without bringing the interface down? The requirement stems from the need to hold onto (IPv4) existing connections on the interface, but also obtain the link-local address on it.

Answer

sleinen picture sleinen · Mar 1, 2012

GNU/Linux systems typically use "ip" (from the "iproute" package) to configure addresses. A link-local address would be added using something like

ip address add dev eth4 scope link fe80::21b:21ff:febb:5db0/64

Did you try that?

If your problem is that you don't know what exact address you should use as the link-local address: These addresses are typically derived from the hardware (MAC) address of the interface.

Take the MAC address of the interface (the "link/ether" field in the result of "ip link show dev ..."), and convert it to Modified EUI-64 according to this procedure.

Then add "fe80::" (standard link-local prefix) to the left and "/64" (as the subnet prefix length) to the right.