Configuration Management

This chapter shows how to manage system configuration.

The configuration is loaded at boot time from the running://config.boot file. If there is an error loading this file, the factory configuration settings are loaded.

The boot file cannot be changed. If the admin wants to use different configuration files to choose between them at a later stage, he/she must copy the currently active configuration into another file to load another file.

Save configuration

The show running | file <filename> will redirect the output of the configuration that is currently active into a specific file.

Example:

admin@osdx$ show running | file running://saved_config
  Command's output saved under "saved_config"
  Filesize: 887.000 B

Load configuration

The load command can be used inside the configuration mode to modify the working configuration session. Several options are available.

  • load boot-config: Uses the disk startup configuration file that was last saved.

  • load factory-config: Automatically loads the factory configuration settings onto the working configuration session.

  • load file <filename>: Loads a specific configuration file.

Snapshots

A snapshot shows the state of a system at a particular moment in time. In OSDx, the system state is defined by the configuration that is being run.

Snapshots allow you to easily return to a specific configuration state. This is an incredibly powerful tool if you want to quickly change the device configuration.

Every time a commit or save operation is performed, a new snapshot is generated.

Note

By default, up to five snapshots can coexist (five commit snapshots and five save snapshots). This parameter can be explicitly changed using the following command: set system snapshots limit [0-50]

If this parameter is set to 0, no snapshots will be generated. Additionally, if the parameter changes and a greater number of snapshots is allowed, the oldest snapshots will be deleted.

Generating snapshots

Every time a commit or save operation is performed, a new snapshot is generated.

Note

This can be changed by selecting the desired option in the following configuration command set system snapshots operation <both / commit / save>.

Both save/commit operations include the option to add a comment:

admin@osdx# commit comment
  <comment>       Snapshot comment
admin@osdx# save comment
  <comment>       Snapshot comment

Example:

admin@osdx# commit comment Add_VRF_support

This way, snapshots can be recognized very quickly:

admin@osdx$ show snapshot
        Snapshot        Comment
  ---------------------------------------------
  20200501080000_commit       Add_VRF_support
  20200508153000_commit Add_Policies
  20200510200005_commit Remove_Dummy_Interfaces
  20200514120037_save   Definite_Configuration

Snapshot names are formatted like this: [YEAR][MONTH][DAY][HOUR][MINUTE][SECOND]_[OPERATION]

where [OPERATION] is “commit” or “save”.

By default, the generation of snapshots for non-commented operations is disabled. It can be activated by setting this configuration command: system snapshots include-uncommented.

Showing and comparing snapshots

The show snapshot command can be used to print the configuration included in a specific snapshot.

It can be used in both Operational and Configuration menus, and a path can be used to retrieve only a particular configuration tree.

Example:

admin@osdx# show snapshot 20200519065320_commit path interfaces ethernet eth3
  # Teldat OSDx SDE version 202005131344.cc368fc-master-snapshot
  # Tue May 19 07:00:55 UTC 2020
  set interfaces ethernet eth3 address 192.168.213.18/22

You can also compare the current running/working configuration with a snapshot and see the differences between two different snapshots.

Example:

admin@osdx$ show changes snapshot 20200519070520_commit
  # Comment for '20200519070520_commit': Initial_Configuration
  set interfaces ethernet eth0 traffic policy in DROP_ICMP
  set traffic policy DROP_ICMP
  set traffic selector SEL_ICMP

If a previous command is executed in the Configuration menu, the working configuration and the snapshot will be compared.

Example:

admin@osdx# show changes snapshot 20200519070520_commit
  # Comment for '20200519070520_commit': Initial_Configuration
  set interfaces ethernet eth0 traffic policy in DROP_ICMP
  set interfaces ethernet eth1 traffic policy out DROP_ICMP
  set traffic policy DROP_ICM

The following command allows you to see the differences between two snapshots: show changes snapshot <SNAPSHOT_A> snapshot <SNAPSHOT_B> [path <OPTIONAL_PATH>].

It will display the different commands that need to be entered to reach the SNAPSHOT_A configuration state from SNAPSHOT_B.

Example:

admin@osdx# show changes snapshot 20200519070603_commit snapshot 20200519070520_commit
# Comment for '20200519070603_commit': Add_Policies
# Comment for '20200519070520_commit': Initial_Configuration
set interfaces ethernet eth0 traffic policy in DROP_ICMP
set traffic policy DROP_ICMP
set traffic selector SEL_ICMP

If you swap the snapshots, the required commands would be different.

Example:

admin@osdx# show changes snapshot 20200519070520_commit snapshot 20200519070603_commit
  # Comment for '20200519070520_commit': Initial_Configuration
  # Comment for '20200519070603_commit': Add_Policies
  delete interfaces ethernet eth0
  delete traffic

When comparing a configuration state (running/working/snapshot) with a snapshot that was generated using a different version, a comment will appear pointing out the snapshot’s version.

Example:

admin@osdx# show changes snapshot 20200519072903_save snapshot 20200519073016_commit
  # Version for '20200519072903_save': 202005181818.cc368fc-master-snapshot
  # Comment for '20200519072903_save': Different_Version
  # Version for '20200519073016_commit': 202005131344.cc368fc-master-snapshot
  # Comment for '20200519073016_commit': Add_Policies
  delete interfaces ethernet eth0
  delete traffic

Loading snapshots

Snapshots can be loaded from the configuration menu using the following command: load snapshot <SNAPSHOT>.

Note

This command does not commit the changes. They are only applied to the working configuration. Therefore, you will be able to modify/discard/commit the configuration.