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

Re: Linux gateway + DHCP server setup?



Subba Rao, 2003-Apr-02 18:43 -0500:
> 
> Hi,
> 
> My system is running Debian 3.0 (Woody) Linux.
> 
> I use this Linux system as the gateway for my home LAN.  It has 2 interfaces
> eth0 and eth1.
> 	eth0 - Uses DHCP to connect to the ISP
> 	eth1 - Uses static IP address (10.10.10.10)
> 
> Now I want to switch the home LAN to DHCP environment. I have a few questions
> about the setup.
> 
> Should the eth1 have a static IP address so that other systems on the LAN know
> the gateway to the Internet?

Yes. 
 
> Are there any routes to be added for a dhcp environment?

Only a default route back to eth1 for all clients.

> When I run "dhcp3 -d" I get the following message:
> --------------------------------------
> Internet Software Consortium DHCP Server V3.0.1rc9
> Copyright 1995-2001 Internet Software Consortium.
> All rights reserved.
> For info, please visit http://www.isc.org/products/DHCP
> Wrote 0 leases to leases file.
> 
> No subnet declaration for eth1 (10.10.10.10).
> ** Ignoring requests on eth1.  If this is not what
>    you want, please write a subnet declaration
>    in your dhcpd.conf file for the network segment
>    to which interface eth1 is attached. **
> 
> 
> Not configured to listen on any interfaces!
> --------------------------------------
> 
> Do I have to shutdown the eth1 and then start dhcp3?  The /etc/network/
> directory has some files with the IP address (hardcoded) for eth1. Do I have
> to make manual changes for the eth1 interface?

Check my suggestion below for the config file.  You'll need to either
restart or reload the server daemon after the change.

You also need to start your dhcp server with the option to listen ONLY
on eth1.  If it listens on eth0 you could cause your ISP (especially
if it's a cable modem) and/or yourself a lot of grief.  If you start
it manually, you may only have to specify the interface on the command
line like "# dhcpd eth1".  However, you should have a script in
/etc/init.d that is used to start the daemon, so look at that script
and see if there is an entry you can make for this.


> I want the other systems sending dhclient requests to get an IP address and use
> eth1 on the Debian system as the gateway to the Internet.
> 
> Thank you in advance for any help.
> 
> PS - My /etc/dhcpd.conf is listed below.
> 
> --------------------------------------
> option domain-name "test-lan.home.com";
> option domain-name-servers dns.test-lan.home.com;
> 
> option subnet-mask 255.255.255.0;
> default-lease-time 600;
> max-lease-time 7200;
> 
> subnet 10.10.10.0 netmask 255.255.255.0 {
>   range 10.10.10.1 10.10.10.75;
>   option broadcast-address 10.10.10.255;
>   option routers dns.test-lan.home.com;
> }
> --------------------------------------

Change the range line to look like this:

    range dynamic-bootp 10.10.10.1 10.10.10.75;

and see if that helps.

You may also need to use the IP address instead of the fqdn for the
router statement, which sets the default gateway of the clients.
Consider that for the domain-name-servers statement too.

Another suggestion, consider running a DNS and/or a WEB proxy on this
gateway.  I don't run the WEB proxy yet, but I run dnsmasq which is a
very light DNS proxy.  It caches too.

I hope this helps,
jc

-- 
Jeff Coppock		Systems Engineer
Diggin' Debian		Admin and User



Reply to: