3. CLI Usage

This chapter provides information about using the Command Line Interface (CLI).

Topics in this chapter include:

3.1. CLI Structure

-The 7705 SAR CLI is a command-driven interface accessible through the console, or through Telnet, secure shell (SSH), or SSH file transfer protocol (SFTP). The CLI can be used for configuration and management of 7705 SAR routers.

The 7705 SAR CLI command tree is a hierarchical inverted tree. At the highest level is the ROOT level. Below this level are other tree levels with the major command groups; for example, configure commands and show commands are levels below ROOT.

The CLI is organized so that related commands with the same scope are at the same level or in the same context. Sublevels or subcontexts have related commands with a more refined scope.

Figure 1 and Figure 2 display the major contexts for router configuration. The figures are sample representations of high-level commands; not all commands are included.

Figure 1:  Root Commands 
Figure 2:  Operational Root Commands 

3.2. Navigating in the CLI

The following sections describe additional navigational and syntax information:

3.2.1. CLI Contexts

Use the CLI to access, configure, and manage 7705 SAR routers. CLI commands are entered at the command line prompt. Access to specific CLI commands is controlled by the permissions set by your system administrator. Entering a CLI command makes navigation possible from one command context (or level) to another. When you initially enter a CLI session, you are in the ROOT context. Navigate to another level by entering the name of successively lower contexts. For example, enter either the configure or show commands at the ROOT context to navigate to the config or show context, respectively. For example, at the command prompt, enter config. The active CSM slot displays in the command prompt at the beginning of the CLI context.

A:ALU-12# config
     A:ALU-12>config#

In a given CLI context, you can enter commands at that context level by simply entering the text. It is also possible to include a command in a lower context as long as the command is formatted in the proper command and parameter syntax.

The following example shows two methods of navigating to a service SDP ingress level:

Method 1: Enter all commands on a single line.

     A:ALU-12# configure service cpipe 6 spoke-sdp 2:6 ingress
     *A:ALU-12>config>service>cpipe>spoke-sdp>ingress# 

Method 2: Enter each command on a separate line.

     A:ALU-12>config# service
     A:ALU-12>config>service# cpipe 6
     *A:ALU-12>config>service>cpipe# spoke-sdp 2:6
     *A:ALU-12>config>service>cpipe>spoke-sdp# ingress
     *A:ALU-12>config>service>cpipe>spoke-sdp>ingress#

The CLI returns an error message if the syntax is incorrect.

     *A:ALU-12>config# rooter
     Error: Bad command.

3.2.2. Basic CLI Commands

The console control commands are the commands that are used for navigating within the CLI and displaying information about the console session.

Most of these commands are implemented as global commands. They can be entered at any level in the CLI hierarchy, with the exception of the password command, which must be entered at the ROOT level. The console control commands are listed in Table 2.

Table 2:  Console Control Commands 

Command

Description

<Ctrl-c>

Aborts the pending command

<Ctrl-z>

Terminates the pending command line and returns to the ROOT context

back

Navigates the user to the parent context

clear

Clears statistics for a specified entity or clears and resets the entity

echo

Echoes the text that is typed in. Primary use is to display messages to the screen within an exec file.

exec

Executes the contents of a text file as if they were CLI commands entered at the console

exit

Returns the user to the previous higher context

exit all

Returns the user to the ROOT context

help

Displays help in the CLI

?

Displays all available options

history

Displays a list of the most recently entered commands

info

Displays the running configuration for a configuration context

logout

Terminates the CLI session

mrinfo

Displays multicast information from the target multicast router. See the 7705 SAR OAM and Diagnostics Guide for details.

mstat

Traces a multicast path from a source to a receiver and displays multicast packet rate and loss information. See the 7705 SAR OAM and Diagnostics Guide for details.

mtrace

Traces a multicast path from a source to a receiver and displays hop-by-hop information. See the 7705 SAR OAM and Diagnostics Guide for details.

oam

Provides OAM test suite options. See the 7705 SAR OAM and Diagnostics Guide for details.

password

Changes the user CLI login password. The password can only be changed at the ROOT level.

ping

Verifies the reachability of a remote host

pwc

Displays the present or previous working context of the CLI session

sleep

Causes the console session to pause operation (sleep) for 1 second or for the specified number of seconds. Primary use is to introduce a pause within the execution of an exec file.

ssh

