Monday, May 22, 2023
HomeNetworkingTCL Script for A number of Loopbacks in Seconds

TCL Script for A number of Loopbacks in Seconds

Scripting will be very great tool when networkers have to work on identical exercise repetitively. A few of the boring and time consuming actions are –

  • Placing a number of interfaces in VLANs
  • Configuring a number of entries of BGP neighborship
  • Entry checklist entries for identical supply or vacation spot

And lots of extra.

TCL Script for A number of Loopbacks

So right here comes within the TCL script which might full a few of repetitive and tedious jobs in seconds. Lets take an instance the place I wish to configure 5 Loopbacks. The script will look one thing like this –

foreach {quantity handle} {
5} { places [ ios_config “interface Loopback$number” “ip address $address” ] }

Now lets check the configuration in lab –

R1(tcl)#foreach {quantity handle} {
+>(tcl)#           1
+>(tcl)#           2
+>(tcl)#           3
+>(tcl)#           4
+>(tcl)#           5
+>(tcl)#+>(tcl)# } {   places [ ios_config “interface Loopback$number” “ip address $ address” ] }

The output of TCL script configuration is under –

R1#present ip int temporary
Interface                 IP-Handle     OK?   Technique    Standing                            Protocol
FastEthernet0/0       unassigned     YES        unset          administratively down  down
FastEthernet0/1        unassigned     YES        unset          administratively down  down
Loopback1                     YES        unset          up                                      up
Loopback2                     YES        unset          up                                       up
Loopback3                     YES        unset          up                                       up
Loopback4                     YES        unset          up                                       up
Loopback5                      YES        unset          up                                       up

Good to see how TCL script could make tiring actions enjoyable and time saver for techies.

Proceed Studying:

TCL Ping Script

BGP Neighborship Drops when NAT is Enabled

Associated Posts

About The Writer



Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments