Linux 3.2.x 内核中禁用/降级临时IPV6地址

重装了Ubuntu 12.04,内核升级后,支持了临时IPV6地址,但是,默认被设置成了:优先走临时地址,再走public地址。


$ ls /proc/sys/net/ipv6/conf/eth0
accept_dad                  disable_ipv6       regen_max_retry
accept_ra                   force_mld_version  router_probe_interval
accept_ra_defrtr            force_tllao        router_solicitation_delay
accept_ra_pinfo             forwarding         router_solicitation_interval
accept_ra_rt_info_max_plen  hop_limit          router_solicitations
accept_ra_rtr_pref          max_addresses      temp_prefered_lft
accept_redirects            max_desync_factor  temp_valid_lft
accept_source_route         mc_forwarding      use_tempaddr
autoconf                    mtu
dad_transmits               proxy_ndp


use_tempaddr 	System dependent (seems to be 2 on Ubuntu these days…) 	We might expect that this is a simple on/off value to enable use of temporary addresses. Yet when we cat it on this system it has the value ’2′.

    <=0 Disable Privacy Extensions (i.e. do not use changing temporary addresses at all)
    ==1 Use the Privacy Extensions, but prefer public (i.e. non-temporary) adresses over temporary ones.
    >1 (e.g. 2 as here) Use the Privacy Extensions and prefer them.


echo 1 > /proc/sys/net/ipv6/conf/eth0/use_tempaddr


Leave a Reply

Your email address will not be published. Required fields are marked *