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

Re: Linux gateway + DHCP server setup?





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?

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


Below is my /etc/dhcpd.conf file.

I also had the problem of getting dhcpd to listen on eth1, so just swapped the cables (I know its crude). I later found out how indicate to dhcpd which interface to listen on, but I already had the whole system setup up the way I wanted ;)

I would think that the interface your dhcpd listens on must have a static ip. I mean, if it has a dynamic IP, then where does it get it from? In that case there would be another dhcp server on the subnet already.

mine goes something like this:

ISP <-> DSL modem <-> eth1 (router box) eth0 <-> home LAN
DHCP 192.168.1.1 192.168.0.1 subnet 255.255.255.0
            192.168.1.254

the 'option routers' line tells the dhcp clients what their gateway is.

-Roberto Sanchez

# dhcpd.conf

option subnet-mask 255.255.255.0;
default-lease-time 604800;
max-lease-time 2592000;
option routers 192.168.0.1;
option domain-name-servers 192.168.1.254, 192.168.1.254;

subnet 192.168.0.0 netmask 255.255.255.0 {
 range 192.168.0.2 192.168.0.254;
 option broadcast-address 192.168.0.255;
}

subnet 192.168.1.0 netmask 255.255.255.0 {

}



_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963



Reply to: