[Dibbler] dibbler-client and pd

Jean-Jacques Sarton jj.sarton at web.de
Fri Mar 29 11:54:02 CET 2013


Hello,

Am 29.03.2013 10:29, schrieb Tomasz Mrugalski:
> 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

As you probalby have seen I have allready posted a patch.
What I do is practically the step you mention.

> 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().

Vlan mean that messages passed to an interface are only delivered to
the interfaces which are "member of the vlan". I will have a look to
the bug #265 and thinks about this.
> 
> 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.
I had see this yesterday while inspecting the radvd.conf you produce.
Autoconf can't work for prefixes greater as /64 (eg /70). This is a
real problem.
The problem with short prefixes (eg /56) can be solved in a very easy
way, of course a directive within the configuration file may be OK.

On the other hand, I thing that declaring a /64 prefix for the
interface will always be OK if the prefix is shorter as /64. You
set the routing according to the prefix. for example we will have

IP-Addr  2001:db8:dead:1234::1/64 interface eth1 (from dibbler)
IP-Route 2001:db8:dead:1234::1/64 interface eth1 (automatically set)
IP-Route 2001:db8:dead:1200::1/56 interface eth1 (from dibbler)

I have not inspected exactly what you do actually, I have a
static configuration for the interfaces involved in my tests but
I can rearrange this.

For The case that you have for example a /80 prefix the radvd.conf
you produce shall not have the flag AdvAutonomous set to on.
There will also be nice to be able to configure the value for
this FLAG. One RFC for CPE tell that this flag must be configurable.

Cheers,

Jean-Jacques



More information about the Dibbler mailing list