Summary: This note explains the procedure for uploading and executing a TCL script on a Cisco IOS-XE device, using the KBA-030 - TCL Script to Update Default Route as an example.
First, you need to transfer the TCL script file to the device's local storage, such as bootflash:. You can use any file transfer protocol like SCP, FTP, or TFTP.
Example using SCP:
scp default-route-change.tcl your_username@router_ip:bootflash/
To make the script easily executable, you can create a command alias in the global configuration mode of the IOS-XE device.
configure terminal
!
alias exec change-route tclsh bootflash:default-route-change.tcl
!
end
This configuration creates a new command change-route that will execute the TCL script.
From the privileged EXEC mode (#), you can now run the script by simply typing the alias you created. The script will then prompt for any required input.
Router# change-route
The script will then guide you through the process of changing the default route.