If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Need a little help with DHCPd (I almost got it)

Ahh.. I got it - almost.

I set up my iptables/firewall and all works fine. I can manually set IP info and connect to internet.

Now to make life a little easier, I set up dhcpd on the firewall/router box. It seems to be working fine. It assigns the IP to the client but I don't belive it is assigning the it a default gateway or dns server list. How do I enable that? I have read the man pages and onlind doc but they are pretty helpless on this one..

PS. How do I set the default gateway and dns server name statically on a linux box? I know how to set IP and subnet (in /etc/rc.d/rc.inet1) but I need the additional functiuonality

You have to replace the $ variables yourself, though (dhcpd isn't smart enough to do that). $YOUR_DOMAIN is whatever you want your client DHCP daemon to put into /etc/resolv.conf as a "search" directive. $YOUR_IP is the gateway address. $DNS_SERVER_IP is what the client should put into resolv.conf as a "nameserver" directive. And $SUBNET_BCAST is the broadcast address for your subnet (you probably already have that set up).

Heres the deal. I got eth0 wich gets IP via dhcp from my ISP. I got eth1 wich is assigned the usual 192.168.1.1/255.255.255.0 subnet mask. Mt hostname is "gtwy2k1" and the domain name I gave it was "tampabay.rr.com".

As I said before, the firewall/routing works great if I configure the clients manually, so I do not belive there is anytihng wrong with the normal net settings (do let me know if I am wrong here)

Also....

option routers $YOUR_IP;

do I enter my external ethernet IP? Or do I use the internal (LAN) IP here?

and..

option broadcast-address $SUBNET_BCAST;

I got that part right didn't I ?

next...

option domain-name $YOUR_DOMAIN;

Now for this, I assume I need to enter "tampabay.rr.com"? Is this actually needed? And am I even using the right domain name? are there rules for picking a domain name?

and finally..

option domain-name-servers $DNS_SERVER_IP;

this is pretty self-explainatory - right? Just plug in my DNS server list?

thx again...

oh.. yeah...

You said the stuff mentioned goes into the "subnet" section? Ort do I just modify the file as mentioned earlier?

Originally posted by deanrantala do I enter my external ethernet IP? Or do I use the internal (LAN) IP here?

Your internal (LAN) IP. It has to be an IP address that the clients can find via ARP -- in other words, an address on the local LAN -- because they don't know of a router address to use to get to it.

I got that part right didn't I ?

Yep.

Now for this, I assume I need to enter "tampabay.rr.com"?

Yes.

Is this actually needed?

I'm actually not sure. I have it in there, just to make sure that my DHCP clients can ping by hostname rather than IP address (my internal DNS server won't resolve just "alpha", for example, but it will resolve "alpha.mydomain").

And am I even using the right domain name? are there rules for picking a domain name?

As long as nobody outside your network can talk to your DNS server, then no, there aren't any rules. But if there's even a slight chance that they can, then there are rules for choosing a domain name. Basically, you have to pay a registrar for it. But it sounds like you already did, so that ought to be all right.

this is pretty self-explainatory - right? Just plug in my DNS server list?

Yep. Well -- your DNS server. I'm not sure if it can take a list or not (maybe that's been fixed in later dhcpd releases though).

As for putting it in the subnet section vs. not, I'm not positive on that either. I have it in my subnet section, and it works. But I'd expect that as long as you'll only ever serve one subnet for DHCP (and duh, it makes sense that that'd be the case), then it won't metter.