La evolución de la especificación de las extensiones de privacidad se referencia principalmente en los siguientes documentos:
RFC 3041 - Privacy Extensions for Stateless Address Autoconfiguration in IPv6
January 2001
RFC 4941 - Privacy Extensions for Stateless Address Autoconfiguration in IPv6
September 2007
Obsoletes: 3041
RFC 8981 - Temporary Address Extensions for Stateless Address Autoconfiguration in IPv6
February 2021
Obsoletes: 4941
Authors: F. Gont - SI6 Networks, S. Krishnan - Kaloom, T. Narten, R. Draves - Microsoft Research
RFC 7217 - A Method for Generating Semantically Opaque Interface Identifiers with IPv6 Stateless Address Autoconfiguration (SLAAC)
April 2014
Authors: F. Gont - SI6 Networks / UTN-FRH
Y la implementación de este mecanismo en el kernel de Linux comprende los parámetros:
xuse_tempaddr - INTEGER
Preference for Privacy Extensions (RFC3041).
<= 0 : disable Privacy Extensions
== 1 : enable Privacy Extensions, but prefer public
addresses over temporary addresses.
> 1 : enable Privacy Extensions and prefer temporary
addresses over public addresses.
Default: 0 (for most devices)
-1 (for point-to-point devices and loopback devices)
temp_valid_lft - INTEGER
valid lifetime (in seconds) for temporary addresses.
Default: 604800 (7 days)
temp_prefered_lft - INTEGER
Preferred lifetime (in seconds) for temporary addresses.
Default: 86400 (1 day)
addr_gen_mode - INTEGER
Defines how link-local and autoconf addresses are generated.
0: generate address based on EUI64 (default)
1: do no generate a link-local address, use EUI64 for addresses generated
from autoconf
2: generate stable privacy addresses, using the secret from
stable_secret (RFC7217)
3: generate stable privacy addresses, using a random secret if unset
4.1 Chequeamos estos parámetros en H2
xxxxxxxxxx
sysctl -a | grep ipv6 | grep tempaddr
net.ipv6.conf.all.use_tempaddr = 0
net.ipv6.conf.default.use_tempaddr = 0
net.ipv6.conf.eth0.use_tempaddr = 0
net.ipv6.conf.eth1.use_tempaddr = 0
net.ipv6.conf.lo.use_tempaddr = -1
xxxxxxxxxx
sysctl -a | grep ipv6 | grep lft
net.ipv6.conf.all.temp_prefered_lft = 86400
net.ipv6.conf.all.temp_valid_lft = 604800
net.ipv6.conf.default.temp_prefered_lft = 86400
net.ipv6.conf.default.temp_valid_lft = 604800
net.ipv6.conf.eth0.temp_prefered_lft = 86400
net.ipv6.conf.eth0.temp_valid_lft = 604800
net.ipv6.conf.eth1.temp_prefered_lft = 86400
net.ipv6.conf.eth1.temp_valid_lft = 604800
net.ipv6.conf.lo.temp_prefered_lft = 86400
net.ipv6.conf.lo.temp_valid_lft = 604800
4.2 Habilitamos las direcciones IPv6 temporales en la interfaz eth1 ejecutando
xxxxxxxxxx
sysctl -w net.ipv6.conf.eth1.use_tempaddr=1
Y verificamos la nueva asignación de direcciones IPv6
xxxxxxxxxx
ip a s
Ejecutamos el comando mtr con destino a H1 para verificar el uso de las direcciones temporales
xxxxxxxxxx
mtr <IPv6_H1>
¿Qué observa en la salida del comando mtr?
4.3 Cambiamos el comportamiento de las direcciones temporales y forzamos su uso
xxxxxxxxxx
sysctl -w net.ipv6.conf.eth1.use_tempaddr=2
Y verificamos nuevamente ejecutando el comando mtr
xxxxxxxxxx
mtr <IPv6_H1>
¿Observa algún cambio?