DHCP server on Cisco
A pool per network, excluded addresses and fixed addresses by MAC.
Configuration for IOS and IOS XE — with check and undo.
A pool per network, excluded addresses and fixed addresses by MAC.
Configuration for IOS and IOS XE — with check and undo.
DHCP configuration for a Cisco IOS or IOS XE router or L3 switch: a pool per network, addresses that must not be handed out, gateway, DNS, domain, lease time, options 150 and 66 for IP phones and fixed addresses for chosen devices.
Gateway is the router's interface address in that network with its prefix length; it defines the network. Excluded addresses are ranges with a hyphen, short form allowed: .1-.20. The gateway address is excluded automatically.
The device always gets the same address from the network that contains it. Any MAC format works: 00:11:22:33:44:55, 00-11-…, 0011.2233.4455.
The configuration is built in your browser; addresses and MACs are not sent anywhere.
A Cisco router or L3 switch can hand out addresses itself — no separate server needed. Each network gets a pool with its network address, gateway, DNS and lease time, and addresses taken by hand — the gateway, servers, printers — are excluded with ip dhcp excluded-address. Devices that need a fixed address get their own pool bound to their MAC.
Most devices, Windows included, present themselves to a DHCP server with a client identifier: the MAC with a 01 byte in front, which is why the configuration writes it as 0100.1122.3344.55. Some access points, printers, cameras and Linux send only the MAC — they need a hardware-address line. If unsure, let the device take a dynamic lease and look at show ip dhcp binding: it shows how the device identified itself. Foreign DHCP servers are blocked by DHCP snooping on the switches — the “Cisco L2 security” page sets it up, together with bindings for IP Source Guard.
IOS does not know which addresses in the network are taken by hand: the gateway, servers, printers. Without an exclusion it may hand such an address to another device, causing a conflict. IOS pings an address before offering it, but a printer that is switched off does not answer.
Usually an old lease is left: delete it with clear ip dhcp binding
and reconnect the device. If that does not help, the device identifies itself differently — check show ip dhcp binding and try hardware-address instead of client-identifier.Yes: create a pool per network. The router answers in the network where it has an interface with an address from the pool, such as a VLAN interface or subinterface. If the DHCP server is elsewhere, ip helper-address on the interfaces is enough.
The address of the TFTP server IP phones download their settings and firmware from. Cisco phones read option 150, most other SIP phones option 66. The configuration sets both.