Question
There are two ways a host can be assigned an IP address.One is manual configuration by a system administrator (typically ina file on the host).
There are two ways a host can be assigned an IP address.One is manual configuration by a system administrator (typically ina file on the host). The other is DHCP. What does DHCP stand for,what is its purpose, and why is it popular? Illustrate withexample(s) of why it is used.
text from the book
Obtaining a Host Address: the Dynamic Host ConfigurationProtocol Once an organization has obtained a block of addresses, itcan assign individual IP addresses to the host and routerinterfaces in its organization.A system administra- tor willtypically manually configure the IP addresses into the router(often remotely, with a network management tool).
Host addresses can also be configured manually, but more oftenthis task is now done using the Dynamic Host Configu- rationProtocol (DHCP) [RFC 2131].
DHCP allows a host to obtain (be allocated) networkadministrator can configure DHCP so that an IP addressautomatically. A network given host receives the same IP addresseach time it connects to the network, or host may be assigned atemporary IP address that will be different each time the hostconnects to the network.
In addition to host IP address assignment, DHCP also allows ahost to learn additional information, such as its subnet mask, theaddress of its first-hop router (often called the default gateway),and the address of its local DNS server.
Because of DHCP's ability to automate the network-relatedaspects of connect- ing a host into a network, it is often referredto as a plug-and-play protocol.
This capability makes it very attractive to the networkadministrator who would other- wise have to perform these tasksmanually! DHCP is also enjoying widespread use in residentialInternet access networks and in wireless LANS, where hosts join andfor example, the student who carries a lap- leave the networkfrequently. Consider, from a dormitory room to a library to aclassroom. It is likely that in each loca- tion, the student willbe connecting into a new subnet and hence will need a new IPaddress at each location. DHCP is ideally suited to this situation,as there are many users coming and going, and addresses are neededfor only a limited amount of time. DHCP is similarly useful inresidential ISP access networks.
Consider, for example, a residential ISP that has 2,000customers, but no more than 400 customers are ever online at thesame time. In this case, rather than needing a block of 2,048addresses. a DHCP server that assigns addresses dynamically needsonly a block of 512 addresses (for example, a block of the forma.b.c.d/23). As the hosts join and leave, the DHCP server needs toupdate its list of available IP addresses. Each time host joins,the DHCP server allocates an arbitrary address from its currentpool of avail- able addresses; each time host leaves, its addressis returned to the pool. DHCP is a client-serverprotocol.
A client is typically a newly arriving host a wanting to obtainnetwork configuration information, including an IP address foritself. In the simplest case, each subnet (in the addressing senseof Figure 4.17) will have a DHCP server. If no server is present onthe subnet, a DHCP relay agent (typ- ically a router) that knowsthe address of a DHCP server for that network is needed. Figure4.20 shows a DHCP server attached to subnet 223.1.2/24, with therouter serving as the relay agent for arriving clients attached tosubnets 223.1.1/24 and 223.1.3/24.
In our discussion below, we'll assume that a DHCP server isavailable on the subnet.
For a newly arriving host, the DHCP protocol is a four-stepprocess, as shown in Figure 4.21 for the network setting shown in(as in Figure 4.20.
In this figure, yiaddr *your Internet address") indicates theaddress being allocated to the newly arriving client.
The four steps are: DHCP server discovery.
The first task of a newly arriving host is to find a DHCP serverwith which to interact.
This is done using a DHCP discover message, a which a clientsends within a UDP packet to port 67.
The UDP packet is encap- sulated in an IP datagram.
But to whom should this doesn't even know the IP address of thenetwork datagram be sent?
The host to which it is attaching, much less the address of aDHCP server for this creates network.
Given this, the DHCP client an IP datagram containing its DHCPdiscover destination IP address of 255.255.255.255 and a "thishost" source IP broadcast message along with the address of0.0.0.0.
The DHCP client passes the IP datagram to the link layer, whichthen broadcasts this frame to all nodes attached to the subnet (wewill cover the details of link-layer broadcasting in Section5.4).
DHCP server offer(s).
A DHCP server receiving a DHCP discover message responds to theclient with a DHCP offer message that is broadcast to all nodes onthe subnet, again using the IP broadcast address of255.255.255.255. (You might want to think about why thisserver reply must also be broadcast). Since several DHCPservers can be present on the subnet, the client may find itself inthe enviable position of being able to choose from among severaloffers. Each server offer message contains the transaction IDof the received discover mes- sage, the proposed IP address for theclient, the network mask, and an IP address lease time-the amountof time for which the IP address will be valid. It is com- monfor the server to set the lease time to several hours or days[Droms 1999].server offers a DHCP request. The newly arrivingclient will choose from among on and respond to its selected offerwith a DHCP request message, echoing back the configurationparameters. DHCP ACK. The server responds to the DHCPrequest message with a DHCP ACK message, confirming the requestedparameters.Once the client receives the DHCP ACK, the interactionis complete and the client can use the DHCP-allocated IP addressfor the lease duration. Since a client may want to use itsaddress beyond the lease's expiration, DHCP also provides a thatallows a client to renew its lease mechanism on an IPaddress. The value of moves to manually configure a host's IPaddress. Consider the student the alternative is DHCP'splug-and-play capability is clear, considering the fact that fromclassroom to library to dorm room who net. and thus obtains a witha laptop, joins a new sub- new IP address at each location.administrator would have to reconfigure laptops at each location,and few rem It is unimaginable that a sys- students (except thosetaking a computer networking class!) would have the expert- theirise to configure laptops does manually. From a mobility aspect,however, DHCP have shortcomings. Since a new IP address isobtained from DHCP each time node connects to a new subnet, a TCPconnection to a remote application cannot be maintained as a mobilenode moves between subnets. In Chapter 6. we will examine mobileIP-a recent node to extension to the IP infrastructure that allowsuse a single permanent address as it moves betweensubnets. Additional details about DHCP can be found in [Droms1999] and [dhc 2007]. An open source reference implementationof DHCP is a mobile tium [ISC 2007]. available from the InternetSystems Consortitym [ISC 2007].
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started