I have a VPN connecting two virtual interfaces of two hosts. Both VPN interfaces have MAC addresses 00:00:00:00:00:00, as the OS (Linux) assigns link-local IPv6 address based on MAC address. So the link-local IPv6 addresses are identical for both peers. This breaks OSPFv3 (at least).

What is the right way to obtain IPv6 addresses, which would be unique on the link, for such interfaces? I expect that I'd not need to configure a new IPv6 network and manually assign addresses from it to VPN endpoints.

  • 3
    Why not configure your interfaces to use something other than an invalid MAC address? Many network devices will drop traffic that contains an all zero MAC address as invalid. This would also solve your IPv6 problem.
    – YLearn
    Jul 14, 2015 at 19:30
  • 4
    @jwbensley It seems to me that the material question here is "What is the right way to obtain IPv6 addresses, which would be unique on the link, for such interfaces?" which seems to be squarely on topic for networking.SE.
    – alx9r
    Jul 14, 2015 at 21:58
  • 1
    @alx9r It is within the RFC for there to be two interfaces on one device and have them both use the same link-local address. The OS will typically assign an interface identifier to distinguish one link-local "network" from the next. For example, my Win7 box's SLAAC generated IPv6 address is: fe80::8dcf:9f11:dec9:527c%23, and the %23 is what identifies that particular interface. Now, if some external application has issues with that, then the solution is to manually assign link-local addresses as necessary.
    – Eddie
    Jul 15, 2015 at 0:42
  • 1
    @alx9r - Yes I agree with what you are saying, however having two interface with all zero's MAC address, it could cause an issue for the underlying protocols so best practice would probably be to fix that. By way of fixing that the OP wouldn't have this problem (most likely). As Eddie has said, there is a work around for having two link-local addresses on the same box within the RFC, but that's assuming the interface has a MAC address which the OP's does not...
    – jwbensley
    Jul 15, 2015 at 9:05
  • 1
    The OP is getting two duplicate addresses because the virtual interfaces have duplicate/missing MACs, solving this at the IP layer isn't fixing the underlying issue but working around it. That is my point, fix the underlying MAC issue.
    – jwbensley
    Jul 15, 2015 at 9:06


Browse other questions tagged or ask your own question.