Three-step DHCP basic configuration on a router

Basic configuration of DHCP on a router-
By deafult, DHCP server and relay agent service is enabled on a router, hence, we do not need to start it.


1. Instead of mentioning the range which should be assigned as IP address for the devices using your DHCP server, we mention the address it should exclude to assign to the devices-
R1(conf)#ip dhcp excluded-address <range of IP address>

example
R1(conf)#ip dhcp excluded-address 142.100.10.20 142.100.10.50
R1(conf)#ip dhcp excluded-address 142.100.10.80 142.100.10.254

This means only range 142.100.10.1-10 and 142.100.10.51-79 is available for the devices.


2. Configure the DHCP Pool

R1(conf)#ip dhcp pool POOL1  ---- define the name of the pool
R1(dhcp-config)#network 142.100.10.0 255.255.255.0 -- define the IP&mask of the DHCP pool's network
R1(dhcp-config)#default router 142.100.10.20  -- define default gateway
R1(dhcp-config)#option 150 142.100.10.20 -- define TFTP address


3. Configure IP helper Address
This command is configured on the interface that is connected to the broadcast domain in which you
wish to provide DHCP IP addresses example Vlan interface or ethernet interface which is connected with l2 switch.
This command is not required if your phones are hooked on the router on HWIC POE card.
R1(conf)#int gig0/0.202
R1(Conf)#ip helper address <DHCP server IP address>



Comments

Popular posts from this blog

Status: Local Agent is not responding. This may be due to Master or Local Agent being down.

Understanding code yellow