[Babel-users] Send: Cannot assign requested address
Bobby
sniporbob at yahoo.com
Fri Jan 28 06:18:12 GMT 2022
The mystery is partly solved. Most importantly, ipv6 and babeld are both
now working!
The source of the problem lies in ipv6's DAD (duplicate address
detection). If I understand correctly, when an ipv6 address is assigned,
dad is supposed to check the network to see if the newly assigned ipv6
address is already in use elsewhere. For some unknown reason, this does
not happen. After manually assigning a link-local address it gets
flagged as tentative until DAD determines it to be unique, but it never
makes that determination, and therefore the address stays tentative
forever. I discovered this after issuing the `ip addr` command and
noticing that the manually assigned link-local address was listed as
tentative despite having been assigned over 12 hours prior. While marked
tentative, the address is unusable on that interface, so even though
ifconfig lists a link-local address, there really isn't actually a
link-local address. In my brief googling, I was not able to find a way
to force it out of a tentative state. I encountered this issue on
Raspberry Pi's running the latest Raspbian Buster, as well as on Ubuntu
20.04 (running in a VM with access to a physical usb wifi card), so I
think this may be a more widespread problem as opposed to merely a
Raspbian peculiarity. I'm quite surprised nobody else has run into this
issue.
The only solution I could find is to simply disable DAD on the
interface. This is done by adding |net.ipv6.conf.wlan1.accept_dad=0 to
the end of /etc/sysctl.conf. After making the change (and rebooting for
good measure) DAD no longer held the ipv6 address in a tentative state.
If an address was assigned, it was accepted immediately.|
|I still do not understand why the link-local address is lost and is not
automatically regenerated when bringing an interface down and back up.
It remained necessary to use |`sudo ip -6 addr add
$(generate-ipv6-address fe80::) dev wlan1` in order to give the
interface the link-local address after it is brought up. I did also run
across another way to cause generation of the link-local address
automatically, but it only happens one time and doesn't seem like the
proper way to achieve this. It is possible to edit
/proc/sys/net/ipv6/conf/wlan1/addr_gen_mode and change the value from 1
to 0. This will cause a link-local address to be created for the wlan1
interface. However, bringing the interface down and back up will clear
this link-local address again, and it will not automatically reassign
one unless you change that value from 0 to 1, save, and then change back
again from 1 to 0.
It is perhaps not ideal, but it is a very quick and easy solution.
Babeld runs without any complaints and the Pis discover each other as
neighbors.
||
Thanks,
Bobby
More information about the Babel-users
mailing list