Support Support Downloads Knowledge Base Case Manager My Juniper Community

Knowledge Base

Search our Knowledge Base sites to find answers to your questions.

Ask All Knowledge Base Sites All Knowledge Base Sites JunosE Defect (KA)Knowledge BaseSecurity AdvisoriesTechnical BulletinsTechnotes Sign in to display secure content and recently viewed articles

SRX Getting Started - Copy/Paste Configuration

0

0

Article ID: KB16622 KB Last Updated: 18 Mar 2014Version: 4.0
Summary:

This article describes how to copy and paste text from a configuration or an entire configuration to the CLI.

For other topics, go to the SRX Getting Started main page.

Symptoms:
  • Copy a portion of one configuration and paste the portion into another configuration
  • Override the current candidate configuration
Cause:

Solution:

This section contains the following:


Copying and Pasting a Configuration Section to Another Configuration

If you have a section of a configuration that you want include in another configuration, you can use the load merge terminal relative command to copy the configuration section from a file or an application window (for example, a Web browser) and paste the section in the CLI of the terminal window that you are using to configure a device.

To copy and paste a section of a configuration to another configuration:
  1. In the terminal window, navigate to the specific hierarchy where the data will be pasted (in this example, the system hierarchy).

  2. user@host# edit system
    [edit system]


  3. Enter the load merge terminal relative command:

  4. user@host# load merge terminal relative
    [Type ^D at a new line to end input]


  5. Copy the section of the configuration from a file or an application window.

  6. Paste the copied text into the CLI of the terminal window that you are using to configure the device.
  7. user@host# load merge terminal relative
    [Type ^D at a new line to end input]
    location building 2;
    ntp server 78.46.194.186 version 4;

  8. Press Enter once. Make sure that you perform this step before proceeding.

  9. Press Ctrl+d to indicate that the end of the pasted text. You see "load complete" in the terminal window.

  10. To verify the configuration but not activate it, use the show command. You can also use the commit check command to verify the correctness of the syntax for the commands that have been entered.

  11. If the validation is successful, go to the next step. Otherwise, review any error messages and use the CLI to change the configuration and resolve errors.

  12. Commit the configuration to activate it:

  13. user@host# commit
    commit complete

The following example shows how to add an additional logical unit to an interface.

Note: You must navigate to the hierarchy in which the configuration changes are required. In this example, you need to navigate to the interface ge-0/0/0 hierarchy.
  1. Verify the ge-0/0/0 interface configuration before making any changes.
  2. user@host# show interfaces ge-0/0/0
    unit 0 {
        family inet {
            address 10.85.49.149/24;
        }
    }

  3. Navigate to the specific hierarchy where the changes are required.

  4. user@host# edit interfaces ge-0/0/0

    [edit interfaces ge-0/0/0]

  5. Enter the load merge terminal relative command.

  6. user@host# load merge terminal relative
    [Type ^D at a new line to end input]


  7. Copy the section of the configuration from a file or an application window.

  8. Paste the copied text into the CLI of the terminal window that you are using to configure the device.

  9. user@host# load merge terminal relative
    [Type ^D at a new line to end input]
    description management;
    unit 1 {
         family inet {
             address 192.168.1.1/24;
         }
    }


  10. Press Enter once. Make sure that you perform this step before proceeding.

  11. Press Ctrl+d to indicate that the end of the pasted text. You see "load complete" in the terminal window.

  12. Verify the configuration with the show command.
  13. [edit interfaces ge-0/0/0]
    user@host# show
    description management;
    unit 0 {
         family inet {
             address 10.10.10.149/24;
         }
    }
    unit 1 {
         family inet {
             address 192.168.1.1/24;
         }
    }

  14. To verify but not activate the configuration, use the commit check command.

  15. [edit interfaces ge-0/0/0]
    user@host# commit check

  16. Commit the configuration.

  17. user@host#
    commit
    commit complete

Overriding a Candidate Configuration

You can paste an entire configuration in to the CLI of the terminal window that you are using to configure a device. Use the load override terminal command to override the current candidate configuration.

To override a candidate configuration:
  1. Make sure that you are at the top level of the configuration mode hierarchy. If you are below the top level, enter exit to return to the top level.

  2. From the top level of the configuration hierarchy, enter the load override terminal command:

  3. user@host# load override terminal
    [Type ^D at a new line to end input]


  4. Copy the section of the configuration from a file or an application window.

  5. Paste the copied text into the CLI of the terminal window that you are using to configure a device.

  6. Press Enter once. Make sure that you perform this step before proceeding.

  7. Press Ctrl+d to indicate the end of the pasted text.

  8. To verify the configuration but not activate it, use the show command.
  9. user@host# show
    ## Last changed: 2010-02-02 20:49:24 UTC
    version 10.0R2.10;
    system {
    host-name SRX;
    ...
    ...

  10. To verity the syntax for the commands that were entered, use the commit check command.

  11. user@host#
    commit check

  12. If the validation is successful, go to the next step. Otherwise, review any error messages and use the CLI to change the configuration and resolve errors.

  13. Commit the configuration to activate it:

  14. user@host# commit
    commit complete


Technical Documentation

Junos CLI User Guide


Comment on this article > Affected Products Browse the Knowledge Base for more articles related to these product categories. Select a category to begin.

Getting Up and Running with Junos

Getting Up and Running with Junos Security Alerts and Vulnerabilities Product Alerts and Software Release Notices Problem Report (PR) Search Tool EOL Notices and Bulletins JTAC User Guide Customer Care User Guide Pathfinder SRX High Availability Configurator SRX VPN Configurator Training Courses and Videos End User Licence Agreement Global Search