Category:Cisco Systems -> Routing and Switching
DCHP - Dynamic Host Configuration Protocol.
Basic DHCP server configuration in Cisco routers and switches:
// Start in global config mode
ip dhcp pool vlan100
import all
// Allows to import DNS servers' IP addresses served by an ISP's DHCP server to the WAN interface of a CP router to be assigned to internal hosts.
network 192.168.1.0 255.255.255.0
domain-name user.local
default-router 192.168.1.254
netbios-name-server 192.168.1.100
dns-server 4.2.2.2
ip dhcp excluded-address 192.168.1.100
ip dhcp excluded-address 192.168.1.254
If you wish to create a DHCP reservation by mac-address, use the following configuration commands:
ip dhcp excluded-address 172.16.10.15
// Used as precaution to avoid IP address conflict
ip dhcp pool User#
host 172.16.10.15 255.255.252.0
client-identifier 011c.6f65.59a3.0c
default-router 172.16.10.254
dns-server 172.16.10.1 172.16.10.2
// Pay attention, 01 is a solid prefix and 1c6f.6559.a30c is the host's mac-address, so we get 011c.6f65.59a3.0c
DHCP server for lightweight APs configuration
Configuration example:
ip dhcp pool LWAP
network 192.168.2.0 255.255.255.0
default-router 192.168.2.254
option 60 ascii “Cisco AP c1140”
option 43 hex f108.C0A8.0101.C0A8.0102
Here is the explanation of the following line origin: option 43 hex f108C0A80101C0A80102.
Type + Length + WLC IP address(-es) in hex
Type is always f1. Length = WLC number muliplied by 4. Thus if we have 2 WLCs then 2*4=8 or 08. WLC hexademical values for IP addresses 192.168.1.1 and 192.168.1.2 will be C0A80101 and C0A80102 giving us option 43 hex f108C0A80101C0A80102. It’s simple.
DHCP relay
Original author unknown:
Credit to Brocade for the following images:
By privilege15