cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1101
Views
8
Helpful
18
Replies

DHCP relay agent check command

Translator
Community Manager
Community Manager

Could you please tell me the command to check if DHCP relay is working?
I couldn't find the answer even after searching, so could you help me?

Reference information
Model number: C9300
OS: version 17.9

<Japanese>
Whether DHCP Relay is Working
Could you give me the command to investigate?
You can only find out how to set up the relay agent.

reference information
Model: C9300
OS: version 17.9

18 Replies 18

Translator
Community Manager
Community Manager

Hello @suzuki2502 

You could check the config of ip helper-address configured with this command:

#show ip helper-address

but a command to check if it works... you could monitor traffic to ensure unicast packet is build for DHCPDiscover with the ip helper-address as destination IP...

 

One way to check if dhcp relay is working would be to check the content of the arp table. If there are entries in the arp table for devices in the subnet which is getting addresses using dhcp relay then that is a demonstration that dhcp relay is working.

HTH

Rick

Thanks!
I found "show arp" to be a useful command.

> the subnet which is getting addresses using dhcp relay
If you are trying to assign IP addresses of 192.168.0.0/24 using DHCP, is it correct to say that it is working if the IP address 192.168.0.1 is written to the ARP table?
(The above values ​​are just examples.)

You are welcome. I am glad that you found show arp to be useful. We do not know enough about your environment to say with confidence whether seeing 192.168.0.1 in the arp table is proof that dhcp relay is working. It is quite possible that this address is the vlan IP address of the vlan interface. And in that case seeing it in the arp table does not prove anything about dhcp relay. If you see entries in the arp table for clients in the vlan then it is proof that dhcp relay is working.

HTH

Rick

Thanks for letting me know!
But I was looking at the command reference and realized it might not exist...

https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9300/software/release/17-9/command_reference/b_179_9300_cr/ip_addressing_services_commands.html

Hello,

You can view DHCP packet forwarding statistics: 
Router> show ip dhcp server statistics // Displays count information about server statistics and messages sent and received.

Thanks!

 

Thank you for letting me know twice!

I don't have the actual device here to try it, so I was looking at the command reference this morning.
Looking at it, I thought that the command might not exist...

Also, I have a question about the command you told me about.
The device I'm thinking of (C9300) doesn't function as a DHCP server, but rather as a DHCP relay agent.
Even in that case, would the command be useful?

If your device doesn't function as a DHCP server, the command @Joshqun Ismayilov mentioned - show ip dhcp server statistics - will not produce any meaningful information. Here is what the output will look like from a device whic is not configured as a dhcp server:

c1000#show ip dhcp server statistics
Memory usage 0
Address pools 0
Database agents 0
Automatic bindings 0
Manual bindings 0
Expired bindings 0
Malformed messages 0
Secure arp entries 0
Renew messages 0
Workspace timeouts 0
Static routes 0
Relay bindings 0
Relay bindings active 0
Relay bindings expired 0
Relay bindings terminated 0
Relay bindings selecting 0

Message Received
BOOTREQUEST 0
DHCPDISCOVER 0
DHCPREQUEST 0
INIT-REBOOT 0
REQUEST 0
RENEW 0
REBIND 0
DHCPDECLINE 0
DHCPRELEASE 0
DHCPINFORM 0
DHCPVENDOR 0
BOOTREPLY 0
DHCPOFFER 0
DHCPACK 0
DHCPNAK 0

Message Sent
BOOTREPLY 0
DHCPOFFER 0
DHCPACK 0
DHCPNAK 0

Message Forwarded
BOOTREQUEST 0
DHCPDISCOVER 0
DHCPREQUEST 0
INIT-REBOOT 0
REQUEST 0
RENEW 0
REBIND 0
DHCPDECLINE 0
DHCPRELEASE 0
DHCPINFORM 0
DHCPVENDOR 0
BOOTREPLY 0
DHCPOFFER 0
DHCPACK 0
DHCPNAK 0

DHCP-DPM Statistics
Offer notifications sent 0
Offer callbacks received 0
Classname requests sent 0
Classname callbacks received 0

Port Based Allocation Statistics
Discover MAC change 0
Request MAC change 0
Invalid binding in fwd req 0

HTH

Regards, LG
*** Please Rate All Helpful Responses ***

Thanks for letting me know!
I didn't try it on a C9300, but I did try it on a C2960-X.
I confirmed that these values ​​incremented, even though I only configured it as a DHCP relay agent.

- DHCPDISCOVER
- DHCPREQUEST
- DHCPOFFER
- DHCPACK

It seems to indicate that it's working.

The way I would verify that the dhcp relay is working - I would look at the client. Is he getting the correct IP, gateway, DNS, etc. from the DHCP server? Alternatively, I would check the DHCP server to see if a binding for the client exists in the correct pool.

Another way to check this is to do two packet captures - one on the LAN segment to see that the client is requesting an IP and the second capture on the segment pointing to the DHCP server in order to see the unicast packets destined to the DHCP server.

HTH

Regards, LG
*** Please Rate All Helpful Responses ***

Thanks for letting me know!
I'll consider doing a packet capture.

debug ip dhcp server packet detail <<- share this

MHM

Hello
How about......

sh ip dhcp relay  ?


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

It seems that the ip dhcp relay family of commands is only available on Cisco small business switches. I checked in my lab and the ip dhcp relay address isn't available on routers running IOS or IOS XE.

Regards, LG
*** Please Rate All Helpful Responses ***