[Dibbler] dibbler-client and pd

Tomasz Mrugalski thomson at klub.com.pl
Fri Mar 29 10:29:11 CET 2013

On 27.03.2013 16:30, Jean-Jacques Sarton wrote:
> Hello,
> Am 27.03.2013 13:13, schrieb Jean-Jacques Sarton:
>> Hello,
>> If I request a prefix delegation from my CPE I get a /62 prefix.
>> I have foreseen 2 interfaces. If I look to the route assigned
>> via dibbler-client I see that the first /64 is used for both
>> interfaces:
>> 2001:db8:dead:fc:800::/70  on if 1
>> 2001:db8:dead:fc:1000::/70 on if 2
This code could use some improvement. I chose the easy (or lazy if you
prefer) way and thought that typically you'd get /56 or /48, so I just
make the prefix longer by 8 bits. This is clearly not the way to go.

>> It will be nice to have:
>> 2001:db8:dead:fc::/64  on if 1
>> 2001:db8:dead:fd::/64  on if 2
>> or
>> 2001:db8:dead:fc::/61  on if 1
>> 2001:db8:dead:fd::/61  on if 2
> Sorry I had mean /63
>> Is it possible to arrange the client in order to get such results ?
Not with the current code, but I'd be very interested in the code you're
developing to remedy this issue. :-)

> I have commenced to rearrange the file ClntIfaceMgr/ClntIfaceMgr.cpp
> With my actual modification I will have the following:
> if the number of subnets is >= the number of interfaces and the prefix
> length is less than 64 the route for the concerned interface will be
> set to /64, /63, ... according to number of possible subnets per
> interfaces.
> If the preliminary condidions is not meet or only one interface is
> stated the routing will be set as this what is done actually.
> Example the client.conf file contain downlink-prefix-ifaces eth1 eth2
> and the delegated prefix is 2001:db8:cafe:fc::/62
> We will set the route to 2001:db8:cafe:fc::/63 for eth1 and
> 2001:db8:cafe:fe::/63 for eth2.
> If We want 3 subnets for eth1 and one for eth2 we can put
> downlink-prefix-ifaces eth1, eth1, eth1, eth0
> to the client.conf file.
> If we have 3 interface defined (eth1, eth2 and eth1) we will
> see one /64 subnet for each interface, the last subnet will
> not be subject to a route.
> Any kind of interess for this ?
Sure. Do you want to develop this code? I think this should more or less
look like following:

1. find out how many interfaces are in need of a prefix
2. calculate how many bits are needed to cover them
3. calculate prefix for each interface

There are 2 extra things in this areas that may be improved as well:

1. downlink-prefix-ifaces command does not handle vlans (see bug #265).
This may be tricky to fix, because it is possible that the whole dibbler
framework do not support vlans. This may require hacking some low level
C code around Port-linux/lowlevel-linux.c in if_list_get().

2. Someone told me that for the stateless autoconf to work, exactly /64
prefix is needed and for larger (/63 or less) prefixes some devices
won't work. If that is the case, there probably should be a switch in
dibbler-client to force the client to split prefixes exactly to /64. For
example, if client receives a /48 prefix and has 2 interfaces, it would
use only two /64 prefixes. This is potentially very wasteful approach,
so it should not be the default. Let me know if you're interested in
this. I can help with adding extra directive to the parser.


More information about the Dibbler mailing list