Operational mode

When connecting to the CLI, it starts in operational mode, identified by the following prompt:

vsr>

In this mode, the user can:

  • display the help of a command (ex: help edit)

  • retrieve the state of the device (ex: show state)

  • retrieve the running configuration of the device (ex: show config)

  • switch to the edition mode (ex: edit running)

  • update the startup configuration of the device (copy running startup)

  • send commands (ex: cmd reboot)

Show configuration

The show config command is used to display the configuration. In operational mode, it shows the running configuration by default.

The syntax of the command is: show config [running|startup|(file <file>)] [text|xml|json] [all|nodefault] [relative|absolute] [fullpath|nopath] [show-passwords|hide-passwords] [<path...>]

The default output format is text:

vsr> show config /
config
    vrf main
        ssh-server
            enabled true
            port 22
            ..
        ..
    ..

The output format can be customized. See the Edition Mode section for details.

Show state

The show state command is used to display the current state of the device. The arguments and the output of the command are similar to the show config command.

The syntax of the command is show state [text|xml|json] [all|nodefault] [relative|absolute|fullpath] [show-passwords|hide-passwords] [<path...>].

Example of use:

vsr> show state network-port
network-port pci-b0s4
    bus-addr 0000:00:04.0
    vendor "Red Hat, Inc."
    model "Virtio network device"
    mac-address 52:54:00:12:34:57
    interface eth0
    ..
network-port pci-b0s3
    bus-addr 0000:00:03.0
    vendor "Red Hat, Inc."
    model "Virtio network device"
    mac-address de:ad:de:01:02:03
    interface eth1
    ..
network-port pci-b0s2
    bus-addr 0000:00:02.0
    vendor "Red Hat, Inc."
    model "Virtio network device"
    mac-address 52:54:00:12:34:56
    interface eth2
    ..

Diff configurations

The diff command shows the differences between two configurations. The syntax is the same as in edition mode, except that the configurations to be diffed must always be specified.

See the Edition Mode section for details.