NVIDIA MLNX-OS User Manual v3.11.2224 LTS
NVIDIA MLNX-OS User Manual v3.11.2224 LTS

Configuration Management

To save the current configuration to the active configuration file, you can either use the “configuration write” command (requires running in Config mode) or the “write memory” command (requires running in Enable mode).

  • To save the configuration to the active configuration file, run:

    Copy
    Copied!
                

    switch (config) # configuration write

  • To save the configuration to a user-specified file without making the new file the active configuration file, run:

    Copy
    Copied!
                

    switch (config) # configuration write to myconf no-switch

  • To save the configuration to a user-specified file and make the new file the active configuration file, run:

    Copy
    Copied!
                

    switch (config) # configuration write to myconf

  • To display the available configuration files and the active file, run:

    Copy
    Copied!
                

    switch (config) # show configuration files initial myconf (active) switch (config) #

By default, or after a system reset, the system loads the default “initial” configuration file.

To load a different configuration file and make it the active configuration:

Copy
Copied!
            

switch > switch > enable switch # configure terminal switch (config) # configuration switch-to myconfig switch (config) #

On modular switch systems with dual management modules, load the configuration file according to the following:

  1. Power cycle the system.

  2. Load the configuration on the top CPU that serves as the chassis master according to the procedure described above.

    Note

    If the configuration file is loaded on a different CPU than the SM HA master (SM HA master that servers the VIP), the SM configuration is overwritten.

If system configuration becomes corrupted, it is suggested to restore factory default configuration.

  • To restore factory default configuration on a single management module system, run:

    Copy
    Copied!
                

    switch (config) # reset factory keep-basic

  • To restore factory default configuration on a dual management module system:

    If the system configuration ever becomes corrupted it is suggested to restore the factory default configuration.

    1. Connect to a remote console/serial connection.

    2. Remove the slave management module.

    3. Run "reset factory":

      Copy
      Copied!
                  

      switch (config) # reset factory keep-basic

      Please wait for reboot to complete before moving to the next step.

    4. Log in as “admin” and start running the Configuration Wizard.

    5. Insert the slave management module.

    6. Remove the master management module.

      Note

      A takeover will occur changing the Slave management module role to Master.

    7. Repeat Step 3 on the new Master management module.

    8. Insert the other management module. No takeover will occur at this stage.

    9. Power cycle the system.

There are two types of configuration files that can be applied on the BIN files (binary) and text-based configuration files.

BIN Configuration Files

BIN configuration files are not human readable. Additionally, these files are encrypted and contain integrity verification preventing them from being edited and used.

  • To create a new BIN configuration file, do the following:

    Copy
    Copied!
                

    switch (config) # configuration new my-filename

    Note

    A newly created BIN configuration file is always empty and is not created from the running-config.

  • To upload a BIN configuration file to an external file server, do the following:

    Copy
    Copied!
                

    switch (config) # configuration upload my-filename scp://myusername@my-server/path/to/my/<file>

  • To fetch a BIN configuration file, do the following:

    Copy
    Copied!
                

    switch (config) # configuration fetch scp://myusername@my-server/path/to/my/<file>

  • To see the available configuration files, do the following:

    Copy
    Copied!
                

    switch (config) # show configuration files initial (active) my-filename   Active configuration: initial Unsaved changes: no switch (config) #

  • To load a BIN configuration file, do the following:

    Copy
    Copied!
                

    switch (config) # configuration switch-to my-filename This requires a reboot. Type 'yes' to confirm: yes

Note

A binary configuration file uploaded from the switch is encrypted and has integrity verification. If the file is modified in any manner, the fetch to the switch fails.

Text Configuration Files

Text configuration files are text-based and editable. It is similar in form to the output of the command “show running-config expanded”.

  • To create a new text-based configuration file, do the following:

    Copy
    Copied!
                

    switch (config) # configuration text generate active running save my-filename

    Note

    A newly created text configuration file is always created from the running-config.

  • To apply a text-based configuration file, do the following:

    Copy
    Copied!
                

    switch (config) # configuration text file my-filename apply

    Copy
    Copied!
                

    switch (config) # configuration text generate active running save my-filename

    Note

    Applying a text-based configuration file to an existing/running data port configuration may result in unpredictable behavior. It is therefore suggested to first clear the configuration by applying a specific configuration file (following the procedure in "BIN Configuration File") or by resetting the switch back to factory default.

  • To upload a text-based configuration file to an external file server, do the following:

    Copy
    Copied!
                

    switch (config) # configuration text file my-filename upload scp://root@my-server/root/tmp/my-filename

  • To fetch a text-based configuration file from an external file server to a
    switch, do the following:

    Copy
    Copied!
                

    switch (config) # configuration text fetch scp://root@my-server/root/tmp/my-filename

  • To apply a text-based configuration file, do the following:

    Copy
    Copied!
                

    switch (config) # configuration text file my-filename apply

    Note

    When applying a text-based configuration file, the configuration is appended to the existing configuration. Only new or changed configuration is added. Reboot is not required.

Automated Backup

Automated configuration file backup feature can be used to upload the active configuration file on every “configuration write".

  • To set the remote URL to upload the configuration file to, run the following:

    Copy
    Copied!
                

    switch (config) # configuration auto-upload remote-url “scp://root:password@my-server/path/to/upload/to”

  • To check the remote URL set, run the following:

    Copy
    Copied!
                

    switch (config) # show configuration auto-upload Auto-upload settings: Enabled: yes Remote url: scp://root@my-server/path/to/upload/to Password : ******

  • To save the configuration, run the following:

    Copy
    Copied!
                

    switch (config)# configuration write

    This will upload the active configuration file on every “configuration write."

  • To remove the remote URL, run the following:

    Copy
    Copied!
                

    switch (config)# no configuration auto-upload remote-url

    This will disable the feature. It will not upload the active configuration file after each “configuration write."

Automated Periodic Backup

Scheduled jobs can be used to perform automated periodic backup.

To upload the active configuration file periodically, follow these steps.

  1. Create a job.

    Copy
    Copied!
                

    switch (config) # job 1

  2. Add the upload command to the job.

    Copy
    Copied!
                

    switch (config) # job 1 command 1 "configuration upload timestamp active scp://root:password@my-server/path/to/upload/to"

  3. Schedule this job to run periodically, and specify the period.

    Copy
    Copied!
                

    switch (config) # job 1 schedule periodic interval 18h0m0s

  4. Enable the job.

    Copy
    Copied!
                

    switch (config) # job 1 enable

© Copyright 2024, NVIDIA. Last updated on May 30, 2024.