Adding global IPv6 addresses using SLAAC

Stateless Adress Autoconfiguration allows a node on the link to automatically configure global IPv6 addresses by appending its interface identifier (64 bits) to the prefix (64 bits) advertised by the router.

Lets assume I have a server with the global IPv6 Adress

2001:0db8:85a3:08d3:1319:8a2e:0370:7347 

Now i want to add another global IPv6 address to the same interface by changing just the interface identifier and keeping the prefix. e.g.

2001:0db8:85a3:08d3:3315:2b5e:a320:3254 -------same--------|-----different-----                                 

How can i do that using SLAAC, where the interface identifier is automatically appended to the network prefix? I am currently using Ubuntu.

(This is similar to what the IPv6 Privacy Extension does, but i want to control adding and removing temporary IPv6 addresses myself.)

Replay

Privacy Extensions are exactly what you're looking for. You just want to have some manual control over them. You can manipulate the expiration and generation by using the ip address command. The ip-address man page says:

mngtmpaddr (IPv6 only) make the kernel manage temporary addresses created from this one as template on behalf of Privacy Extensions (RFC3041). For this to become active, the use_tempaddr sysctl setting has to be set to a value greater than zero. The given address needs to have a prefix length of 64. This flag allows to use privacy extensions in a manually configured network, just like if stateless auto-configuration was active.

At the moment, I'm not aware of any method for manually causing the system to switch to a new temporary address.

However, you can tune the time period in which a temporary address is used and cause the system to create them more frequently.

From the kernel documentation:

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)

(Yes, the misspelling is intentional...)

So, let us say you want the system to start using a new temporary address every 10 minutes. You will then set:

sysctl net.ipv6.conf.all.temp_prefered_lft=600
sysctl net.ipv6.conf.default.temp_prefered_lft=600

The other sysctl, temp_valid_lft, allows some extra time for existing connections using a temporary address to finish up. You can also reduce this, especially if you don't anticipate long running connections. Here I reduce it to 1 hour:

sysctl net.ipv6.conf.all.temp_valid_lft=3600
sysctl net.ipv6.conf.default.temp_valid_lft=3600

Category: linux Time: 2016-07-31 Views: 46

