Dissecting a DHCP header
When reviewing a DHCP packet, you will see many fields in the header, as shown here:
Figure 14.6 – DHCP packet structure
To follow along, obtain a copy of DHCP.cap
from https://wiki.wireshark.org/uploads/__moin_import__/attachments/SampleCaptures/dhcp.pcapand and open it in Wireshark. Expand the DHCP header in Frame 1, as follows:
![](https://static.packt-cdn.com/products/9781803231679/graphics/image/B18389_14_007.jpg)
Figure 14.7 – A DHCP header
As we can see, each DHCP header contains key fields and identifiers. Let's look at these in more detail.
Examining DHCP field values
Within the header, you will see key fields that help the DORA process move through the various states. The field values are as follows:
- Operation Code (op): This indicates the message type; for example,
1 = BOOTREQUEST
or2 = BOOTREPLY
. In Wireshark, this is displayed asMessage type
, as shown in the preceding screenshot. - Hardware Type (htype): This defines the type of connection for...