Sponsored Content
Top Forums Shell Programming and Scripting Perl telnet to cisco router and compare the ping ms Post 302133478 by optimus on Thursday 23rd of August 2007 01:33:22 PM
Old 08-23-2007
Perl telnet to cisco router and compare the ping ms

All
Please help, i will telnet to router to obain the ping status and compare, if higher than normal latency, i will have further action..

if i do the telent and in perl script then ....

e.g the result i obtain from the router will be =' Success rate is 100 percent (5/5), round-trip min/avg/max = 140/140/141 ms'


and the xxxx/140/xxxx ms , while i only concern the average one = 140ms. How can I read the value in the middle of the '/'line, sometimes will be 2 digit , sometimes will be 4 digit and how I can compare it?

For example I define 180ms is not acceptable, if now the ping is 100/250/300 ms while the 250 is higher than 180 , then I will print 'high Alarm'.
 

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
iptunnel(8)						      System Manager's Manual						       iptunnel(8)

NAME
iptunnel - Creates, deletes, and displays configured tunnels SYNOPSIS
/usr/sbin/iptunnel [operation] [args] DESCRIPTION
The iptunnel command creates configured tunnels for sending and receiving IPV6 or IPV4 packets that are encapsulated as the payload of an IPV4 datagram. The iptunnel command can perform one of the following operations: Creates a tunnel interface, which you must subsequently configure by using the ifconfig command. The syntax of the create operation is as follows: iptunnel create [-I int-name] [v4-dest] [v4-src] Specifies the interface unit of the tunnel to be created. This is an optional parameter. The int-name parameter has the following form: iptx, where x is the interface unit number. By default, the interface name selected for the tunnel is iptx+1, or the value of the interface unit number of the last tunnel created plus 1. Specifies the remote end-point to which a tunnel is to be created. Sets the IPV4 source address in the encapsulating header. The tunnel is enabled (packets are sent/received on the tunnel) only if v4-src is a valid address on the system. This is an optional parameter. Deletes a tunnel interface. You must disable the tunnel before you can delete it by executing the following command: # ifconfig tunnel name down delete abort Shows the tunnel attributes (name, tunnel end points, next hop for tunneled packets). EXAMPLES
To create a tunnel from hobbes to calvin, enter: # iptunnel create -I ipt5 calvin ipt5 iftype 208 src 16.140.16.86 dst 16.140.16.91 To display the tunnel attributes, enter: # iptunnel show ipt5 interface ipt5 src 16.140.16.86 dst 16.140.16.91 gate 16.140.16.86 To config- uring the tunnel to encapsulate IPv6 packets, enter: # ifconfig ipt5 ipv6 up IPv6 packets will be sent as payloads of IPv4 datagrams from 16.140.16.86 to 16.140.16.91. The tunnel may also be used to send IPV4 packets encapsulated within IPV4 headers as follows: # ifconfig ipt5 10.10.80.60 netmask 255.255.255.0 To verify the previous command, enter: # ifconfig ipt5 ipt5: flags=4c1<UP,RUNNING,NOARP,MULTICAST> 16.140.16.86 --> 16.140.16.91 rxmt 1000, reach time 30000, dad tries 1, mtu 1280, hops 64, token len 64 inet 10.10.80.60 netmask ffffff00 ipmtu 1280 inet6 fe80::108c:1056 To deleting the tunnel, enter: # ifconfig ipt5 down delete abort ipt5: delete inet address 10.10.80.60 10.10.80.60: aborting 0 tcp connection(s) Then, enter: # iptunnel delete ipt5 interface ipt5 deleted SEE ALSO
Commands: ifconfig(8). RFC 2003, IP Encapsulation within IP, Perkins, C., October 1996 iptunnel(8)
All times are GMT -4. The time now is 03:11 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy