DNS a DHCP konfigurace

http://docstore.mik.ua/orelly/networking_2ndEd/dns/ch10_05.htm

http://www.madboa.com/geek/soho-bind/

http://forums.justlinux.com/showthread.php?115689-dhcpd-Handing-out-gateway-and-DNS-addresses-to-clients

 

# dhcpd.conf
#
# Configuration file for ISC dhcpd (see ‚man dhcpd.conf‘)
# Sample /etc/dhcpd.conf
# (add your comments here)
default-lease-time 600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 192.168.1.2;
option domain-name „mydomain.org“;
ddns-update-style ad-hoc;
subnet 192.168.1.0 netmask 255.255.255.0 {
range 192.168.1.10 192.168.1.100;
range 192.168.1.150 192.168.1.200;
}

 

theres my dhcpd.conf file….

I do not really understand it too well.

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. [Wink]

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.

11-02-2003 05:57 PM#5
deanrantala
deanrantala is offlineRegistered User

Join Date
Mar 2003
Location
Cookeville, TN
Posts
642

thx

I got it. And I have been rather happy the past few hours [Smilie]

I got my firewall set up, FTP server running smoothly, Apache is working, routing is up and working right, and of coarse, I can now add another client to the LAN without needing to configure anything [Big Grin]