cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
5743
Views
0
Helpful
4
Replies

to check the dhcp relay statistics on cisco switches

Mohit Chauhan
Level 1
Level 1

Hi guys,

I was trying to dig out if there was a specific command (debug and non-debug) to check the packets received (from clients), relayed to the dhcp server on cisco switches.

I could do that easily on non-cisco easily.

thanks in advance!

Regards,

Mo

4 Replies 4

ajay chauhan
Level 7
Level 7

Command

Purpose

Router# debug ip dhcp server {events | packets | linkage}

Enables debugging on the DHCP server.

To display DHCP server information, use the following commands in EXEC mode, as needed:

Command

Purpose

Router> show ip dhcp binding [address]

Displays a list of all bindings created on a specific DHCP server.

Router> show ip dhcp conflict [address]

Displays a list of all address conflicts recorded by a specific DHCP server.

Router# show ip dhcp database [url]

Displays recent activity on the DHCP database.

Note   Use this command in privileged EXEC mode.

Router> show ip dhcp server statistics

Displays count information about server statistics and messages sent and received.


Thanks

thanks for the reply Ajay.

However, I am afraid that these commands are meant to help you only if you are running dhcp server. That way you can run the debug and watch al that traffic if hitting for dhcp service.

have you tried them on dhcp relay and saw the traffic that way?

Cheers,

Mohit

You can use sniffer on swicth or debug ip packet using and ACL specific to source and destination.

Thanks

Ajay

eduardomozart
Level 1
Level 1

I don't think there's a way to display DHCP Relay statistics as it exists on other switches vendors.

But you can enable debug on switch to debug DHCP relay:

 

debug ip udp
debug ip dhcp server packet
configure terminal
logging monitor 7
line vty 0 15
 monitor

 

Here's an output example:

*Feb 22 17:32:41.950: DHCPD: DHCPDISCOVER received from client 012c.fe4f.85d5.20 on interface Vlan20.
*Feb 22 17:32:41.950: DHCPD: setting giaddr to 10.42.32.2
*Feb 22 17:32:41.950: DHCPD: BOOTREQUEST from 012c.fe4f.85d5.20 forwarded to 10.42.0.142.
*Feb 22 17:32:41.950: DHCPD: BOOTREQUEST from 012c.fe4f.85d5.20 forwarded to 10.42.88.35.
*Feb 22 17:32:41.950: DHCPD: forwarding BOOTREPLY to client 2cfe.4f85.d520.
*Feb 22 17:32:41.950: DHCPD: no option 125
*Feb 22 17:32:41.950: DHCPD: creating ARP entry (10.42.32.3, 2cfe.4f85.d520).
*Feb 22 17:32:41.950: DHCPD: unicasting BOOTREPLY to client 2cfe.4f85.d520 (10.42.32.3).

Disable DHCP debugging after troubleshooting with the commands:

no debug ip udp
no debug ip dhcp server packet
configure terminal
no logging monitor 7
line vty 0 15
 no monitor

 

Review Cisco Networking for a $25 gift card