The CLI displays messages when you enter and exit from configuration and operational command modes, when you successfully complete some commands, and when you type an invalid string or value.
If you type an invalid string—for example, the name of a command or statement that does not exist—you see the message “syntax error” or “unknown command.” A caret (^) indicates where the error is. For example:
- user@host> clear route <Enter>
- ^
- syntax error, expecting <command>.
- [edit]
- user@host# telnet <Enter>
- ^
- unknown command.
When the number of choices is limited, a message might display the commands you can enter to correct the syntax error. For example:
- [edit]
- user@host# load myconfig-file<Enter>
- ^
- syntax error, expecting ‘merge’, ‘override’,
or ‘replace’.
In configuration mode, if you do not type an option for a statement that requires one, a message indicates the type of information required.
In this example, you need to type an area number to complete the command:
- [edit]
- user@host# set protocols ospf area<Enter>
- ^
- syntax error, expecting <identifier>.
In this example, you need to type a value for the hello interval to complete the command:
- [edit]
- user@host# set protocols ospf area 45 interface
so-0/0/0
-
hello-interval<Enter>
- ^
- syntax error, expecting <data>
If you have omitted a required statement at a particular hierarchy level, when you attempt to move from that hierarchy level or when you issue the show command in configuration mode, a message indicates which statement is missing. For example:
- [edit system login user phil]
- user@host# up
- Warning: missing mandatory statement: 'class'
- [edit system login]
- user@host# show
- user phil {
- full-name “Phil James";
- # Warning: missing mandatory statement(s): 'class'
- }