How to configure dhcp?

author
  • Total 1 Answer
  • 1232
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

 

Whoops, looks like something went wrong.

1/1 ErrorException in Filesystem.php line 111: file_put_contents(/var/www/html/storage/framework/sessions/XawF7BV1JG4vONQwPkywE9JQbXkAkoi0ylVEf5Nv): failed to open stream: No space left on device

  1. in Filesystem.php line 111
  2. at HandleExceptions->handleError(2, 'file_put_contents(/var/www/html/storage/framework/sessions/XawF7BV1JG4vONQwPkywE9JQbXkAkoi0ylVEf5Nv): failed to open stream: No space left on device', '/var/www/html/vendor/laravel/framework/src/Illuminate/Filesystem/Filesystem.php', 111, array('path' => '/var/www/html/storage/framework/sessions/XawF7BV1JG4vONQwPkywE9JQbXkAkoi0ylVEf5Nv', 'contents' => 'a:4:{s:6:"_token";s:40:"53k7RCfg8auCr0YoxCv910GemspkM7XTCNMgPlHi";s:11:"viewed_urls";a:1:{i:0;s:21:"how-to-configure-dhcp";}s:9:"_previous";a:1:{s:3:"url";s:49:"http://www.networkbulls.com/how-to-configure-dhcp";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', 'lock' => true))
  3. at file_put_contents('/var/www/html/storage/framework/sessions/XawF7BV1JG4vONQwPkywE9JQbXkAkoi0ylVEf5Nv', 'a:4:{s:6:"_token";s:40:"53k7RCfg8auCr0YoxCv910GemspkM7XTCNMgPlHi";s:11:"viewed_urls";a:1:{i:0;s:21:"how-to-configure-dhcp";}s:9:"_previous";a:1:{s:3:"url";s:49:"http://www.networkbulls.com/how-to-configure-dhcp";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', 2) in Filesystem.php line 111
  4. at Filesystem->put('/var/www/html/storage/framework/sessions/XawF7BV1JG4vONQwPkywE9JQbXkAkoi0ylVEf5Nv', 'a:4:{s:6:"_token";s:40:"53k7RCfg8auCr0YoxCv910GemspkM7XTCNMgPlHi";s:11:"viewed_urls";a:1:{i:0;s:21:"how-to-configure-dhcp";}s:9:"_previous";a:1:{s:3:"url";s:49:"http://www.networkbulls.com/how-to-configure-dhcp";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}', true) in FileSessionHandler.php line 83
  5. at FileSessionHandler->write('XawF7BV1JG4vONQwPkywE9JQbXkAkoi0ylVEf5Nv', 'a:4:{s:6:"_token";s:40:"53k7RCfg8auCr0YoxCv910GemspkM7XTCNMgPlHi";s:11:"viewed_urls";a:1:{i:0;s:21:"how-to-configure-dhcp";}s:9:"_previous";a:1:{s:3:"url";s:49:"http://www.networkbulls.com/how-to-configure-dhcp";}s:6:"_flash";a:2:{s:3:"old";a:0:{}s:3:"new";a:0:{}}}') in Store.php line 128
  6. at Store->save() in StartSession.php line 88
  7. at StartSession->terminate(object(Request), object(Response)) in Kernel.php line 216
  8. at Kernel->terminateMiddleware(object(Request), object(Response)) in Kernel.php line 187
  9. at Kernel->terminate(object(Request), object(Response)) in index.php line 58
  10. at require_once('/var/www/html/public/index.php') in index.php line 20