TECH SOLUTION

TECH SOLUTION

Monday, 28 October 2013

Configuring Dynamic Host Configuration Protocol(DHCP) Basic Theory



Configuring Dynamic Host Configuration Protocol

1.     Using DHCP, you can have an IP address and the other information automatically assigned to the hosts connected to your network.

2.     This method is quite efficient and convenient for large networks with many hosts, because the process of manually configuring each host is quite time consuming.

3.     By using DHCP, you can ensure that every host on your network has a valid IP address, subnet mask, broadcast address, and gateway, with minimum effort on your part.

4.     You should have a server configured for each of your subnets and Each host on the subnet needs to be configured as a DHCP client.

5.     You may also need to configure the server that connects to your ISP as a DHCP client if your ISP dynamically assigns your IP address

Setting up the server

1.     The program which runs on the server is dhcpd and is included as an RPM on Red Hat 7.2 installation CD 2.

2.     Look for the file dhcp-2.0pl5-1.i386.rpm and use the Gnome-RPM (the graphical RPM tool) from the desktop, or use the rpm command from a command prompt to install it.

3.     In Red Hat Linux the DHCP server is controlled by the text file /etc/ dhcpd.conf.

4.     If this file does not exist on your server, you can create it using a text editor. Be sure to use the proper addresses for your network.

5.     To start the server, run the command dhcpd. To ensure that the dhcpd program runs whenever the system is booted, you should put the command in one of your init scripts.
Configuring the client

1.     First you need to check if the dhcp client is installed on your system. You can check for it by issuing command: which dhcpcd

2.     If the client is on your system, you will see the location of the file.

3.     If the file is not installed, you can find it on Red Hat Installation CD 1.

4.     Install the client using the rpm command. After you install the client software, start it by running the command dhcpcd.

5.     Each of your clients will now receive its IP address, subnet mask, gateway, and broadcast address from your dhcp server.

Since you want this program to run every time the computer boots, you need to place it in the /etc/rc.local file. Now whenever the system starts, this daemon will be loaded.

No comments:

Post a Comment