Action Commands

clear configuration inconsistency

To clear an inconsistency alarm for a router configuration, use the clear configuration inconsistency command in XR EXEC mode.

clear configuration inconsistency

Syntax Description

This command has no keywords or arguments.

Command Default

EXEC mode: Clears the inconsistency alarms for an SDR configuration.

Command Modes

XR EXEC mode

Command History

Release

Modification

Release 3.x.x

This command was introduced.

Usage Guidelines

An inconsistency alarm is set when there is a failure to restore the configuration; this can occur during router startup, or when a line card or route processor (RP) card is inserted or when there is an OIR (Online Insertion and Removal).

When the inconsistency alarm is set, all configuration commit operations fail until the alarm is cleared using the clear configuration inconsistency command. This command clears the alarm and removes the failed configuration.

Enter the clear configuration inconsistency command to clear the alarm and allow commit operations to continue.


Note


To reapply the failed configuration, you must reapply and recommit the configuration. Use the load configuration failed command with the startup keyword to populate the target configuration with the contents of the previous failed configuration from the startup configuration.


Use the show configuration history command with the alarm keyword to view the inconsistency alarm set and alarm clear events in the configuration history log.

Command Modes

To clear the inconsistency alarms for the router, enter the clear configuration inconsistency command in XR EXEC mode.

Task ID

Task ID

Operations

config-services

execute

Examples

The following example shows how to clear the inconsistency alarms for a router configuration. The command is entered in EXEC mode.


Router# clear configuration inconsistency
  
Creating any missing directories in Configuration File system...OK
Initializing Configuration Version Manager...OK
Syncing commit database with running configuration...OK

In the following example, a history of the inconsistency alarms set and cleared for the configuration are displayed using the show configuration history command with the alarm keyword:


Router# show configuration history alarm 
  
  Sno.  Event      Info                           Time Stamp
  ~~~~  ~~~~~      ~~~~                           ~~~~~~~~~~
  1     alarm      inconsistency alarm raised     Thu Jun 22 15:23:15 2009
  2     alarm      inconsistency alarm cleared    Thu Jun 22 15:42:30 2009
  3     alarm      inconsistency alarm raised     Sun Jul  9 13:39:57 2009
  4     alarm      inconsistency alarm cleared    Sun Jul  9 14:15:48 2009
  5     alarm      inconsistency alarm raised     Sat Jul 15 18:18:26 2009
  6     alarm      inconsistency alarm cleared    Sat Jul 15 19:21:03 2009
  

copy

To copy a file from a source (such as a network server) to a destination (such as a flash disk), use copy command in XR EXEC mode.

copy source { location node-id destination location { node-id | all } | running-config [atomic] }

Syntax Description

source

Filename including the directory path or network location of the file. The possible sources are:

directory-path —Directory path of the file from which the file is copied.

access-list { ipv4 | ipv6 }—Copies an access list (EXEC mode only).

config: —Copies from disk0: file system.

disk0: —Copies from disk0: file system.

