Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring...
-
Upload
devonte-oats -
Category
Documents
-
view
222 -
download
1
Transcript of Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring...
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 1
Configuring Hosts through DHCP
Configuring Hosts through DHCP
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 2
Configuring Hosts through DHCP
In its present form, DHCP concentrates on providing network addresses to hosts.
Although a host can always form a link-local address, such a addresses confine traffic to the local link.
If a host wants to communicate across an internet with other hosts not on its local link, the host needs additional network addresses.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 3
Configuring Hosts through DHCP
Address autoconfiguration has a few shortcomings. All networks that use autoconfiguration must have a router generating router advertisements, and administrators must make sure that all such routers have the correct prefix information.
Autoconfiguration also ties network addresses to particular hosts. An autoconfigured address is built from the host’s link address. Two host with different link addresses cannot share a network address, even if they are never on the network together.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 4
Configuring Hosts through DHCP
Furthermore, this binding prevents an administrator from assigning network addresses based on a more natural identifier, such as the name of the person using the host.
DHCP resolves all of these issues with a more flexible and a more controllable method of autoconfiguring network addresses. The protocol also has the capability to relay other configuration information.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 5
Configuring Hosts through DHCP
Assigning Network Addresses
Network administrators use DHCP to assign network addresses to hosts on their networks. DHCP gives these administrators the flexibility to assign addresses in one of three ways. The approaches represent different allocation strategies.
Manual AllocationThe most rigid method: Through this method, the administrator explicitly assigns specific addresses to specific hosts. When these hosts use DHCP to discover their addresses, DHCP provides them with the manually allocated values.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 6
Configuring Hosts through DHCP
Assigning Network Addresses
Automatic AllocationAutomatic allocation provides the same service as ICMP’s address autoconfiguration. It combines a link address with an address prefix to create a network address.
DHCP uses a different approach to achieve that result, though. Instead of waiting for router advertisements, hosts actively request an address from a special computer acting as a DHCP server.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 7
Configuring Hosts through DHCP
Assigning Network Addresses
Automatic AllocationAdministrators may choose to use DHCP’s automatic allocation instead of address autoconfiguration for at least two reasons. First, DHCP does not require configuration and maintenance of routers on every network. Instead, address administration can be concentrated in a single host. Second, DHCP lets an administrator change allocation strategies easily. If the administrator changes some hosts from automatic allocation to another strategy, those hosts need never even know of the change.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 8
Configuring Hosts through DHCP
Assigning Network Addresses
Dynamic AllocationDynamic allocation represents the most adaptive allocation strategy. It lets a group of hosts share from a smaller pool of network addresses. This strategy is useful if addresses are in demand and only a limited number of the hosts need an address at any one time.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 9
Configuring Hosts through DHCP
Assigning Network Addresses
Only two IP addressees are needed instead of six.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 10
Configuring Hosts through DHCP
Client-Server Interactions
DHCP derives much of its power from making the allocation strategy transparent to the hosts it serves. A host that needs a network address takes exactly the same steps, regardless of the allocation strategy the administrator has selected.
DHCP interactions follow a simple client-server model. A host that needs a network address becomes a client by asking for that address. The system that answers the requests acts as a DHCP server.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 11
Configuring Hosts through DHCP
Client-Server Interactions
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 12
Configuring Hosts through DHCP
If a host knows the address of a DHCP server, it can send its request directly to that server. Otherwise, DHCP relies on a well-known multicast address. The address FF02::1:0 refers to all DHCP servers.
Client-Server Interactions
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 13
Configuring Hosts through DHCP
When the server and client are not on the same link, since the DHCP server multicast address has a link-local scope, messages addressed to FF02::0:1 cannot travel beyond the link on which they first appear.
DHCP solves this problem by defining a third role beyond that of server and client. The new role is a DHCP relay.
Relay Agents
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 14
Configuring Hosts through DHCP
Relay Agents
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 15
Configuring Hosts through DHCP
DHCP and the Domain Name Service
DHCP servers also support their clients by interacting with the DNS. One thing that DHCP servers can do is autoregister their client’s names. If a client knows its domain name, it can supply that name when it requests an address. The DHCP server queries DNS for the client’s address. If DNS has no entry for the client, or if the server needs to assign the client a different address, it can update DNS through the DNS dynamic update mechanism.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 16
Configuring Hosts through DHCP
DHCP and the Domain Name Service
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 17
Configuring Hosts through DHCP
DHCP and the Domain Name Service
A DHCP server can also provide a domain name to its client. If the client does not know its name beforehand, it may find it convenient to get a name the same way it finds its address. The DHCP server must coordinate with the domain name server in this case as well.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 18
Configuring Hosts through DHCP
DHCP Message Formats
1:server detects an error2:server could not support dynamic DNS update
See nextslide
Number of addressesalready had
Typically, address of NIC
0: request an IP addressOtherwise: request for a domain name
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 19
Configuring Hosts through DHCP
DHCP Message Formats
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 20
Configuring Hosts through DHCP
DHCP Message Formats
The address count and interface token fields help keep clients and servers synchronized. In general, a client may request multiple addresses for the same interface. To make sure that the server knows that all such addresses belong to the same interface, the client supplies a value for its interface token. This value must be unique among all other interfaces to the network.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 21
Configuring Hosts through DHCP
DHCP Message Formats
When the client makes a request for an address, it includes the number of addresses it already has in the address count field.
The server also keeps track of this value, and it can detect when the two systems lose synchronization.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 22
Configuring Hosts through DHCP
DHCP Message Formats
The most common cause of this error would be a reboot of the client’s computer. When the client restarts after the reboot, it will ask for a network address. Since it does not remember that it had an address before the reboot, it will set the address count to zero.
When the server sees this address count, it returns an error to the client. At the same time, it removes any addresses previously assigned to the client, freeing them for reassignment elsewhere.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 23
Configuring Hosts through DHCP
DHCP Message Formats
The transaction identifier associates requests and responses, as well as confirmation and rejection messages, with each other. Clients pick a value for this field, and servers reflect that value in their response.
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 24
Configuring Hosts through DHCP
DHCP Message Formats
Source IP address of the request
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 25
Configuring Hosts through DHCP
DHCP Message FormatsCannot use the addressafter this
Cannot use on new connection after this
Client: name for addressServer: return name for address
Future extension to includevarious servers
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 26
Configuring Hosts through DHCP
DHCP Message Formats
An Example
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 27
Configuring Hosts through DHCP
DHCP Message Formats
Client sends to relay router
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 28
Configuring Hosts through DHCP
DHCP Message Formats
2. Relay router sends to DHCP server
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 29
Configuring Hosts through DHCP
DHCP Message Formats
3. DHCP server replied to relay router
Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 30
Configuring Hosts through DHCP
DHCP Message Formats
4. Relay router replies to client