How do you setup dhcpd to assign multiple routers/gateways to clients?
The "option routers" makes me think you should be able to do this.
I've tried "option routers 192.168.0.50, 192.168.0.51, 192.168.0.52;"
but the client only gets the first router. The client gets the
multiple dns servers with "option domain-name-servers 192.168.0.10,
192.168.0.11, 192.168.0.12;" I've looked through a lot of documents on
dhcpd.conf, but I haven't had any luck yet.
Can anyone help me?? Thanks!
Generally a machine will pick up the DCHP server on its own subnet to the
exclusion of all others.
If you need to access other subnets, you need to set up routes to those
subnets from your own in the routing table and you will then be able to
gain access to those subnets. If a computer was able to obtain IP
addresses simultaneously from different network segments the system would
be completely confused.
Thisnk of a postman trying to deliver a letter which has three house
addresess written on it and all for the same street. Which letter box
should he drop the letter through. At best he can only be correct in
33.33% of cases. Do you really want someone else to receive your files and
email or have yours arrive with the wrong person>
Hope this helps.
Claire
you can't have more than one default-router.
with that option routers-option, you set the default-gateway for the
machine, but every machine can only have _one_ *default*-gateway.
i think what you need, are several gateways for several subnets which
are accessed via the three gateways.
as I know, there's no possibility to edit the routing-tables for a
machine via DHCP. to reach the subnets, you have to edit the
routing-tables for each client-machine, and you have to do this either
manually or via a script. but don't ask me about this script ^^
--
---
http://www.alf.at.tc
Austrian Linux Forum
"option routers" is just for specifying the default route -- and these
you can only have one on a given system. I think that the clients will
try to connect to each router listed by #option routers" list, and end
up using the first one to respond.
Are these three addresses really redundant (all giving same/similar
routing in some kind of load-balancing/failover configuration), or
are they routers for some specific subnets?
If the latter, then I guess you'll need to use "option static-routes"
to tell the clients about the routers used for specific networks. However,
pay attention to the warning in dhcp-options manual page about the use
of static-routes option.
>The client gets the multiple dns servers with "option
>domain-name-servers 192.168.0.10, 192.168.0.11, 192.168.0.12;" I've
>looked through a lot of documents on dhcpd.conf, but I haven't had any
>luck yet.
Yes, DNS configuration makes it easy to store addresses for several
resolvers working in parallel; for routing no such storage is available.
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
Ok, let me define my situation a little better.
I have three linux masq boxes (192.168.0.50, 192.168.0.51,
192.168.0.52). Each connected to the internet. I want to have
redundant masq boxes. If one fails, one of the other boxes is used.
From what I understand, you can only use one gateway at a time, and
that's fine with me.
I've set this up manually on my xp workstation. I set 192.168.0.50 as
my primary gateway and 192.168.0.51 as my secondary. Then I
disconnected 192.168.0.50 and my workstation timed-out the primary
(192.168.0.50) and used the secondary (192.168.0.51). That's exactly
what I want it to do. I just need dhcp to assign what I did manually,
automatically. The fact that the option is called "routers" makes me
think you should be able to assign multiple routerS.
Thanks again!
Could be easier to set up the system so that there's some kind of
heartbeat across the masq boxes, so that all the machines know
each others' state. Then, if the primary fails, there'll be some kind
of competition among the secondaries to determine which one will
take up the router IP address. It should even be possible to switch
over the router MAC address to one of the secondaries -- you'll just
have to check how your switches react to that.
Look for failover clustering and you should find a solution.