From: Charles Manafa (charles.manafa@xxxxxxxxxxxxxxxx)
Date: Tue Feb 12 2002 - 16:10:59 GMT-3
Hey Ray, that's an awesome script you've got there. I've been looking for
something similar to that, before I found salvation with Expect.
CM
----- Original Message -----
From: "Ray Stevens" <cisco-guy@rogers.com>
To: "'Emmanuel Oppong'" <e-oppong@attbi.com>; <ccielab@groupstudy.com>
Sent: Tuesday, February 12, 2002 5:32 PM
Subject: RE: Ping script
> I do this at work in several different ways for each type of technology we
> use. for the routers. i have a simple unix shell script which logs into
> the router does a "show ip int brie" and then save the output to a file
and
> grep each line for the IP of the interfaces. then just use a loop to ping
> each intfce. this saves me tons of time as we have so many routers and so
> many int on each router. The automated script takes well over an hour to
> run.
>
> A sample script would be this.
>
>
> #!/bin/sh
> user="username"
> pass="password"
>
> {
> sleep 2
> echo $user
> sleep 2
> echo $pass
> sleep 1
> echo "show ip interface brief"
> sleep 1
> echo "exit"
> } | telnet $IP |tee Results #this tee command will save all output to
a
> file called "Results"
>
> # this will search the output for only lines which are up and save them
into
> a file called int_ip
> grep "up" temp | cut -c28-43 | tee -a int_ip
>
> THis will loop the ping comand for each int and save bad ones into a temp
> file to notify you which ones are down.
>
> Count=`grep -c "\." int_ip"
>
> while [ $Count -gt 0 ]; do
> Count=`expr ${Count} - 1`
> INT_IP=`sed -n "1p" int_ip` this will get the IP from the list and use
it
> to Ping this does nto cahnge the file
>
> sleep 2
> ping $INT_IP 1 | tee -a Ping_Results
>
> `sed "1d" int_ip | cat > int_ip` this will remove the first line from
the
> list
> done
>
> cat Ping_Results | grep "no" #this will list any interface which you
> could not ping
>
>
>
>
> Not sure if this is what you were looking for. but hope it helps in some
> way.
>
>
> Ray Stevens
> ccnp, ccdp, scsa
>
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
> Emmanuel Oppong
> Sent: Monday, February 11, 2002 4:48 PM
> To: ccielab@groupstudy.com
> Subject: Ping script
>
>
> Guys/Gals,
>
> How do you construct a "ping script" so that I can ping all interfaces
from
> each router? I tried writing a series of ping statements but that don't
> work.
>
> Thanks!
>
> -----Original Message-----
> From: nobody@groupstudy.com [mailto:nobody@groupstudy.com]On Behalf Of
> Dotun Oni
> Sent: Monday, February 11, 2002 1:23 PM
> To: elsayedm@hotmail.com; ccielab@groupstudy.com
> Subject: Re: BVI and IRB
>
>
> Cisco Press : Cisco LAN Switching by Clark and Hamilton
>
>
> >From: "Elsayed Mohamed" <elsayedm@hotmail.com>
> >Reply-To: "Elsayed Mohamed" <elsayedm@hotmail.com>
> >To: ccielab@groupstudy.com
> >Subject: BVI and IRB
> >Date: Mon, 11 Feb 2002 15:50:22 -0500
> >
> >Guys,
> >
> >I am having trouble understanding the IRB and BVI topic. All books and
> >white
> >paper repeat the same thing but it seems that I am memorizing it more
than
> >I
> >understand it. If you UNDERSTAND this topic, can you please email me with
> >your source of reading or a lab I should do or anything else.......
> >
> >Signature
> >Elsayed Mohamed
> >frustrated ccie candidate
> >
This archive was generated by hypermail 2.1.4 : Thu Jun 20 2002 - 13:46:20 GMT-3