Sponsored Content
Top Forums Shell Programming and Scripting Perl telnet to cisco router and compare the ping ms Post 302133492 by optimus on Thursday 23rd of August 2007 02:35:38 PM
Old 08-23-2007
robotronic thanks ...

Thanks for robotronic 's help.
but i was mistake the result i obtain from the router must be look like this

"Router#ping 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 104/104/104 ms
Router#"


there must be 7 lines how can i get the middle average value

in addition, how i can handle the non standard reply , (e.g the remote cannot be ping)

Router#ping 1.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
U.U..
Success rate is 0 percent (0/5)
Router#

anyway, thanks for robotronic 's help as I had already search for a very long time for nothing.

Last edited by optimus; 08-23-2007 at 03:59 PM..
 

9 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Cisco Router command to get hostname

Hi All, I am connected to a cisco router and I want to know the hostname of this router. I connect as telnet <IPADDRESS> and the prompt shows vpnaccess-bristol> But I want to know the full hostname of the router how can i do that. When i type the hostname command the following... (3 Replies)
Discussion started by: rahulrathod
3 Replies

2. IP Networking

Linux behind a cisco router

Dear All, I have worked with xDSL routers working in bridged mode, and linux behind them working as a Firewall utilizing IPTABLES. My question is, how this will change if the xDSL router is replaced with a Cisco Router? I mean to ask that, can I assign a public ip on the linux machine, which... (0 Replies)
Discussion started by: tmm
0 Replies

3. IP Networking

isc dhcpd and cisco router

Hello all, I have set up dhcpd on a linux box for serving subnets on multiple vlans configured on a Cisco 6500 with ip helper of the dhcp server. Servers get dhcp leases just fine, however, some machines lose their connection for reboot or what not and I can not get their lease back even though... (0 Replies)
Discussion started by: closedown
0 Replies

4. Shell Programming and Scripting

perl telnet issue with cisco

Hi Experts, I am using perl to telnet on cisco boxes. We have this stupid cisco node which does not support "terminal Length0" command. Since I am using Net::Telnet and capturing output with @output = $telnet->cmd('cmd'); Say @output = $telnet->cmd('show version'); Now problem... (2 Replies)
Discussion started by: mtomar
2 Replies

5. Shell Programming and Scripting

Perl variables inside Net::Telnet::Cisco Module doesn't work

I am writing perl script to configure Cisco device but Variables inside Net::Telnet::Cisco Module doesn't work and passed to device without resolving. Please advise. here is a sample of script: use Net::Telnet::Cisco; $device = "10.14.199.1"; ($o1, $o2, $o3, $o4) = split(/\./,$device);... (5 Replies)
Discussion started by: ahmed_zaher
5 Replies

6. Shell Programming and Scripting

Animation Ping on Solaris Like Cisco Ping

Hi, I develop simple animation ping script on Solaris Platform. It is like Cisco ping. Examples and source code are below. bash-3.00$ gokcell 152.155.180.8 30 Sending 30 Ping Packets to 152.155.180.8 !!!!!!!!!!!!!.!!!!!!!!!!!!!!!. % 93.33 success... % 6.66 packet loss...... (1 Reply)
Discussion started by: gokcell
1 Replies

7. Shell Programming and Scripting

Perl Telnet cisco routers

Hi all i have little problem finding solution about simple telnet script .... i have 250 routers and on some i have different password and on some they ask just for password no username. So for example 1,2,3 have username and password (user,password) 4, and 5 have different username and password... (0 Replies)
Discussion started by: IvanMP
0 Replies

8. Shell Programming and Scripting

Perl telnet to router run commands from file

I have a perl script that is called with a router name command list file and output file. The command file can be very large, up to 3k of commands. At first I dumped the command list file to an array and ran the entire file on the router and captured the output. It worked ok for a command list in... (1 Reply)
Discussion started by: numele
1 Replies

9. IP Networking

Need help configuring Cisco 892-k9 router

I bought a Cisco 892-k9 router and I am having in issue trying to setup the initial configuration. Does someone have a sampl configuration for a single subnet that I can use for my configuration? Thanks. (0 Replies)
Discussion started by: gandolf989
0 Replies
Smokeping_probes_CiscoRTTMonDNS(3)				     SmokePing					Smokeping_probes_CiscoRTTMonDNS(3)

