cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3449
Views
0
Helpful
0
Comments
ashirkar
Level 7
Level 7

 

Introduction:

In previous document we have seen how commit command works in IOS XR. In this document we will see how "commit best-effort" command different from "commit" command.

Background:

When you put commit command on IOS XR, your entire target configuration gets committed, and will become part of your running config. By default the commit operation is pseudo atomic, means the entire configuration in target area is committed and if there any error occur during verification, the commit operation rolled back and errors return to configuration agent.

To demonstrate this I will configure IP address on L2 interface shown as below:

Hers is a basic configuration I have in my XR:

RP/0/0/CPU0:PE1#sh running-config

Sun Nov 24 22:39:30.037 TLT

Building configuration...

!! IOS XR Configuration 0.0.0

!! Last configuration change at Sun Nov 24 22:39:19 2013 by UNKNOWN

!

hostname PE1

interface GigabitEthernet0/0/0/0

shutdown

!

interface GigabitEthernet0/0/0/1

l2transport

!

 

Let’s do some configuration on device.

RP/0/0/CPU0:PE1#conf t

Sun Nov 24 22:49:29.273 TLT

RP/0/0/CPU0:PE1(config)#int gig0/0/0/0

RP/0/0/CPU0:PE1(config-if)#ip add 10.1.1.1 255.255.255.0

RP/0/0/CPU0:PE1(config-if)#no sh

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

RP/0/0/CPU0:PE1(config)#int gig0/0/0/1

RP/0/0/CPU0:PE1(config-if)#ip add 20.1.1.1 255.255.255.0

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

RP/0/0/CPU0:PE1(config)#commit

Sun Nov 24 22:50:02.173 TLT

 

% Failed to commit one or more configuration items during a pseudo-atomic operation. All changes made have been reverted. Please issue 'show configuration failed' from this session to view the errors

RP/0/0/CPU0:PE1(config)#

RP/0/0/CPU0:PE1(config)#sh configuration failed

Sun Nov 24 22:53:52.633 TLT

!! SEMANTIC ERRORS: This configuration was rejected by

!! the system due to semantic errors. The individual

!! errors with each failed configuration command can be

!! found below.

interface GigabitEthernet0/0/0/1

ipv4 address 20.1.1.1 255.255.255.0

!!% Subsystem(2599), Code(11): cerrno 0x45139600: L3 configuration is not allowed under a L2 interface

!

end

RP/0/0/CPU0:PE1(config)#

 

As you can see I’m getting error that device failed to commit config because I have configured IP address on L2 interface.

 

The problem here is your entire config get reject after verification. You can see , I have also configured gig0/0/0/0 interface and its config also got rejected due to default pseudo atomic mode that commits entire config in target area.

Here you can have a look on the running config after "commit" command. 

RP/0/0/CPU0:PE1(config)#sh running-config

Sun Nov 24 22:56:29.249 TLT

Building configuration...

!! IOS XR Configuration 0.0.0

!! Last configuration change at Sun Nov 24 22:40:43 2013 by UNKNOWN

!

hostname PE1

interface GigabitEthernet0/0/0/0

shutdown

!

interface GigabitEthernet0/0/0/1

l2transport

 

So here “commit best-effort” command makes difference. When you use this command, only part of the configuration that has gone through successful verification gets committed and not necessary everything in target buffer.

RP/0/0/CPU0:PE1(config)#commit best-effort

Sun Nov 24 23:07:37.708 TLT

 

% Failed to commit one or more configuration items. Please issue 'show configuration failed' from this session to view the errors

 

RP/0/0/CPU0:PE1(config)#sh run

Sun Nov 24 23:07:50.218 TLT

Building configuration...

!! IOS XR Configuration 0.0.0

!! Last configuration change at Sun Nov 24 23:07:37 2013 by UNKNOWN

!

hostname PE1

interface GigabitEthernet0/0/0/0

ipv4 address 10.1.1.1 255.255.255.0

!

interface GigabitEthernet0/0/0/1

l2transport

 

From the above you can see, after using commit best-effort command still we are getting semantic error but valid config got committed to runing-config.

Related Information:

Cisco ASR 9k Configuration Guides"

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: