TCL script to write access-list for a Cisco router.

we have a few users in that need to apply a access list on each router. I want to create a TCL script that will write the access-list out and have an input variable for the third octet of the IP in the access-list.
LVL 2
djohnson104Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

rsivanandanCommented:
I'm by no means a programmer but I think it would be much easier to work with expect scripts than tcl for this.

http://coding.derkeiler.com/Archive/Tcl/comp.lang.tcl/2006-06/msg00094.html

Refer another example here.

Cheers,
Rajesh
0
djohnson104Author Commented:
These are routers that will have no access to tftp. I need this script to be on a USB drive and ran from within the router. I pretty much have it figured out i just need to put it togather.
0
rsivanandanCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
djohnson104Author Commented:
saved the following lines bellow as test.tcl and ran tclsh test.tcl from the ios command line.
ios_config "ip route 0.0.0.0 0.0.0.0 cell 0/1/0"
      
ios_config "no ip http server"

ios_config "ip nat inside source list 115 interface cell 0/1/0 overload"
      
ios_config "access-list 1 permit any log"
0
djohnson104Author Commented:
Not an actual script but it allowed me to write my own.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Scripting Languages

From novice to tech pro — start learning today.