cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1176
Views
0
Helpful
2
Comments
edo.deleeuw
Community Member

Hi,

I want to put comment in my configurations which I make in a textfile, but I don't want this comment to be taken over in the IOS-XR configuration.

I am used to use the "!" character, but this  character puts the configuration in the IOS-XR router, which I don't want.

normal behavior of comment in IOS-XR:

http://www.cisco.com/en/US/docs/rou...

Is there a special character that I can include at the start of a line in a textfile, which is not taken over in the router configuration?

Comments
Rivalino Tamaela
Cisco Employee
Cisco Employee

Hello Edo,

Usually i use '#' on my txt config for comment, and it will fail as invalid syntax whenever i paste it to the router, but the router will accept other valid config. Below is example:

Textfile configuration:

# INTERFACE CONFIGURATION

interface loopback1923

description test

ipv4 address 10.2.1.33 255.255.255.252

!

# OSPF CONFIGURATION

router ospf 1

area 0

  interface loopback1923

  !

!

!

Apply it to the router:

RP/0/RSP0/CPU0:ASR9006-H(config)#

RP/0/RSP0/CPU0:ASR9006-H(config)#

RP/0/RSP0/CPU0:ASR9006-H(config)## INTERFACE CONFIGURATION

                                 ^

% Invalid input detected at '^' marker.

RP/0/RSP0/CPU0:ASR9006-H(config)#interface loopback1923

RP/0/RSP0/CPU0:ASR9006-H(config-if)# description test

RP/0/RSP0/CPU0:ASR9006-H(config-if)# ipv4 address 10.2.1.33 255.255.255.252

RP/0/RSP0/CPU0:ASR9006-H(config-if)#!

RP/0/RSP0/CPU0:ASR9006-H(config-if)## OSPF CONFIGURATION

                                    ^

% Invalid input detected at '^' marker.

RP/0/RSP0/CPU0:ASR9006-H(config-if)#router ospf 1

RP/0/RSP0/CPU0:ASR9006-H(config-ospf)# area 0

RP/0/RSP0/CPU0:ASR9006-H(config-ospf-ar)#  interface loopback1923

RP/0/RSP0/CPU0:ASR9006-H(config-ospf-ar-if)#  !

RP/0/RSP0/CPU0:ASR9006-H(config-ospf-ar-if)# !

RP/0/RSP0/CPU0:ASR9006-H(config-ospf-ar-if)#!

RP/0/RSP0/CPU0:ASR9006-H(config-ospf-ar-if)#

RP/0/RSP0/CPU0:ASR9006-H(config-ospf-ar-if)#end

Uncommitted changes found, commit them before exiting(yes/no/cancel)? [cancel]:

RP/0/RSP0/CPU0:ASR9006-H(config)#show

Fri Dec 20 09:17:55.239 EST

Building configuration...

!! IOS XR Configuration 4.2.3

interface Loopback1923

description test

ipv4 address 10.2.1.33 255.255.255.252

no shutdown

!

router ospf 1

area 0

  interface Loopback1923

  !

!

!

end

RP/0/RSP0/CPU0:ASR9006-H(config)#commit

Fri Dec 20 09:17:56.559 EST

RP/0/RSP0/CPU0:ASR9006-H(config)#

HTH,

rivalino

edo.deleeuw
Community Member

Hi Rivalino,

I had exactly the same solution in mind. Apparently there seems to be no special character that can be used without giving the error: "% Invalid input detected at '^' marker."

thanks for the reply!

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:

Quick Links