Problem
You want to add comments to the router configuration file to help other people reading the file understand how the router is configured.
Solution
Use the annotate command to add a comment:
[edit protocols ospf] aviva@router1# set area 0.0.0.0 interface fe-0/0/0 aviva@router1# annotate area 0.0.0.0 "backbone routers" aviva@router1# show /* backbone routers */ area 0.0.0.0 { interface fe-0/0/0.0; }
Discussion
It is generally good practice to include comments in the configuration to clarify what is included for others who read the configuration. You can add comments for statements at the current hierarchy level in the configuration. In this recipe, we add a comment for the area statement at the [edit protocols ospf] level. The comment appears immediately before the statement.
To delete a comment, use the annotate command with an empty string:
[edit protocols ospf] aviva@router1# annotate area 0.0.0.0 ""
Router Configuration and File Management
Basic Router Security and Access Control
IPSec
SNMP
Logging
NTP
Router Interfaces
IP Routing
Routing Policy and Firewall Filters
RIP
IS-IS
OSPF
BGP
MPLS
VPNs
IP Multicast