Switch Command Line Interface

Description

The SonicWall Switch Command Line Interface (CLI) provides a concise and powerful way to configure SonicWall Switches without using the web-based management user interface.

You can use the CLI commands individually on the command line, or in scripts for automating configuration tasks.

This document contains an introduction to key conventions/keyboard shortcuts and the different CLI command modes, and a categorized list of the CLI commands for the Switch. Each command is described with the command objective, syntax, parameter descriptions and the command mode.

The following table format lists the different CLI command modes. Depending on the CLI mode, the prompt will be specific.

COMMAND MODEACCESS METHODPROMPT
Privileged EXECThis is the initial mode to start a session<Switch Name>#
Global ConfigurationThe EXEC mode command configure terminal is used to enter the Global Configuration mode.<Switch Name> (config)#
Interface ConfigurationThe Global Configuration mode command interface <interfacetype><interfaceid> is used to enter the Interface configuration mode.<Switch Name> (config-if)#
Interface Range Mode

The Global Configuration mode command interface range

({ <interfacetype><slot/port- port>} {vlan <vlan-id(1- 4094)>- <vlan-id(2-4094)>}) is used to enter the Interface range mode.

<Switch Name> (config-if-range)#
SNTP ConfigurationThe SNTP Configuration mode command sntp is used to enter the SNTP configuration mode.<Switch Name> (config-sntp)#
Config-VLAN

The Global configuration mode

command vlan vlan-id is used to enter the Config-VLAN mode.

<Switch Name> (config-vlan)#
Line ConfigurationThe Line Configuration mode command line cli is used to enter the Line configuration mode.<Switch Name> (config-line)#
IPV4 ACL Extended Access List ConfigurationThe IPV4 ACL Extended Access List configuration mode command ip access-list extended <name> is used to enter the IPV4 ACL Extended Access List configuration mode.<Switch Name> (config-ext-nacl)#
MAC ACL Extended Access List ConfigurationThe MAC ACL Extended Access List configuration mode command mac access-list extended <name> is used to enter the MAC ACL Extended Access List configuration mode.<Switch Name> (config-ext-macl)#
Policy Map Configuration ModeThe Policy Map configuration mode command class-policy <name> is used to enter the Policy Map configuration mode.<Switch Name> (config-qc-ply)#
MSTP Configuration ModeThe MSTP Configuration mode command spanning-tree mst configuration is used to enter the MSTP configuration mode.<Switch Name> (config-mst)#

Related Articles

  • Sonicwall Switch: Auto-Discovery through CLI
    Read More
  • Supported SonicWall and 3rd party SFP and SFP+ Modules that can be used with SonicWall Switches
    Read More
  • Configuring storm control on SonicWall Switch
    Read More
not finding your answers?