Opens a secure shell connection to a host

telnet

Telnet to a host

traceroute

Determines the route to a destination address

tree

Displays a list of all commands at the current level and all sublevels

write

Sends a console message to a specific user or to all users with active console sessions

The list of all system global commands is displayed by entering help globals in the CLI. For example:

*A:ALU-12>config>service# help globals
     back            - Go back a level in the command tree
     echo            - Echo the text that is typed in
     enable-admin    - Enable the user to become a system administrator
     exec            - Execute a file - use -echo to show the commands and
                       prompts on the screen
     exit            - Exit to intermediate mode - use option all to exit to root
                       prompt
     help            - Display help
     history         - Show command history
     info            - Display configuration for the present node
     logout          - Log off this system
     mrinfo          - Request multicast router information
     mstat           - Trace multicast path from a source to a receiver and 
                       display multicast packet rate and loss information
     mtrace          - Trace multicast path from a source to a receiver
     oam             + OAM Test Suite
     ping            - Verify the reachability of a remote host
     pwc             - Show the present working context
     sleep           - Sleep for specified number of seconds
     ssh             - SSH to a host
     telnet          - Telnet to a host
     traceroute      - Determine the route to a destination address
     tree            - Display command tree structure from the context of execution
     write           - Write text to another user
*A:ALU-12>config>service#

Table 3 lists command syntax symbols. Where the syntax differs between the CLI and the Command Reference sections of the 7705 SAR guides is noted in the table.

Table 3:  Command Syntax Symbols  

Symbol

Description

Example

 |

A vertical line (pipe) indicates that one of the parameters within the brackets or braces is required

tcp-ack {true | false}

[ ]

Brackets indicate optional parameters

router [router-name]

< >

Angle brackets indicate that the user must enter a value for the parameter inside the brackets (Note: angle brackets are not used in the 7705 SAR guides but are used on the CLI; italics are used in these guides to indicate the same rule)

interface <interface-name>

{ }

Braces indicate that one of the parameters must be selected

default-action {drop | forward}

[{ }]

Braces within square brackets indicate that the parameters are optional, but if one is selected, the information within the braces is required; for example, if you select the peer parameter, you must enter the keyword “peer” (ip-address is optional)

discovery [{peer [ip-address]} | {interface [ip-int-name]}]

Bold

In the 7705 SAR guides (not on the CLI), bold indicates commands and keywords that the user must enter exactly as shown

scope {inclusive | template}

Italic

In the 7705 SAR guides (not on the CLI), italics indicate parameters that the user must enter a value for

dscp dscp-name

n/a

In the Command Reference section, n/a in the Default field of a command indicates that a default value is not applicable for the command

3.2.3. CLI Environment Commands

The CLI environment commands are found in the root>environment context of the CLI tree. These commands control session preferences for a single CLI session. The CLI environment commands are listed in Table 4.

Table 4:  CLI Environment Commands  

Command

Description

alias

Enables the substitution of a command line by an alias

create

Enables or disables the use of a create parameter check

more

Configures whether CLI output should be displayed one screen at a time awaiting user input to continue

reduced-prompt

Configures the maximum number of higher-level CLI context nodes to display by name in the CLI prompt for the current CLI session

saved-ind-prompt

Saves the indicator in the prompt

suggest-internal-objects

Enables the suggestion of internally created objects while auto-completing

terminal

Configures the terminal screen length for the current CLI session

time-display

Specifies whether time should be displayed in local time or UTC

time-stamp

Specifies whether a timestamp should be displayed before the prompt

3.2.4. CLI Monitor Commands

The CLI monitor commands are found in the root>monitor context of the CLI tree. Monitor commands display specified statistical information related to the monitor subject (such as filter, port, router, and service) at a configurable interval until a count is reached.

The monitor command output displays a snapshot of the current statistics. The output display refreshes with subsequent statistical information at each configured interval and is displayed as a delta to the previous display.

The <Ctrl-c> keystroke interrupts a monitoring process. Monitor command configurations cannot be saved. You must enter the command for each monitoring session. If the maximum limits are configured, you can monitor the statistical information for a maximum of 60 × 999 s (approximately 1000 minutes, or 16.6 hours).

The CLI monitor commands are listed in Table 5.

Table 5:  CLI Monitor Commands  

Command

Description

filter

Enables IP and MAC filter monitoring at a configurable interval until that count is reached

