How to search by IP using CMS

Milenko

[H]ard|Gawd
Joined
Jul 15, 2002
Messages
1,482
Me and the IT manager are trying to figure out how to search through all the cisco switches by using CMS to find out which IP address is on which port.

Is there an easy way to do this?
 
If I'm looking for, say, 10.11.11.101, do a 'sh ip arp | inc 10.11.11.101' to figure the MAC. Then do a 'show mac-address-table | inc $mac' to figure which port it is on.


router>show ip arp | inc 10.11.11.101
Internet 10.11.11.101 15 00e0.b84e.0373 ARPA FastEthernet0/0.11

switch#show mac-address-table | inc 0373
00e0.b84e.0373 Dynamic 110 FastEthernet0/6
 
Fint said:
If I'm looking for, say, 10.11.11.101, do a 'sh ip arp | inc 10.11.11.101' to figure the MAC. Then do a 'show mac-address-table | inc $mac' to figure which port it is on.


router>show ip arp | inc 10.11.11.101
Internet 10.11.11.101 15 00e0.b84e.0373 ARPA FastEthernet0/0.11

switch#show mac-address-table | inc 0373
00e0.b84e.0373 Dynamic 110 FastEthernet0/6

Why not just do sh ip arp (ip) and sh mac-address-table address (mac) ?
Not that yours doesn't work or anything, but using the | inc isn't actually necessary.
 
So you can do partials matches, especially for the MAC. Rather then have to type (or paste :) ) the entire mac, you can just do | inc and put part of the mac address.

My example for the IP was bad, as I'd usually just | inc for the last octet but included the whole IP to make the example more clear.
 
Ok, I gotcha now. The example just was a little confusing, as it looked like you were doing that for full matches all the time.
 
Back
Top