09-13-2017 11:09 AM - edited 03-08-2019 12:01 PM
I have searched for similar posts and have found nothing.
I am needing help with commands I can run to get a list of ALL IP's and their associated ports from the CLI. I do not want a single ip and its port. That's too much work for our organization.
I can get mac's and ports or ip's and macs. But not IP's and ports.
Any help would be greatly appreciated. Thank you
09-13-2017 12:02 PM
09-13-2017 01:00 PM
Hi
The only command that it could be useful is:
show ip int brief
or
show ip int brief | include up
09-13-2017 01:04 PM
09-13-2017 01:18 PM - edited 09-13-2017 01:24 PM
Other command but it will show everything local and remote subnets is:
show ip cef
or more explicit
show ip cef | inc receive
The information could be a little bit confused based on what you desire obtain.
Or show ip arp but you must identify the IP Addresses associated to your interfaces
09-13-2017 01:29 PM
09-13-2017 01:39 PM
There may be commercial tools but I would simply script it.
So get all the mac address tables off the L2 switches, get the arp table and mac address table of the L3 switch(es) and then cross reference the arp to mac address tables based on mac address.
A number of scritpting languages have modules to make connecting to Cisco devices relatively easy and then you collect the relevant tables and then withint the script you could do the cross referencing using the arp table contents to cross reference against each mac address table.
Even this is not perfect depending on your network topology and whether the end device is active or not but it would be a good start.
You may find something like this has been done before if you do a search.
Jon
09-13-2017 01:43 PM
09-13-2017 02:07 PM
Hi Leo,
Please correct me if I am wrong, does it work for routers? or just for switches?
Thank you
09-13-2017 03:11 PM
09-13-2017 03:16 PM
Ok thank you for the explanation.
:-)
09-14-2017 07:19 AM - edited 09-14-2017 07:27 AM
Enabling the IP tracking feature from the command line does nothing.
I need to retrieve about 500 devices IP's and ports from our switches for our VOIP provider. I do not want to sort through all of that data manually.
It's 2017, I feel like this should be a feature by now or someone should have a way to pull every port's assigned DHCP address with ease, instead of only listing MAC address and port.
09-14-2017 11:16 AM
08-13-2020 11:02 AM
"Enabling the IP tracking feature from the command line does nothing."
I would think you would want to enable IP device tracking on the interface(s) rather than globally, especially if you have interfaces you don't care to track. For example - if you are trying to track IP addresses on all hosts belonging to a specific VLAN then go into the VLAN interface and run "ip device tracking max 500" (since you said 500 devices)
You then need to wait for the devices to actually DO something IP related. Like other users have said, a switch will not natively track this so the data needs to populate after you enable the command. For example, you enable IP device tracking and then show ip device tracking but don't see anything. You then ping a device on one of the interfaces you are tracking and re-run the "show ip device tracking all" command. You will now see that the data for that device, specifically: IP Address, MAC Address, Vlan, Interface, Probe-Timeout, State, Source.
04-24-2021 06:37 AM
hello dear cisco i used in my office all my network connectivity in cisco device please support me how to configure Switch or vlans
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