Specifying a Switch or Fabric for Command Scope
In NetVisor Unified Cloud Fabric, a switch is designed as the building block of a fabric and the goal of NetVisor OS design is to manage the fabric of switches as a single switch. Due to this capability, you can run the CLI commands on a local switch, a cluster of switches, other switches in the fabric, or the entire fabric. You do not have to login to each switch to run the commands because all the switches are part of the same fabric. By default, you can run the commands on the switch that you had logged-in.
For example, to disable a port (port 5) on the switch that you had logged in (switch-1), use the command,
CLI(network-admin@Switch-1) > port-config-modify port 5 disable
To specify a different switch for a single command, use the switch prefix. For example, use switch pn-switch-2 port-config-modify port 5 enable to enables port 5 on pn-switch-2, even if the CLI is connected to a different switch in the fabric:
CLI(network-admin@Switch-1) > switch pn-switch-2 port-config-modify port 5 enable
To specify a different switch for a series of commands, use the switch prefix with no command. For example,
CLI(network-admin@Switch-1) > switch pn-switch-2 <return>
The CLI prompt changes to indicate that pn-switch-2 is the switch you are executing commands. You can run other commands on pn-switch-2 even though the switch that you are physically connected to is switch-1.
For most CLI show commands, the command displays results from all switches in the fabric by default. For example, when the CLI command port-show is entered on the switch, it shows the ports of all switches in the fabric.
To specify that a CLI show command should apply to a specific switch, use the switch prefix to the CLI command. For example, to view the show output of the port-show command of the switch named pn-switch-1, type the command:
CLI(network-admin@Switch-1) > switch pn-switch-1 port-show
switch port bezel-port status
----------- ---- ---------- --------------------
pn-switch-1 9 3 phy-up,host-disabled
pn-switch-1 10 3.2 phy-up,host-disabled