Scheduling the Activation of a Configuration

Problem

You want to activate a new or modified router configuration at a later time.

Solution

You schedule when the software should activate a configuration:

	[edit]
	aviva@router1# commit at 10:45
	configuration check succeeds
	commit at will be executed at 2005-02-25 10:45:00 PST
	Exiting configuration mode

The time is in 24-hour (military) format, so to specify a time after 12 p.m., use the following command:

	[edit]
	aviva@router1#  
commit at 22:45
	configuration check succeeds
	commit at will be executed at 2005-02-25 22:45:00 PST
	Exiting configuration mode

To schedule the activation of a configuration to occur on another day, use the full date and time:

	[edit]
	aviva@router1# commit at "2005-02-26 10:45"
	configuration check succeeds
	commit at will be executed at 2005-02-26 10:45:00 PST
	Exiting configuration mode

To cancel a commit operation scheduled with the commit at command, use the following command:

	aviva@router1>  
clear system commit
	Pending commit cleared

 

Discussion

Sometimes you want to delay the activation of a configuration, scheduling it to occur at some later time. For example, if you are a network provider and have a service window in which network changes are made, you want the new configuration to take effect during that window. Or, if you are making changes on a number of routers, you might want the changes to take effect on all the routers at the same time or within the same time window, especially if you are making changes to routing protocols that might affect routing and route convergence across the network.

One way to schedule the activation of a configuration is to use the commit at command. The first two commands in this recipe commit the configuration at a specific time on the current day, one at 10:45 a.m. and the second at 10:45 p.m. The third command schedules the commit at 10:45 a.m. on another day.

Verify that the commit command has actually executed by looking at the timestamp on the currently running configuration file:

	aviva@router1>  
file list detail /config

	/config:
	total 34
	-rw-r----- 1 root wheel 2127 Feb 25 03:10 juniper.conf.1.gz
	-rw-r----- 1 root wheel 2127 Feb 25 03:00 juniper.conf.2.gz
	-rw-r----- 1 root wheel 2127 Feb 24 12:56 juniper.conf.3.gz
	-rw-r----- 1 root wheel 2127 Feb 25 10:45 juniper.conf.gz
	drwxr-xr-x 2 root wheel 512 Jan 18 2004 license/

You see that the running configuration file, juniper.conf.gz, was activated February 25 at 10:45 a.m.

When you use the commit at command, you must be at the [edit] hierarchy level in the configuration. The time and date that you specify are interpreted based on the router's time clock. Use the show system uptime command to determine the current date and time as set on the router:

	aviva@router1> show system uptime
	Current time: 2005-02-25 10:59:09 PST
	System booted: 2005-02-25 03:07:42 PST (07:51:27 ago)
	Protocols started: 2005-02-25 03:10:07 PST (07:49:02 ago)
	Last configured: 2005-02-25 10:45:12 PST (00:13:57 ago) by aviva
	10:59AM PST up 7:51, 1 user, load averages: 0.01, 0.02, 0.00

To determine whether and when a configuration activation has been scheduled, use the show system commit command:

	aviva@router1> show system commit
	commit requested by aviva via cli at 2005-02-26 10:00:00 PST
	0 2005-02-25 10:45:12 PST by aviva via cli commit at
	1 2005-02-25 03:10:21 PST by aviva via cli
	2 2005-02-25 03:01:01 PST by aviva via cli

The first line shows that a configuration activation has been requested, who requested it, and when it will occur. This command also lists the history of all the commit operations that have occurred on the router and who activated them, and provides you with a history of configuration changes.

Another way you know that a configuration activation has been scheduled is that you see a message when you enter configuration mode:

	aviva@router1> configure
	Entering configuration mode
	Users currently editing the configuration:
	 aviva terminal p0 (pid 6231) on since 2005-02-25 11:55:07 PST, idle 00:15:54
	 commit-at

Note that when a delayed configuration activation is scheduled, you cannot commit any changes to the configuration:

	[edit]
	aviva@router1# commit
	error: Another commit is pending

To cancel a scheduled commit, use the clear system commit command.


Router Configuration and File Management

Basic Router Security and Access Control

IPSec

SNMP

Logging

NTP

Router Interfaces

IP Routing

Routing Policy and Firewall Filters

RIP

IS-IS

OSPF

BGP

MPLS

VPNs

IP Multicast



JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Similar book on Amazon

Flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net