Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

View the Configuration

The show configuration mode command displays the current configuration for a device running Junos OS.

Display the Current Configuration

To display the current configuration for a Juniper Networks device, use the show command in configuration mode. This command displays the configuration at the current hierarchy level or at the specified level.

The configuration statements appear in a fixed order, interfaces appear alphabetically by type, and then in numerical order by slot number, PIC number, and port number. Note that when you configure the device, you can enter statements in any order.

You also can use the CLI operational mode show configuration command to display the last committed configuration, which is the configuration currently running on the router:

When you show a configuration, a timestamp at the top of the configuration indicates when the configuration was last changed:

If you have omitted a required statement at a specific hierarchy level, when you issue the show command in configuration mode, a message indicates which statement is missing. If a mandatory statement is missing, the CLI continues to display this message each time you issue a show command.

For example:

Unsupported statements included in the CLI configuration are displayed with the “unsupported” text in the configuration. For example, if a statement is configured on an unsupported platform, the CLI displays a message that the statement is ignored in the configuration because it is configured on an unsupported platform. When you issue the show command with the | display xml option, you can see the unsupported="unsupported” attribute for configuration that is unsupported.

The “unsupported” attribute included in text configuration or XML configuration is provided to scripts when the unsupported="unsupported" attribute is included in the <get-configuration> RPC call.

Example: Display the Current Configuration

The following example shows how you can display the current device configuration.

Set and commit a configuration:

Display the current configuration:

Display the configuration at a particular hierarchy:

Move down a level and display the configuration at that level:

Display the last committed configuration:

Display Additional Information About the Configuration

In configuration mode only, to display additional information about the device configuration, use the display detail command after the pipe ( | ) in conjunction with a show command. The additional information includes the help string that explains each configuration statement and the permission bits required to add and modify the configuration statement.

For example:

Display set Commands from the Configuration

In configuration mode, you can display the configuration as a series of configuration mode commands required to re-create the configuration. This is useful if you are not familiar with how to use configuration mode commands or if you want to cut, paste, and edit the displayed configuration.

To display the configuration as a series of configuration mode commands, which are required to re-create the configuration from the top level of the hierarchy as set commands, issue the show configuration mode command with the display set option:

When you issue the show configuration command with the | display set pipe option to view the configuration as set commands, those portions of the configuration that you do not have permissions to view are substituted with the text ACCESS-DENIED.

You can use the <explicit> option with the | display set command, to explicitly display all the configuration statements that the system internally creates, as a series of set commands, when you configure certain statements from the top level of the hierarchy.

For example, assume you issue the set interfaces ge-0/0/0.0 family inet configuration mode command. You then show the resulting configuration with the show interfaces ge-0/0/0 | display set command. The output displays the same set command you entered. If you include the explicit argument, the output also shows the configuration statements needed to create the hierarchy where the family inet statement is specified. Specifically for this example, the output therefore includes the set interfaces ge-0/0/0 unit 0 statement in addition to the set interfaces ge-0/0/0.0 family inet statement.

Example: Display set Commands from the Configuration

Display the set commands from the configuration at the [edit interfaces] hierarchy level:

To display the configuration as a series of configuration mode commands required to re-create the configuration from the current hierarchy level, issue the show configuration mode command with the show | display set relative option. You can use the <explicit> option to explicitly display, as a series of commands, all the configurations that the system internally creates when you configure certain statements from the current hierarchy level.

Example: Display set Commands with the match Option

To display the configuration as set commands and search for text matching a regular expression by filtering output, specify the match option after the pipe ( | ):

Display IP addresses associated with an interface: