Simon Kelley: > Jochen Schulz wrote: >> >> dhcp-option=wifi,33,172.16.27.2,192.168.1.1 > > Your configuration looks fine, and should work. The problem is almost > certainly with your DHCP client, not the server.
You are correct. When I add 'static-routes' to the 'request' stanza in my dhclient.conf, I receive the route. > What client are you using? The ISC dhclient can be configured to > request an option in dhclient.conf, and I guess the host-configuratoin > script would need to be modified to get the value of the option and run > the correct "route add" command. Correct. I found out that you can write custom scripts which dhclient executes at certain points if operation. I created the file /etc/dhclient-exit-hooks which contains this: if [ $reason == "BOUND" ] || [ $reason == "REBOOT" ] then host=$(echo $new_static_routes | awk '{ print $1 }') gw=$(echo $new_static_routes | awk '{ print $2 }') route add -host $host gw $gw fi dhclient executes this after getting a lease and apparently it works in my case. Of course it's not well tested and I am a poor shell programmer. Thanks a lot, Simon. Not only for developing and maintaining dnsmasq, but also for your prompt support. J. -- In idle moments I remember former lovers with sentimental tenderness. [Agree] [Disagree] <http://www.slowlydownward.com/NODATA/data_enter2.html>
signature.asc
Description: Digital signature