I'm looking to prevent the IPv6 link local address from being randomly assigned. I'm not looking to disable v6 but rather statically assign my own link local. I've done ifconfig vboxnet0 inet6 add fe80::/126 and it works and I can do ping6 -I vboxnet0 fe80::1 and successfully ping my VM but then eventually I end up with 2 link local addresses or it'll delete mine and assign it's own.

  • 2
    Should you be using a site-local address, if you set it manually? ( 4sysops.com/archives/… ) Also I think all IPv6 interfaces need a link-local, so leave it alone. The interface will be happy to have many addresses. Feb 23, 2015 at 23:07
  • @richard yes they do need a link local but they have one.
    – Scoopta
    Feb 23, 2015 at 23:20
  • Link-local addresses are not randomly assigned. Feb 24, 2015 at 18:29
  • @MichaelHampton yes I know they're based on MAC addresses what I was saying is it kept assigning the address at random times and either deleting mine or adding it to mine...however it was always the same address.
    – Scoopta
    Feb 24, 2015 at 18:30
  • 2
    Leave the LLA alone. The LLA is constructed using the interface identifier, which cannot be modified from userland. What's wrong with the kernel-provided LLA anyway? Feb 27, 2015 at 13:55

3 Answers 3


I think what you want to solve is the problem of your manual link local address going away. Just put it in the startup config script:

# cat /etc/sysconfig/network-scripts/ifcfg-eth | grep IPV6ADDR

if you already have an ipv6 entry then use the following parameter instead:


That will make it permanent. And I agree, its nice to have a simple to remember default gateway like fe80::1 for you entire LAN. Its widely publicized to be a common practice.

And don't worry about the other automatically assigned Link Local Address. It won't affect you in any way.

  • 2
    If you forget your gateway, you can find it easily enough with ping6 ff02::2%interface. Mar 1, 2015 at 17:21
ip link set dev X addrgenmode none

(requires kernel with bc91b0f07ada553 "ipv6: addrconf: implement address generation modes", aka. 3.17+)


The IPV6 link local address is assigned based on your MAC interface, which is guaranteed to be unique. For example: here's my mac and ll address:

HWaddr: 00:50:56:c0:00:08
inet6 addr: fe80::250:56ff:fec0:8

This is how it's formed:

HWaddr:     00:    50:56  :  c0 : 00:08
inet6 addr: fe80::250:56ff:fec0 : 00 08

So, you could change your mac address to get a different link local address, if you really really want. So basically you would want to do the following, which I haven't tested:

/etc/init.d/networking stop
ifconfig eth0 hw ether 02:01:02:03:04:08 (or whatever you want)
/etc/init.d/networking start 

And there, done.

  • This is not at all what the question is. "Modern" OSes now do not assign based upon MAC address, because privacy. The poster wants to go back to the old situation. Hardwiring the address isn't really what they asked for.
    – mcr
    Jul 9, 2022 at 22:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .