大网数据广告活动
服务器运维问答

IPv6 Privacy Extensions use_tempaddr=1 vs use_tempaddr=2

· 52CE 我爱测

I understand privacy extensions and that you enable them by setting use_tempaddr. Unfortunately I haven't found any explantion for the different settings. Every articel I read used either 1 or 2 or cited kernel.org without furthe…

问题原文

原帖链接 · wedi · CC BY-SA 4.0

I understand privacy extensions and that you enable them by setting use_tempaddr. Unfortunately I haven't found any explantion for the different settings. Every articel I read used either 1 or 2 or cited kernel.org without further explanation.

The Kernel.org documentation*:

use_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)

But I still do not understand the difference between 1 and >1. What's the public IP in contrast to the temporary IP? The one that is assigned with DHCP / set statically? Or something else?

Thanks for your help!

已采纳解答

原帖链接 · Quantim · CC BY-SA 4.0

Privacy extension is usable with Stateless Address Autoconfiguration (SLAAC). This option doesn't have effect for DHCPv6 or static configuration. With privacy extension, you have at least two public IPv6 addresses (and link-local FE80::), one, for example, with EUI-64 identifier and one with identifier generated according to RFC-3041. You can see it with command ip a. Station listens on both of them, but use_tempaddr 1 or 2 to define which address is used for outgoing traffic.

When use_tempaddr=2, the privacy address is used as source of all outgoing traffic. With use_tempaddr=1, system generate privacy address is used, but as the more "predictable" one is used for outgoing traffic, its purpose looks to be redundant.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2018-08-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。