Date: Fri, 06 Aug 2021 10:34:41 +0000 From: bugzilla-noreply@freebsd.org To: net@FreeBSD.org Subject: [Bug 218508] Tunneling and aliases using the tun device, reusing a destination address works with IPv4, but not IPv6 Message-ID: <bug-218508-7501-e1ZQ2z4uv9@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-218508-7501@https.bugs.freebsd.org/bugzilla/> References: <bug-218508-7501@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D218508 Zhenlei Huang <zlei.huang@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |zlei.huang@gmail.com --- Comment #3 from Zhenlei Huang <zlei.huang@gmail.com> --- (In reply to Christian Sturm from comment #0) The IPv6 stack does not behave the same as IPv4 stack. In this case, you can add an IPv6 alias without the destination address to tun0. ``` ifconfig tun0 inet6 2001:db8:: 2001:db8::1 prefixlen 128 ifconfig tun0 inet6 alias 2001:db8::2 prefixlen 128 ``` The long answer: In principle, a tunnel interface can be unnumbered. For a router, you can "borrow" the global unique address on loopback interface as the local addre= ss. As for numbered tunnel interface, is the peer should be numbered? No, at le= ast in principle not required. We give another thought on the remote address of tunnel interface, if both = ends are numbered, then should either end has only exactly one IP address? No. Due to historical reason, the destination address of tunnel interface can n= ot be omitted of the FreeBSD IPv4 stack implementation. But it is not the case= of IPv6 stack. Still we can teach the FreeBSD kernel to "smartly" process IPv6 aliases with same destination address. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-218508-7501-e1ZQ2z4uv9>