How to configure dhcp?

author
  • Total 1 Answer
  • 1049
Can You answer this question?
author

Hi, 

DHCP server is used to dynamically provide ip addresses to devices. You can configure a router or switch as a DHCP server with the following commands:-

router(config)# ip dhcp pool

router(config-dhcp)# network   

router(config-dhcp)#default-router < ip address of default router>

router(config-dhcp)# dns-server < ip address of dns-server>

 

for example

router(config)# ip dhcp pool cisco

router(config-dhcp)# network 192.168.1.0 255.255.255.0

router(config-dhcp)# default-router 192.168.1.1

router(config-dhcp)# dns-server 8.8.8.8

These are the  commands by which you can configure a router or layer-3 switch as a dhcp server. Then go to the end devices and request to dhcp server for ip address and other informations.

Hope it helps.

 

Thanks