Including Comments in the Configuration

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



JUNOS Cookbook
Junos Cookbook (Cookbooks (OReilly))
ISBN: 0596100140
EAN: 2147483647
Year: 2007
Pages: 290
Authors: Aviva Garrett

Flylib.com © 2008-2020.
If you may any questions please contact us: flylib@qtcs.net