TCL Scripting, need help !

Unanswered Question
Dec 11th, 2008
User Badges:

Hi all, i have a requirement in which i have to shut and no shut a particular tunnel at around 20+ spokes from the hub. I want to write the script in which it says that go to int tunnel 1 (its always tunnel 1 ) shut and no shut. At each spoke i have authentication through AAA but i am expecting then when i will be doing this activity they will be accessible via local username/pass only which is constant throughout. so this is the steps i need

go to particular WAN IP

enter username

enter password


enter password

conf t

int tun 1


no sh



Can some 1 help me write this script ?

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Giuseppe Larosa Fri, 12/12/2008 - 04:19
User Badges:
  • Super Silver, 17500 points or more
  • Hall of Fame,

    Founding Member

Hello Ovais,

for this kind of things you could use the expect library under tcl.

this is thought to be able to manage interactive logins

only warning: when you shut tunnel1 the branch is still reachable ? activetcl 8.4.x or later should have an expect library

you need to build a list of devices ip addresses that will be indexed in a for cycle and in the for body there the instructions for performing the required actions

I used it and it works well. I had used a 5.21 version of porting to windows

if you have a linux box it should be even easier

commands are

expect "sername"

send $user

expect "assoword"

send $pass

during configuration the expect should match only the hostname

Hope to help



This Discussion