From owner-freebsd-doc@freebsd.org Sun Jul 26 20:04:05 2015 Return-Path: Delivered-To: freebsd-doc@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93B649AB4E9 for ; Sun, 26 Jul 2015 20:04:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from mail.allbsd.org (gatekeeper.allbsd.org [IPv6:2001:2f0:104:e001::32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.allbsd.org", Issuer "RapidSSL CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C1A34EAA; Sun, 26 Jul 2015 20:04:04 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from alph.d.allbsd.org (alph.d.allbsd.org [IPv6:2001:2f0:104:e010:862b:2bff:febc:8956] (may be forged)) (authenticated bits=56) by mail.allbsd.org (8.14.9/8.14.9) with ESMTP id t6QK3hO9036813 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 27 Jul 2015 05:03:45 +0900 (JST) (envelope-from hrs@FreeBSD.org) Received: from localhost (localhost [IPv6:::1]) (authenticated bits=0) by alph.d.allbsd.org (8.14.9/8.14.9) with ESMTP id t6QK3eBW093446; Mon, 27 Jul 2015 05:03:42 +0900 (JST) (envelope-from hrs@FreeBSD.org) Date: Mon, 27 Jul 2015 05:01:22 +0900 (JST) Message-Id: <20150727.050122.1732608092550007825.hrs@allbsd.org> To: dru@freebsd.org, dru.lavigne@att.net Cc: freebsd-doc@FreeBSD.org, ruesing@kdo.de Subject: Re: Documentation shortcoming From: Hiroki Sato In-Reply-To: <1437908470.22608.YahooMailBasic@web184901.mail.gq1.yahoo.com> References: <1437908470.22608.YahooMailBasic@web184901.mail.gq1.yahoo.com> X-PGPkey-fingerprint: BDB3 443F A5DD B3D0 A530 FFD7 4F2C D3D8 2793 CF2D X-Mailer: Mew version 6.6 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Multipart/Signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="--Security_Multipart0(Mon_Jul_27_05_01_22_2015_833)--" Content-Transfer-Encoding: 7bit X-Virus-Scanned: clamav-milter 0.98.6 at gatekeeper.allbsd.org X-Virus-Status: Clean X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4.3 (mail.allbsd.org [IPv6:2001:2f0:104:e001::32]); Mon, 27 Jul 2015 05:03:51 +0900 (JST) X-Spam-Status: No, score=-98.0 required=13.0 tests=CONTENT_TYPE_PRESENT, RCVD_IN_AHBL, RCVD_IN_AHBL_PROXY, RCVD_IN_AHBL_SPAM, RDNS_NONE, USER_IN_WHITELIST autolearn=no autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on gatekeeper.allbsd.org X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Jul 2015 20:04:05 -0000 ----Security_Multipart0(Mon_Jul_27_05_01_22_2015_833)-- Content-Type: Multipart/Mixed; boundary="--Next_Part(Mon_Jul_27_05_01_22_2015_361)--" Content-Transfer-Encoding: 7bit ----Next_Part(Mon_Jul_27_05_01_22_2015_361)-- Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Dru Lavigne wrote in <1437908470.22608.YahooMailBasic@web184901.mail.gq1.yahoo.com>: dr> Apparently, this is only required for link local addresses, which dr> should be clarified in the Handbook. Can someone with more IPv6-clue dr> suggest a clearer wording so that both cases are understood? I have a patch including this kind of clarification and other updates (attached). Can you review this? -- Hiroki ----Next_Part(Mon_Jul_27_05_01_22_2015_361)-- Content-Type: Text/X-Patch; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="handbook-ipv6.20150727-1.diff" Index: advanced-networking/chapter.xml =================================================================== --- advanced-networking/chapter.xml (revision 47106) +++ advanced-networking/chapter.xml (working copy) @@ -4439,10 +4439,10 @@ Anycast These addresses are syntactically indistinguishable - from unicast addresses but they address a group of - interfaces. The packet destined for an anycast address - will arrive at the nearest router interface. Anycast - addresses are only used by routers. + from unicast addresses but they address any of the + interface belonging to the address. The packet destined + for an anycast address will be received by one of the + interfaces. @@ -4450,13 +4450,8 @@ Multicast These addresses identify a group of interfaces. A - packet destined for a multicast address will arrive at - all interfaces belonging to the multicast group. The - IPv4 broadcast address, usually - xxx.xxx.xxx.255, is - expressed by multicast addresses in - IPv6. + packet destined for a multicast address will be received by + all interfaces belonging to the multicast group. @@ -4484,7 +4479,7 @@ which in turn is equivalent to 2002::a00:1. - To view a &os; system's IPv6 address, + To view a &os; system's IPv6 address, use &man.ifconfig.8;: &prompt.root; ifconfig @@ -4538,16 +4533,8 @@ - ::00:xx:xx:xx:xx + ::ffff:xx:xx:xx:xx 96 bits - embedded IPv4 - The lower 32 bits are the compatible - IPv4 address. - - - - ::ff:xx:xx:xx:xx - 96 bits IPv4 mapped IPv6 address The lower 32 bits are the IPv4 @@ -4556,11 +4543,15 @@ - fe80::/10 + fe80::%rl0/10 10 bits link-local Equivalent to 169.254.0.0/16 in - IPv4. + IPv4. An address with link-local + scope always needs a zone id part + %rl0 because it is unique only on a + link. The zone id is an interface name or an + interface index number. @@ -4580,7 +4571,7 @@ - 2000::-3fff:: + 2000::-3fff:: 3 bits global unicast All global unicast addresses are assigned from @@ -4597,21 +4588,22 @@ - Configuring <acronym>IPv6</acronym> + Configuring <acronym>IPv6</acronym> Host To configure a &os; system as an IPv6 - client, add these two lines to + host, add these two lines to rc.conf: - ifconfig_rl0_ipv6="inet6 accept_rtadv" -rtsold_enable="YES" + ifconfig_rl0_ipv6="inet6 accept_rtadv" - The first line enables the specified interface to receive - router solicitation messages. The second line enables the - router solicitation daemon, &man.rtsol.8;. + This line enables the specified interface to receive + Router Advertisement messages, which are distributed by + routers on the same link to provide information about subnet + prefix, default routers, MTU, recursive + DNS server list, and so on. - For &os; 8.x, add a third - line: + For &os; 8.x, add the + following line: ipv6_enable="YES" @@ -4619,16 +4611,25 @@ IPv6 address, add an entry to specify the static address and associated prefix length: - ifconfig_rl0_ipv6="inet6 2001:db8:4672:6565:2026:5043:2d42:5344 prefixlen 64" + ifconfig_rl0_ipv6="inet6 2001:db8:4672:6565:2026:5043:2d42:5344/64" On a &os; 8.x system, that line uses this format instead: - ipv6_ifconfig_rl0="2001:db8:4672:6565:2026:5043:2d42:5344" + ipv6_ifconfig_rl0="2001:db8:4672:6565:2026:5043:2d42:5344 prefixlen 64" - To assign a default router, specify its address: + To manually assign a default router, specify its address. + Note that this information is also provided via Router + Advertisement messages and the specified address will not be + overridden. ipv6_defaultrouter="2001:db8:4672:6565::1" + + This can be an link-local address because an IPv6-capable + interfaces always has one. In that case, an address must be + associated with a zone id: + + ipv6_defaultrouter="fe80::1%rl0" @@ -4672,8 +4673,14 @@ the generic tunneling interface gif0: - gif_interfaces="gif0" + cloned_interfaces="gif0" + + gif_interfaces and + gif_ifconfig used in earlier releases are + now obsolete. + + Next, configure that interface with the IPv4 addresses of the local and remote endpoints. Replace MY_IPv4_ADDR @@ -4680,7 +4687,7 @@ and REMOTE_IPv4_ADDR with the actual IPv4 addresses: - gifconfig_gif0="MY_IPv4_ADDR REMOTE_IPv4_ADDR" + ifconfig_gif0="inet tunnel MY_IPv4_ADDR REMOTE_IPv4_ADDR" To apply the IPv6 address that has been assigned for use as the IPv6 tunnel @@ -4688,7 +4695,7 @@ MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR with the assigned address: - ifconfig_gif0_ipv6="inet6 MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR" + ifconfig_gif0_ipv6="inet6 tunnel MY_ASSIGNED_IPv6_TUNNEL_ENDPOINT_ADDR" For &os; 8.x, that line should instead use this format: @@ -4711,38 +4718,76 @@ - Router Advertisement and Host Auto Configuration + <acronym>IPv6</acronym> Router Configuration This section demonstrates how to setup &man.rtadvd.8; to - advertise the IPv6 default route. + distribute Router Advertisement messages. To enable &man.rtadvd.8;, add the following to /etc/rc.conf: - rtadvd_enable="YES" + ipv6_gateway_enable="YES" +rtadvd_enable="YES" - It is important to specify the interface on which to - do IPv6 router solicitation. For example, - to tell &man.rtadvd.8; to use - rl0: + It is important to specify the interface on which to send + IPv6 Router Advertisement messages. For + example, to tell &man.rtadvd.8; to use + rl0: rtadvd_interfaces="rl0" - Next, create the configuration file, - /etc/rtadvd.conf as seen in this - example: + A valid global IPv6 prefix must be + configured on rl0 interface. + ifconfig_rl0_ipv6="inet6 2001:db8:1::1/64" + + And on every IPv6 router, a + subnet-router anycast address should be configured as an + alias. It is the same address and prefix length as the global + IPv6 prefix with an additional keyword + anycast. + + ifconfig_rl0_ipv6_alias0="inet6 2001:db8:1::/64 anycast" + + Note that &man.rtadvd.8; normally does not require a + configuration file, /etc/rtadvd.conf. + + For exmaple, information about available recursive + DNS servers and/or search list for + non-fully-qualified domain name can be distributed via Router + Advertisement message. To enable this, create the + configuration file, /etc/rtadvd.conf as + seen in this example: + rl0:\ - :addrs#1:addr="2001:471:1f11:246::":prefixlen#64:tc=ether: + :rdnss="2001:db8:ffff::10,2001:db8:ffff::2:43":\ + :dnssl="example.com": - Replace rl0 with the interface - to be used and 2001:471:1f11:246:: - with the prefix of the allocation. + More details can be found in &man.rtadvd.conf.5; manual + page. - For a dedicated /64 subnet, nothing else needs - to be changed. Otherwise, change the - prefixlen# to the correct value. + IPv6 host nodes on the same link will + receive Router Advertisement messages from this router and + configure a global IPv6 address and the + IPv6 default route. The receipt of the + messages is disabled by default. The following line in + /etc/rc.conf on an + IPv6 host enables it on + rl0 interface as explained + earlier: + + ifconfig_rl0_ipv6="inet6 accept_rtadv" + + And if Router Advertisement messages contain lists of + recursive DNS server and/or search list for + non-fully-qualified domain name, an IPv6 + host has to enable &man.rtsold.8; daemon by adding the + following line to /etc/rc.conf: + + rtsold_enable="YES" + + This daemon handles updating + /etc/resolv.conf. ----Next_Part(Mon_Jul_27_05_01_22_2015_361)---- ----Security_Multipart0(Mon_Jul_27_05_01_22_2015_833)-- Content-Type: application/pgp-signature Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEABECAAYFAlW1PJIACgkQTyzT2CeTzy2MOQCeNV/HP4mYjleR3NvfC/tdqOmF tc4AnRqbxNSH3ClTCxLQ5oeHjq8fHeOf =Vkej -----END PGP SIGNATURE----- ----Security_Multipart0(Mon_Jul_27_05_01_22_2015_833)----