Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #235523

Re: ipv6 stable privacy (rfc 7217) as default ipv6 address for outgoing traffic

From Andy Smith <andy@strugglers.net>
Newsgroups linux.debian.user
Subject Re: ipv6 stable privacy (rfc 7217) as default ipv6 address for outgoing traffic
Date 2021-05-26 04:10 +0200
Message-ID <CiR9E-57P-1@gated-at.bofh.it> (permalink)
References <CifH3-7Zs-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Serge,

On Mon, May 24, 2021 at 11:51:12AM +0200, Serge Pouliquen wrote:
> I'm getting 2 addresses : one from slaac with stable privacy and one from
> dhcpv6.
> It looks like the one from dhcpv6 is used as the default for outgoing
> traffic.
> 
> How can I indicate that I want to use the one related to stable privacy as
> the default outgoing address ?

I'm not sure if you can do it with DHCPv6.

If you can find a way to alter your routing table, you would be
wanting to set the source address on your v6 default route.

> I can also disable dhcpv6, but I would like to keep dhcpv6.
>   iface enp6s0 inet6 auto

Could you maybe use a post-up directive to change your default
route?

$ ip -6 route show default
default via fe80::200:24ff:fec4:36dd dev enp0s31f6 proto ra metric 100 pref medium
$ my_route=$(ip -6 route show default); ip -6 route change $my_route src 2001:8b0:ca07:c57a:127b:44ff:fe93:fac4
$ ip -6 route show default
default via fe80::200:24ff:fec4:36dd dev enp0s31f6 proto ra src 2001:8b0:ca07:c57a:127b:44ff:fe93:fac4 metric 100 pref medium

(might possibly want to check that your v6 default route doesn't
already have a src ip. Also there can be multiple default routes…)

The other common way to influence source address selection is to set
preferred_lft to 0 for every IPv6 address that you DON'T want used
as a source address. Such addresses will then be marked as
"deprecated"; they will still accept traffic but will not be
selected as the source address unless forced.

Cheers,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting

Back to linux.debian.user | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

ipv6 stable privacy (rfc 7217) as default ipv6 address for outgoing  traffic Serge Pouliquen <sp31415@free.fr> - 2021-05-24 12:10 +0200
  Re: ipv6 stable privacy (rfc 7217) as default ipv6 address for  outgoing traffic Andy Smith <andy@strugglers.net> - 2021-05-26 04:10 +0200

csiph-web