Switch CLI Reference Guide

System Commands

help
Command Objective This command displays a brief description for the given command.
Syntax help [command]
Mode All Modes
Clear screen
Command Objective This command clears all the contents from the screen.
Syntax clear screen
Mode All Modes
end
Command Objective Exit from Configure mode.
Syntax end
Mode All Modes
logout
Command Objective This command exits from Privileged EXEC/ User EXEC mode to ISS Login Prompt in case of console session. In case of a telnet session, this command terminates the session.
Syntax logout
Mode Privileged EXEC Mode
show privilege
Command Objective Show current privilege level.
Syntax show privilege
Mode Privileged EXEC Mode
show cli
Command Objective This command displays TTY line information such as EXEC timeout.
Syntax show cli
Mode Privileged EXEC Mode
exit
Command Objective This command exits the current mode and reverts to the mode used prior to the current mode.
Syntax exit
Mode All Modes
configure terminal
Command Objective This command enters to Global Configuration Mode which allows the user to execute all the commands that supports global configuration mode.
Syntax configure terminal
Mode Privileged EXEC Mode
listuser
Command Objective This command lists all the default and newly created users, along with their permissible mode.
Syntax listuser
Mode Privileged EXEC Mode
show users
Command Objective This command displays the information about the current user.
Syntax show users
Mode Privileged EXEC Mode
lock
Command Objective This command locks the CLI console. It allows the user/system administrator to lock the console to prevent unauthorized users from gaining access to the CLI command shell. Enter the login password to release the console lock and access the CLI command shell.
Syntax lock
Mode Privileged EXEC Mode
show history
Command Objective This command displays a list of recently executed commands.
Syntax show history
Mode Privileged EXEC Mode
username
Command Objective

This command creates a user and sets the enable password for that user with the privilege level.

The no form of the command deletes a user and disables the enable password for that user.

Syntax

username <user-name> [password <passwd>] [privilege <1-15>]

no username < user-name >

Parameter Description

<user-name> - Specifies the login user name to be created.

<passwd> - Specifies the password to be entered by the user to login to the system. The size password entered must be a minimum of 4 and maximum of 32 characters containing atleast one uppercase, one lowercase, one number and one special character.

privilege <1-15> - Applies restriction to the user for accessing the CLI commands. This values ranges between 1 and 15. For Example, a user ID configured with privilege level as four can access only the commands having privilege ID lesser than or equal to four.

Mode Global Configuration Mode
line cli
Command Objective

This command identifies a specific line for configuration and enters the line configuration mode and allows the user to execute all the commands that supports line configuration mode.

This command won't work when accessing the Switch console via ssh.

This command will work only when accessing the Switch console via Switch console port.

Syntax line cli
Mode Global Configuration Mode
exec-timeout
Command Objective

This command sets a time (in seconds) for EXEC line disconnection. This value ranges between 1 and 10000 minutes.

The no form of this command resets the EXEC timeout to its default value.

Syntax

exec-timeout <integer (1-10000)>

no exec-timeout

Mode Line Configuration Mode
ping
Command Objective

This command sends echo messages. The Ping module is built based on the ICMP echo request and ICMP echo response messages. The network administrator uses this ping on a remote device to verify its presence. Ping involves sending ICMP echo messages repeated and measuring the time between transmission and reception of message. The output displays the time taken for each packet to be transmitted, number of packets transmitted, number of packets received and packet loss percentage.

Syntax ping [ ip ] {IpAddress | hostname } [{repeat|count} packet_count (1-10)] [size packet_size (8-5120)] [timeout time_out (1-100)]
Parameter Description
  • ip - Configures the IP address of the node to be pinged.

  • ip_addr - Configures the source IP address of the node to be pinged.

  • string - Configures the name of the host.

  • repeat | count - Configures the number of times the given node address is to be pinged.

  • size - Configures the size of the data portion of the PING PDU.

Mode Privileged EXEC Mode
traceroute
Command Objective

This command traces route to the destination.

Syntax traceroute {<ip_addr>|<string>} [max-ttl <short (2-255)>]
Parameter Description
  • <ip_addr> - Configure the destination IP address to which a route has to be traced.

  • <string> - Configure the destination IP hostname to which a route has to be traced.

  • [max-ttl <short (2-255)>] - Configures the maximum value of the TTL field to be filled up in the IP packets used for the trace route.

Mode Privileged EXEC Mode
clear counters
Command Objective

This command clears all the current interface counters from the interface unless the optional arguments type and number are

specified to clear only a specific interface type (serial, Ethernet, Token Ring, and so on).

