Got it

How to insert comments in a configuration file

Created: Jun 4, 2020 12:41:46Latest reply: Jun 6, 2020 14:43:21 177 7 0 0
  HiCoins as reward: 0 (problem unresolved)

Hi,


I'm trying to insert some lines of comments in a configuration file, for the use of the technician who will effectively configure the router (AR1xx router).

Although there is the hash character # apparently for this task (similar to Cisco's "!") if you type "# some instalation instructions" you get an error. You don't get an error if you only type #, but any character after # will generate an error, and it is difficult to read instructions between errors.

I did not find a workaround (something like 'echo' or similar). Is there any workaround?

  • x
  • convention:

Featured Answers

Recommended answer

Admin Created Jun 5, 2020 03:35:52 Helpful(0) Helpful(0)

Posted by Xandu at 2020-06-04 18:51 Hello, friends, and thank you for trying to help me. Yes, I want to insert some instructions for the ...
Hi,
I tried that command on the switch, and it worked.
I confirmed with the R&D guys, it seems that AR doesn't support annotation lines.
View more
  • x
  • convention:

All Answers
Chenxintao Admin Created Jun 4, 2020 13:01:42 Helpful(0) Helpful(0)

Hello, friend.
It's nice to meet you in the community.
We're working on your problem. Please be patient.
View more
  • x
  • convention:

chenhui Admin Created Jun 4, 2020 13:03:50 Helpful(0) Helpful(0)

Hi @Xandu,
Do you mean insert lines to explain the configuration file, so that it is easier to read and also supports to be copied into the router directly? Just like the annotion in the program.
View more
  • x
  • convention:

chenhui Admin Created Jun 4, 2020 13:14:43 Helpful(0) Helpful(0)

Posted by chenhui at 2020-06-04 13:03 Hi @Xandu,Do you mean insert lines to explain the configuration file, so that it is easier to read a ...
If I'm right, # or ! could help do that.
What should be pointed out is that a space should follows the # or !.
Kindly try the example below:
# This is an annotion line, the words wouldn't be translated as the command. Don't forget the spance character before the first letter T.
View more
  • x
  • convention:

Xandu Created Jun 4, 2020 18:51:06 Helpful(0) Helpful(0)

Hello, friends, and thank you for trying to help me. Yes, I want to insert some instructions for the person who configures the router - to remind them to remove the default admin user, and so on.
I already tried both variants (# and !), with a space after the hash or exclamation sign.
[Huawei]# This is an annotion line .....
^
Error: Unrecognized command found at '^' position.
The pointer is always below the hash sign.
The ! sign is not valid, it also generates an error.

Router is AR129CGVW-L, firmware version is below.

[Huawei]disp ver
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.170 (AR120 V200R009C00SPC500)
Copyright (C) 2011-2018 HUAWEI TECH CO., LTD
Huawei AR129CGVW-L Router uptime is 0 week, 0 day, 8 hours, 57 minutes




View more
  • x
  • convention:

chenhui Admin Created Jun 5, 2020 03:35:52 Helpful(0) Helpful(0)

Posted by Xandu at 2020-06-04 18:51 Hello, friends, and thank you for trying to help me. Yes, I want to insert some instructions for the ...
Hi,
I tried that command on the switch, and it worked.
I confirmed with the R&D guys, it seems that AR doesn't support annotation lines.
View more
  • x
  • convention:

Xandu Created Jun 6, 2020 14:43:21 Helpful(1) Helpful(1)

Some "dirty" workaround, the only one I could find: I use the description of the NULL interface. Because "d" is identified as "description", it is not visible and overall I thing it is usable like this.

[Huawei]int null 0
[Huawei-NULL0]d ###############################
[Huawei-NULL0]d # Don't forget to remove admin user:
[Huawei-NULL0]d # >sys
[Huawei-NULL0]d # aaa
[Huawei-NULL0]d # ]undo local-user admin
[Huawei-NULL0]d ###############################
[Huawei-NULL0]return

If it works, it ain't stupid ;)

View more
  • x
  • convention:

Popeye_Wang Created Jul 8, 2020 12:59:37
That's clever.  

Comment

Comment
You need to log in to comment to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!

My Followers

Login and enjoy all the member benefits

Login

Huawei Enterprise Support Community
Huawei Enterprise Support Community
Block
Are you sure to block this user?
Users on your blacklist cannot comment on your post,cannot mention you, cannot send you private messages.