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

Unanswered Question
Jul 27th, 2010

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,

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 3 (1 ratings)
Loading.
Jon Marshall Tue, 07/27/2010 - 12:31

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

Ayad Thu, 07/29/2010 - 01:53

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,

Actions

This Discussion