From nobody Tue May 20 18:38:53 2025 X-Original-To: dev-commits-doc-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4b23H13148z5wms6 for ; Tue, 20 May 2025 18:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4b23H128mnz47v1; Tue, 20 May 2025 18:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747766333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kDA4QF+8Rdh4ZJembrzOFOhxkJGb4FF1j5Z03qQm9ZY=; b=LQ5tu+EGbvLhSP0Ki6A3afAIMTZTY8MYmWfWr3lV+/6lL5zGkn3EsFf7zsyrs8IR2it/Od SgqdMzRtZO/GmU/+yNAwoyTPpWavsSnXOVygE0rnWdAuhGKT8fyM4BriOIotT7p1M6RDDZ bMlMyt1RN5S/oBLqDW5GuPC7ZClIF/ogjLPhWXDu8JD2AvdsvkTrBFTwWB1y63BZNBGYvu uKzSp20yYLqRvs3mQfuHdEOxYkgTUIRuHcFS7Ma9JhJm+eYAdy731gEtKOBpdlUunT/JPh uJ2HBDbQN4+7hlgcOA0RsdvTbfvG1OtMhnQ4n8YOtQe2b1qRpjth+Oc2kfenAQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1747766333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kDA4QF+8Rdh4ZJembrzOFOhxkJGb4FF1j5Z03qQm9ZY=; b=d4WbBacpA+Kl1DWvkj3tzms8YqIlV/oUjDxg7OEB2L7pVqqwMZYnuGkJqO4nriwJjOlVZT IVe3w3YWDK4/4N5meIjtJEBWSoYA5QT20cWdxKmrgboJRnjj6FMrHw5aoDyr4r9AlH1TMN xqnZ9bcBQJ4hO7KY2Uw0NdL4gYq3f480kCKe1796sNpqo/yyTXs+1bOfnxL2l7BcWnmWXa cJFeRburVwoUQ8vbOU8w9z4h3hnTh5J54/cN5pHQGUM5S2cj8JliW7KyelrOknEFESrSUg JWM4Fgk7OJDn8QP0G1W1SuzCCZ6U17mZu9SnGcfzah5zZHTOiwt2fOlgD6GX5g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1747766333; a=rsa-sha256; cv=none; b=oklfoskcNesrmxUmYEG8RzNiu3YIZ2e0nrLe6PUTaW+OxxIrS+e06B9bCHZoF/AbOqgc3T a+rL9I8zqTYyRS+X1o/LtwLbVBMzN3xUJeYxPaTYV191kI3WQ0VNKk0hOUCJ9VUtdd8kTP WCutlABSP1/LLBmgK7Pictk7fj9jB43zrOCpjwiWFgsVgGu1EM0kuE8Fj/4di0NSTjEBZM BQGIbHvkmNEsx7cYKiaRBPg3cFqM47FwsGc1WhGacqTLlFGKI75/GlaQRg2RTPm/fYcqtF y/XoxzoNI20sRuDStqh1EfqCSG1WEU5a8swHn7KapjN2opoluapc3hNACfmUpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4b23H11SKPz11Gk; Tue, 20 May 2025 18:38:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 54KIcrYr068414; Tue, 20 May 2025 18:38:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 54KIcrqE068411; Tue, 20 May 2025 18:38:53 GMT (envelope-from git) Date: Tue, 20 May 2025 18:38:53 GMT Message-Id: <202505201838.54KIcrqE068411@gitrepo.freebsd.org> To: doc-committers@FreeBSD.org, dev-commits-doc-all@FreeBSD.org From: Lexi Winter Subject: git: e1054c3d55 - main - Handbook: Improve IPv6 documentation List-Id: Commit messages for all branches of the doc repository List-Archive: https://lists.freebsd.org/archives/dev-commits-doc-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-doc-all@freebsd.org Sender: owner-dev-commits-doc-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: doc X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1054c3d553d606d6e1703fb94a8edb7564067fd Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/doc/commit/?id=e1054c3d553d606d6e1703fb94a8edb7564067fd commit e1054c3d553d606d6e1703fb94a8edb7564067fd Author: Seyed Pouria Mousavizadeh Tehrani AuthorDate: 2025-05-20 18:29:41 +0000 Commit: Lexi Winter CommitDate: 2025-05-20 18:38:08 +0000 Handbook: Improve IPv6 documentation Reviewed by: ivy, ziaee, carlavilla, olivier, des Approved by: des (mentor), doceng (doc) Differential Revision: https://reviews.freebsd.org/D49782 --- .../content/en/books/handbook/glossary.adoc | 7 +++ .../content/en/books/handbook/network/_index.adoc | 57 ++++++++++------------ 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/documentation/content/en/books/handbook/glossary.adoc b/documentation/content/en/books/handbook/glossary.adoc index 2009f4ac22..de369e8d2f 100644 --- a/documentation/content/en/books/handbook/glossary.adoc +++ b/documentation/content/en/books/handbook/glossary.adoc @@ -903,6 +903,9 @@ See crossref:glossary[scsi-glossary,Small Computer System Interface]. SG:: See crossref:glossary[sg-glossary,Signal Ground]. +SLAAC:: +See crossref:glossary[slaac-glossary,StateLess Address AutoConfiguration]. + SMB:: See crossref:glossary[smb-glossary,Server Message Block]. @@ -924,6 +927,10 @@ See crossref:glossary[str-glossary,Suspend To RAM]. SVN:: See crossref:glossary[svn-glossary,Subversion]. +[[slaac-glossary]] +StateLess Address AutoConfiguration:: +{empty} + [[smtpauth-glossary]] SMTP Authentication:: {empty} diff --git a/documentation/content/en/books/handbook/network/_index.adoc b/documentation/content/en/books/handbook/network/_index.adoc index 2db78fe808..875e9fa7cf 100644 --- a/documentation/content/en/books/handbook/network/_index.adoc +++ b/documentation/content/en/books/handbook/network/_index.adoc @@ -110,7 +110,7 @@ em0@pci0:0:25:0: class=0x020000 rev=0x03 hdr=0x00 vendor=0x8086 device=0x iwn0@pci0:3:0:0: class=0x028000 rev=0x00 hdr=0x00 vendor=0x8086 device=0x4237 subvendor=0x8086 subdevice=0x1211 vendor = 'Intel Corporation' <1> device = 'PRO/Wireless 5100 AGN [Shiloh] Network Connection' <2> - class = networ + class = network .... The text before the '@' symbol is the name of the driver controlling the device. @@ -356,7 +356,7 @@ IPv6 provides several advantages over IPv4 as well as many new features: * Its 128-bit address space allows for 340,282,366,920,938,463,463,374,607,431,768,211,456 addresses. This addresses the IPv4 address shortage and eventual IPv4 address exhaustion. * Routers only store network aggregation addresses in their routing tables, thus reducing the average space of a routing table to 8192 entries. This addresses the scalability issues associated with IPv4, which required every allocated block of IPv4 addresses to be exchanged between Internet routers, causing their routing tables to become too large to allow efficient routing. -* Address autoconfiguration (http://www.ietf.org/rfc/rfc2462.txt[RFC2462]). +* Address autoconfiguration (http://www.ietf.org/rfc/rfc4862.txt[RFC4862]). * Mandatory multicast addresses. * Built-in IPsec (IP security). * Simplified header structure. @@ -374,8 +374,7 @@ A packet sent to a unicast address arrives at the interface belonging to the add 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. +The packet destined for an anycast address will arrive at the nearest interface. Multicast:: These addresses identify a group of interfaces. @@ -421,55 +420,46 @@ A list of reserved addresses can be checked in the following table: [[reservedip6]] .Example IPv6 Reserved Addresses -[cols="1,1,1,1", frame="none", options="header"] +[cols="1,1,1", frame="none", options="header"] |=== | IPv6 address -| Prefixlength (Bits) | Description | Notes -|`::` -|128 bits +|`::/128` |unspecified |Equivalent to `0.0.0.0` in IPv4. -|`::1` -|128 bits +|`::1/128` |loopback address |Equivalent to `127.0.0.1` in IPv4. -|`::00:xx:xx:xx:xx` -|96 bits -|embedded IPv4 -|The lower 32 bits are the compatible IPv4 address. - -|`::ff:xx:xx:xx:xx` -|96 bits +|`::ffff:0.0.0.0/96` |IPv4 mapped IPv6 address -|The lower 32 bits are the IPv4 address for hosts which do not support IPv6. +|The lower 32 bits are the IPv4 address for compatibility with IPv4 hosts and routers. |`fe80::/10` -|10 bits -|link-local +|link-local unicast |Equivalent to 169.254.0.0/16 in IPv4. |`fc00::/7` -|7 bits |unique-local |Unique local addresses are intended for local communication and are only routable within a set of cooperating sites. -|`ff00::` -|8 bits +|`ff00::/8` |multicast | -|``2000::-3fff::`` -|3 bits +|`2000::/3` |global unicast |All global unicast addresses are assigned from this pool. The first 3 bits are `001`. + +|``2001:db8::/32, 3fff::/20`` +|documentation +|IPv6 address prefix for use in documentation. |=== -For further information on the structure of IPv6 addresses, refer to http://www.ietf.org/rfc/rfc3513.txt[RFC3513]. +For further information on the structure of IPv6 addresses, refer to http://www.ietf.org/rfc/rfc4291.txt[RFC4291]. [[config-static-ip-v6]] === Configuring Static IPv6 Address @@ -490,13 +480,18 @@ To assign a default router, specify its address executing the following command: # sysrc ipv6_defaultrouter="2001:db8:4672:6565::1" .... +To configure an additional IPv6 anycast address, specify the anycast address as an `_aliasN`, as specified in man:rc.conf[5], followed by the `anycast` option: +[source,shell] +.... +# sysrc ifconfig_em0_alias0="inet6 2001:db8:4672:6565::a anycast" +.... + +Keep in mind that the applications can't bind to anycast addresses; in that case you need to use an alias address instead. + [[config-dynamic-ip-v6]] === Configuring Dynamic IPv6 Address -If the network has a DHCP server, it is very easy to configure the network interface to use DHCP. -man:dhclient[8] will provide automatically the IP, the netmask and the default router. - -To make the interface work without DHCP, execute the following commands: +To dynamically configure the IPv6 address of the interface using crossref:glossary[slaac-glossary,SLAAC], execute the following commands: [source,shell] .... @@ -504,6 +499,8 @@ To make the interface work without DHCP, execute the following commands: # sysrc rtsold_enable="YES" .... +Note that when IPv6 packet forwarding is enabled (i.e., `ipv6_gateway_enable=YES`), the system will not configure a SLAAC address unless the `net.inet6.ip6.rfc6204w3` man:sysctl[8] variable is set to 1. + === Router Advertisement and Host Auto Configuration This section demonstrates how to setup man:rtadvd[8] on an IPv6 router to advertise the IPv6 network prefix and default route.