Configuring IOS-Based DHCP options

Exclude one or a range of address

R1(config)# ip dhcp excluded-address 10.0.1.1
R1(config)# ip dhcp excluded-address 10.0.1.1 10.0.1.5

Create a pool with a name

R1(config)# ip dhcp pool Admin_Subnet

we are now under the dhcp config mode

Define the network

R1(dhcp-config)# network 10.0.1.1 /24

Configure option

default gateway
R1(dhcp-config)# default-router 10.0.1.1
domain name
 R1(dhcp-config)# domain-name nemako.net
Multiple DNS servers
R1(dhcp-config)# dns-server 10.0.1.3 10.0.1.4
Netbios servers
R1(dhcp-config)# netbios-name-server 10.0.1.3
Define a proprietary option
R1(dhcp-config)# option 150 ?
 ascii
 hex
 instance
 ip

Show the binding table

R1# show ip dhcp binding
Save the binding table on a server (tftp for example)
R1(config)# ip dhcp database tftp://10.1.0.50/dhcp-bindings.txt

Configure a router as a DHCP client

R2(config)# int e0/0
R2(config-if) ip address dhcp

Importing and Re-using DHCP Options

It is possible to redistribute options that you have learned as a dhcp client in your dhcp server configuration

R1(dhcp-config)# ip dhcp pool Admin_Subnet
R1(dhcp-config)# import all

The biggest command of all : ip helper-address

This command permits to forward broadcast to any server we want.

R1(config)# int s0
R1(config-if)# ip helper-address 10.3.0.1

By default it forward the following UDP port:

  • 37 : time
  • 49 : tacacs
  • 53 : dns
  • 67 : dhcp server
  • 68 : dhcp client
  • 69 : tftp
  • 137 : netbios name service
  • 138 : netbios datagram service

It is possible to define what port number to send over:

R1(config)# ip forward-protocol udp 24

Or to specify what default port number not to send:

R1(config)# no ip forward-protocol udp 37

It is possible to configure multiplce helper-address but a unicast packet will be send for every servers, so both servers will respond.