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:
<statement-name> <identifier> {statement;additional-statements;}<statement-name> <identifier>identifier;The
statement-nameis the name of the statement. In the configuration example shown in the previous section,ospfandareaare statement names.The
identifieris 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 theareastatement is0and the identifier for theinterfacestatement isso-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:
identifier—Theidentifieris a flag, which is a single keyword.identifier value—Theidentifieris a keyword, and thevalueis a required option variable.identifier[value1 value 2 value3...]—Theidentifieris a set that accepts multiple values. The brackets are required when you specify a set of identifiers; however, they are optional when you specify only one identifier.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") withroute-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
showcommand.statement-name identifier-name[...]identifier-namevalue[...];statement-name{identifier-name;[...]identifier-namevalue;[...]}statement-name{identifier-name value1;identifier-name value2;}