Preferring internal IPv6 source address over gif tunnel IP?
Viktor Dukhovni
ietf-dane at dukhovni.org
Wed Jul 31 12:50:29 UTC 2019
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 <my-public-ipv4> <their-tunnel-ipv4>"
> ifconfig_gif0_ipv6="inet6 <tunnel-prefix>::2 <tunnel-prefix>::1 prefixlen 128"
> ipv6_defaultrouter="<tunnel-prefix>::1"
>
> 2. A /64 for my network:
>
> ipv6_network_interfaces="igb1"
> ifconfig_igb1_ipv6="inet6 <my-network>::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 <tunnel-prefix>::2 <tunnel-prefix>::1 prefixlen 128 no_prefer_iface"
ifconfig_igb1_ipv6="inet6 <my-network>::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
<my-network>::/64 40 1
...
Likely some of this is not needed, but not sure which.
--
Viktor.
More information about the freebsd-net
mailing list