Option 3 (Routing) does not appear for fixed-address hosts after dhcp relay

Simon Hobson dhcp1 at thehobsons.co.uk
Tue Jul 5 19:59:39 UTC 2011


Edward Aronovich wrote:

>                 DHCP Server 4.2.1-P1 with fail over accessed through 
>a dhcp relay does not return  router address when fixed-address 
>statement is used.
>
>                 Not working:
>host penguin    { hardware ethernet 00:XX:XX:XX:XX:XX; ddns-hostname 
>"hostname"; fixed-address 10.100.100.200 ; }  - Option 3 - Router 
>(default gw) is not given by the servers.
>In DHCP version 3.1 it works fine.
>
>
>                 Working:
>host penguin    { hardware ethernet 00:XX:XX:XX:XX:XX; ddns-hostname 
>"hostname"; } - Option 3 - Router (default gw) is returned and the 
>computer works fine.
>host penguin    { hardware ethernet 00:XX:XX:XX:XX:XX; ddns-hostname 
>"hostname"; fixed-address 10.100.100.200 ;  option routers 
>10.100.100.1;}  - Works fine.
>
>Address and many other parameters are returned in both cases.
>
>The pool is declared as:
>
>                 subnet 10.100.100.0 netmask 255.255.255.0 }
>         pool}
>                 failover peer "lb-1";
>                 range 10.100.100.65 10.100.100.254;
>                 option routers 10.100.100.1;
>                 option domain-name-servers 10.10.10.10;
>                 option dhcp-renewal-time 43100;
>                 ignore unknown-clients;
>         }
>}
>

Please copy and paste the config as it's defined, not what you've 
mistyped above !

But I see two problems :

1) You must NEVER have a fixed address which is part of a dynamic 
pool. Sooner or later this will cause you problems. But that's not 
your issue.

2) You should define the subnet options OUTSIDE of the pool like this :

subnet 10.100.100.0 netmask 255.255.255.0 {
   pool {
     failover peer "lb-1";
     range 10.100.100.65 10.100.100.254;
   }
   option routers 10.100.100.1;
   option domain-name-servers 10.10.10.10;
   option dhcp-renewal-time 43100;
   ignore unknown-clients;
}

Compare with your version (tidied up) :

subnet 10.100.100.0 netmask 255.255.255.0 {
   pool {
     failover peer "lb-1";
     range 10.100.100.65 10.100.100.254;
     option routers 10.100.100.1;
     option domain-name-servers 10.10.10.10;
     option dhcp-renewal-time 43100;
     ignore unknown-clients;
   }
}

The issue is that your fixed address assignment is not part of the 
pool, therefore options defined in the pool are not applied to it. By 
defining the options correctly in the subnet scope, they will be 
inherited by your fixed address declaration.

-- 
Simon Hobson

Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed
author Gladys Hobson. Novels - poetry - short stories - ideal as
Christmas stocking fillers. Some available as e-books.



More information about the dhcp-users mailing list