Cannot assign requested address

Leo Baltus Leo.Baltus at omroep.nl
Fri May 1 22:30:56 CEST 2009


Bernhard,

Op 01/05/2009 om 17:43:36 +0200, schreef Bernhard Schmidt:
>> We are trying to set up services using home-brewed scripts to set-up
>> ipv6 adresses and bind services to them, just as we do this for ipv4.
>>
>> Using a fairly recent linux kernel (2.6.27.21), or any other linux
>> kernel I can get my hands on, the following scripts fails:
>>
>> ip -f inet6 a add ::2/128 dev eth0 && nc -l ::2 1234
>> nc: Cannot assign requested address
>>
>> An EADDRNOTAVAIL is issued.
>>
>> Basically, we set up an ipv6 address and let nc listen on it.
>>
>> Introducing a 2 sec. sleep between setting up the interface and
>> bind()'ing to it, seems to be the only workaround I have found.
>
> You are most probably hit by Duplicate Address Detection as defined in  
> RFC2462 Section 5.4. You will probably see the address being "tentative"  
> in ip -6 addr while the DAD is run.
>
> You can disable DAD on the interface setting the sysctl variable  
> net.ipv6.conf.et0.dad_transmits to 0, or enable the optimistic DAD  
> support (RFC4429) in recent Linux kernels.

You were right, it was Duplicate Address Detection. However setting 
net.ipv6.conf.eth0.accept_dad=0 solved it.

Thanks a lot.

-- 
Leo Baltus, internetbeheerder                         /\
NPO ICT Internet Services                            /NPO/\
Sumatralaan 45, 1217 GP Hilversum, Filmcentrum, west \  /\/
beheer at omroep.nl, 035-6773555                         \/



More information about the ipv6-ops mailing list