Commenting Configuration Elements

The user can add comments to configuration elements. These comments are displayed directly before the element in the outputs of the info and admin save configuration commands.

Comments are supported in model-driven configuration mode in the configure and li regions. They are not supported in the bof region.

Comments can be entered using the "# comment: " notation and the following usage guidelines apply.

A comment entry is ignored if a non-configuration element (such as a configuration or operational command) is entered following the comment.

Comments are not displayed in the info command output if any of the following options is used, even if they are used with other supported options:

Copying and pasting a configuration comment from an info command output maintains the association between the comment and element, with the assumption that the comment applies to the configuration element entered on the immediate next line.

[ex:/configure router "Base" bgp]
A:admin@node-2# # comment: Line one for connect-retry

[ex:/configure router "Base" bgp]
A:admin@node-2# # comment: Line two for connect-retry

[ex:/configure router "Base" bgp]
A:admin@node-2# connect-retry 98

*[ex:/configure router "Base" bgp]
A:admin@node-2# # comment: Separate this comment \nfor deterministic-med \n note the blank space

*[ex:/configure router "Base" bgp]
A:admin@node-2# best-path-selection deterministic-med false

*[ex:/configure router "Base" bgp]
A:admin@node-2# info
    # comment: Line one for connect-retry
    # comment: Line two for connect-retry
    connect-retry 98
    authentication-key "qvzYGrrZtXg2eqQbniwULbem+PvCH+iycONUiGK7/g==" hash2
    ebgp-default-reject-policy {
        import false
        export false
    }
    best-path-selection {
        # comment: Separate this comment
        # comment: for deterministic-med
        # comment:  note the blank space
        deterministic-med false
        always-compare-med {
            med-value on
            strict-as false
        }
---snip---
[/]
A:admin@node-2# admin show configuration /configure router bgp
    # comment: Line one for connect-retry
    # comment: Line two for connect-retry
    connect-retry 98
    authentication-key "qvzYGrrZtXg2eqQbniwULbem+PvCH+iycONUiGK7/g==" hash2
    ebgp-default-reject-policy {
        import false
        export false
    }
    best-path-selection {
        # comment: Separate this comment
        # comment: for deterministic-med
        # comment:  note the blank space
        deterministic-med false
        always-compare-med {
            med-value on
            strict-as false
        }
    }
---snip---