NAME
Smokeping::probes::CiscoRTTMonDNS.pm - Probe for SmokePing SYNOPSIS
*** Probes *** +CiscoRTTMonDNS forks = 5 offset = 50% step = 300 timeout = 15 # The following variables can be overridden in each target section ioshost = RTTcommunity@Myrouter.foobar.com.au # mandatory iosint = 10.33.22.11 name = www.foobar.com.au # mandatory pings = 5 timeout = 15 # [...] *** Targets *** probe = CiscoRTTMonDNS # if this should be the default probe # [...] + mytarget # probe = CiscoRTTMonDNS # if the default probe is something else host = my.host ioshost = RTTcommunity@Myrouter.foobar.com.au # mandatory iosint = 10.33.22.11 name = www.foobar.com.au # mandatory pings = 5 timeout = 15 DESCRIPTION
A probe for smokeping, which uses the ciscoRttMon MIB functionality ("Service Assurance Agent", "SAA") of Cisco IOS to time ( recursive, type A) DNS queries to a DNS server. VARIABLES
Supported probe-specific variables: forks Run this many concurrent processes at maximum Example value: 5 Default value: 5 offset If you run many probes concurrently you may want to prevent them from hitting your network all at the same time. Using the probe- specific offset parameter you can change the point in time when each probe will be run. Offset is specified in % of total interval, or alternatively as 'random', and the offset from the 'General' section is used if nothing is specified here. Note that this does NOT influence the rrds itself, it is just a matter of when data acqusition is initiated. (This variable is only applicable if the variable 'concurrentprobes' is set in the 'General' section.) Example value: 50% step Duration of the base interval that this probe should use, if different from the one specified in the 'Database' section. Note that the step in the RRD files is fixed when they are originally generated, and if you change the step parameter afterwards, you'll have to delete the old RRD files or somehow convert them. (This variable is only applicable if the variable 'concurrentprobes' is set in the 'General' section.) Example value: 300 timeout How long a single 'ping' takes at maximum Example value: 15 Default value: 5 Supported target-specific variables: ioshost The (mandatory) ioshost parameter specifies the Cisco router, which will send the DNS requests, as well as the SNMP community string on the router. Example value: RTTcommunity@Myrouter.foobar.com.au This setting is mandatory. iosint The (optional) iosint parameter is the source address for the DNS packets. This should be one of the active (!) IP addresses of the router to get results. IOS looks up the target host address in the forwarding table and then uses the interface(s) listed there to send the DNS packets. By default IOS uses the (primary) IP address on the sending interface as source address for packets originated by the router. Example value: 10.33.22.11 name The (mandatory) name parameter is the DNS name to resolve. Example value: www.foobar.com.au This setting is mandatory. pings How many pings should be sent to each target, if different from the global value specified in the Database section. Note that the number of pings in the RRD files is fixed when they are originally generated, and if you change this parameter afterwards, you'll have to delete the old RRD files or somehow convert them. Example value: 5 timeout How long a single RTTMonDNS 'ping' take at maximum plus 10 seconds to spare. Since we control our own timeout the only purpose of this is to not have us killed by the ping method from basefork. Example value: 15 Default value: 15 AUTHORS
Joerg.Kummer at Roche.com NOTES
host parameter The host parameter specifies the DNS server, which the router will use. IOS VERSIONS This probe only works with IOS 12.0(3)T or higher. It is recommended to test it on less critical routers first. INSTALLATION To install this probe copy ciscoRttMonMIB.pm to ($SMOKEPINGINSTALLDIR)/lib/Smokeping and CiscoRTTMonDNS.pm to ($SMOKEPINGINSTALLDIR)/lib/Smokeping/probes. The router(s) must be configured to allow read/write SNMP access. Sufficient is: snmp-server community RTTCommunity RW If you want to be a bit more restrictive with SNMP write access to the router, then consider configuring something like this access-list 2 permit 10.37.3.5 snmp-server view RttMon ciscoRttMonMIB included snmp-server community RTTCommunity view RttMon RW 2 The above configuration grants SNMP read-write only to 10.37.3.5 (the smokeping host) and only to the ciscoRttMon MIB tree. The probe does not need access to SNMP variables outside the RttMon tree. BUGS
The probe does unnecessary DNS queries, i.e. more than configured in the "pings" variable, because the RTTMon MIB only allows to set a total time for all queries in one measurement run (one "life"). Currently the probe sets the life duration to "pings"*5+3 seconds (5 secs is the timeout value hardcoded into this probe). SEE ALSO
<http://oss.oetiker.ch/smokeping/> <http://www.switch.ch/misc/leinen/snmp/perl/> The best source for background info on SAA is Cisco's documentation on <http://www.cisco.com> and the CISCO-RTTMON-MIB documentation, which is available at: ftp://ftp.cisco.com/pub/mibs/v2/CISCO-RTTMON-MIB.my <ftp://ftp.cisco.com/pub/mibs/v2/CISCO-RTTMON-MIB.my> 2.6.8 2013-03-17 Smokeping_probes_CiscoRTTMonDNS(3)
All times are GMT -4. The time now is 08:34 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy