NetFlow Lab/Protocol Labs/DHCP
Simulated
Mission

Get PC-1 onto the network from nothing but a MAC address.

dhcp dora · broadcast-reply scenario (flags = 1)nothing on the wire
BROADCAST DOMAIN · 192.168.1.0/24 · ONE SEGMENTPC-10.0.0.0no address yetPC-2192.168.1.20not a serverPC-3192.168.1.23not a serverRouter · DHCP192.168.1.1pool .10 – .200mac a4:5e:60:c2:11:07LAN SWITCH · L2idlePC-1 has just booted. It has a MAC address and nothing else.DISCOVEROFFERREQUESTACK
udp 68 ↔ 67 · every frame on the wire, with its source and destination—
0.0.0.0.68 > 255.255.255.255.67 DHCP DISCOVER xid 0x3f2a91c4 chaddr a4:5e:60:c2:11:07
↳ flooded to every port — PC-2 and PC-3 receive it and drop it
dhcp packet · the fixed header, then the options that do the real work
op / msg type
—

option 53 names the message

xid
—

ties all four together

ciaddr
0.0.0.0

the client has no address to put here

broadcast flag
1

asks server replies to use broadcast

chaddr
a4:5e:60:c2:11:07

the only identity it owns

yiaddr
—

“your address” — offered, then committed

opt 1 / 3
—

mask and gateway ride along

opt 6 dns
—

names, not just numbers

opt 51 lease
—

borrowed, not owned

client_state
Scenario
init · no address
1DISCOVER — "is anyone out there?"
2OFFER — an address plus everything else
3REQUEST — "that one, please"
4ACK — the lease is committed
Think first · step 1 of 4

PC-1 has no IP address and doesn’t know where a DHCP server is. Who can it send its first message to?

interface configuration · empty
address
— none —
mask
— none —
gateway
— none —
dns
— none —
lease
— none —
Lease clock · 24 h
0hT1 12h · renewT2 21h · rebind

Five settings, not one — and every one of them arrives in the same exchange.

what just happened

A machine that has just booted knows its own MAC address and nothing else. Four messages later it has an address, a mask, a gateway, a pair of resolvers and a deadline.

state INIT · addr none · mask none · gateway none · resolvers none
the common mistake

DHCP does not just hand out an IP address. It hands over the whole configuration — mask, gateway, DNS servers, lease length. Get the address and lose the gateway and you can reach your neighbour and nothing else.

DISCOVER and the selecting-state REQUEST are broadcast. In this lab the client also sets the BROADCAST flag, so the server broadcasts OFFER and ACK. A client that can receive before configuring its address may clear that flag and receive those replies by unicast. The ARP lab shows local broadcast one layer down.

And you do not own the address — you borrow it. The lease is a timer, and the client is responsible for renewing it at halfway. Everything the other labs assume about 192.168.1.10 starts here.