Syntax clear counters [ <interface-type> <interface-id> ]
Parameter Description
  • <interface-type> - Configures the specified type of interface.

  • <interface-id> - Configures the IP interface configuration for the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash. For Example: 0/1 represents that the slot number is 0 and port number is 1.

Mode Privileged EXEC Mode
jumbo-frame
Command Objective

This command configures the maximum transmission unit frame size for all the frames transmitted and received on all the interfaces in a Switch. The size of the jumbo frame size can be increased using this command. The value ranges between 1522 and 10240. The no form of this command sets the maximum transmission unit to the default value in all interfaces. This value defines the largest PDU that can be passed by the interface without any need for fragmentation. This value is shown to the higher interface sub-layer and should not include size of the encapsulation or header added by the interface.

Syntax jumbo-frame <frame-size(1522-10240)>
Mode Global Configuration Mode
interface range
Command Objective

This command selects the range of physical interfaces and VLAN interfaces to be configured.

The no form of the command selects the range of VLAN interfaces to be removed.

Syntax

interface range ( { <interface-type> <slot/port-port>} {vlan <vlan-id(1-4094)> - <vlan-id(2-4094)>})

no interface range vlan <vlan-id(1-4094)> - <vlan-id(2-4094)>

Parameter Description
  • <interface-type> - Selects the range of the specified interface.

  • <slot/port-port> - Selects the range of the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash.

  • vlan <vlan-id(1-4094)> - <vlan-id(2-4094)> - Selects the range of the specified VLAN ID. This is a unique value that represents the specific VLAN created and activated. This value ranges between 1 and 4094.

Mode Global Configuration Mode
configure terminal
Command Objective

This command enters the configuration mode. Configuration from memory or network is not supported when entered into the configuration mode using this command.

Syntax configure terminal
Mode Privileged EXEC Mode
mac-address-table static unicast
Command Objective

This command configures a static unicast MAC address in the forwarding database.

The no form of the command deletes a configured static Unicast MAC address from the forwarding database.

Syntax

mac-address-table static unicast <aa:aa:aa:aa:aa:aa> vlan

<vlan-id > interface ([<interface-type> <0/a-b, 0/c, ...>] [<interface-type> <0/a-b, 0/c, ...>] [port-channel <a,b,c-d>])

no mac-address-table static unicast <aa:aa:aa:aa:aa:aa> vlan

<vlan-id >

Parameter Description
  • <aa:aa:aa:aa:aa:aa> - Configures the static unicast destination MAC address. The received packets having the specified MAC address are processed.

  • vlan <vlan-id> - Configures the static unicast destination MAC address for the specified VLAN. This value ranges between 1 and 4094.

    • <vlan –id> - VLAN ID is a unique value that represents the specific VLAN. This value ranges between 1 and 4094

  • interface - Configures the member ports interface type and ID. The details to be provided are:

    • <interface-type> - Configures the member ports for the specified type of interface. The interface can be:

      • gigabitethernet - A version of LAN standard architecture that supports data transfer up to 1 Gigabit per second.

      • port-channel - Logical interface that represents an aggregator which contains several ports aggregated together.

    • <0/a-b, 0/c, ...> - Configures the member ports for the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash. Port-channel ID is provided, for interface type port-channel. Use comma as a separator without space while configuring list of interfaces. Example: 0/1, 0/3 or 1, 3.

Mode Global Configuration Mode
mac-address-table aging-time
Command Objective

This command configures the timeout period (in seconds) for aging out dynamically learned forwarding information entry and static entry in the MAC address table. That is, the entry is deleted once the aging timer expires. High value for the aging time helps to record dynamic entries for a longer time, if traffic is not frequent. This reduces the possibility of flooding.

The no form of the command resets the maximum age of an entry in the MAC address table to its default value.

Syntax

mac-address-table aging-time <10-630 seconds>

no mac-address-table aging-time

Mode Global Configuration Mode/ Switch Configuration Mode
set switch-name
Command Objective

This command sets the name of the Switch.

Syntax

set switch-name <switchname>

Mode Global Configuration Mode
ip telnet server
Command Objective

This command enables the telnet service in the system. The no form of this command disables the telnet service.

Syntax

ip telnet server

no ip telnet server

Mode Global Configuration Mode
copy startup-config
Command Objective

This command copies a file from a source remote site /flash to a destination remote site/flash. The entire copying process takes several minutes and differs from protocol to protocol and from network to network.

Syntax

