Re: DHCP & DNS

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

 



zephod@xxxxxxxxxx wrote:
I think my understanding is a little lacking on this subject (one of many).

Here is my simple and, I suspect, very common setup: 2 PCs, one FC6 Linux, one Windows Vista and a Linksys wireless router. A DHCP server on the Linksys determines the IP addresses of the 2 machines.
My question is: is it possible for either machine to ping the other without having to make an entry in its local hosts file?  Making entries in the hosts file doesn't seem like a good idea since the IP address could, in theory, change.
The Linksys is a WRT54G and I don't think that it contains a DNS server. The names of my 2 machine should never get to a public DNS router since they are on a private network.

Steve


I take it you want an education:-)

turn off DHCPD in the Linksys.

Designate a Linux box as "server."

Install and configure dhcpd on that.

Here's a working dhcpd.conf you can mull over. Be sure to read all the relevant man pages before asking questions. If the included docs aren't enough, see what's at www.isc.org
[summer@(none) ~]$ cat /etc/dhcpd.conf
#
ddns-update-style interim;
ignore client-updates;
authorative;
subnet 172.17.0.0 netmask 255.255.255.0 {

# --- default gateway
        option routers                  172.17.0.1;
        option subnet-mask              255.255.255.0;

        option nis-domain               "laptop.lan";
        option domain-name              "laptop.lan";
        option domain-name-servers      172.17.0.1;

        option time-offset              -18000; # Eastern Standard Time
#       option ntp-servers              172.17.0.1;
#       option netbios-name-servers     172.17.0.1;
# --- Selects point-to-point node (default is hybrid). Don't change this unless
# -- you understand Netbios very well
#       option netbios-node-type 2;

        range dynamic-bootp 172.17.0.128 172.17.0.143;
        default-lease-time 3600;
        max-lease-time 7200;
        filename="/PXE/pxelinux.0";

        # we want the nameserver to appear at a fixed address
}
[summer@(none) ~]$

there's more there than you need, but the excess is probably harmless. Some of it will need to change.

Install bind, bind-utils and bin-libs. Read bind's docs. Well, some of it.
Install caching-nameserver.

Create zone files to convert (say) shelly.zephod.lan to an IP address and the IP address to shelly.zephod.lan, and so on for each likely host in your office. It works best if your the IP addresses in your DHCP config match those in your zone files.

Probably google "isc bind zone example" will find some basic files to work from.


btw Did you know your Linksys runs Linux? There is alternative firmware available for it. Google knows about it. You could also look at openwrt.org.





--

Cheers
John

-- spambait
1aaaaaaa@xxxxxxxxxxxxxxxx  Z1aaaaaaa@xxxxxxxxxxxxxxxx

Please do not reply off-list


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux