Tip

This is the documentation for the 19.02 version. Looking for the documentation of the latest version? Have a look here.

Configuration Mode

After starting the TNSR CLI, the administrator is in basic mode and not configuration mode. To enter configuration mode, enter the configure command. This command may be abbreviated to config and it is also acceptable to write terminal after, as a convenience for administrators familiar with IOS who type it out of habit.

All of the following commands are equivalent:

tnsr# configure
tnsr# configure terminal
tnsr# config
tnsr# conf t

After entering any one of the above commands, the prompt changes to reflect the new configuration mode:

tnsr# configure terminal
tnsr(config)#

After entering other configuration commands, the new configuration is stored in the candidate database. A candidate database may be committed either when all of the required information is present, or when exiting the current context. Some commands are committed immediately.

Enter the exit command until the prompt returns to basic mode. At that point, if no errors have been encountered by TNSR, all changes will have been committed to the running database:

tnsr(config-interface)# exit
tnsr(config)# exit
tnsr#

Items are removed or negated using no, for example, to remove an interface description:

tnsr(config)# interface GigabitEthernet0/14/1
tnsr(config-interface)# no description

Troubleshooting

If a change to the candidate database fails a validation check or application of the change to the system fails for some reason, it is discarded automatically by default. TNSR resets the candidate database to the current contents of the running database to avoid further attempts to apply the faulty configuration contained in the candidate database.

This automatic behavior can be changed, however, in cases where power users want more control to troubleshoot failed configuration transactions:

tnsr# configure
tnsr(config)# no cli option auto-discard

When auto-discard is disabled, if a configuration commit fails the candidate database retains the faulty configuration data. Further configuration commands may apply additional changes to the candidate database. However, until the configuration data which caused the failure is removed or set to a value which can be successfully applied, no further commit will succeed.

Disabling the auto-discard feature only persists for the duration of the current CLI session in which it was disabled. At the start of a new CLI session, auto-discard will again be enabled by default.

A faulty candidate can be viewed with the show configuration candidate command, as described in Configuration Database

There are three approaches to rectify this situation:

  • Issue alternate commands that directly correct the faulty configuration.

  • Abandon the attempted configuration:

    tnsr# configure
    tnsr(config)# configuration candidate discard
    
  • Removed the fault from the candidate configuration by reverting to the running configuration:

    tnsr# configure
    tnsr(config)# configuration copy running candidate
    tnsr(config)# configuration candidate commit