KanREN DHCP Seminar November 7-9, 2005

Basic DNS Configuration

So far, the clients aren't getting a DNS domain name and a list of DNS servers, so they're not able to access any services by hostname. To provide DNS service to the clients, add a domain name and a list of nameservers to the configuration. In the global section of the configuration file (not within the subnet declaration) , add the following lines:

# Define domain name and nameservers for entire lab

option domain-name "kanren.net";

option domain-name-servers 164.113.130.1, 164.113.207.250,

164.113.92.251, 164.113.31.235;

Exit the editor and test your configuration:

lab1:/var/dhcp # dhcpd -t

Internet Systems Consortium DHCP Server V3.0.4b2

Copyright 2004-2005 Internet Systems Consortium.

All rights reserved.

For info, please visit http://www.isc.org/sw/dhcp/

lab1:/var/dhcp #

Now to activate your configuration, stop and restart the server.

lab1:/var/dhcp # kill `cat dhcpd.pid`

lab1:/var/dhcp # dhcpd

Internet Systems Consortium DHCP Server V3.0.4b2

Copyright 2004-2005 Internet Systems Consortium.

All rights reserved.

For info, please visit http://www.isc.org/sw/dhcp/

Wrote 1 leases to leases file.

Listening on BPF/xl0/00:50:da:10:e5:8c/192.168.10/24

Sending on BPF/xl0/00:50:da:10:e5:8c/192.168.10/24

Sending on Socket/fallback/fallback-net

lab1:/var/dhcp #

Then test the new DNS configuration. Using the yellow network, renew your DHCP lease.

On Windows, you can type ipconfig /renew, and then type ipconfig /all and examine the output for a list of DNS servers.

On the Macintosh, you can click the renew button in the Network preferences. The DNS servers don't show up in that panel if they were received from DHCP, so you can open a Terminal window and type cat /etc/resolv.conf to make sure the settings have been received.

Finally, use telnet to test connectivity again, but this time by hostname instead of IP.

vlan402-dhcp11:~ neufeld$ telnet leela.kanren.net 22

Trying 164.113.130.2...

Connected to 164.113.130.2.

Escape character is '^]'.

SSH-1.99-OpenSSH_3.6.1p1 FreeBSD-20030924

^]

telnet> quit

Connection closed.

Success!

2005-11-07T09:22:35