copy startup-config { tftp://ip-address/filename }

Parameter Description
  • tftp://ip-address/filename - Configures the TFTP details for taking back up of initial configuration in TFTP server.

    • ip-address - The IP address or host name of the server.

    • filename - The name of the file in which the initial configuration should be stored. Filenames and directory names are case sensitive

Mode Privileged EXEC Mode
copy
Command Objective

This command copies the configuration from a remote site to flash.

Syntax

copy { tftp://ip-address/filename startup-config}

Parameter Description
  • tftp://ip-address/filename startup-config - Configures the address from which the file is to be copied and the file name from which configuration is to be copied. This option configures the TFTP server details Filenames and directory names are case sensitive

Mode Privileged EXEC Mode
save
Command Objective

This command copies variables from the running configuration to the startup configuration file in NVRAM, where the running- config is the current configuration in the router and the startup config is the configuration that is loaded when the Switch boots up.

Syntax

save

Mode Privileged EXEC Mode
copy logs
Command Objective

This command writes the system logs to a remote site.

Syntax

copy logs { tftp://ip-address/filename }

Parameter Description
  • tftp://ip-address/filename startup-config - Configures the address from which the file is to be copied and the file name from which configuration is to be copied. This option configures the TFTP server details Filenames and directory names are case sensitive

Mode Privileged EXEC Mode
clock set
Command Objective

This command manages the system clock.

Syntax
  • clock set hh:mm:ss <day (1-31)>
  • {january|february|march|april|may|june|july|august|septemb er|october|november|december} <year (2000 - 2035)>

Parameter Description
  • hh:mm:ss - Sets the current time. The format is hour, minutes and seconds.

    • <day (1-31)> - Sets the current day. It ranges between 1 and 31.

    • january - Sets the month as January.

    • february - Sets the month as February

    • march - Sets the month as march

    • april - Sets the month as april

    • may - Sets the month as may

    • june - Sets the month as June

    • july - Sets the month as July

    • august - Sets the month as August

    • september - Sets the month as September

    • october - Sets the month as October

    • november - Sets the month as November

    • december - Sets the month as December

    • <year (2000 - 2035)> - Sets the year. It ranges between 2000 and 2035

Mode Global Configuration Mode
show clock
Command Objective

This command displays the system date and time.

Syntax

show clock

Mode Privileged EXEC Mode
show jumbo-frame
Command Objective

This command displays the maximum transmission unit frame size for all the frames transmitted and received on all the interfaces in a Switch.

Syntax

show jumbo-frame

Mode Privileged EXEC Mode
reboot
Command Objective

This command restarts the Switch.

Syntax

reboot

Mode Privileged EXEC Mode
restore-defaults
Command Objective

This command restore default configuration.

Syntax

restore-defaults

Mode Privileged EXEC Mode
show telnet server
Command Objective

This command displays the telnet server status.

Syntax

show telnet server

Mode Privileged EXEC Mode
port speed - duplex
Command Objective

This command configures the speed and duplex operation.

Syntax
  • speed { 10 | 100 | 1000 | 10000 } duplex { full | half }
Parameter Description
  • 10 - Port runs at 10Mbps

  • 100 - Port runs at 100Mbps

  • 1000 - Port runs at 1000Mbps

  • 10000 - Port runs at 10000Mbps

  • full - Port is in full-duplex mode, that is data simultaneously communicates in both directions.

  • half - Port is in half-duplex mode, that is data can communicate in both directions, but only in one direction at a time.

Mode Interface Configuration
negotiation
Command Objective

This command enables auto-negotiation on the interface.

The no form of the command disables auto-negotiation on the interface.

The port in which auto-negotiation is enabled, negotiates with the other end for port properties like speed, duplexity and so one. The normal port uses the port property values configured by the administrator.

Syntax

negotiation

no negotiation

Mode Interface Configuration
port-isolation
Command Objective

This command set the status of the traffic to be allowed in these configured egress ports when the ingress is this interface.

Syntax

port-isolation {enable|disable}

Parameter Description
  • enabled - Enables the Port Isolation rule in this ingress interface.
  • disabled - Disables the Port Isolation rule in this ingress interface.
Mode Interface Configuration
show port-isolation status
Command Objective

This command displays the Port Isolation table.

Syntax

show port-isolation status

Mode Privileged EXEC Mode
clock utc-offset
Command Objective

This command sets the system time zone with respect to UTC.

The no form of command resets the system time zone to GMT.

Syntax

clock utc-offset <UTC-offset value as (+HH:MM /-HH:MM)(+00:00 to +14:00)/ (-00:00 to -12:00)> Eg: +05:30

Parameter Description
  • +/- - Sets the client time zone as after or before UTC. Plus indicates forward time zone and minus indicates backward time zone.

  • UTC- offset value as - Sets the UTC offset value in hours.

    • +00:00 to +14:00

    • -00:00 to -12:00

Mode Global Configuration Mode
show clock properties
Command Objective

This command displays the PTP clock properties.

Syntax

show clock properties

Mode Privileged EXEC Mode
interface
Command Objective

This command allows to configure interface such as VLAN.

Syntax

interface {vlan < vlan-id > [switch <string(32)>] | port-channel <integer (1-8)> | <iftype> <ifnum>} no interface {vlan < vlan-id > [switch <string(32)>] | port- channel <integer (1-8)> | <iftype> <ifnum>}

Parameter Description
  • vlan <vlan-id> - VLAN ID is a unique value that represents the specific VLAN. This value ranges between 1 and 4094.

  • switch<switch-name> - Configures interface for the specified context. This value represents unique name of the Switch context. This value is a string whose maximum size is 32. This parameter is specific to multiple instance feature. This feature has been included to adhere to the Industry Standard CLI syntax.

  • port-channel<port-channel-id (1-8)> - Configures the port to be used by the host to configure the router. This value ranges between 1 and 8. The port channel identifier can be created or port channel related configuration can done, only if the LA feature is enabled in the Switch.

  • <interface-type> - Configures the specified type of interface

    • gigabitethernet - A version of LAN standard architecture that supports data transfer upto 1 Gigabit per second.

    • port-channel - Logical interface that represents an aggregator which contains several ports aggregated together.

Mode Global Configuration Mode
ip address
Command Objective

This command sets the IP address for an interface.

Syntax

ip address <ucast_addr> <ip_mask>

no ip address <ucast_addr>

Parameter Description
  • ucast_addr - Sets the IP address for an interface. If the network in which the Switch is implemented contains a server such as DHCP server, dynamically allocating IP address, the configured IP address should not be within the range of the addresses that will be allocated by the server to the other Switches. This precaution avoids creation of IP address conflicts between the Switches.

  • ip_mask - Sets the subnet mask for the configured IP address. The configured subnet mask should be in the same subnet of the network in which the Switch is placed.

Mode

Interface Configuration Mode

This command is applicable in VLAN Interface Mode / OOB Interface Mode.

ip address dhcp/bootp
Command Objective

This command sets the DHCP/BOOTP IP address for an interface.

Syntax

ip address dhcp

no ip address

Parameter Description
  • dhcp - Get IP by using DHCP protocol.

  • bootp - Get IP by using BOOTP protocol.

Mode Interface Configuration Mode
shutdown
Command Objective

Set the AdminStatus of Interface down/up.

Syntax

shutdown

no shutdown

Mode Interface Configuration Mode
description
Command Objective

Descriptions about the interface.

Syntax

description <description of this interface>

no description

Mode Interface Configuration Mode
show interface port-security
Command Objective

This command shows the maximum number of learning address and lock mode.

Syntax

show interface port-security [<iftype> <ifnum>]

Parameter Description
  • <interface-type> - Displays the IP interface configuration for the specified type of interface. The interface can be:

    • gigabitethernet - A version of LAN standard architecture that supports data transfer upto 1 Gigabit per second.

Mode

Privileged EXEC Mode

show interface cable-diag
Command Objective

Used to diagnose the copper cable. If there is an error on the cable, it can determine the type of error and the position where the error occurred.

Syntax

show interface cable-diag Gigabitethernet [<iftype> <ifnum>]

Parameter Description
  • OK - This pair has been connected to partner network device and the link is up.

  • OPEN - This pair is left open.

  • SHORT - This pair has been shorted between two lines of its own.

  • Unknown - The last diagnosis do not obtain the cable’ status, please try it again.

Mode Privileged EXEC Mode
show interfaces
Command Objective

This command displays the interface status and configuration.

Syntax

show interfaces [{ [<interface-type> <interface-id>]

[{ description | storm-control | flowcontrol | capabilities | status | port-security-state | rate-limit }]| {vlan <vlan-id> [{switch <switch-name>}]}

Parameter Description
  • <interface-type> - Displays the interface status and configuration for the specified type of interface. The interface can be:

    • gigabitethernet - A version of LAN standard architecture that supports data transfer upto 1 Gigabit per second.

    • port-channel - Logical interface that represents an aggregator which contains several ports aggregated together.

  • <interface-id> - Displays the interface status and configuration for the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash. For Example: 0/1 represents that the slot number is 0 and port number is 1.

  • Description - Displays the interface description.

  • storm-control - Displays the broadcast, multicast, and unicast storm suppression levels for the specified interface

  • flowcontrol - Displays the flow control related statistics information for the specified interface.

  • capabilities - Displays the interface type, interface speed, duplex operation and flowcontrol status for the specified interface.

  • status - Displays the status, duplex details, speed and negotiation mode of the specified interface.

  • port-security-state - Displays the state of the port security option.

  • vlan <vlan-id> - VLAN ID is a unique value that represents the specific VLAN. This value ranges between 1 and 4094.

  • switch<switch-name> - Configures interface for the specified context. This value represents unique name of the Switch context. This value is a string whose maximum size is 32. This parameter is specific to multiple instance feature. This feature has been included to adhere to the Industry Standard CLI syntax.

Mode

Privileged EXEC Mode

show interfaces - counters
Command Objective

This command displays the interface statistics for each port.

Syntax

show interfaces {counters | { <interface-type> <interface-id> counters }}

Parameter Description
  • counters - Displays the interface statistics for all the available interfaces.

  • <interface-type> - Displays the IP interface configuration for the specified type of interface. The interface can be:

    • gigabitethernet - A version of LAN standard architecture that supports data transfer upto 1 Gigabit per second.

  • <interface-id> - Displays the IP interface configuration for the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash. For Example: 0/1 represents that the slot number is 0 and port number is 1.

Mode Privileged EXEC Mode
clear interfaces - counters
Command Objective

This command clears all the current interface counters from the interface unless the optional arguments type and number are specified to clear only a specific interface type (serial, Ethernet, Token Ring, and so on).

Syntax

clear interfaces [ <interface-type> <interface-id> ] counters

Parameter Description
  • <interface-type> - Configures the specified type of interface.

    • gigabitethernet - A version of LAN standard architecture that supports data transfer upto 1 Gigabit per second.

  • <interface-id> - Displays the IP interface configuration for the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash.

    For Example: 0/1 represents that the slot number is 0 and port number is 1.

Mode Privileged EXEC Mode
show ip interface
Command Objective

This command displays the IP interface configuration.

Syntax

show ip interface [{[Vlan <vlan-id(1-4094)> | [<interface- type><interface-id>]

Parameter Description
  • Vlan<vlan-id(1-4094)> - Displays the IP interface configuration for the

  • The specified VLAN ID is a unique value that represents the specific VLAN created. This value ranges between 1 and 4094.

  • <interface-type> - Displays the IP interface configuration for the specified type of interface. The interface can be:

    • gigabitethernet - A version of LAN standard architecture that supports data transfer upto 1 Gigabit per second.

  • <interface-id> - Displays the IP interface configuration for the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash. For Example: 0/1 represents that the slot number is 0 and port number is 1.

Mode Privileged EXEC Mode
show flow-control
Command Objective

This command displays the flow-control information.

Syntax

show flow-control [ interface <interface-type> <interface-id>]

Parameter Description
  • <interface-type> - Displays the flow-control information for the specified type of interface. The interface can be:

    • gigabitethernet - A version of LAN standard architecture that supports data transfer upto 1 Gigabit per second.

  • <interface-id> - Displays the flow-control information for the specified interface identifier. This is a unique value that represents the specific interface. This value is a combination of slot number and port number separated by a slash. For Example: 0/1 represents that the slot number is 0 and port number is 1.

Mode Privileged EXEC Mode
snmp trap link-status
Command Objective

This command enables/disable trap generation on the interface. The interface generates a linkUp or linkDown trap. The linkUp trap denotes that the communication link is available and ready for traffic flow. The linkDown trap denotes that the communication link failed and is not ready for traffic flow.

Syntax

snmp trap link-status

no snmp trap link-status

Mode Interface Configuration Mode
flowcontrol
Command Objective

This command is used to set the send or receive flow-control value for an interface.

Syntax

flowcontrol { on | off }

Parameter Description
  • on - If used with receive allows an interface to operate with the attached device to send flow control packets. If used with send the interface sends flowcontrol packets to a remote device if the device supports it

  • off - Turns-off the attached devices (when used with receive) or the local ports (when used with send) ability to send flow-control packets to an interface or to a remote device respectively.

Mode Interface Configuration Mode
port-security
Command Objective

This command configures the number of learning address on certain interface port.

Syntax

port-security <limit-size(1-256)>

no port-security

Parameter Description
  • < limit-size(1-256)> - Range is 1 to 256.

Mode Interface Configuration Mode

Was This Article Helpful?

Help us to improve our support portal

Techdocs Article Helpful form

  • Hidden
  • Hidden

Techdocs Article NOT Helpful form

  • Still can't find what you're looking for? Try our knowledge base or ask our community for more help.
  • Hidden
  • Hidden