From owner-freebsd-current@FreeBSD.ORG Mon Dec 24 04:07:05 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 98E02C3D; Mon, 24 Dec 2012 04:07:05 +0000 (UTC) (envelope-from kpaasial@gmail.com) Received: from mail-wg0-x22a.google.com (mail-wg0-x22a.google.com [IPv6:2a00:1450:400c:c00::22a]) by mx1.freebsd.org (Postfix) with ESMTP id EF27B8FC0A; Mon, 24 Dec 2012 04:07:04 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id dr1so2447330wgb.1 for ; Sun, 23 Dec 2012 20:07:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=G3tXt7E2tEOYQDgBs1xJSi3ljFCcaDMNmq8eTZViAKA=; b=H2H3cI9vOrUPhb22k3grq7KIxHMCBD813/Y/Rslm4PZJxwe5rlO0jnd9pEVBlWxM6p Aubp1zfQ/6zt9HwCTZvUlpxOw0/JFplHlKVX38fMYQwzP8kv88yqlaIsqGfvs8SKDIrJ rngWhse2Ip2rShiEp6EpiNpY1/lAlSrkgqeN3lJlkgpsTwG0iUmMLM702Hszq1EPDLu1 eQblzn64ZazwkKF7Q2PeDCito36BlaHfKKwxa66iFije3Qj/zPb0zj/kEKlKdvo21U9Y ycNhQ58LNjOBiJTsgbGsCkT2EIwGU2cbNlvQ/JncmXZxjXgsj1TOdfUvRA8SCEjE0u8L F49A== MIME-Version: 1.0 Received: by 10.194.9.162 with SMTP id a2mr33625162wjb.33.1356322024137; Sun, 23 Dec 2012 20:07:04 -0800 (PST) Received: by 10.216.172.197 with HTTP; Sun, 23 Dec 2012 20:07:03 -0800 (PST) In-Reply-To: <50D5F296.9050109@wasikowski.net> References: <50D1C553.9060100@wasikowski.net> <20121220132750.GB99616@stack.nl> <50D4F2E4.7020600@wasikowski.net> <20121222171400.GA2399@anubis.morrow.me.uk> <50D5F296.9050109@wasikowski.net> Date: Mon, 24 Dec 2012 06:07:03 +0200 Message-ID: Subject: Re: ipv6_addrs_IF aliases in rc.conf(5) From: Kimmo Paasiala To: =?UTF-8?Q?=C5=81ukasz_W=C4=85sikowski?= Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: Ben Morrow , FreeBSD current , freebsd-stable@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Dec 2012 04:07:05 -0000 On Sat, Dec 22, 2012 at 7:49 PM, =C5=81ukasz W=C4=85sikowski wrote: > W dniu 2012-12-22 18:14, Ben Morrow pisze: >> Quoth =3D?UTF-8?B?xYF1a2FzeiBXxIVzaWtvd3NraQ=3D=3D?=3D : >>> W dniu 2012-12-22 04:41, Kimmo Paasiala pisze: >>> >>>> Yeah, this is problem in network.subr. An interface is not recognized >>>> as IPv6 capable if the interface is not in "ipv6_network_interfaces" >>>> and there's no "ifconfig_IF_ipv6" in rc.conf(5), bummer. For IPv4 it >>>> "just works" because the interface is always assumed to be IPv4 >>>> capable. >>> >>> Ok, I used ifconfig_em0_ipv6=3D"up" and it worked. So it looks like thi= s: >> >> The documented way to do this is to just set the link-local address in >> ifconfig_IF_ipv6, since an interface is required to have a link-local >> address. Either configure an fe80:: address explicitly or set >> >> ifconfig_em0_ipv6=3D"inet6 auto_linklocal" >> >> Alternatively, if you set ipv6_activate_all_interfaces all interfaces >> will be considered IPv6-capable. > > link-local address is assigned by default, even with ifconfig_IF_ipv6=3D"= up". > > root@freebsd:~ # grep -Ev '^[[:space:]]*#|^$' /etc/rc.conf ; ifconfig > em0 | grep -E '^[[:space:]]*inet6' | head -2 > hostname=3D"freebsd" > ifconfig_em0=3D"up" > ipv4_addrs_em0=3D"192.168.168.20-24/24" > defaultrouter=3D"192.168.168.1" > ipv6_network_interfaces=3D"em0" > ipv6_defaultrouter=3D"2001:6a0:1cb::ffff" > ifconfig_em0_ipv6=3D"up" > ipv6_addrs_em0=3D"2001:6a0:1cb::1-e/128" > sshd_enable=3D"YES" > dumpdev=3D"NO" > named_enable=3D"YES" > inet6 fe80::a00:27ff:fe02:8371%em0 prefixlen 64 scopeid 0x1 > inet6 2001:6a0:1cb::1 prefixlen 128 > > Of course using "inet6 auto_linklocal" instead of "up" seems a better > way to do it, thank you for this tip. > > -- > best regards, > Lukasz Wasikowski I have put up the patch at github as: https://gist.github.com/4362018 This version should work with just the ipv6_addrs_IF in rc.conf(5). I changed the detection of ipv6 interfaces so that just having the ipv6_addrs_IF line is enough. -Kimmo