Configuring the Router with the CLI
You configure the JUNOS software by entering configuration mode and creating a hierarchy of configuration mode statements. In configuration mode, the command-line interface (CLI) provides commands to configure the router, load a text (ASCII) file that contains the router configuration, activate a configuration, and save the configuration to a text file.
When you first log on to the router, you enter the CLI operational mode. Operational mode is indicated by the presence of the
>prompt, which is preceded by string that defaults to the name of the user and the name of the router. For example:user@host>You enter configuration mode by issuing the
configurecommand or theeditcommand from the CLI operation mode. When you do this, the CLI prompt changes fromuser@host>touser@host#. Configuration mode is indicated by the presence of the#prompt, which is preceded by string that defaults to the name of the user and the name of the router. For example:user@host> user@host>configureentering configuration mode [edit] user@host#To view a list of configuration mode statements, see Entering Configuration Mode. For information about CLI enhancements for the TX Matrix platform and its connected T640 routing nodes, see Routing Matrix CLI Enhancements.
This chapter discusses the following topics:
- Configuration Statement Hierarchy
- How the Configuration Is Stored
- Entering Configuration Mode
- Configuration Mode Prompt
- Configuration Mode Banner
- Configuration Statements and Identifiers
- Getting Help About Configuration Mode Commands, Statements, and Identifiers
- Creating and Modifying the Configuration
- Moving Among Levels of the Hierarchy
- Exiting Configuration Mode
- Displaying the Current Configuration
- Displaying set Commands from the Configuration
- Displaying Users Currently Editing the Configuration
- Removing a Statement from the Configuration
- Using Regular Expressions to Remove Related Configuration Items
- Copying a Statement in the Configuration
- Renaming an Identifier
- Inserting a New Identifier
- Running an Operational Mode CLI Command from Configuration Mode
- Displaying Configuration Mode Command History
- Verifying a Configuration
- Committing a Configuration
- Synchronizing Routing Engines
- Saving a Configuration to a File
- Loading a Configuration
- Returning to a Previously Committed Configuration
- Returning to the Rescue Configuration
- Configuration Mode Error Messages
- Deactivating and Reactivating Statements and Identifiers in a Configuration
- Adding Comments in a Configuration
- Having Multiple Users Configure the Software
- Example: Using the CLI to Configure the Router
- Additional Details About Specifying Statements and Identifiers
For information about the configuration statements to use to configure particular system functionality, see the chapter about that feature.
For general guidelines for using the CLI to configure a routing matrix, see Configuring the Routing Matrix.