[Contents] [Prev] [Next] [Index]


Additional Details about Specifying Statements and Identifiers

This section provides more detailed information about specifying statements and identifiers in configuration mode:

How to Specify Statements

This section provides more detailed information about CLI container and leaf statements so that you can better understand how the CLI displays them in a configuration and how you must specify them when creating ASCII configuration files.

Statements are shown one of two ways, either with braces or without:

The statement-name is the statement name. In the configuration example shown in the previous section, ospf and area are statements.

The identifier is a name or other string that uniquely identifies an instance of a statement. The identifier is used when a statement can be specified more than once in a configuration. In the configuration example shown in the previous section, the identifier for the area statement is 0 and the identifier for the interface statement is so-0/0/0.

When specifying a statement, you must specify either a statement name or an identifier, or both, depending on the statement hierarchy.

You specify identifiers in one of the following ways:

The following examples illustrate how statements and identifiers are specified in the configuration:

 protocol {                                            # Top-level statement (statement-name).
     ospf {                                        # Statement under "protocol" (statement-name).
         area 0.0.0.0 {                                    # OSPF area "0.0.0.0" (statement-name identifier),
             interface so-0/0/0 {                                # which contains an interface named "so-0/0/0."
                 hello-interval 25;                            # Identifier and value (identifier-name value). 
                 priority 2;                            # Identifier and value (identifier-name value).
                 disable;                            # Flag identifier (identifier-name).
             }
             interface so-0/0/1;                                # Another instance of "interface," named so-0/0/1,
         }                                    # this instance contains no data, so no braces
     }                                        # are displayed.
 }
 policy-options {                                            # Top-level statement (statement-name).
     term term1 {                                        # Statement under "policy-options" 
                                             # (statement-name value).
         from {                                    # Statement under "term" (statement-name).
             route-filter 10.0.0.0/8 orlonger reject;                                                                # One identifier ("route-filter") with
             route-filter 127.0.0.0/8 orlonger reject;                                                                # multiple values.
             route-filter 128.0.0.0/16 orlonger reject;
             route-filter 149.20.64.0/24 orlonger reject;
             route-filter 172.16.0.0/12 orlonger reject;
             route-filter 191.255.0.0/16 orlonger reject;
         }
         then {                            # Statement under "term" (statement-name).
             next term;                        # Identifier (identifier-name).
         }
     }
 }

When you create an ASCII configuration file, you can specify statements and identifiers in one of the following ways. However, each statement has a preferred style, and the CLI uses that style when displaying the configuration in response to a configuration mode show command.



[Contents] [Prev] [Next] [Index]