Wednesday, April 30, 2008

Use DHCP and Dynamic DNS

In this exercise, you configure dynamic DNS for your DHCP server.

In part I, you generate a new 128 bit MD5 key.

In part II, you overwrite your DNS configuration file /etc/named.conf with the file named.conf from the Course DVD. You add a key section and allow dynamic updates for the digitalairlines and 10.0.0 zone.

In part III, you configure the DHCP server to update your DNS server.

In part IV, you configure your DHCP client.
Do the following:

■ Part I - Generate a Key
■ Part II - Configure the DNS Server
■ Part III - Configure the DHCP Server
■ Part IV - Configure the DHCP Clients

Part I - Generate a Key

1. Start a terminal emulation from the main menu.
2. Switch to user root by entering su -.
3. When you are prompted for the root password, enter novell.
4. Switch to the directory /var/lib/named/ by entering
cd /var/lib/named
5. To create a key, enter
dnssec-keygen -a HMAC-MD5 -b 128 -n HOST dhcp-dns
The name of the key file is written on the screen by this command. Record it in the space below:
6. Enter cat name_of_the_key.key and record the key in the space below:

Part II - Configure the DNS Server

Do the following:
1. Overwrite your BIND configuration file /etc/named.conf with the file exercises/section_2/named.conf form the 3074 Course DVD.
2. Start your favorite text editor and open the file /etc/named.conf.
3. Append the following after options:
key dhcp-dns {
algorithm HMAC-MD5;
secret your_key;
};
zone "digitalairlines.com" in {
type master;
file "digitalairlines.zone";
allow-update { key dhcp-dns ;}:
};
zone "0.0.10.in-addr.arpa" in {
type master;
file "10.0.0.zone";
allow-update { key dhcp-dns ;}:
};

4. Save the file.
5. Restart your DNS server with the new configuration:
rcnamed restart

Part III - Configure the DHCP Server

Do the following:
1. Open the file /etc/dhcpd.conf with your text editor and enter the following:
ddns-update-style interim;
ddns-updates on;
key dhcp-dns {
algorithm HMAC-MD5;
secret your_key;
}
zone digitalairlines.com. {
key dhcp-dns;
}
zone 0.0.10.in-addr.arpa. {
key dhcp-dns;
}
2. Save the file and close the editor.
3. Switch back to the virtual terminal and enter
chmod 600 /etc/dhcpd.conf
to prevent it from being readable by all users.
4. Close the terminal window.

Part IV - Configure the DHCP Clients

1. On your DHCP client, edit the file /etc/HOSTNAME. Change the hostname of the client to something that is unique in your network and not already known to your DNS server. (For example, you could set your lastname as the hostname of your client.)
2. Restart your dhcpd by entering
rcdhcpd restart

No comments: