Monitoring the Current Configuration
Use the commands described in this section to monitor the current (running) configuration of the system.
You can use the show configuration command to display information when the router is in Automatic Commit mode. In Automatic Commit mode, the system automatically saves any change to the system configuration to nonvolatile storage (NVS).
You can use the show running-configuration command to display information when the router is in Manual Commit mode. In Manual Commit mode, any configuration change affects only the current (running) system configuration.
For more information about saving the current configuration in Automatic Commit mode or Manual Commit mode, see Saving the Current Configuration.
Defining the Configuration Output Format
The JUNOSe show configuration command displays the entire system configuration. For very large configurations, the show configuration report can take a long time to generate and display.
The service show-config format command enables you to run the show configuration command using one of two formatsoriginal format (format 1; the default) and a format that provides a much faster output (format 2). Using format 2 can significantly reduce the amount of time it takes to generate and display configurations that contain three or more virtual routers and a large number of interfaces.
The primary difference between format 1 and format 2 output is the way in which each displays layer 2 and layer 3 interface configurations. Table 29 indicates where layer 2 and layer 3 interface configurations appear within the show configuration command output when the system is using format 1 or format 2.
The following examples show the differences between format 1 and format 2 output:
Example 1
virtual-router default...interface null 0interface loopback 0ip address 127.0.0.1 255.0.0.0!interface ip shAtm50126ip share-interface atm 5/0.126!interface ip MikeShare2ip share-interface atm 5/1.1!interface atm 5/0interface atm 5/0.100 point-to-pointatm pvc 100 0 100 aal5snap 0 0 0encapsulation pppoepppoe sessions 1!interface atm 5/0.100.1encapsulation pppppp authentication chapip address 102.0.1.1 255.255.255.0!interface atm 5/0.102 multipointatm pvc 1021 0 1021 aal5snap 0 0 0atm pvc 1022 0 1022 aal5snap 0 0 0atm pvc 1023 0 1023 aal5snap 0 0 0ip address 102.0.2.1 255.255.255.0!interface atm 5/0.103 point-to-pointatm pvc 103 0 103 aal5snap 0 0 0encapsulation bridge1483ip address 100.0.0.1 255.255.255.0pppoe!pppoe subinterface atm 5/0.103.1encapsulation pppppp authentication papip address 100.0.1.1 255.255.255.0!interface atm 5/0.104 point-to-pointatm pvc 104 0 104 aal5snap 0 0 0ip address 150.0.1.1 255.255.255.0ipv6 address 2000:0:17::1/60!interface atm 5/0.126 point-to-point!interface atm 5/1interface atm 5/1.1 point-to-pointinterface atm 5/1.100 point-to-pointatm pvc 100 0 100 aal5snap 0 0 0encapsulation pppoepppoe sessions 1!interface atm 5/1.100.1encapsulation pppppp authentication chap!interface atm 5/1.102 multipointatm pvc 1021 0 1021 aal5snap 0 0 0atm pvc 1022 0 1022 aal5snap 0 0 0atm pvc 1023 0 1023 aal5snap 0 0 0!interface atm 5/1.103 point-to-pointatm pvc 103 0 103 aal5snap 0 0 0encapsulation bridge1483pppoe!pppoe subinterface atm 5/1.103.1encapsulation pppppp authentication pap!interface atm 5/1.104 point-to-pointatm pvc 104 0 104 aal5snap 0 0 0!interface atm 5/1.125 point-to-point!interface fastEthernet 0/0ip address 10.13.5.196 255.255.128.0!interface mlppp joe!ip route 0.0.0.0 0.0.0.0 10.13.5.1ip route 40.0.0.0 255.0.0.0 atm5/0.104ip route 172.28.32.70 255.255.255.255 10.13.5.1no ip source-route!!ipv6!! ============================================================================virtual-router foo...interface null 0interface loopback 0ip address 127.0.0.2 255.0.0.0!interface atm 5/1.100.1ip address 102.0.1.2 255.255.255.0!interface atm 5/1.102ip address 102.0.2.2 255.255.255.0!interface atm 5/1.103ip address 100.0.0.2 255.255.255.0!interface atm 5/1.103.1ip address 100.0.1.2 255.255.255.0!interface atm 5/1.104ip address 150.0.1.2 255.255.255.0ipv6 address 2000:0:17::2/60!ip route 30.0.0.0 255.0.0.0 atm5/1.104no ip source-route!!ipv6Example 2
service show-config format 2...virtual-router default...interface atm 5/0interface atm 5/0.100 point-to-pointatm pvc 100 0 100 aal5snap 0 0 0encapsulation pppoepppoe sessions 1!interface atm 5/0.100.1encapsulation pppppp authentication chap!interface atm 5/0.102 multipointatm pvc 1021 0 1021 aal5snap 0 0 0atm pvc 1022 0 1022 aal5snap 0 0 0atm pvc 1023 0 1023 aal5snap 0 0 0!interface atm 5/0.103 point-to-pointatm pvc 103 0 103 aal5snap 0 0 0encapsulation bridge1483pppoe!pppoe subinterface atm 5/0.103.1encapsulation pppppp authentication pap!interface atm 5/0.104 point-to-pointatm pvc 104 0 104 aal5snap 0 0 0!interface atm 5/0.126 point-to-point!interface atm 5/1interface atm 5/1.1 point-to-pointinterface atm 5/1.100 point-to-pointatm pvc 100 0 100 aal5snap 0 0 0encapsulation pppoepppoe sessions 1!interface atm 5/1.100.1encapsulation pppppp authentication chap!interface atm 5/1.102 multipointatm pvc 1021 0 1021 aal5snap 0 0 0atm pvc 1022 0 1022 aal5snap 0 0 0atm pvc 1023 0 1023 aal5snap 0 0 0!interface atm 5/1.103 point-to-pointatm pvc 103 0 103 aal5snap 0 0 0encapsulation bridge1483pppoe!pppoe subinterface atm 5/1.103.1encapsulation pppppp authentication pap!interface atm 5/1.104 point-to-pointatm pvc 104 0 104 aal5snap 0 0 0!interface atm 5/1.125 point-to-point!interface fastEthernet 0/0interface null 0interface loopback 0ip address 127.0.0.1 255.0.0.0!interface ip shAtm50126ip share-interface atm 5/0.126!interface ip MikeShare2ip share-interface atm 5/1.1!interface mlppp joeinterface fastEthernet 0/0ip address 10.13.5.196 255.255.128.0!interface atm 5/0.100.1ip address 102.0.1.1 255.255.255.0!interface atm 5/0.102ip address 102.0.2.1 255.255.255.0!interface atm 5/0.103ip address 100.0.0.1 255.255.255.0!interface atm 5/0.103.1ip address 100.0.1.1 255.255.255.0!interface atm 5/0.104ip address 150.0.1.1 255.255.255.0ipv6 address 2000:0:17::1/60!ip route 0.0.0.0 0.0.0.0 10.13.5.1ip route 40.0.0.0 255.0.0.0 atm5/0.104ip route 172.28.32.70 255.255.255.255 10.13.5.1no ip source-route!!ipv6!! ============================================================================virtual-router foo...interface null 0interface loopback 0ip address 127.0.0.2 255.0.0.0!interface atm 5/1.100.1ip address 102.0.1.2 255.255.255.0!interface atm 5/1.102ip address 102.0.2.2 255.255.255.0!interface atm 5/1.103ip address 100.0.0.2 255.255.255.0!interface atm 5/1.103.1ip address 100.0.1.2 255.255.255.0!interface atm 5/1.104ip address 150.0.1.2 255.255.255.0ipv6 address 2000:0:17::2/60!ip route 30.0.0.0 255.0.0.0 atm5/1.104no ip source-route!Customizing the Configuration Output
You can customize the configuration information by including or excluding lines of output based on the keywords described in this section.
Using a keyword with the show configuration command might be more effective than using show configuration | begin. When show configuration is used with a specific keyword, the current configuration is quickly determined and displayed for only that specified keyword. Executing show configuration | begin causes all output of show configuration to be generated, but the output is not displayed until the begin criterion is met.
Use the virtual-router keyword to display the current configuration of a specified virtual router. You can combine the virtual-router keyword with the category keyword to display the current configuration of specific settings for a virtual router.
Use the interface keyword to display the current configuration of a particular interface. Use the type keyword to target specific interface types. You can exclude information about particular types of interfaces using the exclude-category interface keyword.You can exclude information about particular types of interfaces using the exclude-category interface keyword.
Use the category keyword to display the current configuration of a specific group of router settings. The settings are organized in categories by function.
Use the tag-group keyword with the category interfaces keywords to tag interfaces as belonging to a specific group and display all interfaces within a group.
Use the tag-group command to configure an interface tag group. Any number of interfaces can be in a tag group. The following interface types cannot be added to tag groups: tunnel, lag, mlppp, and mlframe-relay. An interface can be in only one tag group.
Table 30 describes the categories of router settings and the type of information displayed for each category.
Many of the categories described in Table 30 contain subcategories of router settings. For example, you can specify show configuration category management cli to display only the configuration for the CLI. To display the names of subcategories that you can specify for each category, issue the show configuration category categoryName ? command.
You can combine the category keyword with the virtual-router keyword to display the current configuration of specific settings for a virtual router.
NOTE: When you specify categories with the show configuration command, the output might display additional configuration data that is not explicitly associated with the categories that you specified.
service show-config
- Use to define the show configuration command display output.
- Specify format 1 to display the show configuration command output in its original format.
- Specify format 2 to significantly reduce the amount of time it takes to generate and display output for configurations that contain three or more virtual routers and a large number of interfaces.
- Example
host1#service show-config format 2Use the no version to revert the show configuration command output format to its default (format 1). show configuration
- Use to display the current configuration of the system, a specified virtual router, a specified interface, or a specified category of router settings.
- This command was formerly documented as show config; that abbreviation is still supported.
- You can create a configuration script from the output by saving it as a file with the .scr extension.
- This command provides configuration information based on the privilege level of the session (user). The output does not display any configuration data for commands that have privilege levels higher than that of the session. For example, if the session is enabled at level 5, issuing the show configuration command displays only output for commands at level 5 and below. For more information, see CLI Command Privileges.
- You can use the output filtering feature of the show command to include or exclude lines of output based on a text string you specify. See Chapter 2, Command-Line Interface, for details.
- Example
host1#show configuration! Configuration script being generated on TUE JAN 29 200X 00:31:12 UTC! Juniper Networks Edge Routing Switch ERX-700! Version: x.y.z (January 18, 200X 15:01)! Copyright (c) 1999-200X Juniper Networks, Inc. All rights reserved.Commands displayed are limited to those available at privilege level 10! Juniper Networks Edge Routing Switch ERX-700boot config running-configurationboot system erx_x-y-z.relno boot backupno boot subsystemno boot backup subsystemno boot force-backup!! Note: The following commands are here to ensure that all virtual routers and! vrfs are created before other commands that may need to reference them.! These commands will be repeated further on as each virtual router and vrf! has its configuration presented.!virtual-router defaultvirtual-router boston!ip vrf vpnavirtual-router vrA!hostname host1exception protocol ftp anonymous null!controller t1 6/0channel-group 2 timeslots 1,3-8,10 speed 64...!virtual-router vrAaaa authentication ppp default radiusaaa accounting ppp default radius!ip address-pool localinterface null 0ip bgp-community new-formatno ip source-route!snmp-server!! End of generated configuration script.Example using interface keyword:host1#show configuration interface serial 4/0interface atm 4/0atm vc-per-vp 1024atm uni-version 3.0!interface atm 4/0.1 point-to-pointprofile pppoe myProfileqos-profile myQosProfile!interface atm 4/0.2 point-to-pointqos-profile myQosProfileip description TestIP!interface atm 4/0.3 point-to-pointExample using category keyword:host1#show configuration category system file-systemboot config running-configurationboot system m.relno boot backupno boot subsystemno boot backup subsystemshow running-configuration
- Use to display the configuration currently running on the router, a specified virtual router, a specified interface, or a specified category of router settings.
- Example
host1#show running-configurationExample 2 host1#show running-configuration interface serial 4/0Example 3 host1#show running-configuration category system file-systemtag-group
- Use to configure an interface tag group.
- Any number of interfaces can be in a tag group.
- Interface types tunnel, lag, mlppp, and mlframe-relay cannot be added to tag groups.
- An interface can be in only one tag group.
- Example
host1(config-if)#tag-group redUse the no version to remove the tag group.