Page 1 of 1

Distribute ipv6 in descending order

Posted: 02 Mar 2017, 13:19
by hugleo
Accel-ppp distribute ipv6 delegated pool in ascending order like:

xxxx:xxx:3fe0:200::/56
xxxx:xxx:3fe0:300::/56
xxxx:xxx:3fe0:400::/56

My router will slaac/dhcp ipv6 for the clients in my network.

Windows machines will get a ip like:
xxxx:xxx:3fe0:200::xxx/64

The problem happened if pppoe session in router needs to be restarted. So accel will delegate a new pool, the next one xxxx:xxx:3fe0:300::/56.
So since windows machine keeps all ipv6 in cache will can see that now appears two ipv6 in network in device.
windows ipconfig:
xxxx:xxx:3fe0:200::xxx/64
xxxx:xxx:3fe0:300::xxx/64

Windows try to use the smallest ipv6 address xxxx:xxx:3fe0:200::xxx/64 that is not more valid.
To solve I need to restart windows ou reconnect the network cable.

So would be cool a option to accel distribute the delegated ipv6 in reverse order (descending order) like:
xxxx:xxx:3fe0:400::/56
xxxx:xxx:3fe0:300::/56
xxxx:xxx:3fe0:200::/56

Re: Distribute ipv6 in descending order

Posted: 02 Mar 2017, 15:50
by hugleo
edited accel-pppd/extra/ipv6pool.c file

Lines: 127 e 128
list_add_tail(&a->entry, &it->it.prefix_list);
list_add_tail(&it->entry, &dppool);

Changed to:
list_add(&a->entry, &it->it.prefix_list);
list_add(&it->entry, &dppool);

Will it work without any side effects?

Re: Distribute ipv6 in descending order

Posted: 02 Mar 2017, 22:39
by hugleo
Never mind. Since ipv6 pool rotates is not guaranteed that the same user get a lower address.
The correct solution would be use a delegated static prefix or tell microsoft to fix the problem.

One solution that could be implemented in accel side would be save the delegated ipv6 prefix with a mac and lease time. If the pppoe user session needs to reconnect then the user will get the same delegated pool than before.

Distribute ipv6 in descending order

Posted: 11 Apr 2018, 01:19
by WashKl
What good topic