Re: [Feature Request] Extended SLAAC option: Multiple options, per prefix, preferred lifetime, inform6, temporary addresses
Roy Marples
Tue Sep 12 11:15:39 2017
Hi Maddes
On 12/09/2017 00:06, M. Buecher wrote:
> Hi Roy,
>
> finally was able to correctly build the git master branch for Debian 9.0
> "Stretch".
> The fix works but IPv6 addresses are not shown as temporary:
>
> $ cat /proc/sys/net/ipv6/conf/eth0/use_tempaddr
> 0
>
> $ ip addr show
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP group default qlen 1000
> inet6 2003:a:b2b:6100:ba27:ebff:fe58:322e/64 scope global
> noprefixroute dynamic
> valid_lft 6766sec preferred_lft 3166sec
>
> $ echo 2 > /proc/sys/net/ipv6/conf/eth0/use_tempaddr
>
> $ ip addr show
> 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
> state UP group default qlen 1000
> inet6 2003:a:b2b:6100:a093:ef1b:b2bc:85a7/64 scope global
> noprefixroute dynamic
> valid_lft 7185sec preferred_lft 3585sec
> inet6 2003:a:b2b:6100:ba27:ebff:fe58:322e/64 scope global
> noprefixroute dynamic
> valid_lft 7185sec preferred_lft 3585sec
>
> When I use the systemd.network:
> inet6 2003:a:b2b:6100:fdbd:14b7:2b45:f77e/64 scope global
> *temporary* dynamic
> valid_lft 6863sec preferred_lft 3263sec
Arrgghhhh! I can't read my own comments!
On linux dhcpcd will add addresses from autoconf (RA slaac addresses)
with the mngtmpaddr flag. As such it needs to be new enough to support
it - the headers need to expose IFA_F_MANAGETEMPADDR:
http://elixir.free-electrons.com/linux/latest/source/include/uapi/linux/if_addr.h#L51
Linux will then manage temporary addresses from this address. As such,
dhcpcd won't actually report any temporary addresses, although it could
report on temporary addresses added by the kernel (add a support ticket
for this is you feel it's needed).
Example output:
$ sysctl -a | grep use_tempaddr
net.ipv6.conf.wlp8s0.use_tempaddr = 2
dhcpcd-7.0.0-rc1 starting
wlp8s0: executing `/libexec/dhcpcd-run-hooks' PREINIT
wlp8s0: executing `/libexec/dhcpcd-run-hooks' CARRIER
DUID 00:01:00:01:20:e0:f8:4a:7c:5c:f8:59:7b:b2
wlp8s0: IAID f8:59:7b:b2
wlp8s0: delaying IPv6 router solicitation for 0.1 seconds
wlp8s0: soliciting an IPv6 router
wlp8s0: sending Router Solicitation
wlp8s0: Router Advertisement from fe80::1
wlp8s0: adding address fd73:7808:1015:0:34a8:16c7:ed4c:7542/64
wlp8s0: pltime 120 seconds, vltime 180 seconds
wlp8s0: adding route to fd73:7808:1015::/64
wlp8s0: adding default route via fe80::1
wlp8s0: waiting for Router Advertisement DAD to complete
3: wlp8s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP
group default qlen 1000
link/ether 7c:5c:f8:59:7b:b2 brd ff:ff:ff:ff:ff:ff
inet6 fd73:7808:1015:0:28e9:d386:3ae3:7841/64 scope global temporary
dynamic
valid_lft 175sec preferred_lft 115sec
inet6 fd73:7808:1015:0:34a8:16c7:ed4c:7542/64 scope global
mngtmpaddr noprefixroute dynamic
valid_lft 175sec preferred_lft 115sec
Roy
References:
| [Feature Request] Extended SLAAC option: Multiple options, per prefix, preferred lifetime, inform6, temporary addresses | M. Buecher |
| Re: [Feature Request] Extended SLAAC option: Multiple options, per prefix, preferred lifetime, inform6, temporary addresses | Roy Marples |
| Re: [Feature Request] Extended SLAAC option: Multiple options, per prefix, preferred lifetime, inform6, temporary addresses | Roy Marples |
| Re: [Feature Request] Extended SLAAC option: Multiple options, per prefix, preferred lifetime, inform6, temporary addresses | M. Buecher |
Archive administrator: postmaster@marples.name