Regarding option routers

Simon Hobson dhcp1 at thehobsons.co.uk
Thu Jul 13 07:04:05 UTC 2006


Vithal Shirodkar wrote:

>Is there a way of configuring the ISC DHCP server, so that when "option
>routers" is sent back as part of dhcpack it contains the address of the dhcp
>helper address that came with the dhcp request.
>
>My DHCP server is serving multiple L3 subnets and a router connected to each
>of these also acts as the dhcphelper.  I want to keep my dhcp config fairly
>static, but the helper address might change.  Hence, I need the dhcp server
>to dynamically figure out the helper address and send it back as option
>routers.

Let me clarify this, several separate networks, each with it's own 
router - so no shared subnets or anything like that ?

The ISC server won't do what you want, unless you go in and hack the code.


However, leaving aside DHCP, I would suggest that having your router 
addresses liable to change so often that you want to do this suggests 
a worryingly unstable network - IMHO this is storing up problems that 
you don't need as an admin ! I am curious to know why you believe you 
need this.

Bear in mind that every time you change the router address, you will 
have to reconfigure every device. Some you can do by DHCP (but you 
will still need to force a release/renew on some clients*), but I'm 
sure you'll have some statically configured stuff to walk round and 
fix manually. Changing one setting in the DHCP server seems fairly 
trivial by comparison.

* IIRC, some clients will not pick up changed options in a renewal, 
therefore they continue using old settings (eg DNS servers) until 
they have their lease released and then renewed - something you 
cannot force from the server.


If you are doing this because you have a dynamic network, and have to 
add/remove routers as things change, then I'd consider adding a 
secondary address to one router (such as n.n.n.1) and use that as the 
default route for the network. If you have to change the router(s), 
then remove that secondary address and add it to whichever router now 
does the default route. It's a simple step and will avoid the 
heartache of reconfiguring the clients and then fielding the support 
calls from people with broken networking.


Finally, as long as all routers are correctly configured (ie all know 
the same routing table), then it doesn't matter which router a client 
has as it's default - if it uses the wrong one, it will simply be 
redirected invisibly to the user.


Simon


More information about the dhcp-users mailing list