Chapter 4 Configuring General Router Features

Managing Configuration Sessions

Clearing All Changes to a Target Configuration

To clear changes made to the target configuration without terminating the configuration session, enter the clear command in global configuration mode or administration configuration mode. This command deletes any configuration changes that have not been committed.

In the following example, the user configures an interface but does not commit it. After reviewing the changes to the target configuration with the show configuration command, the user decides to remove the changes and start over by entering the clear command:

RP/0/RP0/CPU0:router# configure

RP/0/RP0/CPU0:router(config)# interface POS 0/3/0/1

RP/0/RP0/CPU0:router(config-if)# description this is my interface

RP/0/RP0/CPU0:router(config-if)# ipv4 address 10.1.1.1 255.0.0.0

RP/0/RP0/CPU0:router(config-if)# shutdown

RP/0/RP0/CPU0:router(config-if)# exit

RP/0/RP0/CPU0:router(config)# show configuration

Building configuration...

interface POS0/3/0/1 description this is my interface ipv4 address 10.1.1.1 255.0.0.0 shutdown

end

RP/0/RP0/CPU0:router(config)# clear

RP/0/RP0/CPU0:router(config)# show configuration

Building configuration...

end

Committing Changes to the Running Configuration

The changes in the target configuration do not become part of the running configuration until you enter the commit command. When you commit a target configuration, you can use the commit command to do either of the following:

Merge the target configuration with the running configuration to create a new running configuration.

Replace the running configuration with the target configuration.

Note If you try to end a configuration session without saving your changes to the running configuration with the commit command, you are prompted to save the changes. See the “Ending a Configuration Session” section on page 4-37for more information.

 

Cisco IOS XR Getting Started Guide

4-34

OL-10957-02

Page 120
Image 120
Cisco Systems Cisco IOS XR Clearing All Changes to a Target Configuration, Committing Changes to the Running Configuration