0

I am troubleshooting an issue where a DHCP client is not receiving an address during PXE boot, but receives an address with no issues once booted into Windows. Our Cisco router is also our DHCP server. I'm no IOS expert, so is there any DHCP logging available in IOS to see if the DHCP request is even hitting the router?

codewario
  • 548
  • 3
  • 16
  • 33
  • I think some one already have similar issue here, http://serverfault.com/questions/507365/pxe-boot-fails-to-get-ip-address-via-dhcp-but-dhcp-works-when-os-booted also there is article about it in microsoft site, http://support.microsoft.com/en-us/kb/257579 – hardik Apr 02 '15 at 17:58

1 Answers1

2

Yes, on Cisco IOS there are a lot of built in debug commands. Most of these are pretty noisy and are disabled by default.

If you want to debug what's going on with DHCP, SSH to the router and first issue the command:

terminal monitor

This will make sure that logging from the device is printed in your terminal. Next, to get onto the DHCP commands issue:

debug ip dhcp server events

Then boot up your server. IF there is a DHCP negotiation taking place then you should see some output generated, for example

Apr  3 07:18:21.199: DHCPD: Sending notification of DISCOVER:
Apr  3 07:18:21.199:   DHCPD: htype 1 chaddr aabb.ccdd.eeff
Apr  3 07:18:21.199:   DHCPD: remote id 020a0000c0a8020101000000
Apr  3 07:18:21.199:   DHCPD: circuit id 00000000
Apr  3 07:18:21.199: DHCPD: Seeing if there is an internally specified pool class:
Apr  3 07:18:21.199:   DHCPD: htype 1 chaddr aabb.ccdd.eeff
Apr  3 07:18:21.199:   DHCPD: remote id 020a0000c0a8020101000000
Apr  3 07:18:21.199:   DHCPD: circuit id 00000000
Apr  3 07:18:22.215: DHCPD: Sending notification of ASSIGNMENT:
Apr  3 07:18:22.215:  DHCPD: address 192.168.2.33 mask 255.255.255.0
Apr  3 07:18:22.215:   DHCPD: htype 1 chaddr aabb.ccdd.eeff
Apr  3 07:18:22.215:   DHCPD: lease time remaining (secs) = 604800

Here you can see a network device successfully broadcasting for a DHCP address (discover) and being assigned the address 192.168.2.33 from the configured pool.

When you are finished make sure you turn off the debug commands or you run the risk of spiking your router's CPU.

undebug all

Hope this helps!

AlienPie
  • 48
  • 5