Help Center Help Articles Community RMA & Warranty Downloads Tech Specs

EdgeRouter - Copy and Replace Configuration Sections

Translated by AI

Overview

Readers will learn how to display the configuration in the set...command format, which allows administrators to easily copy and replace sections of the config. This method can also be used to copy over certain parts of a configuration to another EdgeRouter.

NOTES & REQUIREMENTS:
Applicable to the latest EdgeOS firmware on all EdgeRouter models. Please see the Related Articles below for more information.
Device used in this article:

Displaying and Modifying the Configuration

Back to Top

CLI: Access the Command Line Interface.You can do this using the CLI button in the GUI or by using a program such as PuTTY.

1. Run the following command from operational mode

show configuration commands | no-more

2. Copy the relevant parts of the configuration to a text editor. For example, if we want to move the VIF interfaces under eth1 to eth2.

show configuration commands | no-more
...
set interfaces ethernet eth1 vif 10 address 10.0.10.1/24
set interfaces ethernet eth1 vif 10 description VLAN10

set interfaces ethernet eth1 vif 20 address 10.0.20.1/24
set interfaces ethernet eth1 vif 20 description VLAN20

3. Enter configuration mode.

configure

4. Delete the configuration sections that you want to replace.

delete interfaces ethernet eth1 vif 10
delete interfaces ethernet eth1 vif 20

5. Add the new modified configuration, replacing eth1 with eth2.

set interfaces ethernet eth2 vif 10 address 10.0.10.1/24
set interfaces ethernet eth2 vif 10 description VLAN10

set interfaces ethernet eth2 vif 20 address 10.0.20.1/24
set interfaces ethernet eth2 vif 20 description VLAN20

6. Compare the differences between the old and the new configuration.

compare

7. Commit the changes and save the configuration.

commit ; save

Related Articles

Back to Top

EdgeRouter - Configuration and Operational Mode

EdgeRouter - Access the CLI from the Web UI

Intro to Networking - How to Establish a Connection Using SSH

Was this article helpful?
0 out of 0 found this helpful