Assignment 10.1: DHCP Reading Chapter 9 from Practical Packet Analysis - savannahc502/SavC-TechJournal-NET215 GitHub Wiki

Information on this page may be paraphrased or copied from Champlain College materials and other Textbooks. Avoid coping as you may be committing plagiarism. This is for note-taking and academic purposes only.

COMMON UPPER-LAYER PROTOCOLS - Chapter 9 from Practical Packet Analysis, 3rd Edition, Chris Sanders and Assignment Questions Notes


DHCP (Dynamic Host Configuration Protocol)

BOOTP: Bootstrap Protocol (BOOTP) was created to automatically assign addresses to network-connected devices. BOOTP was later replaced with the more sophisticated Dynamic Host Configuration Protocol (DHCP).

DHCP Packet Structure:

image

Notes on DHCP Packet Structure Video

* OpCode: indicates whether the packet is a request or a reply
* Hardware Type: type of hardware address
* Hardware length: length of hardware address
* Hops: Used by relay agents to assist in finding a DHCP server
* Transaction ID: a random number to pair between DHCP requests and responses
* Seconds Elapsed: seconds since the client first requested an address from the DHCP server
* Flags: the types of traffic the DHCP client can accept (unicast, broadcast, etc.) 
* Client IP address: the client's IP address 
* Your IP address: The IP address offered by the DHCP server
* Server IP address: DHCP address
* Gateway IP address
* Client Hardware address (MAC) 
* Server host name (optional) 
* Boot file (optional) 
* Options 

The DHCP Initialization Process

image

"The primary goal of DHCP is to assign addresses to clients during the initialization process." This is done through the DORA process

  • DHCP relies on UDP as its transport layer protocol.
    • DHCP is very concerned with the speed at which a client receives the information itโ€™s requesting.
    • DHCP has its own built-in reliability measures, which means UDP is a perfect fit.
  • UDP 68 to 67 during Discover Packet

DHCP In-Lease Renewal

Out-of-lease: when a device has not gone through the DORA Initialization process yet or the IP address that was assigned to it has an expired lease.

  • The In-Lease Renewal occurs when a device is still in the lease window but reboots -- in this case, the discover and offer packets are not needed. All other cases of renewal require a complete DORA process again.

By default, DHCP renewal happens at 50% of the lease time


DHCP Options and Message Types

Full List of DHCP Options: http://www.iana.org/assignments/bootp-dhcp-parameters/

  • DHCP is very flexible since it has many available options
  • The only option required in all DHCP packets is the Message type option (option 53)

DHCP Version 6 (DHCPv6)

image

image

  • Solicit: An initial packet is sent from a client to a special multicast address (ff02::1:2) to attempt to locate available DHCPv6 servers on the network.
  • Advertise: An available server responds directly to the client to indicate that it is available to provide addressing and configuration information.
  • Request: The client sends a formal request for configuration information to the server via multicast.
  • Reply: The server sends all available requested configuration information directly to the client, and the process is complete.