Export/Import configuration

You can export the startup-config of the router emulated by GNS3 to a text file. You can also import the exported configuration into the startup-config of the router on GNS3 to restore the configuration easily.

This page explains how to export/import the configuration of the router emulated by GNS3.

How to export configuration

To export the router’s startup-config to a text file, follow the steps below.

  1. Save running-config to startup-config.
  2. Export startup-config to a specified folder.

1. Save running-config to startup-config

It is the startup-config that will be exported to a text file. Therefore, the first step is to save the running-config of the router to startup-config. Enter the following command in the router’s console.

#copy running-config startup-config

2. Export startup-config to a specified folder

Click [Tools] > [Import/Export node config] in the menu, select [Export configs to a directory], and click [OK].

This will bring up a dialog box for you to select a folder. Select the folder you want to export.

The startup-config of the device on the project will be saved as a text file in the selected folder. The file name is in the format [device name]_configs_i[x]_startup-config.cfg.

[x]:device ID

How to import configuration

The procedure for importing the exported configuration into the router startup-config again is as follows.

  1. Stop the device.
  2. Specify the folder where the configuration you want to import is saved.

1. Stop the device

Stop the router before importing the configuration. It is possible to import the config while the router is running. However, since the running-config is not changed, you need to reboot the router to reflect the imported configuration. For this reason, it is better to stop it when importing.

2. Specify the folder where the configuration you want to import is saved.

Click [Tools] > [Import/Export node config] in the menu, select [Import configs to a directory], and click [OK].

A dialog box for selecting a folder will appear. Select the folder where the configuration you want to import is saved.

Note that the file name of the configuration must be in the following format when it is exported.

[devicename]_configs_i[x]_startup-config.cfg

[x]:device ID

Notice

A warning message such as “private-config.cfg not found” may appear on the console during import. private-config.cfg stores the RSA encryption key and other information when SSH is configured. There is no need to worry about this for devices without SSH settings.