Dynamic Host Configuration Protocol (DHCP) This protocol is used to assign IP addresses to hosts or workstations on the network. Usually a DHCP server on the network performs this function. Basically it "leases" out address for specific times to the various hosts. If a host does not use a given address for some period of time, that IP address can then be assigned to another machine by the DHCP server. When assignments are made or changed, the DHCP server must update the information in the DNS server. As with BOOTP, DHCP uses the machine's or NIC ethernet (MAC) or hardware address to determine IP address assignments. The DHCP protocol is built on BOOTP and replaces BOOTP. DHCP extends the vendor specific area in BOOTP to 312 bytes from 64. RFC 1541 defines DHCP. DHCP RFCsDHCP RFCs are 1533, 1534, 1541, and 1542. Sent from DHCP server:
DHCP Lease Stages
DHCP discover message - The initial broadcast sent by the client to obtain a DHCP lease. It contains the client MAC address and computer name. This is a broadcast using 255.255.255.255 as the destination address and 0.0.0.0 as the source address. The request is sent, then the client waits one second for an offer. The request is repeated at 9, 13, and 16 second intervals with additional 0 to 1000 milliseconds of randomness. The attempt is repeated every 5 minutes thereafter. The client uses its own port 68 as the source port with port 67 as the destination port on the server to send the request to the server. The server uses its own port 67 as the source port with port 68 as the destination port on the client to reply to the client. Therefore the server is listening and sending on its own port 67 and the client is listening and sending on its own port 68. This can be confusing when you consider which way the message is going. To be clear on this, I quote RFC 1531 which states "DHCP messages from a client to a server are sent to the 'DHCP server' port (67), and DHCP messages from a server to a client are sent to the 'DHCP client' port (68)" DHCP Lease Renewal After 50% of the lease time has passed, the client will attempt to renew the lease with the original DHCP server that it obtained the lease from using a DHCPREQUEST message. Any time the client boots and the lease is 50% or more passed, the client will attempt to renew the lease. At 87.5% of the lease completion, the client will attempt to contact any DHCP server for a new lease. If the lease expires, the client will send a request as in the initial boot when the client had no IP address. If this fails, the client TCP/IP stack will cease functioning. DHCP Scope and SubnetsOne DHCP scope is required for each subnet.DHCP Relay AgentsMay be placed in two places:
Client ReservationClient Reservation is used to be sure a computer gets the same IP address all the time. Therefore since DHCP IP address assignments use MAC addresses to control assignments, the following are required for client reservation:
Exclusion RangeExclusion range is used to reserve a bank of IP addresses so computers with static IP addresses, such as servers may use the assigned addresses in this range. These addresses are not assigned by the DHCP server.Sample DCHP Configuration FileIn Linux, a sample configuration file is:subnet 192.168.199.0 netmask 255.255.255.0 { # --- default gateway option routers 192.168.199.1; option subnet-mask 255.255.255.0; option nis-domain "mynet.net"; option domain-name "mynet.net"; option domain-name-servers 192.168.199.1; option time-offset -5; # Eastern Standard Time # option ntp-servers 192.168.199.1; # option netbios-name-servers 192.168.199.1; # --- Selects point-to-point node (default is hybrid). Don't change this unless # -- you understand Netbios very well # option netbios-node-type 2; default-lease-time 1209600; # 2 weeks max-lease-time 1814400; # 3 weeks range 192.168.199.10 192.168.199.250; # we want the nameserver to appear at a fixed address host nameserver { next-server nameserver.mynet.net; hardware ethernet 00:10:4b:ca:db:b5; fixed-address 192.168.199.1; } }This demonstrates that the IP addresses are based on lease times to the various clients. If they are not used within the period of their lease time by the client, those IP addresses are freed up for use by other clients. http://www.comptechdoc.org/independent/networking/guide/netdhcp.html |
DHCP
Posted by Unknown
on Sunday, December 18, 2011,
Add Comment
Subscribe to:
Post Comments (Atom)
0 Response to "DHCP"
Post a Comment