management-access-filter

Monitors commands for management access filters

port

Enables port traffic monitoring. The specified ports’ statistical information displays at the configured interval until the configured count is reached.

router

Enables virtual router instance monitoring at a configurable interval until that count is reached

service

Monitors commands for a particular service

3.3. Getting Help in the CLI

The help system commands and the ? key display different types of help in the CLI. Table 6 lists the help commands.

Table 6:  Online Help Commands  

Command

Description

?

Lists all commands in the current context

string ?

Lists all commands available in the current context that start with string

command ?

Displays the command’s syntax and associated keywords

command keyword ?

Lists the associated arguments for keyword in command

string<Tab> string<Space>

Completes a partial command name (auto-completion) or lists available commands that match string

The tree and tree detail system commands are help commands that are useful when searching for a command in a lower-level context.

The tree flat command displays the command hierarchy on single lines; for example:

card
card card-type
card mda
card mda access
card mda access ingress
card mda access ingress fabric-policy
card mda access ingress security-queue-policy
card mda ais-propagation
card mda clock-mode

Figure 3 shows a partial list of the output of the tree and tree detail commands entered at the config level.

Figure 3:  CLI Display for CLI Tree Help 

3.4. The CLI Command Prompt

By default, the CLI command prompt indicates the device being accessed and the current CLI context. For example, the prompt A:ALU-1>config>router# indicates that the active CSM is CSM A, the user is on the device with hostname ALU-1, and the current context is configure router. In the prompt, the separator used between contexts is the “>” symbol.

