DHCP

Dynamic Host Configuration Protocol

  • Automatically assigns an IP address whenever a device connects to the network.

DHCP four-way handshake #

DORA Discover Offer Request Acknowledgement

Ports/Protocols #

Uses UDP ports 67 and 68

  • Sending: 67
  • Receiving: 68

DHCP relays #

On larger networks with multiple LANs sometimes it’s necessary to relay DHCP broadcasts through to the central DHCP server. Routers block DHCP broadcasts by default.

IP reservation #

Can configure DHCP servers to reserve certain IPs in use as static IPs on some machines

MAC Reservations #

Rarely used, but sometimes it makes more sense to have the same MAC address always associated with the same IP.

No DHCP Server #

Zeroconf #

Troubleshooting #

  1. Try to re-establish lease manually Windows: ipconfig /release ipconfig /renew Mac: sudo ifconfig eth0 down sudo ifconfig eth0 up Linux: sudo dhclient -r sudo dhclient

Multiple DHCP Servers #

Usually in a failover configuration.

Rogue DHCP Server #

A DHCP server is added to the network and is giving out incorrect IP addresses. Often this is either a user brings in a router from home and plugs it into the network or it’s a malicious actor that has gained access to the network.