[Techtalk] DHCPd and my gateway's routing table.

Mary Gardiner linuxchix at puzzling.org
Sun Jan 27 11:33:42 EST 2002


Hi all,

Intro: Like a lot of Linux users, I'm taking advantage of the fact that
Linux machines can act as routers - in our case, we've connected our
computers into a network and one computer connects to the internet and
takes all our data and forwards it to the 'net and all the traffic back
is directed at the right computer.

Details:
My house has a private network (192.168.0.0/24) using 192.168.0.1 as the
gateway. 192.168.0.3 is running DHCPd and giving IP addresses to the
subnet. Most of our permanent boxes get a static IP based on MAC address
anyway.

Part of the reason for using DHCPd is so that we don't have to nag the
house to update any networking configs, especially nameservers. It also
means that people can come over and just plug in.

At the moment I have to maintain two sets of configs by hand anyway.

The first is 192.168.0.3, a Red Hat 7.2 box. As I understand it though,
as it is the DHCPd host, there is no way to get it to query itself for
network information before it brings up it's own network!

The second is 192.168.0.1, a Debian woody box, the gateway. I don't see
any reason why this one can't use DHCP, except for the routing table.

At the moment I have a global option:

        option routers 192.168.0.1;

and other options for the nameservers and so on.

And then each host has something like:

        host hostname {
           hardware ethernet 00:00:00:00:00:00;
           fixed-address 192.168.0.1;
        }

And we have:
        subnet 192.168.0.0 netmask 255.255.255.0 {
           range 192.168.0.20 192.168.0.254;
        }

to catch other hosts on the network.
      
but our gateway then ends up with itself in its routing table and
gets... confused :-)

Is there anyway to specific a default router, and then tell the gateway
(via dhcpd.conf) NOT to use it?

-Mary

-- 
Mary Gardiner
<mary at puzzling.org>



More information about the Techtalk mailing list