classless routes

Tim Peiffer peiffer at umn.edu
Wed Feb 21 13:54:57 UTC 2007


I see two issues to comment on.  1 - Isn't your static route competing 
with your interface route?  You can't route to something that is within 
your same layer3 address space.  2 - Are you misreading the RFCs?  
Option 249 specifies that the route as 8 octets.  The first 4 octets 
are  the bitlength shift left 3 octets imposed over the network right 
sifted 1 octet ((bitlength << 24) OR (network > 8).  The second 4 octets 
are the destination address on the same network to forward to.

Ref: http://www.ietf.org/rfc/rfc3442.txt
Pay attention to page 3 where it specifies how the destination 
descriptors are to be encoded.
>    The following table contains some examples of how various subnet
>    number/mask combinations can be encoded:
>
>    Subnet number   Subnet mask      Destination descriptor
>    0               0                0
>    10.0.0.0        255.0.0.0        8.10
>    10.0.0.0        255.255.255.0    24.10.0.0
>    10.17.0.0       255.255.0.0      16.10.17
>    10.27.129.0     255.255.255.0    24.10.27.129
>    10.229.0.128    255.255.255.128  25.10.229.0.128
>    10.198.122.47   255.255.255.255  32.10.198.122.47
With the above in mind, shouldn't you encode the route as:

 option ca-static-routes 24,192,168,0, 192,168,0,1;

??

Tim Peiffer
Networking and Telecommunications Services
University of Minnesota


Enrique de Guindos Carretero wrote:
> Hello Eric.
> Thanks for your quick answer.
>
> Unfortunately, my dhcp still does not work as I want with Linux clients.
> Now, my config file is the next:
>
> -----------------------------------------------------------------------------------------------
>
> ddns-update-style none;
> authoritative;
>
> default-lease-time              3600;           # 1 hora
> max-lease-time                  14400;
>
> option ca-static-routes code 121  = array of unsigned integer 8;
>
> <several options for domain, dns server, etc...>
>
> option  broadcast-address       192.168.0.255;
> option  routers                        192.168.0.1;
> option  subnet-mask               255.255.255.0;
>
> subnet  192.168.0.0  netmask 255.255.255.0
> {
>         pool
>         {
>                 range   192.168.0.15    192.168.0.50;
>                 option ca-static-routes 24, 192,168,0,0, 192,168,0,1;
>         }
> }
> ...
> ---------------------------------------------------------------------------------------------------
>
> But as soon as a Linux dhcp client boots, it has the normal route table,
> same as if I do not put the code 121 option:
>
> linux_client#> route
>
> Destination   Gateway      Genmask        Flags   Metric   Ref   Use   Iface
> 192.168.0.0   *                 255.255.255.0 U         0          0
> 0       eth0
> default          192.168.0.1  0.0.0.0           UG       0          0
> 0       eth0
>
> And I think I should expect something like
>
> Destination   Gateway   ...
> 192.168.0.0  192.168.0.1
>
> The above is what I observe on Windows Clients if I add an option for code
> 249 instead (or together with) of code 121.
>
> Do you see anything wrong on my configuration?
>
> Just to let you know, I'm using OpenSuSE 10.2
>
> Thanks a lot in advance,
>
> Enrique
>
> 2007/2/20, Eric Helm <helmwork at ruraltel.net>:
>   
>> Enrique de Guindos Carretero wrote:
>>     
>>> Hello.
>>> I'm new to dhcp and I'm having a problem.
>>>
>>> I have read RFC 3442 concerning classless routes sent to the dhcp
>>>       
>> clients.
>>     
>>> As I saw, Windows clients are using code 249 while the standard one is
>>>       
>> 121.
>>     
>>> On Windows clients I have no problems. But I have troubles on Linux
>>>       
>> ones.
>>     
>>> On my dhcpd.conf I have:
>>>
>>> option  ca-static-routes code 121 = string;
>>> option  ca-static-routes 18:C0:A8:00:C0:A8:00:01;
>>>
>>> In order of having  192.168.0.0/24 routed through 192.168.0.1 router.
>>> Changing the code with 249 works for windows clients. But with code 121,
>>>       
>> my
>>     
>>> Linux clients are receiving nothing and they have not the static route
>>> configured.
>>>
>>> Is it there any solution?
>>>
>>>       
>> For my linux hosts, this config works to supply option 121:
>> option classless-routes code 121 = array of unsigned integer 8;
>>
>> subnet 192.168.0.0 netmask 255.255.255.0
>> {
>>        pool
>>        {
>>                range 192.168.0.2 192.168.0.254
>>                option classless-routes 24, 192,168,0,0,  192,168,0,1;
>>        }
>> }
>>
>> /Eric
>>
>>
>>     
>
>
>   



More information about the dhcp-users mailing list