Paul Nixon wrote:
> I've just started converting my static ip internal networks over to dhcp
> and I've run into some trouble. Basically I have a server connected to the
> internet via cable modem. I use dhcpcd to get an ip address, gateway info,
> and DNS info. Originally I had all my other machines on two networks
> (wired and wireless) point to the Linux Mandrake 7.2 server as the
> gateway, and each system had the DNS info included as part of their
> network setup (Windows) or /etc/resolv.conf (Linux).
> Now I am working with dhcpd and a single Windows system to try to get a
> handle on things. Basically I've been able to get the Windows machine to
> request an IP from the Mandrake server and it works fine. I included a DNS
> entry in the dhcpd.conf file and that gets passed to the Windows machine
> no problem. Where I have the trouble is when I attempt to telnet from the
> Windows machine to the server. Because the ip is no longer static, the
> hostname no longer resolves to what is in the /etc/hosts file and so the
> session takes a long time before I can log in. Once logged in there is no
> problem. I would like to fix the time delay in the log in if possible.
> I read somewhere that the problem is caused by the server attempting to do
> a reverse lookup.
> Is there an easy way to fix this problem?
> Thanks in advance,
> Paul Nixon
you should really have a dns server given you have a resonable number
of machines on your network
do you have any experince with dns servers?
firstly dhcpd can give a specfic ip to a machine based on that machines
ethernet mac address
this is a part of my dhcpd.conf which shows how i give a "static" ip
via dhcp
---
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.20 192.168.0.254;
use-host-decl-names on;
host office {
hardware ethernet 00:90:27:17:10:ac;
fixed-address 192.168.0.10;
}
host indigo {
hardware ethernet 00:d0:b7:b5:f3:c9;
fixed-address 192.168.0.11;
}
host wildfire {
hardware ethernet 00:01:02:fc:23:0c;
fixed-address 192.168.0.12;
}
}
---
next we want to enable a dns server to do reverse lookups for this network
you will need to look at the mandrake docs to find out how to start the dns
server (you might even need to install it)
if you need help makeing the zone files just edit the obvius part of my
email address and send me your hosts files and tell me how you want to configure
dhcp on your network (i can also give you a dhcpd.conf file as well)
hopefully you can figure out enough from my samples.
this is how you define the reverse lookup zone for the 192.168.0.0 network
change the file names for your own setup and replace the techdrive.foo for your
own domain
named.conf
---
zone "0.168.192.in-addr.arpa" in {
type master;
file "arpa/in-addr/192/168/000";
};
---
arpa/in-addr/192/168/000
---
$TTL 86400 ; 1 day
@ IN SOA ns1.techdrive.foo. root.ns1.techdrive.foo. (
2002 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
3600000 ; expire (5 weeks 6 days 16 hours)
86400 ; minimum (1 day)
)
NS ns1.techdrive.foo.
NS ns2.techdrive.foo.
1 PTR router.techdrive.foo.
2 PTR server.techdrive.foo.
3 PTR server-3.techdrive.foo.
4 PTR server-4.techdrive.foo.
5 PTR server-5.techdrive.foo.
6 PTR server-6.techdrive.foo.
7 PTR server-7.techdrive.foo.
8 PTR server-8.techdrive.foo.
9 PTR server-9.techdrive.foo.
10 PTR office.techdrive.foo.
11 PTR indigo.techdrive.foo.
12 PTR wildfire.techdrive.foo.
13 PTR accounts.techdrive.foo.
14 PTR hawke.techdrive.foo.
15 PTR node-15.techdrive.foo.
16 PTR node-16.techdrive.foo.
17 PTR node-17.techdrive.foo.
18 PTR node-18.techdrive.foo.
19 PTR node-19.techdrive.foo.
; this is specfic to bind 9 it wont work on anythig else
; Automatically generate dhcp-20 to dhcp-254
$GENERATE 20-254 $ PTR dhcp-$.techdrive.foo.
---
too do the forward lookups (name to ip)
named.conf
---
zone "techdrive.foo" {
type master;
file "foo/techdrive/hosts";
};
---
foo/techdrive/hosts
---
; File: techdrive.foo
$TTL 86400
techdrive.foo. IN SOA ns1.techdrive.foo. root.ns1.techdrive.foo. (
2002 ; Serial
3H ; Refresh
15M ; Retry
1W ; Expiry
1D ) ; Minimum
NS ns1.techdrive.foo.
NS ns2.techdrive.foo.
MX 1 server.techdrive.foo.
router IN A 192.168.0.1
server-1 IN A 192.168.0.1
server IN A 192.168.0.2
ns1 IN A 192.168.0.2
---
--
You are only young once, but you can stay immature indefinitely.