cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
988
Views
3
Helpful
2
Replies

Ping a list of IPs addresses from Cisco 2620 (IP connectivity tests)

Ayad
Level 1
Level 1

Dear all,

In order to check and ensure the IP connectivity of my hosts and devices in LAN, WAN, I have a batch script witch I execute from my computer and for each IP address in a list.txt file, I ping the address, i send the output to a result.txt.

when the executer of my file is finshed, i get the result.txt with the test connectivity status (reply or timeout).

For security reasons and from today, i will not have access to ping devices directy from my computer and then i must to telnet a cisco router where i can ping my hosts, devices.

- Does someone know is there any possibility to make a ping to a list of IP address from cisco 2620 router ? to cpoy list.txt in the flash ? send output to ftp/tftp,..?

- Does someone can help on how to open /close telnet sessions from batch files ?

Thanks in advance,

Regards,

2 Replies 2

Jon Marshall
Hall of Fame
Hall of Fame

There are probably a number of approaches to this but i have used the Perl module Net::Telnet::Cisco to do this sort of thing in the past. The module has all the inbuilt code to connect to routers/switches and once connected you could just then run through your list of IPs in a foreach loop, capture the output and save to a text file running on your host computer.

It all depends how comfortable you are using Perl. If you aren't then there is also Expect/Tcl which allows you do the same thing but using TCL Expect commands.

EEM (which uses TCL) is built into the later IOS releases and might be able to do the same. I suggest if you want to try EEM then post this query into Network Management where he EEM expert Joe Clarke hangs out.

Jon

Hi Jon,

Thanks for your idea to use Perl.

I have found a script in the net to use Net::Telnet::Cisco/ Cisco::IOS, but i can't setup it as i'm a beginner in perl. You can help on this ?

I will post the script in the network management if someone can help.

Thanks again.

Regards,

Review Cisco Networking products for a $25 gift card