Thursday, November 27, 2014

Cisco ASR IOS-XR - How to remove comments

IOS-XR accepts all ! comands and they stay in the configuration !

If execute the command
! Hi all
l2vpn


The comments stays there and it is associated with the next command you execute.
Now, how can we remove it!

Just do it with the "clear comment" command.
Example:

router static
 vrf MYVRF
  address-family ipv4 unicast
   ! This is server A route
   10.1.1.1/32 2.2.2.2
commit


router static
 vrf MYVRF
  address-family ipv4 unicast
   clear comment
   10.1.1.1/32 2.2.2.2
commit