Difference between revisions of "Quick Reusable Config Patches"

From Baranoski.ca
Jump to navigation Jump to search
(Created page with "Let's say you have one config element that you frequently change to a particular value, then change back shortly after. For example, I have a time of day rule that I use to l...")
 
 
Line 25: Line 25:
 
The router will merge the file into the running config whenever I execute the command '''opentime''
 
The router will merge the file into the running config whenever I execute the command '''opentime''
  
Then I just use the '''rollback''' command I created [[Configure Replace | here]] to quickly revert to the original configuration.
+
Then I just use the '''rollback''' command I created <U>[[Configure Replace | here]]</U> to quickly revert to the original configuration.

Latest revision as of 13:57, 12 January 2015

Let's say you have one config element that you frequently change to a particular value, then change back shortly after. For example, I have a time of day rule that I use to limit bandwidth during the day and open up the bandwidth at night.

time-range ISP-UNLIMITED
 periodic daily 2:00 to 8:00
 periodic Monday 8:00 to 12:00

Frequently, I need to open up the limiter during the day for brief periods. To make this easier, I created the text file "open_time_acl.cfg" on my server with the following content:

time-range ISP-UNLIMITED
periodic daily 00:01 to 23:59
end

I then copied the file to my router's flash.

Then I created an alias:

alias exec opentime copy flash:open_time_acl.cfg running-config

The router will merge the file into the running config whenever I execute the command 'opentime

Then I just use the rollback command I created here to quickly revert to the original configuration.