Assignment 01‐2 - LPouliot/Junior-Spring-NET-330-01-Network-Design GitHub Wiki

Question 1

image

Question 2

image


10.10 The Dynamic Host Configuration Protocol (DHCP)

10.10.1 The DHCP Server and Routers

As the name implies, the DHCP [8] is a protocol that permits a mobile or wired host to “dynamically” obtain its IP address from the network DHCP server when it joins a network, rather than from the network administrator.

The host will maintain this IP address only while it is connected to the network and in use. Some additional necessary information is also available through the DHCP, e.g., the subnet mask, the gateway IP address and the DNS server’s IP address.

The network in Figure 10.20 consists of three subnets connected by a router. DHCP should not require a server on each subnet. Each network has at least one DHCP server, and the network administrator must configure the router such that it knows the IP address of this server.

DHCP must work across routers or through the intervention of BOOTP relay agents. Therefore, a new host joining the network in the lower subnet can contact the DHCP server at address 131.204.2.5 using DHCP and obtain an IP address in this (131.204.3.0/24) subnet.

Figure 10.20:

  • A DHCP client/server network that relies on the router to locate the DHCP server.

image

10.10.2 DHCP Protocol

The actual correspondence between the DHCP client that wants to join the network and the network’s DHCP server is illustrated in Figure 10.21. First, the client broadcasts a DHCP DISCOVER message using source port number 68 to the DHCP server’s port number 67. The router knows the IP address of the DHCP server and forwards the message to it.

The DHCP server responds with a DHCP OFFER message broadcast to client port number 68. The offer is the IP address 131.204.3.4 that is the yiaddr, which stands for (offered) your IP address. Next, the client formally requests this IP address provided by the DHCP server with a DHCP REQUEST message.

The DHCP server responds with a DHCP ACK that acknowledges the request and then the client is allowed to use 131.204.3.4 on the network. It is important to note that there may be more than one DHCP server in the network, a client may receive multiple offers, and in this case the client must select one of them using a DHCP request.

Figure 10.21:

  • A DHCP client/server interaction; yiaddr is the (offered) your IP address.

image

A relay agent is a small program that relays DHCP messages between clients and servers on different subnets. Routers connecting each subnet should comply with the DHCP relay agent capabilities described in RFC 1542. Relay agents within routers pass messages to DHCP servers on different subnets. When a DHCP server receives the DHCP DISCOVER message, it processes it and sends an IP address lease offer (DHCP OFFER) directly to the relay agent identified in the gateway IP address (GIADDR) field of the DHCP DISCOVER message. The router then relays the address lease offer (DHCP OFFER) to the DHCP client using a MAC (hardware) address.

The RFC for DHCP in IPv4 is RFC 2131 [8] and RFC 3315 [9] describes DHCPv6. It is based on UDP and the Client Hardware (Ethernet/MAC) Address (CHADDR) is used as a client ID to ensure that the offer and ACK are to the same ID. The Transaction ID consists of a random number, chosen by the client, and used by the client and server to associate messages and responses.

The DHCP offer and ACK contains Your IP Address (YIADDR) and the DHCP Option Field section with various options being sent by the server, i.e:

  • (1) The Subnet Mask
  • (2) The Default Gateway (Router)
  • (3) The Lease Time
  • (4) The DNS server address or Windows Internet Name Service (WINS) server address, i.e., the Network Based Input/Output System (NetBIOS) Name Service, and the NetBIOS Node Type

10.10.3 The Reuse of a Previously Allocated Network Address

Most DHCP servers are configured to let a client reuse a previously allocated network address, and this can reduce the amount of broadcast traffic resulting from DHCP DISCOVER message and DHCP OFFER message.

The client broadcasts a DHCPREQUEST message on its local subnet. The message includes the client’s network address in the “requested IP address” option. As the client has not received its network address, it must not fill in the ClientIP (ciaddr) field. BOOTP relay agents pass the message on to DHCP servers not on the same subnet. Servers with knowledge of the client’s configuration parameters respond with a DHCPACK message to the client.

The client receives the DHCPACK message with configuration parameters. The client performs a final check on the parameters and notes the duration of the lease specified in the DHCPACK message. The specific lease is implicitly identified by the “client identifier” or “ClientHardwareAddress” (CHADDR) and the network address. At this point, the client is configured successfully. Note that DHCP defines a “client identifier” option that is used to pass an explicit client identifier to a DHCP server.