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.
Who is Participating?
rsivanandanConnect With a Mentor Commented:
I'm by no means a programmer but I think it would be much easier to work with expect scripts than tcl for this.

Refer another example here.

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.
djohnson104Author Commented:
saved the following lines bellow as test.tcl and ran tclsh test.tcl from the ios command line.
ios_config "ip route 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"
djohnson104Author Commented:
Not an actual script but it allowed me to write my own.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.