Cisco IP to Port Mapping / Ping Sweep

aaronearles

[H]ard|Gawd
Joined
Aug 31, 2006
Messages
2,016
Hi guys,

I'm preparing to segment an existing flat network, I've currently got my target hosts moved over to the new subnet and routing through the router, I'm in the process of building my switch config to move routing to the switch and apply the VLAN config. I'm curious to hear if anyone has any good tips for mapping which ports are connected to hosts on the network I want to move.

I am familiar with mapping individual ports with ping, arp, and mac address-table, I figured if I can get the switch to ping every available IP on the new network then I can parse the mac address-table for the ports I need, unless anyone has a better suggestion.

Unfortunately, it seems making a list of available IPs to ping in excel and pasting the string of commands does not work because it skips over several IPs at a time while the initial ping takes place.

Hopefully that all makes sense, let me know if anyone has any ideas!

Thanks
 
One method you could use to ping a range of addresses from a Cisco device is a TCL script.

Code:
Switch# tclsh


foreach address {
192.168.1.1
192.168.1.2
} {
ping $address }

I am assuming that this network has Cisco boxes with default configs, if so then you could also do a "show spanning-tree" on each switch and look for all of the non-root, designated ports that are not connected to other switches (verifiable via "show cdp neighbors") this would give you a picture as to what ports were up/up and where hosts that may need to be migrated are located.
 
Also remember that just because an IP address doesn't reply to a ping doesn't mean there isn't a computer actively using that address
 
One method you could use to ping a range of addresses from a Cisco device is a TCL script.

Code:
Switch# tclsh


foreach address {
192.168.1.1
192.168.1.2
} {
ping $address }

I am assuming that this network has Cisco boxes with default configs, if so then you could also do a "show spanning-tree" on each switch and look for all of the non-root, designated ports that are not connected to other switches (verifiable via "show cdp neighbors") this would give you a picture as to what ports were up/up and where hosts that may need to be migrated are located.

I love you...

No, seriously - thank you!
 
Back
Top