ftp: —Copies from an FTP network server. The syntax is ftp:[[[//username [:password]@] location]/directory]/filename.

harddisk: —Copies from the hard disk drive file system (if present).

http: —Copies from one webserver to another over a network. The syntax is http://username: password@ ip-address: port/ directory-path

https: —Copies from the https: file system. The syntax is https://username: password@ ip-address: port/ directory-path

prefix-list {ipv4 | ipv6} —Copies from a prefix list (EXEC mode only).

rootfs: —Copies from the rootfs: file system.

running-config —Copies from the current system configuration.

tftp: —Copies from a TFTP network server. The syntax is tftp:[[//location]/directory]/filename

xml-schema —Copies the XML schema files as a tar ball file (.tar.gz) [EXEC mode only].

destination

Filename including the directory path or network location of the file.

location node-id

Specifies a node. The node-id argument is expressed in the rack/ slot notation.

location all

Copies to all nodes.

running-config

Applies the source configuration file to the running configuration of the system.

atomic

(Optional) Applies the changes to the running configuration only if there are no errors

Command Default

None

Command Modes

XR EXEC mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

Source and destination can each be a configuration file, a text file, or a file system. Enter source and destination URL information, usernames, and passwords and issue the copy command. The networking device prompts for any missing information.

The exact format of the source and destination arguments vary according to the file or directory location. Enter the device or network location for the file system type.

Filenames can include the following characters:

! # $ % + 0 1 2 3 4 5 6 7 8 9 @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z [ ] ^ _ a b c d e f g h i j k l m n o p q r s t u v w x y z { } ~

The following characters can be used with the stated limitations:

  • ` needs backslash before this character

  • – cannot be the first character

  • . cannot be the last character

  • = cannot be the filename without other characters

The following characters cannot be used in filenames:

" ( ) * , / : < > ? \ | ' & ;

The maximum length allowed for a filename is 254 characters including the path. If a filename longer than 254 characters is specified, the filename is truncated to 254 characters.

To copy a file from a source on the router to a destination on the router, specify a source location node-id and a destination location node-id . To copy the file to all nodes, use the location all keywords.

In the alias syntax for the ftp: , rcp: , and tftp: keywords, the location is either an IP address or a hostname. The filename is specified relative to the directory used for file transfers.

When no alias is specified, the networking device looks for a file in the current directory. To view the current directory, enter the pwd command.


Note


During processing of the copy command, you might see the “C” character. For all files being copied, “C” indicates that the copy process is taking place. The entire copying process might take several minutes and differs from protocol to protocol and from network to network.


Table 1. Network Protocols Supported by Cisco IOS XR Software

Prefix

Name

Description

tftp:

Trivial File Transfer Protocol

TFTP is a simplified version of FTP that allows files to be transferred from one computer to another over a network, usually without the use of client authentication (for example, username and password).

ftp:

File Transfer Protocol

FTP is an application protocol, part of the TCP/IP protocol stack, and is used for transferring files between network nodes. FTP requires a username and password.

rcp:

Remote Copy Protocol

The rcp protocol allows users to copy files to and from a file system residing on a remote host or server on the network. The rcp protocol uses TCP to ensure the reliable delivery of data. The rcp protocol downloads require a username.

http:

Hypertext Transfer Protocol

HTTP protocol allows users to transfer files from one webserver to another over a network. The user authentication depends on the webserver configuration.

Additional usage guidelines are in the following sections.

Invalid Combinations of Source and Destination

Some combinations of source and destination are invalid. Specifically, you cannot copy the following:

  • From a running configuration to a running configuration

  • From a network device to a network device (for example, copy ftp: rcp: )

Using TFTP

TFTP is a simplified version of FTP that allows files to be transferred from one computer to another over a network, usually without the use of client authentication (for example, username and password).

The syntax is as follows:

copy tftp://hostname /ipaddress/directory-path pie name target-device [location {node-id | all}]

Example:

Router# copy tftp://1.1.1.1/images/software.pie disk1:

Note


Some Cisco IOS XR images may be larger than 32 MB, and the TFTP services provided by some vendors may not support a file this large. If you do not have access to a TFTP server that supports files larger than 32 MB, download the software image using FTP or rcp as described in the following sections.


Using FTP

FTP servers require a username and password for each client request. Cisco IOS XR software sends the first valid username in the following list:

  1. The username and password specified in the copy command, if a username is specified.

    The syntax is as follows:

    copy ftp:// username : password @ hostname or ipaddress/directory-path/pie-name target-device [location {node-id | all}]

    Example:
    
    Router# copy ftp://john:secret@10.1.1.1/images/software.pie disk1:
    
  2. An “anonymous” username and password. The anonymous password is “root@ip address,” where “ip address” is the IP address of the local networking device.

  3. A password “username@iosname.domain” formed by the networking device. The variable “username” is the username associated with the current session, “iosname” is the configured hostname, and “domain” is the domain of the networking device.

The username and password must be associated with an account on the FTP server. If you are writing to the network server, the FTP server must be properly configured to accept the FTP write request from the user on the networking device.

If the network server has a directory structure, the configuration file or image is written to or copied from the directory associated with the username on the network server. For example, if the system image resides in the home directory of a user on the network server, specify the name of that user as the remote username.

Refer to the documentation for your FTP server for more details.

Using rcp

The rcp protocol requires a username upon each request. When you copy a configuration file or image between the networking device and an rcp server, the Cisco IOS XR software sends the first valid username in the following list:

  1. The remote username specified in the copy command, if one is specified.

  2. The username set by the rcp client username command, if the command is configured.

  3. The networking device hostname.

For the rcp copy request to process successfully, an account must be defined on the network server for the remote username. If the network administrator of the destination server did not establish an account for the remote username, this command does not run successfully. If the network server has a directory structure, the configuration file or image is written to or copied from the directory associated with the remote username on the network server. For example, if the system image resides in the home directory of a user on the network server, specify the name of that user as the remote username.

If you are writing to the network server, the rcp server must be properly configured to accept the rcp write request from the user on the networking device. For UNIX systems, add an entry to the .rhosts file for the remote user on the rcp server. Suppose the networking device contains the following configuration lines:


hostname Rtr1
ip rcp remote-username User0
    

If the IP address of the networking device translates to company.com, then the .rhosts file for User0 on the rcp server should contain the following line:


company.com Rtr1
    

See the documentation for your rcp server for more details.

If you are using a personal computer as a file server, the computer must support remote shell (rsh) protocol.

Using xml-schema

Use the xml-schema keyword to obtain the most up-to-date XML schemas (.xsd files) from the router. Using this keyword is useful to prevent the use of outdated schemas in the event that router software updates include schema updates. The tar ball file includes all active schema files. It does not include schemas that are activated by specific package installation envelopes (PIEs) if those PIEs are not installed and activated on the router.

Using HTTP(s)

HTTP(s) allows files to be transferred from one webserver to another over a network. The user authentication depends on the webserver configuration. The following copy operations are supported:

  • Copy a file from webserver to device via HTTP

  • Copy a file from webserver to device via HTTPS

  • Copy a file from device to webserver via HTTP


Note


Copying a file from device to webserver via HTTP is not supported.

Copying a file from sys-admin via HTTP(s) is not supported.


The syntax is as follows:

copyhttps://username: password@ ip-address: port target-device [location {node-id | all}]

Example:

The following example shows how to copy a file from http server, where user credentials are not required, and server listens to the default port.

Router# copy http://1.1.1.1/images/software.pie disk1:
The following example shows how to copy a file from http server, where user credentials are required, and server listens to the default port.

Router# copy http://user:cisco@1.1.1.1/images/software.pie disk1:

UserID: user
Password: cisco
The following example shows how to copy a file from http server, where user credentials are required, and server listens to a specific port.

Router# copy http://user:cisco@1.1.1.1:45/images/software.pie disk1:


UserID: user
Password: cisco
Specific listen port: 45

Copying to the Running Configuration

When you use the copy command to copy a configuration file to the running-config destination, the configuration in the file is applied to the running configuration of the system. This is a configuration operation. By default, the copy is carried out in a best-effort manner. This means that if some configuration lines from the file cannot be applied, the remaining configuration is still integrated into the system. In this case, a partial configuration is committed. When the atomic keyword is used, partial configurations are not committed. This means that even if one error occurs in the parsing or committing phase, no changes are made to the system. To view any errors when applying the configuration, use the show configuration failed command.

Task ID

Task ID

Operations

filesystem

execute

Examples

The following example shows how to copy a file from a FTP server to disk1:


Router#copy ftp://john:secret@10.1.1.1/images/comp-cisco8k-full.pie disk1:

The following example shows how to copy a file from an rcp server to disk1:


Router#copy rcp://john@10.1.1.1/images/comp-cisco8k-full.pie disk1:

The following example shows how to copy a file from a TFTP server to disk1:


Router#copy tftp://10.1.1.1/images/comp-cisco8k-full.pie disk1:

install apply

To apply the latest changes on the router, use the install apply command in XR EXEC mode.

install apply { reload | restart } [noprompt] [synchronous]

Syntax Description

noprompt

(Optional) Applies the changes without prompting for permission.

reload

(Optional) Applies the changes by reloading the device.

restart

(Optional) Applies the changes by restarting impacted processes.

synchronous

(Optional) Applies the changes synchronously.

Command Default

Applies the changes by the least impactful method available based on the changeset.

Command Modes

XR EXEC mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

To activate software changes performed through install package or install source commands, use the install apply command. The apply is either performed through process restart or a full system reload depending on the nature of the changes. Once the changes are applied, you can test the new software. If you are satisfied with the new software, you can run install commit to commit to the changes you have performed. If you are unsatisfied, reloading the device will return the device to the previous committed software.


Note


The default of installation commands is asynchronous mode, meaning that the command runs in the background and the XR EXEC mode is returned as soon as possible. Performing a command in synchronous mode allows the installation process to finish before the prompt is returned.


Task ID

Task ID

Operations

pkg-mgmt

read, write

Examples

This example shows how to apply the changes by reloading the device:


Router# install apply reload
  

This example shows how to apply the changes by restarting impacted processes:

Router# install apply restart

install commit

To make the active software persistent across system reloads, use the install commit command in XR EXEC mode.

install commit [synchronous]

synchronous

(Optional) Applies the changes synchronously.

Command Default

Commits the active software set.

Command Modes

XR EXEC mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

To make the current active software persistent across reloads, use the install commit command.

If the system is restarted before the active software set is saved with the install commit command, the previously committed software set is used.

Task ID

Task ID

Operations

pkg-mgmt

read, write

Examples

The following example shows how to make the current active software set persistent:



Router# install commit
  
Install operation 16 'install commit' started by user 'user_b' at 19:18:58 UTC
Sat Apr 08 2006.
Install operation 16 completed successfully at 19:19:01 UTC Sat Apr 08 2006.
  

install package

To install packages on the router, use the install package command in XR EXEC mode.

install package { abort { all-since-apply | latest } | { add | downgrade } [ source location ] [package] | remove package | replace location | rollback transaction-ID | upgrade [ source location ] [package] [synchronous] }

abort all-since-apply | latest

Aborts the latest package update or all package updates since the last apply.

add packagename | source source

Adds the specified package. You can either specify the name of the package, Cisco bugfix ID or the full path of the source.

The source can be a repository or a local directory or a tarfile (local or remote).

You can add more than one package.

downgrade packagename | source source

Downgrades the specified package.

The source can be a repository or a local directory or a tarfile (local or remote).

You can add more than one package.

remove packagename

Removes the specified package.

replace location

Replaces currently installed software with that in a given ISO.

You can specify the full local path to ISO. The ISO must be located in or under one of the following directories: /harddisk:/ or /misc/disk1/ or /ftp:// or /http:// .

rollback transaction-ID

Rolls back to the software committed by the given transaction ID.

upgrade packagename | source source

Upgrades the specified package. You can either specify the name of the package, Cisco bugfix ID or the full path of the source.

The source can be a repository (local or remote) or a local directory or a tarfile (local or remote). Remote repository or tarfiles can be accessed via ftp:// or https:// or http://.

synchronous

(Optional) Installs the package synchronously.

Command Default

None

Command Modes

XR EXEC mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

To specify the source, you must specify the full path to a local directory. The full path must be a subdirectory of /var/xr/disk1/, /harddisk:/, or /misc/disk1/.

You can use the URL of a remote DNF repository or tarball. The URL can optionally contain a VRF, and should be in the following format:

  • ftp://<server>[;<vrf>]/<full_path_to_repo>

  • http://<server>[;<vrf>]/<full_path_to_repo>

  • https://<server>[;<vrf>]/<full_path_to_repo>

Task ID

Task ID

Operations

pkg-mgmt

read, write

Examples

This example shows how to replace the current software with the 8000-x64.iso image:


Router# install package replace /harddisk:/8000-x64.iso
  

This example shows how to add more than one package:

Router# install package add package-1 package-2 package-n

This example shows how to remove an optional package:

Router# install package remove package-name

This example shows how to upgrade to new package versions which contain bugfixes:

Router# install package upgrade xr-8000-core-7.0.11v1.0.1-1 xr-core-7.0.1v1.0.1-1 

This example shows how to downgrade a package:


Router# install package downgrade xr-telnet
Router# install apply reload 

install source

The install source command installs or upgrades packages from the specified source and applies the change automatically.

install source { location | | any-configured } [reload] [noprompt] [synchronous]

location

A source can be the name of a configured DNF repository, a local diectory, a local tar file, a remote repository or tar file.

any-configured

Use any configured repository to obtain packages.

reload

(Optional) Applies the changes through a reload.

noprompt

(Optional) Applies the changes without prompting for permission.

synchronous

(Optional) Applies the changes synchronously.

Command Default

None

Command Modes

XR EXEC mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

The location of the source can be a repository, URL, or a local directory.

For local directories, you must specify the full path. The full path must be a subdirectory of /var/xr/disk1/, /harddisk:/, or /misc/disk1/.

For remote repositories or tarballs, the IP address of the repository must be accessible from the Management Ethernet port. In-band interfaces on linecards cannot be used to reach the repository. The URL can optionally contain a VRF, and should be in the following format:

  • ftp://<server>[;<vrf>]/<full_path_to_repo>

  • http://<server>[;<vrf>]/<full_path_to_repo>

  • https://<server>[;<vrf>]/<full_path_to_repo>

Task ID

Task ID

Operations

pkg-mgmt

read, write

Examples

This example shows how to install the package from the local directory:


Router# install source /harddisk:/files xr-ipsla-7.0.11v1.0.1-1.x86_64.rpm
  
This example shows how to install the package from a configured local or remote repository named install-repo:

Router# install source install-repo xr-ipsla
  

This example shows how to install the package from a repository URL:


Router# install source http://72.16.0.0:3333/remote-repo xr-ipsla
  

This example shows how to install more than one package in a single packaging operation:


Router# install source /harddisk:/files xr-ipsla-7.0.11v1.0.0-1.x86_64.rpm xr-mcast-7.0.11v1.0.0-1.x86_64.rpm 
  

install rollback

To roll back to the software associated with the specific transaction ID, use the install rollback command in XR EXEC mode.

install rollback id [commmit] [reload] [noprompt] [synchronous]

id

Speecifes the transaction ID for the rollback.

commit

(Optional) Commits the installed software after rollbck.

reload

(Optional) Applies the changes through a reload.

noprompt

(Optional) Applies the changes without prompting for permission.

synchronous

(Optional) Applies the changes synchronously.

Command Default

None

Command Modes

XR EXEC mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

This roll back operation installs the previous software and also applies the change automatically. This may reload the router depending on the package that is rolled back.

Alternatively, use the install package rollback command to only roll back the package but not apply the changes. You can check whether the router will reload or restart if you apply the change using the show install history last transaction verbose command or show install request command. Based on the command output, you can take the appropriate action using install apply reload | restart command to either reload or restart the system. Use the install commit command to commit the transaction.

Task ID

Task ID

Operations

pkg-mgmt

read, write

Examples

This example shows how to the roll back to the software associated with the specific transaction ID 200.


Router# install rollback 200
  

This example shows how to roll back and commit the changes:


Router# install rollback 200 commit
  

This example shows how to roll back and reload:


Router# install rollback 200 reload
  

install replace

To replace the currently installed software with that in a given ISO and apply the change, use the install replace command in XR EXEC mode.

install replace location [commmit] [reload] [noprompt] [synchronous]

location

Speecifes the location of the package for installation.

commit

(Optional) Commits the installed software after replacing.

reload

(Optional) Replaces the software through a reload.

noprompt

(Optional) Applies the changes without prompting for permission.

synchronous

(Optional) Applies the changes synchronously.

Command Default

None

Command Modes

XR EXEC mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

Include the keyword noprompt in the command to enable the system to bypass your permission to reload the router.

Task ID

Task ID

Operations

pkg-mgmt

read, write

Examples

This example shows how to replace the currecnt software with the 8000-x64.iso image.


Router# install replace /harddisk:/8000-x64.iso
  

This example shows how to replace the currecnt software and commit the changes:


Router# install replace /harddisk:/8000-x64.iso commit
  

This example shows how to replace the currecnt software and reload:


Router# install replace /harddisk:/8000-x64.iso reload
  

reload

To reloads the route processor (RP), use the reload command in XR EXEC mode.

reload

Syntax Description

This command has no keywords or arguments.

Command Default

None

Command Modes

XR EXEC mode

Command History

Releases

Modifications

Release 7.0.12

This command was introduced.

Usage Guidelines

Use the reload command to cause the RP to reload the Cisco IOS XR software according to the configuration register setting (for example, 0x0 to enter ROMMON mode and 0x2 to reload the RP to EXEC mode). If a standby RP is in the ready redundancy state, the reload command also causes the router to fail over to the standby RP. Use the show redundancy command in EXEC mode to display the status of the standby RP.

When the reload command is used and a switchover occurs, the running (active) software configuration is automatically maintained during switchover.


Caution


If a standby RP is not installed or is not in the ready state, then the router experiences a loss of service while the active RP is reloading Cisco IOS XR software. To view the status of the standby RP, issue the show redundancy command in EXEC mode.


If you use the reload command and there is no available standby node, you are prompted to continue with the reload:


RP/0/RP0/CPU0:router# reload

Standby card not present or not Ready for failover. Proceed?[confirm]y         
  

Task ID

Task ID

Operations

root-lr

execute

Examples

The following example shows how to reload the active RP. If a standby RP is in the ready state, then the router fails over to the standby RP. If the standby RP is not installed or is not in the ready state, then the router enters ROMMON mode and routing operations stop.


RP/0/RP0/CPU0:router# reload
  
  Updating Commit Database.  Please wait...[OK]
  Proceed with reload? [confirm] y

  PCI0 device[7]: Vendor ID 0x10ee 
  PCI0 device[7]: Device ID 0x300e
  PCI1 device[7]: Device ID 0x1100
  PCI1 device[7]: Vendor ID 0x1013
  PCI1 device[8]: Device ID 0x649
  PCI1 device[8]: Vendor ID 0x1095
  PCI1 device[9]: Device ID 0x5618
  PCI1 device[9]: Vendor ID 0x14e4
  PCI1 device[10]: Device ID 0x5618
  PCI1 device[10]: Vendor ID 0x14e4
  System Bootstrap, Version 1.15(20040120:002852) ,
  Copyright (c) 1994-2004 by cisco Systems, Inc.
  Board type is 0x100000 (1048576)
  Enabling watchdog  
  Broadcom 5618 #0 Found on PCI
  Broadcom 5618 #1 Found on PCI
  No. of BCM 56xx switches found 2 .
  BCM Switch #0 initialisation complete.
  BCM Switch #1 initialisation complete
  G4(7450-SMP-GT64260_A) platform with 2048 Mb of main memory
  
  rommon B1 >  
  

reload bootmedia

To reload bootable image from the hardware module network location, use the reload bootmedia command in EXEC mode.

reload bootmedia { network location { node-id | all } | usb }

Syntax Description

network

To reload bootable image from the hardware module.

location node-id

Specifies a node. The node-id argument is expressed in the rack/ slot notation.

location all

Copies to all nodes.

usb

To reload bootable image from usb.

Command Default

None

Command Modes

EXEC mode

Command History

Release

Modification

Release 7.0.12

This command was introduced.

Usage Guidelines

The reload bootmedia network command reloads reload bootable image from the hardware module network location. Include the keyword noprompt in the command to enable the system to bypass your permission to reload the router.

Examples

The following example shows how to reload bootable image from all hardware module network location:


RP/0/RP0/CPU0:ios#reload bootmedia network location all
Wed Feb 15 07:21:42.536 UTC
Proceed with reload? [confirm]

The following example shows how to reload bootable image from specific hardware module network location:

RP/0/RP0/CPU0:ios#reload bootmedia network location 0/RP0/CPU0
Wed Feb 15 07:21:42.536 UTC
Proceed with reload? [confirm]
The following example shows how to reload bootable image from usb:
RP/0/RP0/CPU0:ios#reload bootmedia usb
Wed Feb 15 07:21:42.536 UTC
Proceed with reload? [confirm]