From nobody Sat Nov 20 19:04:48 2021 X-Original-To: dev-commits-src-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 F1538188C717; Sat, 20 Nov 2021 19:04:49 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HxNJK1RPxz4svX; Sat, 20 Nov 2021 19:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 BCD5F20F6A; Sat, 20 Nov 2021 19:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1AKJ4mmc016995; Sat, 20 Nov 2021 19:04:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AKJ4mZv016994; Sat, 20 Nov 2021 19:04:48 GMT (envelope-from git) Date: Sat, 20 Nov 2021 19:04:48 GMT Message-Id: <202111201904.1AKJ4mZv016994@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 3f7b9525ea48 - main - if_stf: document 6rd in the man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f7b9525ea48afcb297abcf6c66bd39fcf6b756b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=3f7b9525ea48afcb297abcf6c66bd39fcf6b756b commit 3f7b9525ea48afcb297abcf6c66bd39fcf6b756b Author: Kristof Provost AuthorDate: 2021-11-17 00:13:17 +0000 Commit: Kristof Provost CommitDate: 2021-11-20 18:29:02 +0000 if_stf: document 6rd in the man page PR: 253328 Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D33042 --- share/man/man4/stf.4 | 66 +++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 63 insertions(+), 3 deletions(-) diff --git a/share/man/man4/stf.4 b/share/man/man4/stf.4 index 786acb22fce1..7a5e16be56d8 100644 --- a/share/man/man4/stf.4 +++ b/share/man/man4/stf.4 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 28, 2012 +.Dd November 16, 2021 .Dt STF 4 .Os .Sh NAME @@ -44,11 +44,15 @@ The .Nm interface supports .Dq 6to4 +and +.Dq 6rd IPv6 in IPv4 encapsulation. It can tunnel IPv6 traffic over IPv4, as specified in -.Li RFC3056 . +.Li RFC3056 +or +.Li RFC5969 . .Pp -For ordinary nodes in 6to4 site, you do not need +For ordinary nodes in a 6to4 or 6RD site, you do not need .Nm interface. The @@ -56,6 +60,8 @@ The interface is necessary for site border router (called .Dq 6to4 router +or +.Dq 6rd Customer Edge (CE) in the specification). .Pp Each @@ -69,6 +75,7 @@ command or using the .Va cloned_interfaces variable in .Xr rc.conf 5 . +.Sh 6to4 .Pp Due to the way 6to4 protocol is specified, .Nm @@ -180,6 +187,41 @@ Note, however, there are other security risks exist. If you wish to use the configuration, you must not advertise your 6to4 address to others. .\" +.Sh 6rd +Like +.Dq 6to4 +.Dq 6rd +also requires configuration before it can be used. +The required configuration parameters are: +.Bl -bullet +.It +The IPv6 address and prefix length. +.It +The border router IPv4 address. +.It +The IPv4 WAN address. +.It +The prefix length of the IPv4 WAN address. +.El +.Pp +These can parameters are all configured through +.Xr ifconfig 8 . +.Pp +The IPv6 address and prefix length can be configured like any other IPv6 address. +Note that the prefix length is the IPv6 prefix length excluding the embedded +IPv4 address bits. +The prefix length of the delegated network is the sum of the IPv6 prefix length +and the IPv4 prefix length. +.Pp +The border router IPv4 address is configured with the +.Xr ifconfig 8 +.Cm stfv4br +command. +.Pp +The IPv4 WAN address and IPv4 prefix length are configured using the +.Xr ifconfig 8 +.Cm stfv4net +command. .Sh SYSCTL VARIABLES The following .Xr sysctl 8 @@ -241,6 +283,24 @@ and not to use your 6to4 prefix as a source. # route add -inet6 2002:: -prefixlen 16 ::1 # route change -inet6 2002:: -prefixlen 16 ::1 -ifp stf0 .Ed +.Pp +The following example configures a +.Dq 6rd +tunnel on a +.Dq 6rd CE +where the ISP's +.Dq 6rd +IPv6 prefix is 2001:db8::/32. +The border router is 192.0.2.1. +The +.Dq 6rd CE +has a WAN address of 192.0.2.2 and the full IPv4 address is embedded in the +.Dq 6rd IPv6 address: +.Bd -literal +# ifconfig stf0 inet6 2001:db8:c000:0202:: prefixlen 32 up +# ifconfig stf0 stfv4br 192.0.2.1 +# ifconfig stf0 stfv4net 192.0.2.2/32 +.Ed .\" .Sh SEE ALSO .Xr gif 4 ,