[ECOS] IPv6 Link Local Address - Link ID?

Shaun Louie sal@microplex.com
Mon Apr 21 11:11:00 GMT 2008

Ok, thanks for confirming this for me.  I was a little worried that the 
hacked address might be used on the network in some cases.  I'm also 
using the ioctl SIOCGIFCONF option to retrieve the current network 
configuration for the user, but I'll just make sure to undo the hack on 
the link address before reporting it.


Jay Foster wrote:
> I believe that the KAME/FreeBSD stack internally hacks bytes 2 and 3
> (counting the first byte as byte 0) of IPv6 link-local addresses to contain
> the associated interface index.  The IPv6 standard defines these bytes to be
> "always 0", and the FreeBSD stack automatically modifies them as necessary
> when sending/receiving packets.
> Perhaps this is what you are seeing?
> Jay
> -----Original Message-----
> From: Shaun Louie [mailto:sal@microplex.com]
> Sent: Friday, April 18, 2008 11:43 AM
> To: ecos-discuss@sourceware.org
> Subject: [ECOS] IPv6 Link Local Address - Link ID?
> Hi,
> When I add a new link local address using SIOCAIFADDR_IN6, the 
> in6_control() function sets a Link ID (3rd and 4th bytes) equal to the 
> interface index. Using ioctl with SIOCGIFCONF after setting the address, 
> I see that the link local address has this Link ID part set to 0x0001. 
> The problem is that from another machine, I cannot ping the link local 
> address that has the Link ID set, but only the original link local 
> address I intended to program to the stack. Maybe the Link ID part of 
> the link local address is only for internal use within the stack?
> Another issue is with the Link ID itself - why is it needed and where is 
> it being used? If there is more than one interface, each interface 
> should be given its own MAC address, and therefore the device should 
> generate different link local addresses for each interface. There should 
> be no need to add a separate field in the link local address to 
> differentiate between interfaces, if that is what it is for.
> Thanks in advance,
> Shaun Louie

Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

More information about the Ecos-discuss mailing list