next generation internet by r.s. chang, dept. csie, ndhu1 configuring hosts through dhcp configuring...

30
eneration Internet by R.S. Chang, Dept. CSIE, NDHU 1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Upload: devonte-oats

Post on 01-Apr-2015

222 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 1

Configuring Hosts through DHCP

Configuring Hosts through DHCP

Page 2: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 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.

Page 3: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 4: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 5: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 6: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 7: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 8: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 9: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 10: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 11: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 11

Configuring Hosts through DHCP

Client-Server Interactions

Page 12: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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

Page 13: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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

Page 14: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 14

Configuring Hosts through DHCP

Relay Agents

Page 15: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 16: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 16

Configuring Hosts through DHCP

DHCP and the Domain Name Service

Page 17: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 18: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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

Page 19: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 19

Configuring Hosts through DHCP

DHCP Message Formats

Page 20: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 21: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 22: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 23: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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.

Page 24: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 24

Configuring Hosts through DHCP

DHCP Message Formats

Source IP address of the request

Page 25: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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

Page 26: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 26

Configuring Hosts through DHCP

DHCP Message Formats

An Example

Page 27: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 27

Configuring Hosts through DHCP

DHCP Message Formats

Client sends to relay router

Page 28: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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

Page 29: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

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

Page 30: Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU1 Configuring Hosts through DHCP Configuring Hosts through DHCP

Next Generation Internet by R.S. Chang, Dept. CSIE, NDHU 30

Configuring Hosts through DHCP

DHCP Message Formats

4. Relay router replies to client