DHCP configuration in GNS3 - giangpham-cncs/Capstone GitHub Wiki

Configure DHCP on Router 1

  • enable the DHCP server
    • R1#configure terminal
    • R1(config)#service dhcp
  • add a range of IP addresses from 192.168.1.1 to 192.168.1.99 to the exclude list for all DHCP pools, which will prevent the DHCP server from allocating those IP addresses to a DHCP client
    • R1(config)#ip dhcp excluded-address 192.168.1.1 192.168.1.99
  • configure pool name
    • R1(config)#ip dhcp pool [name_here]
  • assign IP addresses to DHCP clients
    • R1(dhcp-config)#network 192.168.1.0 255.255.255.0
  • lease time for the IP addresses. E.g lease for 2 days
    • R1(dhcp-config)#lease 2
  • configured on the interface as the default gateway for DHCP clients
    • R1(dhcp-config)#default-router 192.168.1.1

Configure DHCP on Router 2

  • Do the same steps above for Router 2
⚠️ **GitHub.com Fallback** ⚠️