Saving the Current Configuration
By default, the system automatically saves any change to the system configuration to nonvolatile storage (NVS). This feature is known as Automatic Commit mode, but has no effect on the CLI prompt. You can disable this feature by issuing the service manual-commit command. In Manual Commit mode (again with no effect on the CLI prompt), any configuration change affects only the current system configuration (the running configuration).
If you are in Manual Commit mode and want to save the configuration changes to NVS, you must issue either the write memory command or the copy running-configuration startup-configuration command.
If you change the configuration while in Manual Commit mode and issue the reload command without saving the changes to the startup configuration, the system provides a warning, allowing you to save the changes before reloading.
copy running-configuration
- Use to save the current configuration to a system configuration (*.cnf) file.
- This command is available only if the system is in Automatic Commit mode.
- The destination filename must have a .cnf extension.
- The destination file can be either a local or a network file.
- If you want to restore a previously saved configuration, use the boot config filename command.
- Example
host1#copy running-configuration system2.cnfcopy running-configuration startup-configuration
- Use to save all outstanding (unsaved) configuration changes to NVS.
- This command is an exact alias of the write memory command.
- This command is available if the system is in either Automatic Commit mode or Manual Commit mode. If issued while in Automatic Commit mode, the CLI notifies you that the command is not necessary, but allows you to proceed.
- If automatic synchronization between the primary and standby SRP modules is enabled (the default system behavior) and the system is in Manual Commit mode (the nondefault system behavior), issuing this command triggers file system synchronization immediately after the system writes, or commits, all outstanding configuration changes to NVS.
- Example
host1#copy running-configuration startup-configurationcopy startup-configuration
- Use to copy the previously saved startup configuration to a system configuration (*.cnf) file. If you have made but not saved any configuration changes, those changes are not in the startup configuration.
- This command is available only if the system is in Manual Commit mode.
- Example
host1#copy startup-configuration system1.cnfservice manual-commit
- Use to stop the system from automatically saving configuration changes to NVS.
- Issuing this command places the system into Manual Commit mode. This mode has no effect on the CLI prompt.
- Issuing this command causes an immediate save of configuration data not yet committed to NVS.
- Example
host1(config)#service manual-commit
- The no version returns the system to Automatic Commit mode; the no version has no effect if the system is already in Automatic Commit mode.
show configuration
- Use to display the current (running) configuration of the system, a specified virtual router, or a specified interface within the current VR context.
- You can create a configuration script from the output by saving it as a file with the .scr extension.
- Use the interface keyword to display the current configuration of a particular interface.
- You can exclude information about particular types of interfaces.
- This command was formerly documented as show config; that abbreviation is still supported.
- 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.
- Using the command show configuration interface may be more effective than using show configuration | begin. When show configuration interface is used for a specific interface, the current configuration is quickly determined and displayed for only that specified interface. 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.
- This command is available only if the system is in Automatic Commit mode.
- 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.! 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-backupno boot slot!! 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.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-pointshow running-configuration
- Use to display the configuration currently running on the system.
- This command is available only if the system is in Manual Commit mode.
- Example
host1#show running-configurationwrite memory
- Use to save all outstanding (unsaved) configuration changes to NVS.
- This command is an exact alias of the copy running-configuration startup-configuration command.
- This command is available if the system is in either Automatic Commit mode or Manual Commit mode. If issued while in Automatic Commit mode, the CLI notifies you that the command is not necessary, but allows you to proceed.
- If automatic synchronization between the primary and standby SRP modules is enabled (the default system behavior) and the system is in Manual Commit mode (the nondefault system behavior), issuing this command triggers file system synchronization immediately after the system writes, or commits, all outstanding configuration changes to NVS.
- Example
host1#write memory