Site hosted by Angelfire.com: Build your free website today!

IP ADDRESSING©

HOME INTRODUCTION HISTORY CLASSIFICATION PARTS CONFIGURATION DIAGRAMS TERMINOLOGY

DHCP CONFIGURATION

DHCP (or Dynamic Host Configuration Protocol), is a means by which an IP address may be assigned to a computer on boot. When the DHCP client boots, it puts out a request on the Local Area Network for a DHCP server to assign it an IP address. The DHCP server has a pool (or scope) of IP addresses available. The server will respond to this request with an IP address from the pool, along with a lease time. Once the lease time for a given IP address lease has expired, the client must contact the server again and repeat the negotiation. The client will then accept the IP address from the server and will configure the requested interface with the IP address. There is one more handy trick that DHCP clients use for negotiating the IP address that they will be assigned, however. The client will remember it's last assigned IP address, and will request that the server re-assign that IP address to the client again upon next negotiation. If possible, the server will do so, but if not, a new address is assigned. So, the negotiation resembles the following: Client: Is there a DHCP server available on the LAN?

Server: Yes, there is. Here I am.
Client: I need an IP address.
Server: You may take 192.168.10.10 for 19200 seconds.
Client: Thank you.

Client: Is there a DHCP server available on the LAN?
Server:Yes, there is. Here I am.
Client:I need an IP address. The last time we
talked, I had 192.168.10.10;
May I have it again?
Server:Yes, you may (or No, you may not: take 192.168.10.12 instead).
Client: Thank you.

The DHCP client in Linux is /sbin/dhcpcd. If you load /etc/rc.d/rc.inet1 in your favorite text editor, you will notice that /sbin/dhcpcd is called about midway through the script. This will force the conversation shown above. dhcpcd will also track the amount of time left on the lease for the current IP address, and will automatically contact the DHCP server with a request to renew the lease when necessary. DHCP can also control related information, such as what ntp server to use, what route to take, etc. Setting up DHCP on Slackware is simple. Just run netconfig and select DHCP when offered. If you have more than one NIC and do not wish eth0 to be configured by DHCP, just edit the /etc/rc.d/rc.inet1.conf file and change the related variable for your NIC to “YES”.


© 2009 The Official Website of IP Addressing
http://vip11jayem.angelfire.com