Related post

  • Why do I get multiple global IPv6 addresses listed in ifconfig? 2012-05-23

    This could be a no-brainer, but when I look in ifconfig it lists two different global IPv6 addresses. Is there a reason why I'm getting two assigned? Shouldn't I just get a single address? [email protected]:~$ ifconfig eth0 Link encap:Ethernet HWaddr e

  • Assigning link, site and global IPv6 address 2015-06-10

    How can I assign link, site and global IPv6 addresses at a same time using /etc/network/interfaces file? I am able to assign any one of them address at a time. --------------Solutions------------- The link-local address will be assigned automatically

  • How to assign a global IPv6 address in VPN? 2015-08-19

    I cannot assign a global IPv6 address on the iPhone ppp0 interface, just only a link-local address (fe80::). How to assign a global IPv6 address on the iPhone? I'am using L2TP/IPSec VPN with radvd. A Windows machine connected to the VPN server, gets

  • Should I put Scope:Link or scope:Global IPv6 address in DNS AAAA record? 2016-01-30

    I have an mail server for which I need to create the AAAA DNS record and update the SPF record to include itsIPv6 address. An ifconfig command shows a Scope:Link IPv6 address and a Scope:Global IPv6 address. Which one should I put in the AAAA and SPF

  • Two global IPv6 addresses? 2015-04-12

    What is the scope of the second IPv6 address fdee:de36:ce2c:0:174:d4b5:64b7:33f9 ? Netsh confirms that both are global/public. Is there any reason I get 2 global IPv6 addresses? Wireless LAN adapter Wi-Fi: Connection-specific DNS Suffix . : Descripti

  • Can't get IPv6 address using radvd on wireless interface on windows, wired works fine 2011-02-23

    I set up my router to use OpenWRT and set it up to use IPv6 using a tunnel form SixXs. I'm having problems with stateless autoconfiguration using radvd. On my computer, wired connection can get its IPv6 address fine, but wireless can't. After spendin

  • Can a global IPv6 address be NAT'd to an internal IPv4 address at a firewall-level? 2013-01-09

    As an organisation we've just requested our first IPv6 allocation. At present we are a wholly IPv4 organisation with a global IPv4 address allocation configured on our edge router and used (predominately) to NAT via an edge firewall to internally hos

  • Vanity IPv6 address with SLAAC 2014-03-29

    I would like to force the second half (the interface identifier) of my link-local and SLAAC-configured global addresses to not be derived from my MAC address or completely random (from privacy extensions), but a value I would specify myself. Is this

  • Ping Global IPv6 address on Ubuntu VM 2014-12-07

    My setup is like this: Host: Windows 8 with Virtualbox VM: Ubuntu 14.04 with 2 network adapters, eth0 a Host-only Adapter and eth1 a bridged adapter connected to my Wireless. From my host to my VM I can ping the IPv4 address and the IPv6 link scope a

  • Can't get ipv6 address using dhcp 2011-04-19

    I can get the ipv4 address using dhcp,But can't get the ipv6 address. the dhcp server also support the ipv6 service. ifconfig eth0 eth0 Link encap:Ethernet HWaddr: 00:21:85:d3:a3:36 inet addr:10.16.31.183 broadcast:10.16.31.255 netmask:255.255.255.0

  • Route single IPv6 address using router advertisement 2016-01-02

    I have a server in my local network that connects to an external VPN server and gets assigned the public IP address 2a02:c200:1:10:3:0:4315:2. Currently, when other computers in my local network access the server using its public IP address, the conn

  • ipv6 : why ndp resolves to global scope address? 2014-08-21

    I'm facing a strange ipv6 behavior and I don't know how to solve it because I'm not familiar with ipv6. Maybe this behavior is normal. I hope that you will help me. ( I'm running under debian 6.0.9 with a custom kernel 3.2.58 ) machine A is "2a00:7d3

  • Automatically acquire IPV6 address in CentOS 6 2014-03-01

    The network has fixed IPv4 address, and automatic acquired IPv6 address. Does anyone have an idea how to setup? Thanks a lot! I didn't use NetworkManager. The following is my setting, but it does not work :( /etc/sysconfig/network: NETWORKING=yes HOS

  • IPv6 LAN Clients IPV6 Address List 2011-12-12

    I am only using 'radvd'[Stateles Addres Configuration] server to advertise the prefix for LAN clients. LAN clients are formaing global ipv6 address based on advertised prefix. I need to display the IPV6 global addresses of the LAN clients in the devi

  • postfix add single IPv6 address 2012-08-13

    I have my webserver set up to send out email as a smartserver using postfix and it does not allow any other machines on my network to send mail through it. I've been able to send email from my webserver to any address I like and it still works like t

  • Understanding the black magic of IPv6 addresses 2013-01-16

    my router (AVM Fritz Box) is supporting 6to4. So far it works but I want to understand what's going on. The last few hours I spent on a IPv6 book. There are many things I understand now but there is this one thing I can't figure out: Router's address

  • snmpwalk to ipv6 address timeout 2013-07-17

    Snmpwalk is failing. I don't know why. I have a host configured with a global ipv6 address. Snmpd is listening on ipv6. netstat -l|grep snmp udp6 0 0 [::]:snmp [::]:* udp6 0 0 [::]:snmp-trap [::]:* Snmpwalk, on the same host, is failing. snmpwalk -v2

  • How can I set a static IPv6 address for a WiFi connection? 2015-05-03

    I am running CyanogenMod 12 (Android L) on a OnePlus One, and would like to set a specific wireless network to use a static IPv6 address. I see a menu option for doing this for the IPv4 address (as well as hostmask/gateway) but not for v6. Currently

  • problem with multiple global ipv6 adresses 2015-09-30

    (first sorry for my bad english) as I don't get any answers from the ubuntu forum about my problem I go post here. I don't work at the moment with any linux host, I only use VM(debians and ubuntus). So I don't know if the problem comes from the virtu

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development

search

Front-end development

Database

development tools

Open Platform

Javascript development

.NET development

cloud computing

server

Copyright (C) avrocks.com, All Rights Reserved.

processed in 0.755 (s). 13 q(s)