At the end of the prompt, there is either a pound sign (#) or a dollar sign ($). A # at the end of the prompt indicates that the context is an existing context. A $ at the end of the prompt indicates that the context has been newly created. New contexts are newly created for logical entities when the user first navigates into the context.

Since there can be a large number of sublevels in the CLI, the system command reduced-prompt no-of-nodes-in-prompt allows the user to control the number of levels displayed in the prompt.

All special characters (#, $, and so on) must be enclosed within double quotes; otherwise, the character is seen as a comment character and all characters on the command line following the # are ignored. For example:

*A:ALU-1>config>router>mpls# authentication-key "router#1"

This example shows a security configuration over a network link. Because the string “router#1” is enclosed within double quotes, it is recognized as a password for the link.

When changes are made to the configuration file, a “*” appears in the prompt string (*A:ALU-1), indicating that the changes have not been saved. When an admin save command is executed, the “*” disappears. This behavior is controlled by the saved-ind-prompt command in the environment context.

3.5. Displaying Configuration Contexts

The info and info detail commands display the configuration for the current level. The info command displays non-default configurations. The info detail command displays the entire configuration for the current level, including defaults. The following example shows the output that displays using the info command and the output that displays using the info detail command.

*A:ALU-1>config>router# interface system
*A:ALU-1>config>router>if# info
----------------------------------------------
            address 10.221.221.72/32
----------------------------------------------
*A:ALU-1>config>router>if# 
*A:ALU-1>config>router>if# info detail
----------------------------------------------
            address 10.221.221.72/32
            no description
            no arp-timeout
            icmp
                mask-reply
                unreachables 100 10
                ttl-expired 100 10
            exit
            no ntp-broadcast
            no shutdown
            no bfd
----------------------------------------------
*A:ALU-1>config>router>if#

3.6. EXEC Files

The exec command allows you to execute a text file of CLI commands as if it were typed at a console device.

The exec command and the associated exec files can be used to conveniently execute a number of commands that are always executed together in the same order. For example, an exec command can be used to define a set of commonly used standard command aliases.

The echo command can be used within an exec command file to display messages on screen while the file executes.

3.7. Entering CLI Commands

The following sections describe additional information on entering CLI commands:

3.7.1. Command Completion

The CLI supports both command abbreviation and command completion. If the keystrokes entered are enough to match a valid command, the CLI displays the remainder of the command syntax when the <Tab> key or spacebar is pressed. When typing a command, the <Tab> key or spacebar invokes auto-completion. If the keystrokes entered are sufficient to identify a specific command, auto-completion completes the command. If the letters are not sufficient to identify a specific command, pressing the <Tab> key or spacebar displays commands matching the letters entered.

The command completion functionality works for both keywords and for optional parameters that have already been configured. When using command completion for optional parameters, the <Tab> key must be used.

For example, entering “i <Tab> returns the following user-configured interface names:

*A:ALU-12>config>router# interface "i
"igmp_interface"    "igmp_interface2"   "isis_interface"

System commands are available in all CLI context levels.

3.7.2. Unordered Parameters

In a given context, the CLI accepts command parameters in any order as long as the command is formatted in the proper command keyword and parameter syntax. Command completion will still work as long as enough recognizable characters of the command are entered.

The following output shows different static-route command syntax and an example of the command usage.

*A:ALU-12>config>router# static-route ?
- [no] static-route {<ip-prefix/prefix-length> | <ip-prefix> <netmask>} [metric
<metric>] [enable | disable] next-hop <ip-address> [bfd-enable]
- [no] static-route {<ip-prefix/mask> | <ip-prefix> <netmask>} [preference
<preference>] [metric <metric>] [tag <tag>] [enable | disable] indirect <ip-address>
[ldp [disallow-igp]]
- [no] static-route {<ip-prefix/mask> | <ip-prefix> <netmask>} [preference
<preference>] [metric <metric>] [tag <tag>] [enable | disable] black-hole
*A:ALU-12>config>router# static-route preference 1 10.1.0.0/16 metric

3.7.3. Editing Keystrokes

When entering a command, special keystrokes allow for editing of the command. Table 7 lists the command editing keystrokes.

Table 7:  Command Editing Keystrokes  

Editing Action

Keystrokes

Delete current character

<Ctrl-d>

Delete text up to cursor

<Ctrl-u>

Delete text after cursor

<Ctrl-k>

Move to beginning of line

<Ctrl-a>

Move to end of line

<Ctrl-e>

Get prior command from history

<Ctrl-p>

Get next command from history

<Ctrl-n>

Move cursor left

<Ctrl-b>

Move cursor right

<Ctrl-f>

Move back one word

<Esc><b>

Move forward one word

<Esc><f>

Convert rest of word to uppercase

<Esc><c>

Convert rest of word to lowercase

<Esc><l>

Delete remainder of word

<Esc><d>

Delete word up to cursor

<Ctrl-w>

Transpose current and previous character

<Ctrl-t>

Enter command and return to root prompt

<Ctrl-z>

Refresh input line

<Ctrl-l>

3.7.4. Absolute Paths

CLI commands can be executed in any context by specifying the full path from the CLI root. To execute an out-of-context command, enter a forward slash “/” or backward slash “\” at the beginning of the command line. The commands are interpreted as absolute paths. Spaces between the slash and the first command will return an error.

*A:ALU-12# configure router 
*A:ALU-12>config>router# interface system address 1.2.3.4 
*A:ALU-12>config>router# /admin save 
A:ALU-12>config>router# \clear router bfd session all 
A:ALU-12>config>router# 

The command may or may not change the current context depending on whether it is a leaf command. This is the same behavior the CLI performs when CLI commands are entered individually, for example:

*A:ALU-12# admin 
*A:ALU-12>admin# save

or

*A:ALU-12# admin save
*A:ALU-12# 

3.7.5. History

The CLI maintains a history of the most recently entered commands. The history command displays the most recently entered CLI commands.

*A:ALU-1# history 
     1 environment terminal length 48 
     2 show version 
     3 configure port 1/1/1 
     4 info 
     5 show port 1/1/1
     6 \con port 1/1/1
     7 \configure router mpls 
     8 info 
     9 \configure system login-control 
     10 info 
     11 history 
*A:ALU-1# !2
*A:ALU-1# show version 
TiMOS-B-0.0.I322 both/hops NOKIA SAR 7705 
Copyright (c) 2016 Nokia.All rights reserved. 
All use subject to applicable license agreements.
Built on Wed Jan 16 01:05:13 EST 2016 by csabuild in /rel0.0/I322/panos/main
*A:ALU-1#

3.7.6. Entering Numerical Ranges

The 7705 SAR CLI allows the use of a single numerical range as an argument in the command line. A range in a CLI command is limited to positive integers and is denoted with two numbers enclosed in square brackets with two periods (“..”) between the numbers [x.. y] where x and y are positive integers and y-x is less than 1000.

For example, it is possible to shut down ports 1 through 10 on MDA 1. A port is denoted by slot/mda/port, where slot identifies the IOM card slot ID (always 1), mda is the MDA number and port is the port number. To shut down ports 1 through 10 on Slot 1 and MDA 1, the command is entered as follows:

config port 1/1/[1..10] shutdown

<Ctrl-c> can be used to abort the execution of a range command.

Specifying a range in the CLI does have limitations. These limitations are summarized in Table 8.

Table 8:  CLI Range Use Limitations  

Limitation

Description

Only a single range can be specified

It is not possible to shut down ports 1 through 10 on MDA 1 and MDA 2, as the command would look like

config port 1/[1..2]/[1..10]

and requires two ranges in the command: [1..2] for the MDA and [1..10] for the port number

Ranges within quotation marks are interpreted literally

In the 7705 SAR CLI, enclosing a string in quotation marks (“string”) causes the string to be treated literally and as a single parameter. For example, several commands in the 7705 SAR CLI allow the configuration of a descriptive string. If the string is more than one word and includes spaces, it must be enclosed in quotation marks. A range that is enclosed in quotes is also treated literally. For example,

config router interface "A[1..10]" no shutdown

creates a single router interface with the name “A[1..10]”. However, a command such as:

config router interface A [1..10] no shutdown

creates 10 interfaces with names A1, A2 .. A10.

The range cannot cause a change in contexts

Commands should be formed in such a way that there is no context change upon command completion. For example,

config port 1/1/[1..10]

will attempt to change 10 different contexts. When a range is specified in the CLI, the commands are executed in a loop. On the first loop execution, the command changes contexts, but the new context is no longer valid for the second iteration of the range loop. A “Bad Command” error is reported and the command aborts.

Command completion may cease to work when entering a range

After entering a range in a CLI command, command and key completion, which normally occurs by pressing the <Tab> or spacebar, may cease to work. If the command line entered is correct and unambiguous, the command works properly; otherwise, an error is returned.

3.7.7. Pipe/Match

The 7705 SAR supports the pipe/match (...| match) feature to search one or more files for a specified character string or pattern.

Match syntax:

match pattern context {parents | children | all} [ignore-case] [max-count lines-count] [expression]
match pattern [ignore-case] [invert-match] [pre-lines pre-lines] [post-lines lines-count] [max-count lines-count] [expression]

where:

  pattern: a string or regular expression (maximum 200 characters)

  context: displays the context associated with the matching line

  parents: displays the parent context information

  children: displays the child context information

  all: displays both parent and child context information

  ignore-case: ignores the case in the string (uppercase or lowercase)

  max-count lines-count: displays the matching lines, up to the specified number       (1 to 2147483647)

  expression: the pattern is interpreted as a regular expression

  invert-match: displays all the lines that do not contain the string specified in       pattern

  pre-lines pre-lines: displays the lines prior to the matching line, up to the specified number (0 to 100)

  post-lines lines-count: displays the lines after the matching line, up to the      specified number (1 to 2147483647)

For example:

*A:ALU-12# show service sap-using | match 1/1 pre-lines 10  
===============================================================================
Service Access Points 
===============================================================================
PortId                          SvcId      Ing.  Ing.    Egr.  Egr.   Adm  Opr
                                           QoS   Fltr    QoS   Fltr        
-------------------------------------------------------------------------------
1/1/1:333                       111        1     none    1     none   Up   Up
1/1/1:444                       111        1     none    1     none   Up   Up
1/1/9:10                        200        1     none    1     none   Up   Up
1/1/9:11                        200        1     none    1     none   Up   Up
1/1/9:12                        200        1     none    1     none   Up   Up
1/1/9:13                        200        1     none    1     none   Up   Up
1/1/9:14                        200        1     none    1     none   Up   Up
1/1/9:15                        200        1     none    1     none   Up   Up
A:ALU-12# show log log-id 98 | match ignore-case "sdp bind"
"Status of SDP Bind 101:1002 in service 1001 (customer 1)changed to admin=up oper=up
flags="
"Processing of a SDP state change event is finished and status of all affected SDP
Bindings on SDP 101 has been updated."
 
A:ALU-12# show log log-id 98 | match max-count 1 "service 1001"
"Status of service 1001 (customer 1)changed to administrative state: up, operational
state: up"
 
*A:ALU-12# admin display-config | match post-lines 5 max-count 2 expression "snmp”
 
        snmp
        exit
        login-control
            idle-timeout disable
            pre-login-message "csasim2 - " name
        exit
            snmp
                view "testview" subtree "1"
                    mask ff
                exit
                view "testview" subtree "1.3.6.1.2"
                    mask ff type excluded
*A:ALU-12#

Table 9 describes regular expression symbols and interpretation (similar to what is used for route policy regexp matching).

Table 9:  Pipe/Match Characters  

String

Description

.

Matches any single character

[ ]

Matches a single character with what is contained within the brackets

[abc] matches “a”, “b”, or “c”

[a-z] matches any lowercase letter

[A-Z] matches any uppercase letter

[0-9] matches any number

[^ ]

Matches a single character with what is not contained within the brackets

[^abc] matches any character other than “a”, “b”, or “c”

[^a-z] matches any single character that is not a lowercase letter

^

Matches the start of the line (or any line, when applied in multiline mode)

$

Matches the end of the line (or any line, when applied in multiline mode)

()

Defines a “marked subexpression”

Every matched instance will be available to the next command as a variable

*

A single character expression followed by “*” matches zero or more copies of the expression

{m,n}

Matches at least m and at most n repetitions of the term

{m}

Matches exactly m repetitions of the term

{m,}

Matches m or more repetitions of the term

?

The preceding item is optional and matched at most once

+

The preceding item is matched one or more times

-

Used between start and end of a range

\

An escape character to indicate that the following character is a match criterion and not a grouping delimiter

Table 10 identifies the special character options.

Table 10:  Special Characters  

Options

Similar to

Description

[:upper:]

[A-Z]

Uppercase letters

[:lower:]

[a-z]

Lowercase letters

[:alpha:]

[A-Za-z]

Uppercase and lowercase letters

\w

[A-Za-z_]

Word characters

[:alnum:]

[A-Za-z0-9]

Digits, uppercase and lowercase letters

[:digit:]

[0-9]

Digits

\d

[0-9]

Digits

[:xdigit:]

[0-9A-Fa-f]

Hexadecimal digits

[:punct:]

[.,!?:...]

Punctuation

[:blank:]

[ \t]

Space and Tab

[:space:]

[ \t\n\r\f\v]

Blank characters

\s

[ \t\n\r\f\v]

Blank characters

3.7.8. Pipe/Count

The 7705 SAR supports a pipe/count command (...| count) that provides a count of the number of lines that would have otherwise been displayed. The pipe/count command is particularly useful when used in conjunction with the pipe/match command in order to count the number of output lines that match a specified pattern.

For example:

*A:ALU-12# show service service-using vprn
===============================================================================
Services [vprn]
===============================================================================
ServiceId  Type      Adm  Opr  CustomerId Service Name
-------------------------------------------------------------------------------
1          VPRN      Down Down 1
44         VPRN      Up   Up   1
100        VPRN      Down Down 1
102        VPRN      Up   Up   1
235        VPRN      Down Down 1
1000       VPRN      Down Down 1000
-------------------------------------------------------------------------------
Matching Services : 6
-------------------------------------------------------------------------------
===============================================================================
*A:ALU-12# show service service-using vprn | match Down | count
Count: 4 lines
*A:ALU-12#

3.7.9. Redirection

The 7705 SAR supports redirection (“>”) which allows the operator to store the output of a CLI command as a local or remote file. Redirection of output can be used to automatically store results of commands in files (both local and remote).

‘ping <customer_ip> > cf3:/ping/result.txt’
‘ping <customer_ip> > ftp://ron@ftp.alcatel.com/ping/result.txt’

In some cases only part of the output might be applicable. The pipe/match and redirection commands can be combined:

ping 10.0.0.1 | match expression “time.\d+” > cf3:/ping/time.txt

This records only the RTT portion (including the word “time”).

3.8. CLI Configuration Rollback

The CLI configuration rollback feature allows operators to save rollback checkpoint and rescue files that can be used to quickly return the node configuration to a previous state with minimal impacts to services and without restarting the node.

CLI configuration rollback gives operators better control and visibility over router configurations and reduces operational risk while increasing flexibility and providing powerful recovery options.

The location and generic filename of the rollback checkpoint and rescue files must be configured with the rollback-location and rescue-location commands before a rollback file can be saved. Files can be saved locally on the compact flash or on a remote device. The file URL must contain a path or directory and a generic filename with no extension. File suffixes are automatically appended when the file is saved.

3.8.1. Rollback Checkpoint and Rescue Files

Rollback checkpoint files and rescue files are created with the rollback save command. A rollback checkpoint file can be saved at any time or configured to be automatically saved on a recurring schedule using the 7705 SAR CRON feature. For more information refer to CRON.

Rollback checkpoint and rescue files contain all current operationally active configurations, including configuration changes from CLI commands in the config context and SNMP sets. Rollback checkpoint files are intended to be saved whenever there have been a moderate number of changes to the configuration, in order to create a series of intermediate checkpoints that operators can return to. The rollback rescue file is intended to be a permanent stable configuration that can be reverted to if needed.

Rollback checkpoint and rescue files do not contain any BOF configuration information or any configuration or state changes performed under the debug branch of the CLI. Similarly, performing a CLI configuration rollback never impacts the BOF configuration or any command from the debug CLI branch.

When a rollback save command is executed, a rollback checkpoint or rescue file is saved in the configured location. The latest rollback checkpoint file is saved with the suffix *.rb. The suffixes of all previously saved rollback checkpoint files are automatically incremented by one (*.rb becomes *.rb.1, *.rb.1 becomes *.rb.2, and so on). The rescue file is saved with the suffix *.rc.

By default, there can be 10 rollback checkpoint files, the latest with suffix *.rb and nine older files with suffixes *.rb.1 through *.rb.9. If the maximum number of checkpoint files is reached and a new one is saved, the oldest checkpoint file is deleted. The maximum number of rollback checkpoint files that can be saved can be configured with the local-max-checkpoints and remote-max-checkpoints commands.

There can only be one rollback rescue file. When a new rescue file is saved, the existing file is deleted. The rescue file is not impacted by the number of rollback checkpoint files — there will always be one rescue file available.

Operators can view a list of rollback checkpoint or rescue files with the rollback view command. The following information is displayed for the files:

  1. date and time stamps
  2. file index and suffix
  3. the user who created the file
  4. release number
  5. comment string

A rollback compare command is also available that allows operators to compare different checkpoint files to each other or to the current operating configuration. The command output highlights any differences between the configurations.

Rollback checkpoint and rescue files are not editable, nor are they interchangeable with configuration files, such as those generated with an admin save command.

Both admin save and rollback save should be performed periodically. The admin save command backs up the complete configuration file to be used during a router reboot and should be performed after any major service changes or hardware and software upgrades. The rollback save command should be performed to create intermediate checkpoints whenever a moderate number of changes have been made to the configuration.

Rollback checkpoint files and rescue files can be deleted with the dedicated admin>rollback>delete command. When a checkpoint file is deleted, the suffix ID numbers of all older files are automatically decremented.

If a rollback checkpoint file is manually deleted, using, for example, the file delete command, the suffix ID numbers of older checkpoint files are not decremented, nor is the backup checkpoint file deleted from the standby CSM. This creates a gap in the checkpoint file list. New rollback checkpoint files can still be created, but the gap is not filled until enough files have been created to roll the gap off the end of the list.

3.8.1.1. Rollback File Backup

The rollback checkpoint files can be backed up from the active CSM to the standby CSM on the 7705 SAR-8 or 7705 SAR-18 with the rollback-sync command in the admin context. Rollback file backups are not supported on fixed platforms as they do not have redundant CSMs.

The 7705 SAR also supports automatic synchronization with the rollback-sync command in the config context. When automatic rollback synchronization is enabled, a rollback save will cause the new checkpoint file to be saved on both the active and standby CSMs if the rollback location is a local location. The suffixes of all older checkpoint files on both active and standby CSMs are incremented by one. Automatic synchronization only causes newly created rollback checkpoint files to be copied to both CSMs. Any rollback checkpoint files that were created before automatic synchronization was enabled are not copied to the standby CSM, but can be manually backed up with the rollback-sync command in the admin context.

If the config>rollback-sync command is enabled, deleting a rollback checkpoint file also deletes the backup file and decrements the suffix ID numbers on the standby CSM.

The dedicated rollback-sync commands are the only commands that can be used to back up rollback checkpoint files. Existing redundancy synchronization commands are not compatible with rollback checkpoint files.

3.8.2. Performing a CLI Configuration Reversion

The rollback revert command is used to return the CLI configuration, including all configuration commands and SNMP sets, to the saved configuration in a rollback checkpoint or rescue file. CLI configuration reversion can be used to quickly correct problems in the configuration during network operation, or to aid in experimentation by enabling a return to known settings after trying a new configuration.

The CLI configuration reversion is performed without a reboot and with minimal impact on the services being provided by the 7705 SAR. Configuration parameters that have changed since the checkpoint file was created, or items on which changed configurations have dependencies, are first reset to their default values and then restored to their previous values from the rollback checkpoint file. Performing a configuration reversion can be briefly service-impacting in changed areas. There are no service impacts to configuration areas that did not change since the rollback checkpoint file was created.

If a rollback reversion process includes any commands that will remove, rebuild, or reboot an adapter card or fixed platform, the impacted adapter cards and platforms are listed in a warning and the operator is asked whether to proceed or not with a y/n prompt. There is no prompt if the rollback reversion is initiated via SNMP, or if the now keyword is used. The following are examples of adapter card and fixed platform commands that may generate a warning:

  1. config>card>card-type
  2. config>card>mda
  3. config>card>mda>mda-type

While the 7705 SAR is processing a rollback revert command, CLI and SNMP commands from other users are still accepted and applied to the system. The only commands that are blocked during this process are other rollback commands including revert, save, and compare. Only one rollback command can be processed at a time.

Performing a rollback reversion does not have any effect on existing rollback checkpoint and rescue files; files are not renumbered or deleted. For example, if an operator reverts to rollback checkpoint file 3, the file remains as *.rb.3. If the operator then executes a rollback save command, the current configuration is saved as the latest rollback (extension *.rb) and *.rb.3 is incremented to *.rb.4. In this scenario, both the latest rollback checkpoint file and checkpoint file 3 will have the same configuration information.

Currently running or scheduled CRON jobs are handled like all other configurations during a rollback reversion. The CRON configuration will revert to the configuration at the time the checkpoint was created.

The boot-good-exec or boot-bad-exec commands must be manually executed after a rollback reversion; they are not automatically run.

3.8.2.1. Rollback Restrictions

Some hardware or software changes can prevent operators from performing the rollback, or can affect the operation of the node following the reversion.

If hardware is removed or changed after a rollback checkpoint file is saved, the node may not function as expected after the system reverts to that configuration. There is no effect if new hardware is added into previously empty slots.

A CLI rollback reversion is not supported if the rollback checkpoint file was saved in a previous major software load or if it was saved in a more recent major or minor software load. For example:

  1. a node running Release 9.0.R1 cannot revert to a checkpoint file saved in Release 8.0.R4
  2. a node running Release 8.0.R4 cannot revert to a checkpoint file saved in Release 9.0.R1
  3. a node running Release 8.0.R4 cannot revert to a checkpoint file saved in Release 8.0.R6

CLI rollback reversion is supported if the checkpoint file was saved in a previous minor software release. For example, a node running Release 8.0.R6 can revert to a checkpoint file saved in Release 8.0.R4. It is also supported after an operator performs an admin reboot, or changes the primary configuration and then performs an admin reboot. The reboot does not remove any previously saved rollback files.

If the system runs out of memory during a CLI rollback reversion, the process aborts and the node remains in an indeterminate configuration state. The CLI screen displays a warning message that the CLI reversion failed.

A CLI rollback reversion may also fail in rare cases if the node requires a long time to complete the configuration changes. If the CLI rollback reversion fails during execution, it should be attempted again. The second attempt typically completes the remaining configuration changes.

A high availability CSM switchover during a rollback reversion will cause the rollback process to abort, and the newly active CSM will have an indeterminate configuration. This may not be immediately obvious if the CLI rollback reversion was nearly complete when it was interrupted. To assist operators, a log event is created and the results of the last rollback reversion can be displayed with the show system rollback command. If a high availability switchover occurs during a rollback (or within a few seconds of a rollback completing), the Last Revert Result field will display Interrupted and the operator is advised to repeat the rollback revert operation to the same checkpoint.

Caution:

Although the use of the Control-C key combination is not recommended during a rollback revert, it is supported in the CLI and SNMP. Interrupting a rollback revert command may leave the router in an indeterminate state between the active and saved configuration.

If Control-C is used during a CLI rollback reversion, the 7705 SAR displays a warning message to indicate that the operator must examine the configuration and potentially issue another rollback revert command to return to a known, complete configuration.