Re: Static Routes via DHCP - How to do?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Roger Grosswiler wrote:
Paul Howarth wrote:
You'd probably want this then:

option static-route 192.168.1.0 10.0.0.3,
            192.168.2.0 10.0.0.3,
            192.168.3.0 10.0.0.3;

However, it probably won't work; if you look at http://www.gsp.com/cgi-bin/man.cgi?section=5&topic=dhcp-options 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:


192.168.1.0/24 via 10.0.0.3
192.168.2.0/24 via 10.0.0.3
192.168.3.0/24 via 10.0.0.3

That should have the desired effect.

Paul.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux