DHCP Troubleshooting


Scenario:

As one of the network engineers of the network you are responsible for all DHCP related configurations. In this scenario there is one DHCP server that is configured to supply IP addresses for the 192.168.12.0/24 and 192.168.23.0/24 subnet. However both clients are not receiving any IP addresses…up to you to find a solution!

Goal:

  • All required IP addresses have been preconfigured as specified in the topology picture.
  • Do not use show run! (this will spoil the fun 🙂 use the appropiate ‘show’ and ‘debug’ commands. This will teach you the skills needed to become a true troubleshooting master.
  • Router DHCPClient1 needs to get an IP address through DHCP on its fa0/0 interface.
  • Router DHCPClient2 needs to get an IP address through DHCP on its fa0/0 interface.
  • Only router DHCPServer has to supply IP addresses.

It took me 1000s of hours reading books and doing labs, making mistakes over and over again until I mastered all the troubleshooting issues for CCNP.

Would you like to be a master of troubleshooting too? In a short time without having to read 900 page books or google the answers to your questions and browsing through forums?

I collected all my knowledge and created a single ebook for you that has everything you need to know to become a master of troubleshooting.

You will learn all the secrets about troubleshooting DHCP and more.

Does this sound interesting to you? Take a look here and let me show you how to Master CCNP TSHOOT

IOS:

c3640-jk9s-mz.124-16.bin

Topology:

DHCP roubleshooting

Configuration Files

You need to register to download the GNS3 topology file. (Registration is free!)

Once you are logged in you will find the configuration files right here.

Opt In Image
Do you want your CCNA or CCNP Certificate?

The How to Master series helps you to understand complex topics like spanning-tree, VLANs, trunks, OSPF, EIGRP, BGP and more.

Written by René Molenaar - CCIE #41726

You May Also Like

About the Author: Rene Molenaar

René - CCIE #41726 is the creator of GNS3Vault.com where he shares CCNA, CCNP and CCIE R&S labs. He also blogs about networking on http://networklessons.com

24 Comments

  1. first of all Hello everyone, and of course thanks goes to Rene on great labs.

    My thought is you need to enable dhcp service on dhcp server
    service dhcp

    and make static routes or use routing protocol for announcement of networks 12 and 23 on DHCPserver and DCP Client1

    after that maybe use exclude address on DHCPserver…

  2. Hey i’m not getting why client2
    is not able to get it’s ip address by DHCP

  3. This was my solution, ensure ip dhp service is enabled on the DHCP server and also check you have the appropriate default-routers configured for each pool. I’d also suggest using the ip helper address on Client1 because routers do not pass on broadcasts by default. I also configured static route to 192.168.23.0/24 so that the DHCP server could ping Client2. It all seems to be working fine. When doing this lab you could also use debug ip dhcp server packet as this produces some useful information.

  4. @ Mohit_sharma0.
    Why would you enable routing on a client?!?
    A client normally means a PC and PCs don’t route traffic.

    1. Sorry for late reply
      First of all client here does not means PC, it can be router as well
      In this particular case the clients are routes & if you enable debugging on DHCP server you will see that you receive the request from the client_2 (menas helper address is configured). Now the problem here is that Server Does not know how to reach client_2, so for that we have to give route

  5. When the DHCP server gets the unicast packet from Client1, from it’s 192.168.23.0/24 interface, it knows which pool to issue the address from, but it has no route back to 192.168.23.0. Throw in a static route, and second client can get it’s DHCP address

  6. 1. Start dhcp server with "service dhcp"
    2. Configure 192.168.12.1 and 192.168.23.2 as default routers in seperate pool configurations.
    3. Write a static route on server for 192.168.23.0/24 network.
    4. On fa 0/1 of Client1 keep "ip helper-address 192.168.12.1".

    Enjoy it 🙂

  7. Seftera you forget to add ip dhcp exclude-address 192.168.23.1.

    If you see the drawing it clearly says DHCPClient2 needs a 192.168.23.3 address. With the current setup, it will be assigned a .1 by DHCP.

  8. I haven’t actually done this lab yet but by the looks of it seems pretty straight forward. the DHCP server with excluded addresses for cl 1 and 2. DHCP pools for both clients. Client 1 will be the DHCP relay agent for client 2.

    Make sure you setup independent pools for cl1 and 2 or else you’ll have issues.

    I would use a routing protocol over static routes, but it’s your call.

  9. My solution:

    [b]hostname DHCPServer[/b]
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    memory-size iomem 5
    !
    !
    ip cef
    no ip domain lookup
    no ip dhcp use vrf connected
    !
    ip dhcp pool POOL12
    network 192.168.12.0 255.255.255.0
    !
    ip dhcp pool POOL23
    network 192.168.23.0 255.255.255.0
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface FastEthernet0/0
    ip address 192.168.12.1 255.255.255.0
    duplex auto
    speed auto
    !
    ip http server
    no ip http secure-server
    ip route 192.168.23.0 255.255.255.0 FastEthernet0/0
    !
    !
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
    logging synchronous
    line aux 0
    line vty 0 4
    login
    !
    !
    end

    ===========================================

    [b]hostname DHCPClient1[/b]
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    memory-size iomem 5
    !
    !
    ip cef
    no ip domain lookup
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface FastEthernet0/0
    ip address dhcp
    duplex auto
    speed auto
    !
    interface FastEthernet1/0
    ip address 192.168.23.2 255.255.255.0
    ip helper-address 192.168.12.1
    duplex auto
    speed auto
    !
    ip http server
    no ip http secure-server
    !
    !
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
    logging synchronous
    line aux 0
    line vty 0 4
    login
    !
    !
    end

    ===============================================

    [b]hostname DHCPClient2[/b]
    !
    boot-start-marker
    boot-end-marker
    !
    !
    no aaa new-model
    memory-size iomem 5
    !
    !
    ip cef
    no ip domain lookup
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface FastEthernet0/0
    ip address dhcp
    ip helper-address 192.168.12.1
    duplex auto
    speed auto
    !
    ip http server
    no ip http secure-server
    ip route 0.0.0.0 0.0.0.0 FastEthernet0/0
    !
    !
    !
    !
    !
    !
    control-plane
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    line con 0
    logging synchronous
    line aux 0
    line vty 0 4
    login
    !
    !
    end

    1. When defining static routes, try NOT to use this form for ethernet links:
      “ip route 192.168.23.0 255.255.255.0 FastEthernet0/0”

      Instead, use next-hop address:
      “ip route 192.168.23.0 255.255.255.0 192.168.12.2”

      Why? Because, in case of outgoing interface, router will broadcast ARP requests for each and every new destination address of the packets to be forwarded. This puts strain on CPU! Also, note, that if on the other end there is no proxy-arp running, then you will end up with blackhole, since no reply will be received for the ARP requests (except for the packets, destined for that particular connected network, e.g. 192.168.12.0/24 in our case).

      BR,
      Alex

      1. Good post. Also, it is possible to use BOTH at the same time. If you use both, you make the FIB do a tiny bit less work (debug ip cef events, I think the command is) since it does not need to dynamically determine the outgoing interface.

        ip route x.x.x.x x.x.x.x interface0/0 x.x.x.x

  10. Hello guys, it is simple but tricky somehow!

    1- enable service dhcp on dhcp server
    2- static route from dhcp server pointing to 192.168.12.2 on
    client1

    3- configure ip helper- address command with ip address of dhcp-server fa0/0 on fa1/0 of client1

    work is done! client 2 should get a dhcp ip address immediately
    after config

    ENJOY GUYS
    THANKS TO REN MOLENAAR

      1. sure; use “show ip sockets” command on the server; if you don’t see a port number of 67 it means the dhcp service isn’t running.
        Therefor you have todo : dhcpserver(config)#service dhcp

  11. Yes indeed an odd one. Now, this lab matches perfectly with scenarios in TSHOOT FLG book from Ciscopress, several things to watch out for. some hints includes using [DEBUG IP PACKET] on clients. [SHOW IP SOCKETS] [DEBUG IP DHCP SERVER packets/events] i can also recomend sniffing on the wire between routers to see whats going on and what doesn’t. do bottom up troubleshooting could also help. Think packetflow!

  12. Salam Aleykum.

    1) (config)# service dhcp – on DHCPServer
    2) ip helper-address 192.168.12.1 – DHCPClient1’s f1/0 interface subcommand
    3) ip route 192.168.23.0 255.255.255.0 f0/0 – on DHCPServer

    Greate thanks for labs.

  13. Very good lab!
    Solution:
    On the dhcpserver, turn on service dhcp, and exclude addresses, 192.168.12.1 and 192.168.23.1 through 192.168.23.2 .
    Next on DHCPClient1 f0/0 and DHCPClient2 f0/0 add ip address dhcp.
    Next on all router’s turn up all down interface’s.
    Next install the ip helper address (192.168.12.1) on DHCPClient1 f1/0.
    Next turn on ospf on all routers. Or put in static routes on all router’s.
    Now check DHCPClient1 for adj to both DHCPServer and DHCPClient2.
    If adj good, go to the DHCPServer and do a show ip dhcp binding then ping 192.168.23.3 .

    Done! Good lab, I learn a lot.

  14. If anyone here could help me to open these labs , these are not opening in GNS 1.2.3 .Error -Dynamips doesn’t exist …Thank you

Comments are closed.