From owner-freebsd-net@freebsd.org Wed Jul 31 12:50:29 2019 Return-Path: Delivered-To: freebsd-net@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E3911BDBAB for ; Wed, 31 Jul 2019 12:50:29 +0000 (UTC) (envelope-from ietf-dane@dukhovni.org) Received: from straasha.imrryr.org (straasha.imrryr.org [100.2.39.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45zCvT40stz3J9s for ; Wed, 31 Jul 2019 12:50:29 +0000 (UTC) (envelope-from ietf-dane@dukhovni.org) Received: by straasha.imrryr.org (Postfix, from userid 1001) id EBCE047148; Wed, 31 Jul 2019 08:50:28 -0400 (EDT) Date: Wed, 31 Jul 2019 08:50:28 -0400 From: Viktor Dukhovni To: freebsd-net@freebsd.org Subject: Re: Preferring internal IPv6 source address over gif tunnel IP? Message-ID: <20190731125028.GE24255@straasha.imrryr.org> Reply-To: freebsd-net@freebsd.org References: <20190731120726.GD24255@straasha.imrryr.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190731120726.GD24255@straasha.imrryr.org> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: 45zCvT40stz3J9s X-Spamd-Bar: ++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=pass (mx1.freebsd.org: domain of ietf-dane@dukhovni.org designates 100.2.39.101 as permitted sender) smtp.mailfrom=ietf-dane@dukhovni.org X-Spamd-Result: default: False [2.94 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[freebsd-net@freebsd.org]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:100.2.39.101]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[dukhovni.org]; RCPT_COUNT_ONE(0.00)[1]; IP_SCORE(-1.57)[ip: (-5.79), ipnet: 100.2.0.0/16(-2.89), asn: 701(0.88), country: US(-0.05)]; RCVD_IN_DNSWL_MED(-0.20)[101.39.2.100.list.dnswl.org : 127.0.6.2]; MX_GOOD(-0.01)[cached: smtp.dukhovni.org]; NEURAL_HAM_SHORT(-0.98)[-0.977,0]; RCVD_COUNT_ZERO(0.00)[0]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; SUBJECT_ENDS_QUESTION(1.00)[]; ASN(0.00)[asn:701, ipnet:100.2.0.0/16, country:US]; MIME_TRACE(0.00)[0:+]; REPLYTO_EQ_TO_ADDR(5.00)[] X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 31 Jul 2019 12:50:29 -0000 On Wed, Jul 31, 2019 at 08:07:26AM -0400, Viktor Dukhovni wrote: > HE provides me with two prefixes: > > 1. Point to point tunnel /128: > > cloned_interfaces="gif0" > create_args_gif0="tunnel " > ifconfig_gif0_ipv6="inet6 ::2 ::1 prefixlen 128" > ipv6_defaultrouter="::1" > > 2. A /64 for my network: > > ipv6_network_interfaces="igb1" > ifconfig_igb1_ipv6="inet6 ::1 prefixlen 64" > > Is it possible to configure my system to use the internal /64 address > as the default source address of outgoing IPv6 packets? After further manpage reading, it seems to work with: ifconfig_gif0_ipv6="inet6 ::2 ::1 prefixlen 128 no_prefer_iface" ifconfig_igb1_ipv6="inet6 ::1 prefixlen 64 prefer_source" ip6addrctl_policy="AUTO" and in /etc/ip6addrctl.conf: ... # Default IPv6 label is 1 # Use internal address as source for generic IPv6 destinations. ::/0 40 1 ::/64 40 1 ... Likely some of this is not needed, but not sure which. -- Viktor.