buglwIP - A Lightweight TCP/IP stack - Bugs: bug #55602, IPv6 address auto-configuration...


You are not allowed to post comments on this tracker with your current authentication level.

bug #55602: IPv6 address auto-configuration with two different routers will fail

Submitter:  yanhc <yanhc>
Submitted:  Tue 29 Jan 2019 01:16:36 PM UTC
Category:  IPv6 Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
lwIP version:  2.1.0

Wed 30 Jan 2019 12:18:30 AM UTC, comment #1: 

Actually, this post is a little duplicated with https://savannah.nongnu.org/bugs/?53803 (bug #53803: nd6_cleanup_netif should set the auto-configured address to invalid).

This post has two new stuff from that post. The first is the test version is lwip 2.1.0 which is the latest with nd6.c. The second is this post provide how will windows 10 do under such circumstances. And I think what windows 10 do is pretty smart since it not only can retain the address when link is down, but also can switch to new router prefix quick when connected to a new router.

yanhc <yanhc>
Tue 29 Jan 2019 01:16:36 PM UTC, original submission:  

Hi, all.

My experiment is to test lwip 2.1.2 IPv6 address auto-configuration with two different routers.
And check whether IPv6 address auto-configuration is successful.
Unfortunately, the test failed.

My test board is running lwip2.1.2 and there are 3 IPv6 address for the Ethernet netif.
Slot 0 is link local, slot 1 is for global address, slot 2 is for auto-configured address.
My test board can setup auto-configuration IPv6 address with the Router 1 with valid time of 604800 seconds(7 days).
The following address is the auto-configured address 1 with valid time of 604054.
FC00::D51:200:DFF:FE41:1, 604054
When I unplug the Ethernet cable, the auto-configured address 1 with prefix of Router 1 is still there and the valid time is counting down.
FC00::D51:200:DFF:FE41:1, 604038
When I plug the Ethernet cable to the Router 2, no new auto-configured IPv6 address will be generated for prefix of Router 2(FC00:0:0:5B1::/64).
I think when the valid time of auto-configured address 1 is expired, another new address with prefix of Router 2 may generated.
But, this is 7 days later which is not reasonable.

I used the same procedure to test my laptop which is windows 10 with IPv6 auto-configuration enabled on Ethernet interface.
I connected my laptop to the two Routers one by one, everything works fine.
I notice that when I connect my laptop to Router 2, the valid time of the auto-configuration IPv6 address with prefix of Router 1 is reduced to 3 seconds from a 6 days.
And after 3 seconds, the former auto-configured address is disappear and new auto-configured address is generated with prefix of Router 2.
The procedure is as follows:
Interface 16: Ethernet 5
Address type   DAD     Valid time   Preferred time   Address
---------  ----------- ---------- ---------- ------------------------
Public         No         6d23h59m50s  23h59m50s fc00::d51:8c79:e4f9:f5a3:e5eb
Tentative         No         6d23h59m44s  23h57m15s fc00::d51:9146:165c:cb7f:f35a
Other        No            infinite   infinite fe80::8c79:e4f9:f5a3:e5eb%16

Interface  16: Ethernet  5
Address type   DAD     Valid time   Preferred time   Address
---------  ----------- ---------- ---------- ------------------------
Public         Preferred                 3s         3s fc00::d51:8c79:e4f9:f5a3:e5eb
Tentative    Preferred                 3s         3s fc00::d51:9146:165c:cb7f:f35a
Other          Preferred           infinite   infinite fe80::8c79:e4f9:f5a3:e5eb%16

Interface 16: Ethernet  5
Address type   DAD     Valid time   Preferred time   Address
---------  ----------- ---------- ---------- ------------------------
Public        Preferred        6d23h59m59s  23h59m59s fc00::5b1:8c79:e4f9:f5a3:e5eb
Tentative   Preferred        6d23h59m59s  23h57m30s fc00::5b1:b0de:2e31:256f:afcd
Other        Preferred           infinite   infinite fe80::8c79:e4f9:f5a3:e5eb%16

From the test, we can see that when a new router is connected, windows 10 will set the valid time of the former prefix to 3 seconds to make it expired quickly,
then new address will be generated.

So, how to make lwip behave like windows 10 under such circumstances?

yanhc <yanhc>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by yanhc
  • -email is unavailable- added by yanhc (Submitted the item)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follows 1 latest change.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-01-30 yanhc Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code