Juniper Networks
Log in
|
How to Buy
|
Contact Us
|
United States (Change)
Choose Country
Close

Choose Country

North America

  • United States

Europe

  • Deutschland - Germany
  • España - Spain
  • France
  • Italia - Italy
  • Россия - Russia
  • United Kingdom

Asia Pacific

  • Asean Region (Vietnam, Indonesia, Singapore, Malaysia)
  • Australia
  • 中国 - China
  • India
  • 日本 - Japan
  • 대한민국 - Korea
  • 台灣 - Taiwan
Solutions
Products & Services
Company
Partners
Support
Education
Community
Security Intelligence Center

Technical Documentation

Support
Technical Documentation
Content Explorer New
 
Enterprise MIBs
 
EOL Documentation
 
File Format Help
 
Glossary
 
Portable Libraries
 
 
Home > Support > Technical Documentation > Junos OS > Loading a Configuration from a File
Print
Rate and give feedback:  Feedback Received. Thank You!
Rate and give feedback: 
Close
This document helped resolve my issue.  Yes No

Additional Comments

800 characters remaining

May we contact you if necessary?

Name:  
E-mail: 
Submitting...
 

Related Documentation

  • EX Series
  • Examples: Loading a Configuration from a File
  • J Series
  • Examples: Loading a Configuration from a File
  • M Series
  • Examples: Loading a Configuration from a File
  • MX Series
  • Examples: Loading a Configuration from a File
  • PTX Series
  • Examples: Loading a Configuration from a File
  • QFX Series
  • Examples: Loading a Configuration from a File
  • T Series
  • Examples: Loading a Configuration from a File
 

Loading a Configuration from a File

You can create a file, copy the file to the local router, and then load the file into the CLI. After you have loaded the file, you can commit it to activate the configuration on the router, or you can edit the configuration interactively using the CLI and commit it at a later time.

You can also create a configuration while typing at the terminal and then load it. Loading a configuration from the terminal is generally useful when you are cutting existing portions of the configuration and pasting them elsewhere in the configuration.

To load an existing configuration file that is located on the router, use the load configuration mode command:

[edit]user@host# load (factory-default | merge | override | patch | replace | set | update) filename <relative>

For information about specifying the filename, see Viewing Files and Directories on a Device Running Junos OS.

To load a configuration from the terminal, use the following version of the load configuration mode command. Type ^D to end input.

[edit]user@host# load (factory-default | merge | override | patch | replace | set | update) terminal <relative>

To replace an entire configuration, specify the override option at any level of the hierarchy.

An override operation discards the current candidate configuration and loads the configuration in filename or the one that you type at the terminal. When you use the override option and commit the configuration, all system processes reparse the configuration. For an example, see Examples: Loading a Configuration from a File.

To replace portions of a configuration, specify the replace option. For this operation to work, you must include replace: tags in the file or configuration you type at the terminal. The software searches for the replace: tags, deletes the existing statements of the same name, if any, and replaces them with the incoming configuration. If there is no existing statement of the same name, the replace operation adds to the configuration the statements marked with the replace: tag. For an example, see Examples: Loading a Configuration from a File.

To replace only the configuration that has changed, specify the update option at any level of the hierarchy. An update operation compares the current configuration and the current candidate configuration, and loads only the changes between these configurations in filename or the one that you type at the terminal. When you use the update operation and commit the configuration, Junos OS attempts to notify the smallest set of system processes that are affected by the configuration change.

To combine the current configuration and the configuration in filename or the one that you type at the terminal, specify the merge option. A merge operation is useful when you are adding a new section to an existing configuration. If the existing configuration and the incoming configuration contain conflicting statements, the statements in the incoming configuration override those in the existing configuration. For an example, see Examples: Loading a Configuration from a File.

To change part of the configuration with a patch file and mark only those parts as changed, specify the patch option. For an example, see Examples: Loading a Configuration from a File.

To use the merge, replace, set, or update option without specifying the full hierarchy level, specify the relative option. For example:

[edit system]user@host# show static-host-mappingbob sysid 987.654.321ab[edit system]user@host# load replace terminal relative[Type ^D at a new line to end input]replace: static-host-mapping {bob sysid 0123.456.789bc;}load complete[edit system]user@host# show static-host-mappingbob sysid 0123.456.789bc;

If, in an override or merge operation, you specify a file or type text that contains replace: tags, the replace: tags are ignored and the override or merge operation is performed.

If you are performing a replace operation and the file you specify or text you type does not contain any replace: tags, the replace operation is effectively equivalent to a merge operation. This might be useful if you are running automated scripts and cannot know in advance whether the scripts need to perform a replace or a merge operation. The scripts can use the replace operation to cover either case.

To load a configuration that contains the set configuration mode command, specify the set option. This option executes the configuration instructions line by line as they are stored in a file or from a terminal. The instructions can contain any configuration mode command, such as set, edit, exit, and top. For an example, see Examples: Loading a Configuration from a File.

To copy a configuration file from another network system to the local router, you can use the SSH and Telnet utilities, as described in the Junos OS System Basics and Services Command Reference PDF Document.

Note: If you are using Junos OS in a Common Criteria environment, system log messages are created whenever a secret attribute is changed (for example, password changes or changes to the RADIUS shared secret). These changes are logged during the following configuration load operations:

load merge
load replace
load override
load update

For more information, see the Secure Configuration Guide for Common Criteria and Junos-FIPS.

 

Related Documentation

  • EX Series
  • Examples: Loading a Configuration from a File
  • J Series
  • Examples: Loading a Configuration from a File
  • M Series
  • Examples: Loading a Configuration from a File
  • MX Series
  • Examples: Loading a Configuration from a File
  • PTX Series
  • Examples: Loading a Configuration from a File
  • QFX Series
  • Examples: Loading a Configuration from a File
  • T Series
  • Examples: Loading a Configuration from a File
 

Published: 2012-03-26

 
  • About Juniper
  • The New Network
  • Investor Relations
  • Press Releases
  • Newsletters
  • Juniper Offices
  • Resources
  • How to Buy
  • Partner Locator
  • Image Library
  • Visio Templates
  • Security Center
  • Community
  • Forums
  • Blogs
  • Junos Central
  • Social Media
  • Support
  • Technical Documentation
  • Knowledge Base (KB)
  • Software Downloads
  • Product Licensing
  • Contact Support
Site Map / RSS Feeds / Careers / Accessibility / Feedback / Privacy & Policy / Legal Notices
Copyright© 1999-2012 Juniper Networks, Inc. All rights reserved.
Help
|
My Account
|
Log Out