IPv6 link-local addr && %interfacename

sthaug at nethelp.no sthaug at nethelp.no
Fri Nov 7 13:01:04 UTC 2014


> it does not work with the link-local addr:
> 
> $ ./ipv6-client fe80::20c:29ff:fe47:a38d    
> host: fe80::20c:29ff:fe47:a38d
> ssh: connect: Network is unreachable

This is expected.

> but with appending %em0 it does work:
> 
> $ ./ipv6-client fe80::20c:29ff:fe47:a38d%em0
> host: fe80::20c:29ff:fe47:a38d%em0
> read: SSH-2.0-OpenSSH_6.6.1_hpn13v11 FreeBSD-20140420
> 
> My question is: What does the %em0 mean in the IPv6 addr and why it is
> not working without it?

A link-local address is *link-local* and needs the interface specifier
to be unique. The same address can be configured on several interfaces.

In principle you could use fe80::1 as the link local address for *all*
of your Ethernet interfaces...

Steinar Haug, Nethelp consulting, sthaug at nethelp.no


More information about the freebsd-net mailing list