01-06-2017 02:57 PM
Hello All,
Router: ISR4321
IOS: 15.4(3)S4
IOS-XE: 03.13.04.S
I have a GigabitEthernet interface that is configured with "ip address dhcp" to get a dynamic IP Address from the Cable modem/router connected to this interface. And I'm wondering if there is a command that will show you info about that Interface's DHCP lease. Info like it's DHCP IP Address, the Gateway Address, etc... I know if you run "show int Gi0/0/0" it will show you the "Internet Address" in the output, which I think would be that interface's DHCP IP Address that it received, but it doesn't show you the Gateway Address.
If I create an IP Route like this one below, I can run "show ip route" to get the Gateway address. But, is there a way to do this without needing to create an IP Route?
If this is the IP Route:
ip route 8.8.8.8 255.255.255.255 GigabitEthernet0/0/0 dhcp
Then, "show ip route" would give me something like this:
Router# show ip route S 8.8.8.8 [1/0] via <gw_address>, GigabitEthernet0/0/0
So I can find that information by running a few different commands and by creating an ip route. But, it seems like a bit overkill just to find that info. So if there's a single command that can show you that information, it would make life much easier...
Any thoughts or suggestions would be greatly appreciated!
Thanks in Advance,
Matt
01-07-2017 11:21 AM
Matt
I would think that the output of show arp (or show ip arp depending on platform and version of code) would give you the gateway address.
HTH
Rick
01-12-2017 08:54 AM
Hey Rick, thanks for the reply!
Ok, right, that does also show the Gateway. I was kind of hoping for a command that had similar output as the Windows' ipconfig /all, where you can see the Interface's IP Address, Gateway, DNS servers, etc...
But, thanks again for the reply. Much appreciated!
Thanks,
Matt
01-12-2017 02:08 PM
Matt
I understand wanting a single IOS command that gave you the information similar to ipconfig. But I do not know of any single command that does it.
HTH
Rick
06-19-2017 06:13 PM
Hi Matt,
"show dhcp lease" should show you IP, GW and Mask. For DNS info, I think you can use "show dhcp server"
-Uday
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide