static-routes option not working on Android based embedded platform.

Bill Shirley Bill at Henagar.PolymerIndustries.biz
Fri Oct 24 10:20:26 UTC 2014


On 10/24/2014 1:57 AM, Rajeev Bansal wrote:
> Dear All,
>
>    My name is Rajeev. I have a use case where I need to push the static route from a router to a client machine, I am 
> running the Android in my router. I am using the dhcpd to assign the IP address along with the static route to the 
> client. I found dhcpd is able to send the static route option when I run it on my Linux PC and the dhcp client is able 
> to add the static route in its routing cache. However when I cross compiled the dhcpd for my target (ARM based android 
> ) it doesn't send the static route options except that it sends rest all other options. I have tried with the 
> dhcp-4.1-ESV-R3, dhcp-4.1-ESV-R10, and dhcp-4.2.7 and I found behaviour is same. Below is my dhcpd.conf
>
> "
>    subnet 192.168.1.0 netmask 255.255.255.0 {
> authoritative;
>    always-broadcast on;
>    range 192.168.1.2 192.168.1.2;
>    default-lease-time 120;
>    max-lease-time 120;
>    option routers 192.168.1.1;
>    option ip-forwarding off;
>    option broadcast-address 100.65.168.243;
>    option subnet-mask 255.255.255.252;
>    option domain-name-servers 122.175.1.5, 203.145.160.6;
>    option static-routes 192.168.5.1 192.168.1.10;
> }
> "
>
> Can someone point me out what is that I am missing on the target. Command which I uses to launch the dhcps is as follows:
>
> dhcpd -cf /tmp/dhcpd.conf -lf /tmp/dhcpd.lease
>
> Thanks,
> -Rajeev
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

You might try:
option classless-static-routes          code 121 = array of unsigned integer 8; # for Windows Vista and other non 
Windows DHCP clients
option classless-static-routes-ms       code 249 = array of unsigned integer 8; # for Windows 2000 and XP clients

subnet 192.168.1.0 netmask 255.255.255.0 {
.
.
        option classless-static-routes 32,192,168,5,1, 192,168,1,10;
        option classless-static-routes-ms 32,192,168,5,1, 192,168,1,10;
}

You could do a whole subnet  (192.168.5.0/24) with:
        option classless-static-routes      24,192,168,5, 192,168,1,10;

Bill

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20141024/aeb6a0d4/attachment-0001.html>


More information about the dhcp-users mailing list