Static Routes via DHCP - How to do?

Paul Howarth paul at
Wed Jan 26 15:24:30 UTC 2005

Roger Grosswiler wrote:
> Paul Howarth wrote:
>> You'd probably want this then:
>> option static-route,
>>   ,
>>   ;
>> However, it probably won't work; if you look at 
>> it says:
>>   Also, please note that this option is not intended for classless IP
>>   routing - it does not include a subnet mask. Since classless IP
>>   routing is now the most widely deployed routing standard, this option
>>   is virtually useless, and is not implemented by any of the popular
>>   DHCP clients, for example the Microsoft DHCP client.
> thats exactly what i tried before, but it even did not work on fedora 
> core. This will mean, i have to make some kind of hack the get the 
> routing fixed in the routing table. I'm gonna write a very little 
> shell-script and let it execute on boot-up. I think, on windoze i can 
> indicate them also as fixed route per client. :-( It would have been 
> luxury...

You don't need to script this on linux. Assuming you've only got one NIC 
on your clients (eth0), create a file on each client called 
/etc/sysconfig/network-scripts/route-eth0 that contains the following: via via via

That should have the desired effect.


More information about the users mailing list