From owner-freebsd-net@FreeBSD.ORG Fri Nov 7 13:01:04 2014 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CF7A065F for ; Fri, 7 Nov 2014 13:01:04 +0000 (UTC) Received: from bizet.nethelp.no (bizet.nethelp.no [195.1.209.33]) by mx1.freebsd.org (Postfix) with SMTP id 07166F76 for ; Fri, 7 Nov 2014 13:01:03 +0000 (UTC) Received: (qmail 98465 invoked from network); 7 Nov 2014 12:54:19 -0000 Received: from bizet.nethelp.no (HELO localhost) (195.1.209.33) by bizet.nethelp.no with SMTP; 7 Nov 2014 12:54:19 -0000 Date: Fri, 07 Nov 2014 13:54:19 +0100 (CET) Message-Id: <20141107.135419.41700845.sthaug@nethelp.no> To: guru@unixarea.de Subject: Re: IPv6 link-local addr && %interfacename From: sthaug@nethelp.no In-Reply-To: <20141107123343.GA8713@unixarea.DDR.dd> References: <20141107123343.GA8713@unixarea.DDR.dd> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Nov 2014 13:01:04 -0000 > 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@nethelp.no