×

Warning message

  • Cisco Support Forums is in Read Only mode while the site is being migrated.
  • Cisco Support Forums is in Read Only mode while the site is being migrated.

comment not taken over in IOS-XR configuration

Document

Fri, 03/21/2014 - 14:06
Dec 20th, 2013
User Badges:

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?

Loading.
Rivalino Tamaela Fri, 12/20/2013 - 06:20
User Badges:
  • 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 Tue, 12/24/2013 - 05:48
User Badges:

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!

Actions

This Document

Related Content