Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Configuration Features in the Junos OS

    This topic describes the configuration features available in the Junos OS. For more information about displaying and changing router configuration, see the CLI User Guide.

    Configuration Operations

    To configure a Juniper Networks device that runs the Junos OS, you define a hierarchy of configuration statements, either by typing them in Junos OS command-line interface (CLI) configuration mode, or by loading a text file that contains the statements in formatted ASCII.

    You can also write an application that uses the Junos XML management protocol or NETCONF management protocol to add, modify, or delete configuration information; for more information, see User Interfaces to the Junos OS.

    In CLI configuration mode, you issue commands to perform the following operations:

    • Activate (commit) a configuration
    • Display the current configuration
    • Globally search and replace text; you can use regular expressions to locate and replace identifiers and values
    • Insert, copy, and delete statements
    • Issue operational mode commands
    • List the commands that were previously issued during the session
    • List the users currently editing the configuration
    • Move among the levels of the configuration hierarchy
    • Save a configuration to a file
    • Verify the syntactic correctness of a configuration before activating it

    When you load a text file that contains a configuration, you can commit it immediately to activate the configuration on the router, or you can alter it in CLI configuration mode and commit it later. When loading the file, you can specify that it overwrite the entire configuration or portions of it, or that nonoverlapping portions be merged with the existing configuration.

    You can include comments in the configuration to identify or explain particular statement or subhierarchies.

    You can copy the contents of currently active file system partitions on the router to standby partitions that are not active.

    Configuration Versions

    When you change the configuration in CLI configuration mode, your changes are stored in a copy of the currently active configuration. The copy is called the candidate configuration. By default, multiple users can edit the candidate configuration at the same time, and all users immediately see the changes made by everyone. Alternatively, you can lock other users out of the candidate configuration as you enter CLI configuration mode, making them unable to change the candidate configuration until you release the lock. For finer-grained control, you can also allow multiple users each to edit nonoverlapping portions of the configuration and to commit only their own changes.

    For the candidate configuration to become the active configuration running on the router, you must commit it. The candidate file is checked for proper syntax, activated, and saved to a file as the currently active configuration. If the candidate configuration is committed while multiple users are editing it, all changes made by all the users take effect.

    In addition to saving the candidate and active configurations, the CLI saves the previous 49 configurations that were committed. You can roll back to any of the saved previous versions, making it the candidate configuration and then committing it if desired.

    Configuration Groups

    Junos configuration groups are named collections of configuration statements that are defined at the [edit groups] level of the hierarchy and referenced at other locations in the hierarchy. The statements in the configuration group are said to be inherited at the referring location and apply at that location as though they were actually typed there. You can apply the same group in multiple locations in the configuration, and apply different sections of one group to different locations.

    Modified: 2017-10-05