0% found this document useful (0 votes)
69 views101 pages

Smart Switches CLI Manual EN

This document provides a reference manual for the CLI (command line interface) of NETGEAR smart switches. It includes sections on how to use the CLI with descriptions of command syntax, modes, and common commands. The manual also covers system commands for management and network configuration.

Uploaded by

Eric Leitch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
69 views101 pages

Smart Switches CLI Manual EN

This document provides a reference manual for the CLI (command line interface) of NETGEAR smart switches. It includes sections on how to use the CLI with descriptions of command syntax, modes, and common commands. The manual also covers system commands for management and network configuration.

Uploaded by

Eric Leitch
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 101

Lite CLI Reference Manual

Smart Switches with Optional


Remote/Cloud Management
GS108Tv3 and GS110TPv3
GS308T and GS310TP
GS724TPv2 and GS724TPP
GS724TPv3 and GS724TPPv3
GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
GS728TPv3, GS728TPPv3, GS752TPv3, and GS752TPPv3
MS108TUP
MS324TXUP
MS510TXM and MS510TXUP
XS508TM and XS516TM

NETGEAR, Inc.
December 2023 350 E. Plumeria Drive
202-12723-01 San Jose, CA 95134, USA
Smart Switches with Optional Remote/Cloud Management

Support and Community


Visit netgear.com/support to get your questions answered and access the latest downloads.
You can also check out our NETGEAR Community for helpful advice at community.netgear.com.

Regulatory and Legal


Si ce produit est vendu au Canada, vous pouvez accéder à ce document en français canadien à
https://www.netgear.com/support/download/.
(If this product is sold in Canada, you can access this document in Canadian French at
https://www.netgear.com/support/download/.)
For regulatory compliance information including the EU Declaration of Conformity, visit
https://www.netgear.com/about/regulatory/.
See the regulatory compliance document before connecting the power supply.
For NETGEAR’s Privacy Policy, visit https://www.netgear.com/about/privacy-policy.
By using this device, you are agreeing to NETGEAR’s Terms and Conditions at
https://www.netgear.com/about/terms-and-conditions. If you do not agree, return the device to your place of
purchase within your return period.
Do not use this device outdoors. The PoE source is intended for intra building connection only.
Applicable to 6 GHz devices only: Only use the device indoors. The operation of 6 GHz devices is prohibited on
oil platforms, cars, trains, boats, and aircraft, except that operation of this device is permitted in large aircraft while
flying above 10,000 feet. Operation of transmitters in the 5.925-7.125 GHz band is prohibited for control of or
communications with unmanned aircraft systems.

Trademarks
© NETGEAR, Inc., NETGEAR, and the NETGEAR Logo are trademarks of NETGEAR, Inc. Any
non-NETGEAR trademarks are used for reference purposes only.

Revision History

Publication Publish Date Comments


Part Number
202-12723-01 December 2023 Added support for switch models XS508TM and XS516TM
202-12695-01 October 2023 Added support for switch model GS108TUP
202-12694-01 August 2023 Added support for switch model MS324TXUP
202-12657-01 February 2023 Added support for the following switch models:
• GS724TPv3 and GS724TPPv3
• GS728TPv3, GS728TPPv3, GS752TPv3, and GS752TPPv3
202-12599-01 February 2022 Added support for the following switch models and modified
existing commands as needed:
• GS108Tv3 and GS110TPv3
• GS308T and GS310TP
• GS724TPv2 and GS724TPP
• MS510TXM and MS510TXUP
Added the following commands:
• interface (for Multi-Gigabit switches)
• speed (for Multi-Gigabit switches)
• 10g-media

Table of Contents 2 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

• voice-vlan oui
• voip act
202-12580-01 December 2021 Initial publication with support for the GS728TPv2,
GS728TPPv2, GS752TPv2, and GS752TPP switch models.

Table of Contents 3 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Table of Contents
Table of Contents .................................................................................................. 4

How to Use the CLI ................................................................................................ 8


Command syntax ................................................................................................................ 8
Command conventions ...................................................................................................... 8
‘no’ form of a command ..................................................................................................... 9
‘show’ commands ................................................................................................................ 9
Access the CLI...................................................................................................................... 9
Command completion and abbreviation ...................................................................... 10
CLI line-editing conventions ............................................................................................ 10

CLI Modes and Common Commands .................................................................. 11


How to enter or exit a command mode ......................................................................... 11
Common commands ........................................................................................................ 12
enable ...................................................................................................................................... 12
configure .................................................................................................................................. 13
vlan ........................................................................................................................................... 13
interface (for Gigabit switches).............................................................................................. 14
interface (for Multi-Gigabit switches) .................................................................................... 15
interface range ........................................................................................................................ 16
line ssh ...................................................................................................................................... 17
end ............................................................................................................................................ 17
exit ............................................................................................................................................ 18

System Commands .............................................................................................. 19


Management commands ................................................................................................. 19
system name ............................................................................................................................ 19
system contact ......................................................................................................................... 20
system location........................................................................................................................ 20
show info .................................................................................................................................. 21
show environment .................................................................................................................. 22
show version ............................................................................................................................ 23
show cpu status ....................................................................................................................... 23
ip address ................................................................................................................................ 24
ip default-gateway .................................................................................................................. 25
ip dhcp ..................................................................................................................................... 26
ip bootp ................................................................................................................................... 26
show ip ..................................................................................................................................... 27
ipv6 ........................................................................................................................................... 27

Table of Contents 4 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

ipv6 autoconfig ....................................................................................................................... 28


ipv6 address ............................................................................................................................ 29
ipv6 default-gateway .............................................................................................................. 29
ipv6 dhcp ................................................................................................................................. 30
show ipv6 neighbors .............................................................................................................. 31
show clock ............................................................................................................................... 31
sntp ........................................................................................................................................... 32
show sntp ................................................................................................................................. 33
PoE commands .................................................................................................................. 34
power inline ............................................................................................................................. 34
power inline reset ................................................................................................................... 35
show power inline ................................................................................................................... 35
LLDP commands ............................................................................................................... 37
clear lldp statistics ................................................................................................................... 37
show lldp local-device ............................................................................................................ 37
show lldp med ......................................................................................................................... 38
show lldp neighbor................................................................................................................. 39
show lldp statistics .................................................................................................................. 40

Switching Commands ......................................................................................... 41


Interface commands ......................................................................................................... 41
interface (for Gigabit switches).............................................................................................. 41
interface (for Multi-Gigabit switches) .................................................................................... 42
interface range ........................................................................................................................ 43
clear interface .......................................................................................................................... 44
description ............................................................................................................................... 44
flowcontrol ............................................................................................................................... 45
jumbo-frame ............................................................................................................................ 46
show interfaces........................................................................................................................ 47
speed (for Gigabit switches) .................................................................................................. 48
speed (for Multi-Gigabit switches) ........................................................................................ 49
10g-media ............................................................................................................................... 51
auto-nego ................................................................................................................................ 52
shutdown ................................................................................................................................. 52
show fiber-transceiver ............................................................................................................ 53
LAG commands ................................................................................................................. 54
lag ............................................................................................................................................. 54
lag type .................................................................................................................................... 55
show lag ................................................................................................................................... 55
VLAN commands............................................................................................................... 56
vlan ........................................................................................................................................... 56
name ......................................................................................................................................... 57
switchport hybrid pvid ........................................................................................................... 57
switchport hybrid allowed vlan ............................................................................................. 58

Table of Contents 5 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

switchport hybrid remove vlan .............................................................................................. 59


management-vlan ................................................................................................................... 60
show vlan ................................................................................................................................. 61
show interfaces switchport .................................................................................................... 62
Auto-VoIP commands ....................................................................................................... 63
voice-vlan ................................................................................................................................. 63
voice-vlan vlan ......................................................................................................................... 63
voice-vlan cos .......................................................................................................................... 64
voice-vlan oui........................................................................................................................... 64
voip ........................................................................................................................................... 65
voip pri ..................................................................................................................................... 66
voip act ..................................................................................................................................... 66
Spanning tree protocol commands ................................................................................ 67
show spanning-tree ................................................................................................................ 67
show spanning-tree interfaces .............................................................................................. 68
show spanning-tree mst configuration................................................................................. 69
show spanning-tree mst interfaces ....................................................................................... 69
MAC address table commands ....................................................................................... 71
clear mac address-table dynamic ......................................................................................... 71
show mac address-table ........................................................................................................ 71

Routing Commands............................................................................................. 73
IP routing commands ....................................................................................................... 73
show ip interface ..................................................................................................................... 73
Routing table commands ................................................................................................. 74
show ip route ........................................................................................................................... 74
ARP commands ................................................................................................................. 75
clear arp-cache ........................................................................................................................ 75
show arp................................................................................................................................... 75
show arp configuration .......................................................................................................... 76

Security Commands ............................................................................................ 77


Management security commands................................................................................... 77
username ................................................................................................................................. 77
show username ....................................................................................................................... 78
show users ............................................................................................................................... 78
Access commands ............................................................................................................ 79
ip ssh......................................................................................................................................... 79
ip ssh port ................................................................................................................................ 80
ip ssh protocol ......................................................................................................................... 80
exec-timeout ............................................................................................................................ 81
max-session ............................................................................................................................. 81
ip ssh crypto key generate ..................................................................................................... 82

Table of Contents 6 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show ip ssh............................................................................................................................... 82
Traffic control commands ................................................................................................ 83
storm-control ........................................................................................................................... 83
storm-control action ............................................................................................................... 84
show storm-control ................................................................................................................. 85

Monitoring Commands ....................................................................................... 86


Port commands ................................................................................................................. 86
show cable-diag ...................................................................................................................... 86
Logging commands .......................................................................................................... 87
clear logging ........................................................................................................................... 87
show logging ........................................................................................................................... 87
Mirroring commands ........................................................................................................ 88
mirror session destination interface ..................................................................................... 88
mirror session source interface ............................................................................................. 89

Maintenance Commands .................................................................................... 91


Reset commands ............................................................................................................... 91
reboot ....................................................................................................................................... 91
restore-defaults ....................................................................................................................... 91
delete ....................................................................................................................................... 92
delete system .......................................................................................................................... 93
Copy, export, and update commands ........................................................................... 93
Copy ......................................................................................................................................... 93
File management commands .......................................................................................... 96
save ........................................................................................................................................... 96
boot system ............................................................................................................................. 96
show bootvar ........................................................................................................................... 97
show startup-config ................................................................................................................ 98
show running-config ............................................................................................................... 98
show backup-config ............................................................................................................... 99
show tech-support ................................................................................................................ 100
Troubleshooting commands ......................................................................................... 101
ping ........................................................................................................................................ 101

Table of Contents 7 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

How to Use the CLI


The command-line interface (CLI) is a text-based way to manage and monitor the system. You
can access the CLI by using a direct serial connection, or by using a remote logical
connection with telnet or SSH.

Command syntax
A command is one or more words that might be followed by one or more parameters.
Parameters can be required or optional values.

Some commands, such as show version and clear arp-cache, do not require parameters.
Other commands, such as show interfaces id [status | protected], require that you supply a
value for the id parameter. You must type the parameter values in a specific order, and
optional parameters follow required parameters. The following example describes the show
interfaces id [status | protected] command syntax:

show interfaces id [status | protected]

• show interfaces is the command name.


• id is the parameter and represents a required value that you must enter after you type the
command keywords.
• status and protected are optional and mutually exclusive keywords, so you are not
required to enter a value in place of the keyword.

This manual lists each command by the command name and provides a brief description of
the command (“Usage”). Each command reference also contains the following information:

• Syntax: The order of the command, the required and optional keywords, and the
required and optional parameters.
• Parameter: The keywords and parameters with a description. The show commands also
include a description of the information that the command shows.
• Default: The default value, if any, of a configurable setting on the device.
• Mode: The command mode you must be in to access the command.
• Usage: The usage and purpose of the command.
• Example: One or more command examples.

Command conventions
The parameters for a command might include mandatory values, optional values, or keyword
choices. Parameters are order-dependent. The following table describes the conventions this
manual uses to distinguish between value types.

How to Use the CLI 8 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Symbol Example Description


italic font value or [value] Indicates a variable value. You must
replace the italicized text, which can
be placed within curly brackets or
square brackets, with an appropriate
value, which might be a name or
number.
[ ] square brackets [keyword] Indicates an optional parameter.
{ } curly braces {choice1 | choice2} Indicates that you must select a
parameter from the list of choices.
| Vertical bars choice1 | choice2 Separates the mutually exclusive
choices.
[{ }] Braces within [{choice1 | choice2}] Indicates a choice within an optional
square brackets element. This format is used mainly for
complicated commands.

‘no’ form of a command


The no keyword is a specific form of an existing command and does not represent a new or
distinct command. Almost every configuration command has a no form. In general, use the
no form to reverse the action of a command or reset a value back to the default.
For example, the no shutdown configuration command reverses the shutdown of an
interface. Use the command without the no keyword to reenable a disabled feature or to
enable a feature that is disabled by default. Only the configuration commands are available
in the no form.

‘show’ commands
All show commands can be issued from any configuration mode (Global Configuration,
Interface Configuration, VLAN Configuration, etc.). The show commands provide information
about system and feature-specific configuration, status, and statistics.

Access the CLI


You can access the CLI over a secure shell (SSH) connection from a computer that is directly
connected to an Ethernet port on the switch or remotely connected to the same network that
the switch is connected to.
You need to install an SSH client program on your computer. Examples of SSH clients are
applications such as PuTTY and WinSCP, both of which are available on the Internet free of
charge.
You cannot access the switch remotely until the it has an IP address, subnet mask, and default
gateway configured. For information about setting up the switch, see the installation guide
and user manual.

How to Use the CLI 9 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Command completion and abbreviation


Command completion finishes spelling the command when you have entered enough letters
to uniquely identify the command. Once you have entered enough letters, press the
SPACEBAR or TAB key to complete the word.

Command abbreviation allows you to execute a command when you have entered there are
enough letters to uniquely identify the command. You must enter all of the required
keywords and parameters before you enter the command.

CLI line-editing conventions


The following table describes the key combinations you can use to edit commands or
increase the speed of command entry:

Key Sequence Description


DEL or Backspace Delete previous character.
Ctrl-A Go to beginning of line.
Ctrl-E Go to end of line.
Ctrl-F Go forward one character.
Ctrl-B Go backward one character.
Ctrl-D Delete current character.
Ctrl-U Delete to beginning of line.
Ctrl-K Delete to end of line.
Ctrl-W Delete the previous word.
Ctrl-P Go to previous line in history buffer.
Ctrl-R Searches backwards through the history for a
string that is typed interactively.
Ctrl-N Go to next line in history buffer.
Ctrl-Z Return to root command prompt.
Tab Command-line completion.
Exit Go to next lower command prompt.
? List available commands, keywords, or
parameters.

How to Use the CLI 10 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

CLI Modes and Common


Commands
The CLI groups commands into modes according to the command function. Each of the
command modes supports specific commands. The commands in one mode are not
available until you enter that specific mode. The only exception are the User EXEC mode
commands, which you execute in either the User EXEC mode or the Privileged EXEC mode.

The command prompt changes in each command mode to help you identify the current
mode. The following table describes the command modes and the prompts visible in that
mode.

Command Mode Prompt Mode Description


User Exec Switch> Contains a limited set of commands to
view basic system information.
Privileged EXEC Switch# Lets you issue any EXEC command or
enter the Global Configuration mode.
Global Configuration Switch (config)# Groups general setup commands and
permits you to make modifications to
the running configuration.
VLAN Configuration Switch (config-vlan)# Groups all the VLAN commands
together.
Interface Configuration Switch (config-if)# Manages the operation of one or more
interfaces, LAGs, or both.
Interface Range Switch (config-if-range)# Manages the operation of a range of
Configuration interfaces or LAGs.
Line Configuration Switch (config-line)# Contains commands to configure SSH
authentication.

How to enter or exit a command mode


The following table describes how to enter or exit each mode.

Command Mode Access Method Exit or Access Previous


Mode
User Exec From the Privileged EXEC mode, To return to the Privileged
enter exit. EXEC mode, enter enable
and leave the password
blank.

CLI Modes and Common Commands 11 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Privileged EXEC This is the default mode when To exit to the User EXEC
you log in to the CLI. mode, enter exit.
If in User ECEX mode, enter
enable and leave the password
blank
Global Configuration From the Privileged EXEC mode, To exit to the Privileged
enter configure. EXEC mode, enter exit, or
press Ctrl-Z.
VLAN Configuration From the Global Configuration
mode, enter vlan with a VLAN ID
Interface Configuration From the Global Configuration
mode, enter interface with an
interface ID. To exit to the Global
Interface Range Configuration From the Global Configuration Configuration mode, enter
mode, enter interface range exit. To return to the
with an interface range ID. Privileged EXEC mode,
enter Ctrl-Z.
Line Configuration From the Global Configuration
mode, enter line ssh.

Common commands
When you log in to the CLI, you enter the Privileged EXEC mode, in which the CLI prompt
displays as follows:
Switch#

The Privileged EXEC mode is the base mode from which you can enter other CLI modes.

enable

Syntax enable

Parameter

Default No default value.

Mode User EXEC

Usage Use this command to enter Privileged EXEC mode. A password is not
required. In Privileged EXEC mode, the prompt displays as follows with
a number sign (#):
Switch#

CLI Modes and Common Commands 12 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example shows how to enter Privileged EXEC mode (a password
is not required):

Switch> enable
Password:
Switch#

configure

Syntax configure

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to enter Global Configuration mode, in which the
CLI prompt displays as follows:
Switch(config)#

Example This example shows how to enter global configuration mode:

Switch# configure
Switch(config)#

vlan

Syntax vlan vlan-list

Parameter vlan-list The VLAN ID or list of IDs to be created. The vlan-


list parameter represents a single VLAN ID
(Example: 3), a range of VLAN IDs in which the IDs
are separated by a hyphen (Example: 5-9), or a
combination of both, in which the single IDs and
ranges of IDs are separated by one or more
commas (Example: 3,5-9,14,101-104). VLAN IDs
can be from 1 to 4094.

Default No default value.

CLI Modes and Common Commands 13 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Mode Global Configuration

Usage Use this command to enter the VLAN Configuration mode, in which the
CLI prompt displays as follows:
Switch(config-vlan)#

Example This example shows how to enter VLAN Configuration mode for VLANs
5 through 9 and VLAN 101:

Switch# configure
Switch(config)# vlan 5-9,101
Switch (config-vlan)#

interface (for Gigabit switches)

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS308T and GS310TP
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP

Syntax interface id

Parameter id Specify the interface. The id parameter represents


the interface number, allows a partial port name,
and is not case-sensitive. For example, g1 or
GigabitEthernet 2.

Default No default value.

Mode Global Configuration

Usage Some configurations are interface-based, requiring you to enter


Interface Configuration mode. Use this command to enter the Interface
Configuration mode and select one or more interfaces to configure.
In Interface Configuration mode, the prompt displays as follows:
Switch(config-if)#

Example This example shows how to enter Interface Configuration mode for
interface Gigabit Ethernet 1:

Switch# configure
Switch(config)# interface GigabitEthernet 1
Switch(config-if)#

CLI Modes and Common Commands 14 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

This example shows how to enter Interface Configuration mode for


interface g2:

Switch# configure
Switch(config)# interface g2
Switch(config-if)#

interface (for Multi-Gigabit switches)

This command is supported on the MS510TXM and MS510TXUP. This command refers to the
ports and their supported speeds as follows:
• MultiGigabitEthernet: Ports 1–4, supporting 2.5G, 1G, and 100M speed.
• XMultiGigabitEthernet: Ports 5–8, supporting 10G, 5G, 2.5G, 1G, and 100M speed.
• XGigabitEthernet: Ports 9 and 10, which are SFP+ fiber ports supporting 10G and 1G

Syntax interface id

Parameter id Specify the interface. The id parameter represents


the interface number, allows a partial port name,
and is not case-sensitive. For example, mg1 or
MultiGigabitEthernet 2.
The CLI supports three different port types for this
switch:
• MultiGigabitEthernet (or mg): Ports 1–4.
• XMultiGigabitEthernet (or xmg): Ports 5–8.
• XGigabitEthernet (xg): Ports 9 and 10.
You can also specify a port range. For example,
mg1-4, or xmg 5-8, or xg9,10.

Default No default value.

Mode Global Configuration

Usage Some configurations are interface-based, requiring you to enter


Interface Configuration mode. Use this command to enter the Interface
Configuration mode and select one or more interfaces to configure.
In Interface Configuration mode, the prompt displays as follows:
Switch(config-if)#

Example This example shows how to enter Interface Configuration mode for
interface MultiGigabitEthernet 3:

Switch# configure
Switch(config)# interface MultiGigabitEthernet 3

CLI Modes and Common Commands 15 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Switch(config-if)#

This example shows how to enter Interface Configuration mode for


interface xmg7:

Switch# configure
Switch(config)# interface xmg7
Switch(config-if)#

interface range

Syntax interface range id

Parameter id Specify a range or group of interfaces. The id


parameter represents a range of interface
numbers in which each interface number is
separated by a comma (Example: g1,3,5). You can
also enter a range of interface numbers in which
the interface numbers are separated by a hyphen
(Example: g8-9). Another option is to combine
individual interfaces and ranges by separating
them by one or more commas (Example:
g1-4,g6,g8-9).

Default No default value.

Mode Global Configuration

Usage Some configurations are interface-range based, requiring you to enter


Interface Range Configuration mode. Use this command to enter the
Interface Range Configuration mode and select the range of interfaces
to configure.
In Interface Range Configuration mode, the prompt displays as follows:
Switch(config-if-range)#

Example This example shows how to enter Interface Range Configuration mode
for interfaces g3 through g5:

Switch# configure
Switch(config)# interface range g3-g5
Switch(config-if-range)#

This example shows how to enter Interface Configuration mode for


interfaces g6, g7, g10, and g11:

CLI Modes and Common Commands 16 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Switch# configure
Switch(config)# interface range g6-g7,g10-g11
Switch(config-if-range)#

line ssh

Syntax line ssh

Parameter

Default No default value.

Mode Global Configuration

Usage Use this command to enter Line Configuration mode, in which the CLI
prompt displays as follows:
Switch(config-line)#

Example This example shows how to enter Line Configuration mode:

Switch# configure
Switch(config)# line ssh
Switch(config-line)#

end

Syntax end

Parameter

Default No default value.

Mode Privileged EXEC


Global Configuration
VLAN Configuration
Interface Configuration
Interface Range Configuration
Line Configuration

Usage Use this command to return to the privileged EXEC mode. Each mode,
except for the User EXEC mode, allows the end command.

CLI Modes and Common Commands 17 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example shows how to enter the Interface Configuration mode
and use the end command to return to the privileged EXEC mode:

Switch# configure
Switch(config)# interface GigabitEthernet 1
Switch(config-if)# end
Switch#

exit

Syntax exit

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC
Global Configuration
VLAN Configuration
Interface Configuration
Interface Range Configuration
Line Configuration

Usage In User EXEC mode, the exit command closes the current CLI session.
In other modes, the exit command lets you return to the parent mode.
Each mode lets you enter the exit command. The following table
describes the relationships between each mode.

Command Mode Parent Mode


User Exec None
Privileged EXEC User Exec
Global Configuration Privileged EXEC
VLAN Configuration Global Configuration
Interface Configuration Global Configuration
Interface Range Configuration Global Configuration
Line Configuration Global Configuration

Example This example shows how to enter privileged EXEC mode and then use
the exit command to return to the user EXEC mode:

Switch> enable
Switch# exit
Switch>

CLI Modes and Common Commands 18 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

System Commands
Management commands
system name

Syntax system name name

Parameter name Specify the system name string. The name


parameter can represent any combination of
printable characters and a space except for a
question mark (?), single quote (‘), and double
quote (“).

Default The default name is the switch model name.

Mode Global Configuration

Usage Use this command to modify the system name of the switch. The
system name is also used as the CLI prompt.

Example This example shows how to modify the contact information:

Switch(config)# system name myname


myname(config)#

This example shows how to display the system name information


myname# show info
System Name : myname
System Location :
System Contact :
MAC Address : 00:01:02:03:04:05
IP Address : 192.168.0.239
Subnet Mask : 255.255.255.0
Hardware Version : 2
Loader Version : 1.0.0.1
Loader Date : 2017-12-28 09:35:22 UTC
Firmware Version : 6.0.9.2
Firmware Date : Oct 29 2021 - 14:16:17
System Object ID : 1.3.6.1.4.1.4526.100.4.48
System Up Time : 0 days, 0 hours, 2 mins, 37 secs

System Commands 19 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

system contact

Syntax system contact contact

Parameter contact Set the contact information.

Default No default value.

Mode Global Configuration

Usage Use this command to set the contact information for the switch.

Example This example shows how to set the contact information:

Switch(config)# system contact callme

This example shows how to display the system contact information:

Switch# show info


System Name : Switch
System Location :
System Contact : callme
MAC Address : 00:01:02:03:04:05
IP Address : 192.168.0.239
Subnet Mask : 255.255.255.0
Hardware Version : 2
Loader Version : 1.0.0.1
Loader Date : 2017-12-28 09:35:22 UTC
Firmware Version : 6.0.9.2
Firmware Date : Oct 29 2021 - 14:16:17
System Object ID : 1.3.6.1.4.1.4526.100.4.48
System Up Time : 0 days, 0 hours, 2 mins, 37 secs

system location

Syntax system location location

Parameter location Set the location information

Default No default value.

Mode Global Configuration

System Commands 20 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Usage Use this command to set the location information for the switch.

Example This example shows how to set the system location information:

Switch(config)# system location main office

This example shows how to display the system location information:

Switch# show info


System Name : SwitchEF0102
System Location : main office
System Contact :
MAC Address : 00:01:02:03:04:05
IP Address : 192.168.0.239
Subnet Mask : 255.255.255.0
Hardware Version : 2
Loader Version : 1.0.0.1
Loader Date : 2017-12-28 09:35:22 UTC
Firmware Version : 6.0.9.2
Firmware Date : Oct 29 2021 - 14:16:17
System Object ID : 1.3.6.1.4.1.4526.100.4.48
System Up Time : 0 days, 0 hours, 2 mins, 37 secs

show info

Syntax show info

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to show system summary information.

Example This example shows how to display system summary information:

Switch# show info

System Name : Switch


System Location :
System Contact :
MAC Address : 00:01:02:03:04:05
IP Address : 192.168.0.239
Subnet Mask : 255.255.255.0
Hardware Version : 2

System Commands 21 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Loader Version : 1.0.0.1


Loader Date : 2017-12-28 09:35:22 UTC
Firmware Version : 6.0.9.2
Firmware Date : Oct 29 2021 - 14:16:17
System Object ID : 1.3.6.1.4.1.4526.100.4.48
System Up Time : 0 days, 0 hours, 2 mins, 37 secs

show environment

This command is supported on the following switch models:


• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax show environment

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to show system environment information such as


temperature and sensor status. The hardware of the switch model
determines the output of this command.

Example This example shows how to show system environment information:

Switch# show environment


Fan Description Type Speed Level State
--- ----------- ----- ----- ----- ------------
1 Fan-1 Fixed 4000 40% Operational
2 Fan-2 Fixed 4000 40% Operational

Sensor Description Temp(C) State Max Temp(C)


------ ----------- ------- ------------- -----------
1 System 43 Normal 44
2 MAC 43 Normal 44

Power Type State Description


----- ---------- ---------------- ------------------------
1 Fixed Operational PS-1

System Commands 22 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show version

Syntax show version

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to show the loader and firmware versions and the
build dates.

Example This example shows how to display the system versions and build
dates:

Switch# show version


Loader Version : 1.0.0.1
Loader Date : 2017-12-28 09:35:22 UTC
Firmware Version : 6.0.9.2
Firmware Date : Oct 29 2021 - 14:16:17
MAC Address : 00:01:02:03:04:05
SN : 0000000000001

show cpu status

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS308T and GS310TP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax show cpu status

Parameter

Default No default value.

Mode Privileged EXEC

System Commands 23 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Usage Use this command to show current CPU status and utilization.

Example This example shows how to show current CPU utilization:

Switch# show cpu status

Memory Utilization Report:

status KBytes
------ ----------
free 43280
alloc 82360

CPU Utilization:

PID Name 5 Secs 60 Secs 300 Secs


----------- -------------------- -------- -------- --------
3 [ksoftirqd/0] 0.09% 0.00% 0.00%

500 DiscoveryAgent 0.94% 0.69% 0.74%

412 usaged 4.33% 4.29% 4.29%

420 snmpd 0.00% 0.01% 0.01%

440 polld 1.69% 1.61% 1.62%

445 cli 0.00% 0.00% 0.01%

----------- --------------------- -------- -------- --------


Total CPU Utilization 7.07% 6.64% 6.72%

ip address

Syntax ip address a.b.c.d mask a.b.c.d

Parameter address a.b.c.d Set the IPv4 address for switch. The IP address is
represented by a.b.c.d.
mask a.b.c.d Set the netmask address for switch. The netmask
is represented by a.b.c.d.
Default The default IP address is 192.168.0.239 and default netmask is
255.255.255.0.

Mode Global Configuration

Usage Use this command to set the administration IPv4 address for access to
the switch. When you use Telnet, SSH, HTTP, HTTPS, or SNMP to
connect to the switch, you must use this IP address to access the
switch.

System Commands 24 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example shows how to modify the IPv4 address of the switch:

Switch(config)# ip address 192.168.0.200 mask 255.255.255.0

This example shows how to show current ipv4 address of the switch:

Switch# show ip
###### Config ######
IP Address: 192.168.0.239
Subnet Netmask: 255.255.255.0
Default Gateway: 192.168.0.254

###### Status ######


IP Address: 192.168.0.239
Subnet Netmask: 255.255.255.0
Default Gateway: 192.168.0.254

ip default-gateway

Syntax ip default-gateway a.b.c.d

Parameter a.b.c.d Specify the default gateway IPv4 address for


switch. The IP address is represented by a.b.c.d.

Default The default IP address of default gateway is 192.168.0.254.

Mode Global Configuration

Usage Use this command to set the default gateway address.

Example This example shows how to modify the default gateway address of the
switch:

Switch(config)# ip default-gateway 192.168.0.100

This example shows how to show current default gateway address of


the switch:

Switch# show ip
###### Config ######
IP Address: 192.168.0.239
Subnet Netmask: 255.255.255.0
Default Gateway: 192.168.0.100

###### Status ######


IP Address: 192.168.0.239
Subnet Netmask: 255.255.255.0
Default Gateway: 192.168.0.100

System Commands 25 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

ip dhcp

Syntax ip dhcp
no ip dhcp

Parameter

Default The DHCP client is disabled.

Mode Global Configuration

Usage Use the ip dhcp command to enable the DHCP client to let the switch
receive an IP address from a DHCP server.
Use the no ip dhcp command to disable the DHCP client so that you
can set a static IP address.

Example This example shows how to enable the DHCP client:

Switch(config)# ip dhcp

ip bootp

Syntax ip bootp
no ip bootp

Parameter

Default The Bootp client is disabled.

Mode Global Configuration

Usage Use the ip bootp command to enable the Bootp client to let the switch
receive an IP address from a DHCP or Bootp server.
Use the no ip bootp command to disable the Bootp client so that you
can set a static IP address.

Example This example shows how to enable the Bootp client:

Switch(config)# ip bootp

System Commands 26 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show ip

Syntax show ip

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to show the system IPv4 address, netmask, and
default gateway.

Example This example shows how to display the current IPv4 address settings of
the switch:

Switch# show ip
###### Config ######
IP Address: 192.168.0.239
Subnet Netmask: 255.255.255.0
Default Gateway: 192.168.0.254

###### Status ######


IP Address: 192.168.0.239
Subnet Netmask: 255.255.255.0
Default Gateway: 192.168.0.254

ipv6

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax ipv6
no ipv6

Parameter

Default IPv6 is enabled.

System Commands 27 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Mode Global Configuration

Usage Use the ipv6 command to enable IPv6.


Use the no ipv6 command to disable IPv6.

Example This example shows how to disable IPv6 globally on the switch:

Switch(config)# no ipv6

ipv6 autoconfig

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax ipv6 autoconfig


no ipv6 autoconfig

Parameter

Default IPv6 autoconfiguration is enabled.

Mode Global Configuration

Usage Use the ipv6 autoconfig command to enable IPv6 autoconfiguration.


Use the no ipv6 autoconfig command to disable IPv6
autoconfiguration.

Example This example shows how to disable IPv6 autoconfiguration:

Switch(config)# no ipv6 autoconfig

System Commands 28 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

ipv6 address

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax ipv6 address x:x::x:x prefix <0-128>


no ipv6 address x:x::x:x

Parameter address x:x::x:x Specify the IPv6 address for switch. The IPv6
address is represented by x:x::x:x.
prefix <0-128> Specify the IPv6 prefix length for switch. This can
be a value from 0 to 128.

Default No default IPv6 address is configured for the switch.

Mode Global Configuration

Usage Use the ipv6 address command to add a static IPv6 address.
Use the no ipv6 address command to remove an IPv6 address.

Example This example shows how to add a static IPv6 address for the switch:

Switch(config)# ipv6 address fe80::20e:2eff:fef1:4b3c


prefix 128

ipv6 default-gateway

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax ipv6 default-gateway x:x::x:x


no ipv6 default-gateway

Parameter x:x::x:x Specify the default gateway IPv6 address for the
switch. The IPv6 address is represented by x:x::x:x.

System Commands 29 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Default No IPv6 default gateway address is configured on the switch.

Mode Global Configuration

Usage Use the ipv6 default-gateway command to set the IPv6 default
gateway address.
Use the no ipv6 default-gateway command to remove the IPv6
default gateway address.

Example This example shows how to modify the IPv6 default gateway address
on the switch:

Switch(config)# ipv6 default-gateway


fe80::dcad:beff:feef:103

ipv6 dhcp

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax ipv6 dhcp


no ipv6 dhcp

Parameter

Default The DHCPv6 client is disabled.

Mode Global Configuration

Usage Use the ipv6 dhcp command to enable the DHCPv6 client to let the
switch receive an IP address from a DHCPv6 server.
Use the no ipv6 dhcp command to disable the DHCPv6 client so that
you can set a static IPv6 address or IPv6 autoconfiguration address for
the switch.

Example This example shows how to enable the DHCPv6 client:

Switch(config)# ipv6 dhcp

System Commands 30 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show ipv6 neighbors

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax show ipv6 neighbors

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to show information about the IPv6 neighbor
entries cached on the system.

Example This example shows how to display the ipv6 neighbor entries:

Switch# show ipv6 neighbors


VLAN Interface IPv6 address HW address Status Router State
------------- ------------------------- ---------------- -------- ------ ---------
vlan 1 fe80::b498:654a:75f5:9c7b 50:3e:aa:07:ab:46 Dynamic No Reachable

show clock

Syntax show clock [detail]

Parameter detail Optional keyword that displays more detailed


information about the clock.

Default No default value.

Mode Privileged EXEC

Usage Use this command to show information about the clock of the switch.
The detail keyword means display more information about the clock
such as the time zone and daylight saving time.

System Commands 31 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example shows how to display information about the clock of the
switch:

Switch# show clock


Jan 01 02:08:52 2021 (UTC+0)
Time set manually

This example shows how to display detailed information about the


clock of the switch:

Switch# show clock detail


Jan 01 02:08:54 2021 (UTC+0)
Time set manually

Time zone:
Acronym is
Offset is UTC+0

sntp

Syntax sntp <1-3> host hostname port <1-65535> [ver <1-4>]


no sntp <1-3>

Parameter sntp <1-3> Set the SNTP protocol version, which can be 1, 2,
or 3.
hostname Set the IP address or hostname of the SNTP
server.
port <1-65535> Set the port number of the SNTP server, which
can be a number from 1 to 65,535.
ver <1-4> Set the SNTP server version, which can be 1, 2, 3,
or 4.

Default No default SNTP server is defined. If you add an SNTP server, by


default, the server version is 4. (You can configure a different version.)

Mode Global Configuration

Usage Use the sntp command to set a remote SNTP server.


Use the no sntp command to reset the SNTP configuration for a
specific SNTP protocol version.
You can verify your SNTP settings in the output of the show sntp
command.

Example This example shows how to set a remote SNTP server for the switch:

switch(config)# sntp 1 host 192.168.0.100 port 123

System Commands 32 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show sntp

Syntax show sntp

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to display the remote SNTP server information.

Example This example shows how to display the remote SNTP server
information:

Switch# show sntp


SNTP is Enabled

SNTP Server address: 192.168.0.100


SNTP Server port: 123
SNTP Server pri: 1
SNTP Server ver: 4
SNTP Server attemps: 0
SNTP Server failures: 0
SNTP Server reason:
SNTP Server last_success: 0
SNTP Server lastAttemptTime:
SNTP Server lastUpdateTime
……………

System Commands 33 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

PoE commands
power inline

This command is supported on the following switch models:


• GS110TPv3
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXUP

Syntax power inline {never | auto}

Parameter never Disables PoE functionality on an interface.


auto Enables PoE functionality on an interface.

Default The default is auto.

Mode Interface Configuration

Usage Use this command to enable or disable PoE functionality on an


interface.

Example This example shows how to disable PoE on an interface:

Switch(config)#interface g1
Switch(config-if)# power inline never
Switch# show power inline interfaces g1

Port State Status Priority Class Power Up Max.Power (Admin)

(mW)
---- ------ ---------- -------- ------- -------- --------- --------
g1 Never off low N/A 802.3at 0 (30000)

Port Overload Short Current Power Denied MPS Absent Invalid Sig.
---- -------- ------------- ------------- ---------- ----------
g1 0 0 0 0 0

Port Time Range Status


---- -------------------------------- --------
g1

System Commands 34 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

power inline reset

This command is supported on the following switch models:


• GS110TPv3
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXUP

Syntax power inline reset

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to reset all PoE ports.


When one or more PoE ports are in an error state, you can use this
command to reset the PoE ports. You can also use this command to
reset PoE ports that are delivering power. This command takes effect
only once after it is executed and cannot be saved in the running
configuration.

Example This example shows how reset all PoE ports:

Switch# power inline reset

show power inline

This command is supported on the following switch models:


• GS110TPv3
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXUP

Syntax show power inline [interfaces id]

Parameter interfaces id Displays the PoE information for a physical port or


a range of physical ports. (The command does
not apply to logical ports.) The id parameter
represents the port number or a range of port
numbers. Use a hyphen to indicate a range. Use a

System Commands 35 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

comma to separate individual ports, ranges, or a


combination of both.

Default No default value.

Mode Privileged EXEC

Usage Use this command to show the global PoE status, or to show detailed
information for one or more specific PoE ports.

Example This example shows how to display the global PoE status:

Switch# show power inline

Power management mode: Port limit mode


Pre-allocation : Disabled
Power-up sequence : Staggered

Unit Power Status Nominal Allocated Consumed Available


Power Power Power Power
----- ----- ------- --------- ------------ -------- ---------
1 Off Normal 190Watts 0Watts ( 0%) 0Watts 190Watts

Port State Status Priority Class Power Up


Max.Power (Admin)
(mW)
---- ----- --------- --------- ------- -------- --------- ----------
g1 Never off low N/A 802.3at 0 (30000)
g2 Auto searching low N/A 802.3at 0 (30000)
………………

This example shows how to display the PoE status for interface g1:

Switch# show power inline interfaces g1

Port State Status Priority Class Power Up Max.Power (Admin)

(mW)
---- ------ ---------- -------- ------- -------- --------- --------
g1 Never off low N/A 802.3at 0 (30000)

Port Overload Short Current Power Denied MPS Absent Invalid Sig.
---- -------- ------------- ------------- ---------- ----------
g1 0 0 0 0 0

Port Time Range Status


---- -------------------------------- --------
g1

System Commands 36 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

LLDP commands
clear lldp statistics

Syntax clear lldp {global | interfaces id} statistics

Parameter global Clears the LLDP information for all interfaces and
LAGs.
interfaces id Clears the LLDP information for an interface, LAG,
a range of interfaces, or a range of LAGs. The id
parameter represents the interface or LAG
number or a range of interface numbers or LAG
numbers. Use a hyphen to indicate a range. Use a
comma to separate individual interfaces, ranges,
or a combination of both.

Default No default value.

Mode Privileged EXEC

Usage Use this command to clear the LLDP RX/TX statistics.

Example This example shows how to clear the LLDP statistics globally:

Switch# clear lldp global statistics

show lldp local-device

Syntax show lldp interfaces id local-device

Parameter interfaces id The interface or a range of interfaces for which


the LLDP information must be displayed. The id
parameter represents the interface number or a
range of interface numbers. Use a hyphen to
indicate a range. Use a comma to separate
individual interfaces, ranges, or a combination of
both.
Default No default value.

System Commands 37 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Mode Privileged EXEC

Usage Use this command to show the local configuration of LLDP PDUs,
including the contents of LLDP/LLDP-MED TLVs.

Example This example shows how to display the local device information for
interface g1:

Switch# show lldp interfaces g1 local-device

Device ID: 00:12:12:12:12:12


Port ID: g1
System Name: Switch
Capabilities: Bridge
System description:
Port description:
Management address: 192.168.0.239
Time To Live: 120
802.3 MAC/PHY Configur/Status
Auto-negotiation support: Supported
Auto-negotiation status: Enabled
Auto-negotiation Advertised Capabilities: 10BASE-T half
duplex, 10BASE-T full duplex, 100BASE-TX half duplex,
100BASE-TX full duplex
Operational MAU type: Other or unknown
LLDP-MED capabilities: Capabilities, Network Policy
LLDP-MED Device type: Network Connectivity

show lldp med

Syntax show lldp med

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to display the LLDP MED configuration information
for the switch.

System Commands 38 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example shows how to display the LLDP MED information:

Switch# show lldp med

Fast Start Repeat Count: 3

Network policy 1
-------------------
Application type: Voice Signaling
VLAN ID: 2 tagged
Layer 2 priority: 3
DSCP: 4

Network policy 32
-------------------
Application type: Conferencing
VLAN ID: 5 tagged
Layer 2 priority: 1
DSCP: 63

Port | Capabilities | Network Policy | Location | Inventory | PoE PSE


------ + ------------ + -------------- + -------- + --------- + -------
g1 | Yes | Yes | No | No | No
g2 | Yes | Yes | No | No | No
g3 | Yes | Yes | No | No | No
g4 | Yes | Yes | No | No | No
g5 | Yes | Yes | No | No | No
g6 | Yes | Yes | No | No | No
g7 | Yes | Yes | No | No | No
g8 | Yes | Yes | No | No | No
g9 | Yes | Yes | No | No | No
g10 | Yes | Yes | No | No | No
……………

show lldp neighbor

Syntax show lldp [interfaces id] neighbor

Parameter interfaces id As an option, specify the interface or a range of


interfaces for which you want to display the LLDP
neighbor information. The id parameter
represents the interface number or a range of
interface numbers. Use a hyphen to indicate a
range. Use a comma to separate individual
interfaces, ranges, or a combination of both.

Default No default value.

Mode Privileged EXEC

System Commands 39 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Usage Use this command to display the received neighbor LLDP PDU
information. As an option, you can display the information for one or
more interfaces only. When LLDP PDUs are received on interfaces on
which LLDP RX is enabled, the switch stores the PDU information in its
database until the time-to-live (TTL) is expired.

Example This example shows how to display the LLDP neighbor information:

Switch# show lldp neighbor


Port | Device ID | Port ID | SysName | Capabilities | TTL
---- + ------------- + --------- + --------- + --------------- +-----
g1 | TREEBASE | g11 | TREEBASE | Station Only | 33

show lldp statistics

Syntax show lldp statistics

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to display the LLDP RX/TX statistics.

Example This example shows how to display the LLDP statistics:

Switch# show lldp statistics

LLDP Global Statistics:


Insertions : 3
Deletions : 0
Drops : 0
Age Outs : 1
| TX Frames | RX Frames | RX TLVs | RX Ageouts
Port | Total | Total | Discarded | Errors | Discarded | Unrecognized | Total
--------+-----------+-------+-----------+--------+-----------+--------------+----------
g1 | 50 | 0 | 0 | 0 | 0 | 0 | 0
g2 | 0 | 0 | 0 | 0 | 0 | 0 | 0
g3 | 0 | 50 | 0 | 0 | 0 | 0 | 1
g4 | 0 | 0 | 0 | 0 | 0 | 0 | 0
g5 | 0 | 0 | 0 | 0 | 0 | 0 | 0
g6 | 0 | 0 | 0 | 0 | 0 | 0 | 0
g7 | 0 | 0 | 0 | 0 | 0 | 0 | 0
g8 | 0 | 0 | 0 | 0 | 0 | 0 | 0
g9 | 0 | 0 | 0 | 0 | 0 | 0 | 0
g10 | 0 | 0 | 0 | 0 | 0 | 0 | 0

System Commands 40 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Switching Commands
Interface commands
interface (for Gigabit switches)

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS308T and GS310TP
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP

Syntax interface id

Parameter id Specify the interface. The id parameter represents


the interface number, allows a partial port name,
and is not case-sensitive. For example, g1 or
GigabitEthernet 2.

Default No default value.

Mode Global Configuration

Usage Some configurations are interface-based, requiring you to enter


Interface Configuration mode. Use this command to enter the Interface
Configuration mode and select one or more interfaces to configure.
In Interface Configuration mode, the prompt displays as follows:
Switch(config-if)#

Example This example shows how to enter Interface Configuration mode for
interface Gigabit Ethernet 1:

Switch# configure
Switch(config)# interface GigabitEthernet 1
Switch(config-if)#

This example shows how to enter Interface Configuration mode for


interface g2:

Switch# configure
Switch(config)# interface g2
Switch(config-if)#

Switching Commands 41 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

interface (for Multi-Gigabit switches)

This command is supported on the MS510TXM and MS510TXUP. This command refers to the
ports and their supported speeds as follows:
• MultiGigabitEthernet: Ports 1–4, supporting 2.5G, 1G, and 100M speed.
• XMultiGigabitEthernet: Ports 5–8, supporting 10G, 5G, 2.5G, 1G, and 100M speed.
• XGigabitEthernet: Ports 9 and 10, which are SFP+ fiber ports supporting 10G and 1G

Syntax interface id

Parameter id Specify the interface. The id parameter represents


the interface number, allows a partial port name,
and is not case-sensitive. For example, mg1 or
MultiGigabitEthernet 2.
The CLI supports three different port types for this
switch:
• MultiGigabitEthernet (or mg): Ports 1–4.
• XMultiGigabitEthernet (or xmg): Ports 5–8.
• XGigabitEthernet (xg): Ports 9 and 10.
You can also specify a port range. For example,
mg1-4, or xmg 5-8, or xg9,10.

Default No default value.

Mode Global Configuration

Usage Some configurations are interface-based, requiring you to enter


Interface Configuration mode. Use this command to enter the Interface
Configuration mode and select one or more interfaces to configure.
In Interface Configuration mode, the prompt displays as follows:
Switch(config-if)#

Example This example shows how to enter Interface Configuration mode for
interface MultiGigabitEthernet 3:

Switch# configure
Switch(config)# interface MultiGigabitEthernet 3
Switch(config-if)#

This example shows how to enter Interface Configuration mode for


interface xmg7:

Switch# configure
Switch(config)# interface xmg7
Switch(config-if)#

Switching Commands 42 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

interface range

Syntax interface range id

Parameter id Specify a range or group of interfaces. The id


parameter represents a range of interface
numbers in which each interface number is
separated by a comma (Example: g1,3,5). You can
also enter a range of interface numbers in which
the interface numbers are separated by a hyphen
(Example: g8-9). Another option is to combine
individual interfaces and ranges by separating
them by one or more commas (Example:
g1-4,g6,g8-9).

Default No default value.

Mode Global Configuration

Usage Some configurations are interface-range based, requiring you to enter


Interface Range Configuration mode. Use this command to enter the
Interface Range Configuration mode and select the range of interfaces
to configure.
In Interface Range Configuration mode, the prompt displays as follows:
Switch(config-if-range)#

Example This example shows how to enter Interface Range Configuration mode
for interfaces g3 through g5:

Switch# configure
Switch(config)# interface range g3-g5
Switch(config-if-range)#

This example shows how to enter Interface Configuration mode for


interfaces g6, g7, g10, and g11:

Switch# configure
Switch(config)# interface range g6-g7,g10-g11
Switch(config-if-range)#

Switching Commands 43 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

clear interface

Syntax clear interfaces id counters

Parameter id Specify the interface. The id parameter represents


the interface number.

Default No default value.

Mode Privileged EXEC

Usage Use this command to clear statistical counters for a specific interface.

Example This example shows how to clear the counters on interface g1:

Switch# clear interfaces g1 counters

description

Syntax description word


no description

Parameter word A port description with a length from 1 to 64


characters. If the description includes a space
character, place the entire string in double
quotes.

Default No default value.

Mode Interface Configuration

Usage Use the description command to set a port description so that you can
identify it easily.
Use the no description command to reset the description to a blank
string.

Example This example shows how to set a port description:

Switch(config)# interface g1
Switch(config-if)# description userport
Switch(config-if)# exit

Switching Commands 44 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Switch(config)# interface g2
Switch(config-if)# description “uplink port”

This example shows how to display the port description on interface


g1 and g2:

Switch# show interfaces g1-2 status


Port Name Status Vlan Duplex Speed Type
g1 userport notconnect 1 auto auto Copper
g2 uplink port notconnect 1 auto auto Copper

flowcontrol

Syntax flowcontrol {auto | asymmetric | symmetric | off}


no flowcontrol

Parameter auto Automatically enables or disables flow control on


the interface.
asymmetric Forces flow-control as asymmetric on the
interface
symmetric Forces flow-control as symmetric on the interface.
off Disables flow control on the interface.

Default Flow control is disabled.

Mode Interface Configuration

Usage Use the flowcontrol command to set the flow control configuration for
an interface.
Use no flowcontrol command to reset flow control to its default (off).

Example This example shows how to set the flow control configuration for
interface g1:

Switch(config)# interface g1
Switch(config-if)# flowcontrol auto

This example shows how to display the configuration, including flow


control, for interface g1:

Switch# show interfaces g1


Hardware is Gigabit Ethernet
Full-duplex, Auto-speed, media type is Copper
flow-control is auto
back-pressure is enabled
0 packets input, 0 bytes, 0 throttles

Switching Commands 45 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Received 0 broadcasts (0 multicasts)


0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 multicast, 0 pause input
0 input packets with dribble condition detected
379 packets output, 31981 bytes, 0 underrun
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 PAUSE output

jumbo-frame

Syntax jumbo-frame [<1522-10000>]


no jumbo-frame

Parameter <1522-10000> As an option, set a specific maximum frame size


from a value from 1522 to 10,000. If you do not
set a specific value, the jumbo-frame command
sets the value automatically to 10,000.

Default The default maximum frame size is 1522.

Mode Global Configuration

Usage Use the jumbo-frame command to set the maximum frame size to
10,000.
Use the jumbo-frame [<1522-10000>] command to set the maximum
frame size to a specific value.
Use the no jumbo-frame command to reset maximum frame size to its
default value.

Example This example shows how to modify the maximum frame size to 9216
bytes:

Switch(config)# jumbo-frame 9216

This example shows how to display the running configuration, which


includes the jumbo-frame size:

Switch# show running-config

jumbo-frame 9216

Switching Commands 46 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show interfaces

Syntax show interfaces id [status | protected]

Parameter id Specify the interface or LAG. The id parameter


represents the interface or LAG number or a
range of interface numbers or LAG numbers. Use
a hyphen to indicate a range. Use a comma to
separate individual interfaces, ranges, or a
combination of both.
status Use this optional keyword to display a brief status
for the interface.
protected Use this optional keyword to display the
protected status of the interface.

Default No default value.

Mode Privileged EXEC

Usage Use the show interface command to display detailed interface


counters, the parameters, and the status.
Use the show interface status command to display a brief status of
the interface.
Use the show interface protected command to display the protected
status of an interface.

Example This example shows how to display the counters for interface g1:

Switch# show interfaces g1


Hardware is Gigabit Ethernet
Auto-duplex, Auto-speed, media type is Copper
flow-control is off
back-pressure is enabled
0 packets input, 0 bytes, 0 throttles
Received 0 broadcasts (0 multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 multicast, 0 pause input
0 input packets with dribble condition detected
0 packets output, 0 bytes, 0 underrun
0 output errors, 0 collisions, 0 interface resets
0 babbles, 0 late collision, 0 deferred
0 PAUSE output

This example shows how to display the port status for interface g1:

Switch# show interfaces g1 status


Port Name Status Vlan Duplex Speed Type
g1 connected 1 auto auto Copper

Switching Commands 47 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

This example shows how to display the protected port state for
interfaces g1 and g2:

Switch# show interfaces g1-2 protected


Port | Protected State
--------+-----------------
g1 | enabled
g2 | enabled

speed (for Gigabit switches)

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS308T and GS310TP
• GS724TPv2 and GS724TPP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP

Syntax speed {{10 | 100 | 1000} | {auto [10 | 100 | 1000 | 10/100 | 10/100/1000]}}

Parameter auto Sets the port speed to autonegotiation (which is


also the default setting).
10 Forces the port speed to 10 Mbits/s, or if used
with the auto keyword, to autonegotiation with
10 Mbits/s ability.
100 Forces the port speed to 100 Mbits/s, or if used
with the auto keyword, to autonegotiation with
100 Mbits/s ability.
1000 Forces the port speed to 1000 Mbits/s, or if used
with the auto keyword, to autonegotiation with
1000 Mbits/s ability.
10/100 Forces the port speed to autonegotiation with
10 Mbits/s and 100 Mbits/s ability.
10/100/1000 Forces the port speed to autonegotiation with
10 Mbits/s,100 Mbits/s and 1000 Mbits/s ability.

Default auto (autonegotiation) with all available abilities.

Mode Interface Configuration

Usage Use this command to change the port speed configuration up to the
maximum physical speed.

Switching Commands 48 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

The output of the show interfaces command with the status keyword
(see an example below) shows the following:
• For a port that is connected, if the port speed is set to automatic,
the Speed field shows the “a-“ prefix before the detected speed. If
the speed is set to a specific value, the Speed field shows only the
set speed.
• For a port that is not connected, if the port speed is set to
automatic, the Speed field shows “auto.” If the speed is set to a
specific value, the Speed field shows the set speed.

Example This example shows how to modify the port speed configuration:

Switch(config)# interface g1
Switch(config-if)# speed 100
Switch(config-if)# exit
Switch(config)# interface g2
Switch(config-if)# speed auto 10/100

This example shows how to display the running configuration, which


includes the port speed configuration:

Switch# show running-config interfaces g1-2


interface g1
speed 100
interface g2
speed auto 10/100

This example shows how to display information about interfaces,


including the interface link speed:

Switch# show interfaces g1-4 status


Port Name Status Vlan Duplex Speed Type
g1 connected 1 a-full 100M Copper
g2 connected 1 a-full a-100M Copper
g3 notconnect 1 auto auto Copper
g4 notconnect 1 auto 1000M Copper

speed (for Multi-Gigabit switches)

This command is supported on the MS510TXM and MS510TXUP. This command refers to the
ports and their supported speeds as follows:
• MultiGigabitEthernet: Ports 1–4, supporting 2.5G, 1G, and 100M speed. Note that on
these ports, 2.5G speed is available only if you configure the auto parameter.
• XMultiGigabitEthernet: Ports 5–8, supporting 10G, 5G, 2.5G, 1G, and 100M speed. Note
that on these ports, 10G speed is available only if you configure the auto parameter.

Switching Commands 49 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Syntax speed {auto | 100 | 1000 | 2500 | 5000}

Parameter auto Sets the port speed to autonegotiation, which is


an option for MultiGigabitEthernet ports (1–4) and
XMultiGigabitEthernet ports (5–8).
100 Forces the port speed to 100 Mbits/s, which is an
option for MultiGigabitEthernet ports (1–4) and
XMultiGigabitEthernet ports (5–8).
1000 Forces the port speed to 1000 Mbits/s, which is an
option for MultiGigabitEthernet ports (1–4) and
XMultiGigabitEthernet ports (5–8).
2500 Forces the port speed to 2500 Mbits/s, which is an
option for XMultiGigabitEthernet ports (5–8).
5000 Forces the port speed to 5000 Mbits/s, which is an
option for XMultiGigabitEthernet ports (5–8).

Default auto (autonegotiation) with all available abilities.

Mode Interface Configuration

Usage Use this command to change the port speed configuration up to the
maximum physical speed.
The output of the show interfaces command with the status keyword
(see an example below) shows the following:
• For a port that is connected, if the port speed is set to automatic,
the Speed field shows the “a-“ prefix before the detected speed. If
the speed is set to a specific value, the Speed field shows only the
set speed.
• For a port that is not connected, if the port speed is set to
automatic, the Speed field shows “auto.” If the speed is set to a
specific value, the Speed field shows the set speed.

Example This example shows how to modify the port speed configuration:

Switch(config)# interface mg1


Switch(config-if)# speed 1000
Switch(config-if)# exit
Switch(config)# interface xmg5
Switch(config-if)# speed 2500

This example shows how to display the running configuration, which


includes the port speed configuration:

Switch# show running-config interfaces mg1


interface mg1
speed 1000

Switching Commands 50 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

This example shows how to display information about interfaces,


including the interface link speed:

Switch# show interfaces mg1,xmg5 status


Port Name Status Vlan Duplex Speed Type
mg1 connected 1 a-full 1000M Copper
xmg5 notconnect 1 auto 2500M Copper

10g-media

This command is supported on the MS510TXM and MS510TXUP. The SFP+ fiber uplink ports
(9 and 10) of these switch models are capable of 10G and 1G.

Syntax 10g-media {auto-detect | fiber-1g}

Parameter auto-detect Detects the media automatically and sets the


speed according to the detected media type.
fiber-1g Forces the media to fiber and sets the speed to
1000 Mbits/s.

Default auto-detect

Mode Interface Configuration

Usage Use this command to set the media configuration on an


XGigabitEthernet port.

Example This example shows how to modify the media on XGigabitEthernet


port 9:

Switch(config)# interface xg9


Switch(config-if)# 10g-media auto-detect

Switching Commands 51 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

auto-nego

Syntax auto-nego
no auto-nego

Parameter

Default autonegotiation is enabled.

Mode Interface Configuration

Usage Use the auto-nego command to enable autonegotiation on an


interface.
Use the no auto-nego command to disable autonegotiation on an
interface.

Example This example shows how to disable autonegotiation on interface g1


and to enable autonegotiation on interface g2:

Switch(config)# interface g1
Switch(config-if)# no auto-nego
Switch(config-if)# exit
Switch(config)# interface g2
Switch(config-if)# auto-nego

shutdown

Syntax shutdown
no shutdown

Parameter

Default The administration state is no shutdown.

Mode Interface Configuration

Usage Use the shutdown command to disable an interface.


Use the no shutdown command to enable an interface. If an interface
is error-disabled, use the no shutdown command to try to recover the
interface.

Switching Commands 52 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example shows how to shut down interface g1:

Switch(config)# interface g1
Switch(config-if)# shutdown

This example shows how to display the running configuration for


interface g1, which also display the administrative state of an interface:

Switch# show running-config interfaces g1


interface g1
shutdown

show fiber-transceiver

Syntax show fiber-transceiver interfaces id

Parameter interfaces id Display the information about the fiber


transceiver module that is installed in a physical
port or the modules that are installed in multiple
physical ports. The id parameter represents the
port number or a range of port numbers. Use a
hyphen to indicate a range. Use a comma to
separate individual ports, ranges, or a
combination of both.

Default No default value.

Mode Privileged EXEC

Usage Use this command to display information about one or more fiber
transceiver modules that are installed in one or more ports.

Example This example shows how to display information about a fiber transceiver
module that is installed in port g1:

Switch# show fiber-transceiver interfaces GigabitEthernet 1

Port| Temperature| Voltage| Current| Output power| Input power| OE-Present|LOS


| [C] | [Volt] | [mA] | [mWatt] | [mWatt] | |
===============================================================================
g1 | N/S | N/S | N/S | N/S | N/S | Remove |Loss

Switching Commands 53 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

LAG commands
lag

Syntax lag lag-id mode {static | active | passive}


no lag

Parameter lag-id Set the LAG ID for the interface. The lag-id
parameter represents the LAG number. The
number of LAGs that can be supported depends
on the switch model.
static Set static mode for the LAG
active Set dynamic mode for the LAG with the LACP
ports participating as active ports.
passive Set dynamic mode for the LAG with the LACP
ports participating as passive ports.

Default No default value.

Mode Interface Configuration

Usage A link aggregation group (LAG) lets you aggregate multiple physical
ports into one logic port for load sharing (increased bandwidth) or
fault tolerance.
Use the lag command to let one or more ports join a LAG in static or
dynamic mode.
Use the no lag command to remove one or more ports from a LAG.

Example This example shows how to create a dynamic LAG in which ports g1
through g3 are members:

Switch(config)# interface range g1-3


Switch(config-if)# lag 1 mode active

This example shows how to display the LAG status:

Switch# show lag

Group ID | Type | Ports


----------+--------+--------------------------------
1 | LACP | Inactive: g1-3
2 | ------ |
3 | ------ |
4 | ------ |
……………

Switching Commands 54 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

lag type

Syntax lag type {lacp | static}

Parameter lacp Set the LAG type as LACP


static Set the LAG type as static

Default Static

Mode Interface Configuration

Usage Use this command to set a LAG group as a static or dynamic (LACP)
LAG.

Example This example shows how to set LAG 1 as a dynamic (LACP) LAG:

Switch(config)# interface LAG 1


Switch(config-if)# lag type lacp

This example shows how to display the status of the LAGs:

Switch# show lag

Group ID | Type | Ports


----------+--------+--------------------------------
1 | LACP | Inactive: g1-3
2 | ------ |
3 | ------ |
4 | ------ |

……………

show lag

Syntax show lag

Parameter

Default No default value.

Mode Privileged EXEC

Switching Commands 55 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Usage Use this command to display the status of the LAGs and their members.

Example This example shows how to display the status of the LAGs and if LAG
members are active or inactive.

Switch# show lag

Group ID | Type | Ports


----------+--------+----------------------
1 | LACP | Inactive: g1-3
2 | ------ |
3 | ------ |
4 | ------ |
……………

VLAN commands
vlan

Syntax vlan vlan-list


no vlan vlan-list

Parameter vlan-list The VLAN ID or list of IDs to be created. The vlan-


list parameter represents a single VLAN ID
(Example: 3), a range of VLAN IDs in which the IDs
are separated by a hyphen (Example: 5-9), or a
combination of both, in which the single IDs and
ranges of IDs are separated by one or more
commas (Example: 3,5-9,14,101-104). VLAN IDs
can be from 1 to 4094.
Default VLAN 1

Mode Global Configuration

Usage Use the vlan command to create a VLAN.


Use the no vlan to remove an existing VLAN.
You can verify the VLAN setting in the output of the show vlan
command.

Example This example creates VLAN 100:

Switch# configure
Switch (config)# vlan 100
Switch (config-vlan)#

Switching Commands 56 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

name

Syntax name name


no name name

Parameter name Set the name for the VLAN. The name parameter
can be a maximum of 32 characters.

Default VLANxxxx, in which xxxx is the 4-digit VLAN number.

Mode VLAN Configuration

Usage Use the name command to set a name for a VLAN.


Use the no name command to remove a name from a VLAN.
You can verify your setting in the output of the show vlan command.

Example This example sets the name of VLAN 100 to VLAN-one-


hundred:

Switch (config)# vlan 100


Switch (config-vlan)# name VLAN-one-hundred
Switch# show vlan 100

VID | VLAN Name | Untagged Ports | Tagged Ports | Type


-------+------------------+-------------------+----------------+------
100 | VLAN-one-hundred | --- | --- | Static

switchport hybrid pvid

Syntax switchport hybrid pvid <1-4094>

Parameter <1-4094> The port VLAN ID (PVID) is a number from 1 to


4094.

Default The PVID is 1.

Mode Interface Configuration

Usage Use this command to set the PVID of an interface.


You can verify your setting in the output of the show interfaces
command.

Switching Commands 57 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example sets the PVID for interface g1 to 100:

Switch (config)# interface g10


Switch (config-if)# switchport hybrid pvid 100

The example shows the output of the show interfaces command:

Switch# show interfaces switchport g10


Port : g10
Port Mode : Hybrid
Ingress Filtering : enabled
Acceptable Frame Type : all
Ingress UnTagged VLAN ( NATIVE ) : 100
Trunking VLANs Enabled:

switchport hybrid allowed vlan

Syntax switchport hybrid allowed vlan add vlan-list [tagged | untagged]

Parameter vlan-list The VLAN ID or list of IDs to which the interface


must be added. The vlan-list parameter
represents a single VLAN ID (Example: 3), a range
of VLAN IDs in which the IDs are separated by a
hyphen (Example: 5-9), or a combination of both,
in which the single IDs and ranges of IDs are
separated by one or more commas (Example:
3,5-9,14,101-104). VLAN IDs can be from 1 to
4094.
tagged Optional keyword that sets the interface as a
tagged member of the VLAN or VLANs.
untagged Optional keyword that sets the interface as an
untagged member of the VLAN or VLANs.

Default Each interface is an untagged member of VLAN 1.


When you add an interface to a VLAN, by default it is a tagged
member.

Mode Interface Configuration

Usage Use this command to add an interface to a VLAN.


You can verify your setting in the output of the show interfaces
switchport command.

Switching Commands 58 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example adds interface g10 as a tagged member to VLANs 100,
101, 102, 103, 104, and 105:

Switch (config)# interface g10


Switch (config-if)# switchport hybrid allowed vlan add 100-
105

This example shows the output of the show interfaces switchport


command for interface g10:

Switch# show interfaces switchport g10


Port : g10
Port Mode : Hybrid
Ingress Filtering : disabled
Acceptable Frame Type : tagged-only
Ingress UnTagged VLAN ( NATIVE ) : 100
Trunking VLANs Enabled:

Port is member in:


Vlan Name Egress rule
------- ------------------------------- -----------------
1 default Untagged
100 VLAN-one-hundred Tagged
101 VLAN0101 Tagged
102 VLAN0102 Tagged
103 VLAN0103 Tagged
104 VLAN0104 Tagged
105 VLAN0105 Tagged

Forbidden VLANs:
Vlan Name
------- -----------------------

switchport hybrid remove vlan

Syntax switchport hybrid allowed vlan remove vlan-list

Parameter vlan-list The VLAN ID or list of IDs from which the interface
must be removed. The vlan-list parameter
represents a single VLAN ID (Example: 3), a range
of VLAN IDs in which the IDs are separated by a
hyphen (Example: 5-9), or a combination of both,
in which the single IDs and ranges of IDs are
separated by one or more commas (Example:
3,5-9,14,101-104). VLAN IDs can be from 1 to
4094.

Switching Commands 59 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Mode Interface Configuration

Usage Use this command to remove an interface from a VLAN.


You can verify your setting in the output of the show interfaces
switchport command.

Example This example removes interface g10 from VLAN 105:

Switch (config)# interface g10


Switch (config-if)# switchport hybrid allowed vlan remove
105

This example shows the output of the show interfaces switchport


command for interface g10:

Switch# show interfaces switchport g10


Port : g10
Port Mode : Hybrid
Ingress Filtering : disabled
Acceptable Frame Type : tagged-only
Ingress UnTagged VLAN ( NATIVE ) : 100
Trunking VLANs Enabled:

Port is member in:


Vlan Name Egress rule
------- ------------------------------- -----------------
1 default Untagged
100 VLAN-one-hundred Tagged
101 VLAN0101 Tagged
102 VLAN0102 Tagged
103 VLAN0103 Tagged
104 VLAN0104 Tagged

Forbidden VLANs:
Vlan Name
------- -----------------------

management-vlan

Syntax management-vlan vlan id


no management-vlan

Parameter id Set the ID of the management VLAN, which can be


a single VLAN only, with an ID from 1 to 4094.

Default VLAN 1 is the management VLAN

Switching Commands 60 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Mode Global Configuration

Usage Use the management vlan vlan command to set the ID of the
management VLAN. (The VLAN must already exist.)
Use the no management vlan vlan command to restore the
management VLAN to VLAN 1.

Example This example creates VLAN 2 and then sets VLAN 2 as the
management VLAN:

Switch(config)#vlan 2
Switch(config)# management-vlan vlan 2

This example restores the management VLAN to the default


management VLAN (VLAN 1):

Switch(config)# no management-vlan

show vlan

Syntax show vlan vlan-list

Parameter vlan-list The VLAN ID or list of IDs for which information


must be displayed. The vlan-list parameter
represents a single VLAN ID (Example: 3), a range
of VLAN IDs in which the IDs are separated by a
hyphen (Example: 5-9), or a combination of both,
in which the single IDs and ranges of IDs are
separated by one or more commas (Example:
3,5-9,14,101-104). VLAN IDs can be from 1 to
4094.
Default No default value.

Mode Privileged EXEC

Usage Use this command to display information about one or more VLANs.

Example This example shows how to display information about VLAN 1:

Switch# show vlan 1

VID | VLAN Name | Untagged Port | Tagged Port | Type


----- -+--------------+-------------------+-------------+--------
1 | default | g1-28,lag1-4 | --- | Default

Switching Commands 61 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show interfaces switchport

Syntax show interfaces switchport id

Parameter id Specify the interface, LAG, a range of interfaces,


or a range of LAGs. The id parameter represents
the interface or LAG number or a range of
interface numbers or LAG numbers. Use a hyphen
to indicate a range. Use a comma to separate
individual interfaces, ranges, or a combination of
both.

Default No default value.

Mode Privileged EXEC

Usage Use this command to show switchport information for one or more
interfaces.

Example This example shows how to display switchport information for interface
g10:

Switch# show interfaces switchport g10


Port : g10
Port Mode : Trunk
Ingress Filtering : enabled
Acceptable Frame Type : all
Ingress UnTagged VLAN ( NATIVE ) : 1
Trunking VLANs Enabled: 100

Port is member in:


Vlan Name Egress rule
------- ----------------------- ----------------
1 default Untagged
100 VLAN-one-hundred Tagged

Forbidden VLANs:
Vlan Name

Switching Commands 62 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Auto-VoIP commands
voice-vlan

Syntax voice-vlan
no voice-vlan

Parameter

Default No interfaces are members of the voice VLAN.

Mode Interface Configuration

Usage Use the voice vlan command to enable Auto-VoIP OUI-based mode
on an interface.
Use the no voice vlan command to disable Auto-VoIP OUI-based
mode on an interface
With OUI–based Auto-VoIP, the voice prioritization is based on
Organizationally Unique Identifier (OUI) bits.

Example This example shows how to enable Auto-VoIP OUI-based mode on


interfaces 1, 2, and 3:

Switch(config)#interface range g1-3


Switch(config-if)#voice-vlan

voice-vlan vlan

Syntax voice-vlan vlan id

Parameter id Set the ID of the Auto-VoIP VLAN, which can be a


single VLAN only, with an ID from 0 to 4094.

Default No default value.

Mode Global Configuration

Usage Use this command to configure the ID of the Auto-VoIP VLAN in OUI-
based mode.

Switching Commands 63 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

With OUI–based Auto-VoIP, the voice prioritization is based on


Organizationally Unique Identifier (OUI) bits.
The VLAN must already exist before you can configure the VLAN as the
Auto-VoIP VLAN.

Example This example sets VLAN 128 as the Auto-VoIP VLAN in OUI-based
mode:

Switch(config)# voice-vlan vlan 128

voice-vlan cos

Syntax voice-vlan cos <0-7>

Parameter <0-7> Set the class of service (CoS) value for the
AutoVoIP VLAN in OUI-based mode. The value
must be a number from 0 to 7.

Default CoS value 6

Mode Global Configuration

Usage Use this command to configure the CoS value for the Auto-VoIP VLAN.
With OUI–based Auto-VoIP, the voice prioritization is based on
Organizationally Unique Identifier (OUI) bits.

Example This example shows how to set the CoS value:

Switch(config)# voice-vlan cos 7

voice-vlan oui

Syntax voice-vlan oui <0-31> a :b :c [description]


no voice-vlan oui <0-31>

Parameter <0-31> Set the index of the OUI entry to be added or


removed. The value must be a number from 0 to
31.
a :b :c The OUI address in the 24-bit number format. For
example, 00:11:22 or 00:A1:B2.
description As an option, add a text as a description of the
OUI

Switching Commands 64 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Default 9 default OUI entries exist for an OUI-based Auto-VoIP

Mode Global Configuration

Usage Use the voice-vlan oui command to add an OUI entry to an OUI-based
Auto-VoIP.
Use the no voice-vlan oui command to remove an OUI entry from an
OUI-based Auto-VoIP.
You can verify the OUI settings in the output of the show running-
config command.

Example This example shows how to add a new OUI entry 00:11:22 with index 9 and
a description of test:

Switch(config)# voice-vlan oui 9 00:11:22 test

voip

Syntax voip
no voip

Parameter

Default Disabled

Mode Interface Configuration

Usage Use the voip command to enable Auto-VoIP in protocol-based mode


on an interface.
Use the no voip command to disable Auto-VoIP in protocol-based
mode on an interface.

Example This example shows how to enable Auto-VoIP in protocol-based mode on


interfaces g1, g2, and g3:

Switch(config)#interface range g1-3


Switch(config-if)#voip

Switching Commands 65 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

voip pri

Syntax voip pri <0-7>

Parameter <0-7> Set the class of service (CoS) value for VoIP
packets that are detected by Auto-VoIP in
protocol-based mode. The value must be a
number from 0 to 7.

Default CoS value 7

Mode Global Configuration

Usage Use this command to configure the Auto-VoIP Cos value in protocol-
based mode. This CoS value is applied to VoIP packets.

Example This example shows how to set the Auto-VoIP CoS value in protocol-based
mode to 3:

Switch(config)# voip pri 3

voip act

Syntax voip act {remark | traffic-class}

Parameter remark Applies the CoS value that is set in the voip pri
command and the remark flag to tagged VoIP
packets that are detected by Auto-VoIP in
protocol-based mode.
For untagged VoIP packets, the remark flag is
ignored, so the behavior is the same as when you
set the traffic-class parameter.
traffic-class Applies the CoS value that is set in the voip pri
command to tagged or untagged VoIP packets
that are detected by Auto-VoIP in protocol-based
mode.

Default The default action is to apply traffic-class

Mode Global Configuration


Usage Use this command to configure the prioritization type for Auto-VoIP in
protocol-based mode.

Switching Commands 66 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example shows how to set the prioritization type to remark for Auto-
VoIP in protocol-based mode:

Switch(config)# voip act remark

Spanning tree protocol commands


show spanning-tree

Syntax show spanning-tree

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to display the spanning tree configuration.

Example This example shows how to display the spanning tree configuration:

Switch# show spanning-tree

Spanning tree enabled mode RSTP


Default port cost method: short

Root ID Priority 32768


Address 00:11:22:33:44:55
This switch is the root
Hello Time 4 sec Max Age 10 sec Forward Delay 25 sec

Number of topology changes 2 last change occurred 20:34:30 ago


Times: hold 0, topology change 0, notification 0
hello 4, max age 10, forward delay 25

Interfaces
Name State Prio.Nbr Cost Sts Role EdgePort Type
------ ------- -------- ----- ------ ---- -------- -----------
g23 enabled 128.23 19 Blk Desg No P2P (RSTP)

Switching Commands 67 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show spanning-tree interfaces

Syntax show spanning-tree interfaces id

Parameter id Specify the interface, LAG, a range of interfaces,


or a range of LAGs. The id parameter represents
the interface or LAG number or a range of
interface numbers or LAG numbers. Use a hyphen
to indicate a range. Use a comma to separate
individual interfaces, ranges, or a combination of
both.

Default No default value.

Mode Privileged EXEC

Usage Use this command to show the STP configuration and statistics for an
interface or LAG.

Example This example shows how to display the STP configuration for interface
g23:

Switch# show spanning-tree interfaces g23

Port g23 enabled


State: forwarding Role: designated
Port id: 128.23 Port cost: 19
Type: P2P (RSTP) Edge Port: No
Designated bridge Priority : 32768 Address:
00:11:22:33:44:55
Designated port id: 128.23 Designated path
cost: 0
BPDU Filter: Disabled BPDU guard:
Disabled
BPDU: sent 21886, received 0

Switching Commands 68 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show spanning-tree mst configuration

Syntax show spanning-tree mst configuration

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to show the global MST configuration.

Example This example shows how to display the global MST configuration:

Switch# show spanning-tree mst configuration


Name [00:11:22:33:44:55]
Revision 0 Instances configured 2

Instance Vlans mapped


-------- ---------------------
0 1-99,111-4094
1 100-110
--------------------------------

show spanning-tree mst interfaces

Syntax show spanning-tree mst instance-id interfaces id

Parameter instance-id The ID of the MST instance. The instance-id


parameter represents a value from 0 to 15.
id Specify the interface, LAG, a range of interfaces,
or a range of LAGs. The id parameter represents
the interface or LAG number or a range of
interface numbers or LAG numbers. Use a hyphen
to indicate a range. Use a comma to separate
individual interfaces, ranges, or a combination of
both.

Default No default value.

Switching Commands 69 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Mode Privileged EXEC

Usage Use this command to show the MSTP information for a specific MST
instance on an interface.

Example This example shows how to display MSTP information for MST instance
0 on interface g23:

Switch# show spanning-tree mst 0 interfaces g23

MST Port Information


============================================================
Instance Type : CIST (0)
------------------------------------------------------------

Port Identifier : 128/23


External Path-Cost : 0 /19
Internal Path-Cost : 0 /19
------------------------------------------------------------
Designated Root Bridge : 32768/00:11:22:33:44:55
External Root Cost : 0
Regional Root Bridge : 32768/00:11:22:33:44:55
Internal Root Cost : 0
Designated Bridge : 32768/00:11:22:33:44:55
Internal Port Path Cost : 19
Port Role : Designated
Port State : Forwarding
------------------------------------------------------------

This example shows how to display MSTP information for MST instance
1 on interface g23:

Switch# show spanning-tree mst 1 interfaces g23

MST Port Information


============================================================
Instance Type : MSTI (1)
------------------------------------------------------------

Port Identifier : 128/23


Internal Path-Cost : 0 /19
------------------------------------------------------------
Regional Root Bridge : 32768/00:11:22:33:44:55
Internal Root Cost : 0
Designated Bridge : 32768/00:11:22:33:44:55
Internal Port Path Cost : 19
Port Role : Designated
Port State : Forwarding
------------------------------------------------------------

Switching Commands 70 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

MAC address table commands


clear mac address-table dynamic

Syntax clear mac address-table dynamic [interfaces id | vlan vlan-id]

Parameter interfaces id As an option, specify the interface, LAG, a range


of interfaces, or a range of LAGs from which all
dynamically learned addresses must be deleted.
The id parameter represents the interface or LAG
number or a range of interface numbers or LAG
numbers. Use a hyphen to indicate a range. Use a
comma to separate individual interfaces, ranges,
or a combination of both.
vlan vlan-id As an option, specify the VLAN ID from which all
dynamically learned addresses must be deleted.
The vlan-id parameter represents the VLAN ID.

Default No default value.

Mode Privileged EXEC

Usage Use this command to delete the dynamically learned MAC entries from
the MAC address table. As an option, you can specify an interface,
LAG, or VLAN from which the dynamically learned address entries
must be cleared. If you do not specify an interface or a VLAN, all
dynamically learned address entries on the switch are deleted.

Example This example deletes the dynamically learned MAC addresses on


interface g1.

Switch# clear mac address-table dynamic interfaces g1

show mac address-table

Syntax show mac address-table [mac-address]

Parameter mac-address As an option, specify a MAC address for which the


entries in the MAC address table must be displayed.
The mac-address parameter represents the MAC
address in the standard xx.xx.xx.xx.xx.xx format.

Switching Commands 71 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Default No default value.

Mode Privileged EXEC

Usage Use this command to show the entries in the MAC address table. As an
option, you can specify a single MAC address for which entries in the
MAC address table must be displayed.

Example This example shows how to display the entire MAC address table:

Switch# show mac address-table


VID | MAC Address | Type | Ports
------+-------------------+-------------------+------------
---
1 | DE:AD:BE:EF:01:02 | Management | CPU
1 | 1C:E6:C7:8F:10:02 | Dynamic | g3

Total number of entries: 2

This example shows how to displays address table entries that contain
MAC address 00:11:22:33:44:55:

Switch# show mac address-table 00:11:22:33:44:55


VID | MAC Address | Type | Ports
------+-------------------+------------+----------------
100 | 00:11:22:33:44:55 | Static | g1

Total number of entries: 1

Switching Commands 72 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Routing Commands
IP routing commands
show ip interface

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax show ip interface [vlan vlan-id]

Parameter vlan vlan-id As an option, specify the VLAN ID for which the
Layer 3 routing interfaces must be displayed. The
vlan-id parameter represents the VLAN ID.

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to show the L3 routing interfaces. As an option, you
can specify a VLAN for which the routing interfaces must be displayed.
If you do not specify a VLAN, all routing interfaces on the switch are
displayed.
If the switch does not support static routing, or you did not configure
any routing interfaces, the command does not work.

Example This example shows how to display all routing interfaces:

Switch# show ip interface

IP Address I/F I/F Status Type Status


admin/oper
------------------ ---------- ---------- ------- ------
192.168.1.1/24 VLAN 2 UP/DOWN Static Valid
192.168.2.1/24 VLAN 3 UP/DOWN Static Valid

Routing Commands 73 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Routing table commands


show ip route

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax show ip route

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to show the route entries on the switch. If the switch
does not support static routing, the command does not work.

Example This example shows how to display the route entries on the switch:

Switch# show ip route

Codes: > - best, C - connected, S - static

C> 192.168.0.0/24 is directly connected, MGMT VLAN

Routing Commands 74 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

ARP commands
clear arp-cache

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax clear arp-cache

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to delete all ARP entries on the switch.

Example This example shows how to delete all ARP entries on the switch:

Switch(config)# clear arp-cache

show arp

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP
• MS510TXM and MS510TXUP

Syntax show arp

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC

Routing Commands 75 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Usage Use this command to show all ARP entries on the switch.

Example This example shows how to display all ARP entries on the switch:

Switch# show arp


VLAN Interface IP address HW address Status
----------------- --------------- ------------------ ----------
vlan 1 192.168.0.1 50:3e:aa:07:ab:46 Dynamic

show arp configuration

This command is supported on the following switch models:


• GS108Tv3 and GS110TPv3
• MS510TXM and MS510TXUP
• GS728TPv2, GS728TPPv2, GS752TPv2, and GS752TPP

Syntax show arp configuration

Parameter

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to show the ARP configuration on the switch.

Example This example shows how to display the ARP configuration on the
switch:

Switch# show arp configuration

Global configuration:
ARP timeout: 1200 Seconds
ARP response: 1 Seconds
ARP retry: 4 times
ARP cache: 512
ARP renew: enabled

Routing Commands 76 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Security Commands
Management security commands
username

Syntax username name algorithm-type sha256 secret password


no username name

Parameter name The user name that must be added. The name
parameter represents the user name and can
consist of a maximum number of 32 characters.
You can use alphabetical and digital characters
and the following special characters:
!#$%&()*+,-/;<=>@[]^_`{|}~\
password The password that must be associated with the
user name. The password parameter represents
the password in non-encrypted format. The
password can be from 8 to 20 characters, and
must include at least one uppercase letter, one
lowercase letter, and one number.
You can use alphabetical and digital characters
and the following special characters:
!#$%&()*+-./:;<=>@[]^_`{|}~

Default User name “admin” with password “password” and privilege level 15.

Mode Global Configuration

Usage Use the username command to add a new user account or change an
existing user account.
Use the no username command to delete an existing user account.
You cannot remove the default admin account.

The user accounts are stored in the local database for login
authentication.

Security Commands 77 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example shows how to add a new user account with the
name NewUser and password QaZWSx123:

Switch(config)# username NewUser algorithm-type sha256


secret QaZWSx123

show username

Syntax show username

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to show all user accounts in the local database.

Example This example shows how to display all existing user accounts:

Switch# show username


Priv | Type | User Name | Password
-------+--------+-----------------+--------------------------
-
15 | secret | admin | DYVk7/C3+pxgiCTjJLFGQg==
15 | secret | test1 | wTqZERR1UWif6EcDR+b6DQ==
15 | secret | test2 | 9T3Vlx8TA0ZkfxZ8Fx+NWA==
15 | secret | test3 | mCgN/jKs2n9FbPIurDqY7g==

show users

Syntax show users

Parameter

Default No default value.

Mode Privileged EXEC

Security Commands 78 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Usage Use this command to show information about all active users.

Example This example shows how to display information about all active users:

Switch# show users


Username Protocol Location
--------------- ------------ -----------------------
admin console ---
user1 telnet 192.168.0.1
user2 ssh 192.168.0.1

Access commands
ip ssh

Syntax ip ssh
no ip ssh
Parameter

Default Enabled

Mode Global Configuration

Usage Use the ip ssh command to enable SSH access to the switch.
Use the no ip ssh command to disable SSH access to the switch.

Warning: If you disable SSH access, all current SSH sessions are
terminated, and you can no longer access the switch over the CLI. To
restore SSH access, log in to the local browser UI, and reenable SSH
access.

Example This example shows how to disable SSH service:

Switch(config)# no ip ssh
SSH daemon disabled.

Security Commands 79 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

ip ssh port

Syntax ip ssh port <1025-65535>


no ip ssh port

Parameter <1025-65535> Set the secure shell (SSH) TCP service port, which
can be a number in the range from 1025 to
65535.

Default 22

Mode Global Configuration

Usage Use the ip ssh port command to set the TCP port number on which the
switch can detect SSH requests.
Use the no ip ssh port command to reset the port number to the
default.

Example This example shows how to set the SSH TCP port number to port 1025:

Switch(config)# ip ssh 1025

ip ssh protocol

Syntax ip ssh protocol number

Parameter Number The SSH version. The number parameter


represents the SSH version, which can be 2 only.
Currently. only SSH version 2 is supported.

Default 2

Mode Global Configuration

Usage Use this command to set the SSH version. Currently, only SSH version 2
is supported.

Example This example shows how the set the SSH version on the switch to version 2:

Switch# ip ssh protocol 2

Security Commands 80 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

exec-timeout

Syntax exec-timeout <1-60>

Parameter <1-60> Set the SSH session time-out period in minutes,


from 1 to 60 minutes.
Default 5 minutes

Mode Line Configuration

Usage Use this command to set the SSH session time-out period in minutes. If
a user is logged in to the CLI, but does not take action, the user is
automatically logged out from the CLI when the time-out period is
reached.

Example This example shows how to set the SSH session time-out period to 25
minutes:

Switch(config)# line ssh


Switch(config-line)# exec-timeout 25

max-session

Syntax max-session <1-4>

Parameter <1-4> Set the maximum number of simultaneous SSH


sessions, from 1 to 4.
Default 4

Mode Line Configuration

Usage Use this command to set the maximum number of simultaneous SSH
session on the switch.

Example This example shows how to set the maximum number of SSH sessions
to 3:

Switch(config)# line ssh


Switch(config-line)# max-session 3

Security Commands 81 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

ip ssh crypto key generate

Syntax ip ssh crypto key generate rsa


no ip ssh crypto key
Parameter

Default A default RSA key exists.

Mode Privileged EXEC

Usage Use the ip ssh crypto key generate rsa command to generate a new
RSA key or replace the existing RSA key.
Use the no ip ssh crypto key command to delete the existing RSA key.
This process may take a few minutes.

Example This example shows how to generate a new RSA key:

Switch# ip ssh crypto key generate rsa

show ip ssh

Syntax show ip ssh

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to display the SSH configuration and status.

Example This example shows how to display the configuration and status of
SSH:

Switch# show ip ssh

SSH Configuration

Administrative Mode : Disabled


SSH Port : 22
Protocol Levels : Version 2
SSH Sessions Currently Active : 0

Security Commands 82 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Max SSH Sessions Allowed : 4


SSH Timeout (mins) : 5
Keys Present : RSA
Key Generation In Progress : None

Traffic control commands


storm-control

Syntax storm-control {broadcast | multicast | unknown-unicast} [level percent]


no storm-control {broadcast | multicast | unknown-unicast}

Parameter broadcast Select broadcast as the storm control type.


multicast Select multicast as the storm control types.
unknown-unicast Select unknown unicast as the storm control type.
percent As an option, set a rate value. The percent
parameter represents a percentage.

Default All types of storm control are disabled.


If you enable any type of storm control, the default level is 5 (that is, 5
percent).

Mode Global Configuration


Interface Configuration

Usage Use the storm-control {broadcast| multicast | unknown-unicast}


command to enable storm control of a specific type.
The different types of storm control (broadcast, multicast, and
unknown unicast) are not mutually exclusive, but can each be enabled
by issuing the command several times.
Use no storm-control {broadcast| multicast | unknown-unicast}
command to disable storm control of a specific type.

Example This example shows how to enable broadcast storm control on


interface g1 and set a broadcast storm control rate of 10 percent:

Switch(config)# interface g1
Switch(config-if)# storm-control broadcast level 10

Security Commands 83 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

storm-control action

Syntax storm-control {broadcast | multicast | unknown-unicast} action {trap |


shutdown}
no storm-control {broadcast | multicast | unknown-unicast} action

Parameter broadcast The action must apply to broadcast traffic that


exceeds the threshold.
multicast The action must apply to multicast traffic that
exceeds the threshold.
unknown-unicast The action must apply to unknown unicast traffic
that exceeds the threshold.
trap Discard the frames that exceed the threshold and
send an SNMP trap.
shutdown Shut down the interface.

Default All frames that exceed the threshold are discarded (dropped).

Mode Global Configuration


Interface Configuration

Usage Use the storm-control {broadcast | multicast | unknown-unicast}


action command to set the action that must occur when the received
storm control packets exceed the maximum rate.
Use no storm-control {broadcast | multicast | unknown-unicast}
action command to reset the action to the default.

Example This example shows how to set the action for broadcast storm control
globally (because of the Global Configuration command mode) to shut
down the interface or interfaces on which the maximum rate is
exceeded:

Switch(config)# storm-control broadcast action shutdown

Security Commands 84 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show storm-control

Syntax show storm-control

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to show all storm control configurations, including
the global configuration and the per-interface configurations.

Example This example shows how to display all storm control configurations on
the switch. For each of the three types of storm control, the output
shows if the type is enabled or disabled for an interface.

Switch# show storm-control


Storm control preamble and IFG: Excluded
Storm control unit: bps
Port | Broadcast | Multicast | Unknown-Unicast
| % | % | %
-------+---------------------+---------------------+----------------------
g1 5.0 Drop 5.0 Drop (Off) 5.0 Drop (Off)
g2 5.0 Drop 5.0 Drop (Off) 5.0 Drop (Off)
g3 5.0 Drop (Off) 5.0 Drop (Off) 5.0 Drop (Off)
g4 5.0 Drop (Off) 5.0 Drop (Off) 5.0 Drop (Off)
……………

Security Commands 85 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Monitoring Commands
Port commands
show cable-diag

Syntax show cable-diag interfaces id

Parameter interfaces id Specify the interface for which the diagnostic


information must be displayed. The id parameter
represents the interface number or a range of
interface numbers. Use a hyphen to indicate a
range. Use a comma to separate individual
interfaces, ranges, or a combination of both.

Default No default value.

Mode Privileged EXEC

Usage Use this command to show the estimated length of the Ethernet cable
that is attached to an interface. The interface must be active, and in the
link-up state.

Example This example shows how to display the diagnostic information for the
cables that are attached to interfaces g1 and g2:

Switch# show cable-diag interfaces GigabitEthernet 1-2

Port | Speed | Local pair | Pair length | Pair status


--------+--------+------------+-------------+---------------
g1 | auto | Pair A | 0.88 | Open
Pair B | 0.82 | Open
Pair C | 0.80 | Open
Pair D | 0.78 | Open

g2 | auto | Pair A | 0.81 | Open


Pair B | 0.81 | Open
Pair C | 0.77 | Open
Pair D | 0.81 | Open

Monitoring Commands 86 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Logging commands
clear logging

Syntax clear logging {buffered | file}

Parameter buffered Clears the log messages stored in RAM.


file Clears the log messages stored in the flash
memory.
Default No default value.

Mode Privileged EXEC

Usage Use this command to clear the log messages from the internal logging
buffer in the RAM or the flash memory.

Example This example first clears the log messages stored in RAM and then
clears the log messages in flash memory:

Switch# clear logging buffered


Switch# clear logging file

show logging

Syntax show logging [buffered | file | traplogs}

Parameter buffered Displays the log messages stored in RAM.


file Displays the log messages stored in flash
memory.
traplogs Displays the log messages for SNMP traps.

Default No default value.

Mode Privileged EXEC

Usage Use this command to show the log messages in RAM, flash memory, or
the SNMP trap logs.

Monitoring Commands 87 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Example This example shows the log messages stored in the RAM:

Switch# show logging buffered


Logging service is enabled

Aggregation: disabled
Aggregation aging time: 300 sec

Console Logging: level notice


Buffer Logging : level info
File Logging : disabled
Trap Logging : level debug

Buffer Logging
--------------
<182>1 2021-01-01T00:01:33.480Z 192.168.0.239-1 discAgent-6
%% UPnP restart as no new routing interface is up w.r.t
intfm.
<182>1 2021-01-01T00:01:33.480Z 192.168.0.239-1 discAgent-6
%% Started UPnP service pid (591).
<182>1 2021-01-01T00:01:07.330Z 192.168.0.239-1 discAgent-6
%% Started UPnP service.
<182>1 2021-01-01T00:01:07.330Z 192.168.0.239-1 discAgent-6
%% Started UPnP service pid (555).

Mirroring commands
mirror session destination interface

Syntax mirror session <1-4> destination interface id [allow-ingress]


no mirror session {all | <1-4> | [<1-4> destination interface id]}

Parameter <1-4> Specify the mirror session, which can be a


number from 1 to 4. The switch can support a
total of four simultaneous mirroring sessions.
id Specify the destination interface (a single physical
port) to which the traffic is mirrored. The id
parameter represents the interface number,
allows a partial port name, and is not case-
sensitive. For example, g1 or GigabitEthernet2.
allow-ingress As an option, enable forwarding of ingress traffic.
all For the no form of the command, specify all
mirroring sessions. The switch can support up to
four simultaneous mirroring sessions.

Monitoring Commands 88 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Default No destination port is configured.

Mode Global Configuration

Usage Use the mirror session destination interface command to set the
physical destination port for a specific port mirror session.
Use the no mirror session command to stop either all mirroring
sessions on the switch, a single mirroring session on the switch, or one
specific mirroring session on a specific physical destination port.

Example This example shows how to set interface g1 as the destination port for
both incoming and outgoing traffic for mirroring session 1:

Switch(config)# mirror session 1 destination interface g1

mirror session source interface

Syntax mirror session <1-4> source interface id {both | rx | tx}


no mirror session {all | <1-4> | [<1-4> source interface id {both | rx | tx}]}

Parameter <1-4> Specify the mirror session, which can be a number


from 1 to 4. The switch can support a total of four
simultaneous mirroring sessions.
id Specify the source interface, which can be a
physical port or LAG, from which traffic is
mirrored. The id parameter represents the
interface number, allows a partial port name, and
is not case-sensitive.
both Mirroring applies to both incoming and outgoing
traffic.
rx Mirroring applies to incoming traffic only.
tx Mirroring applies to outgoing traffic only.
all For the no form of the command, specify all
mirroring sessions. The switch can support up to
four simultaneous mirroring sessions.

Default No monitor sessions are configured for any source interfaces.

Mode Global Configuration

Monitoring Commands 89 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Usage Use the mirror session source interface command to start a port
mirroring session from a specific source interface.
Note: Before you start a port mirroring session, first configure the
destination port for the session.
Use the no mirror session command to stop either all mirroring
sessions on the switch, a single mirroring session on the switch, or one
specific mirroring session on a specific source port. If you stop it on a
specific source port, you must stop it for either a specific direction or
both directions.

Example This example shows how to start port mirroring session 1 to mirror
both incoming and outgoing traffic on interfaces g2, g3, g4, and g5:

Switch(config)# mirror session 1 source interface g2-5 both

Monitoring Commands 90 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Maintenance Commands
Reset commands
reboot

Syntax reboot

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to reboot the switch without powering down the
switch. If you reboot the switch, all network connections are
terminated. The switch uses the saved startup configuration to initialize
the switch.
The CLI prompts you to confirm that the reboot action must proceed.

Example This example shows how to reboot the switch:

Switch# reboot
Are you sure you want to reboot the system? (Y/N)[N]y
Rebooting system ...

restore-defaults

Syntax restore-defaults

Parameter

Default No default value.

Mode Privileged EXEC

Maintenance Commands 91 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Usage Use this command to restore the switch to factory default settings, after
which the switch automatically reboots.
Note: This command has the same effect as the delete startup-config
command.

Example This example shows how to restore the switch to factory default
settings and then reboot the switch:

Switch# restore-defaults
Rebooting now...

delete

Syntax delete {[startup-config | flash://startup-config] | [backup-config |


flash://backup-config]}

Parameter startup-config Deletes the startup configuration file from flash


memory.
flash://startup- Deletes the startup configuration file from flash
config memory.
backup-config Deletes the backup configuration file from flash
memory.
flash://backup- Deletes the backup configuration file from flash
config memory.

Default No default value.

Mode Privileged EXEC

Usage Use this command to delete the startup configuration file or backup
configuration file from flash memory.

Notes:
• The delete startup-config command is identical to the delete
flash://startup-config command.
• The delete backup-config command is identical to the delete
flash://backup-config command.
• The delete startup-config command has the same effect as the
restore-defaults command.

Example This example shows how to delete the backup configuration file from
flash memory:

Switch# delete backup-config

Maintenance Commands 92 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

delete system

Syntax delete system {image0 | image1}

Parameter image0 Deletes image0 from the flash memory.


image1 Deletes image1 from the flash memory.

Default No default value.

Mode Privileged EXEC

Usage Use this command to delete a firmware image that is stored in flash
memory.

Important: The numbering of the firmware images in the CLI differs


from the numbering in the device UI:
• image0 in the CLI = image1 in the device UI
• image1 in the CLI = image2 in the device UI

Example This example shows how to delete firmware image1 from flash
memory:

Switch# delete system image1

Copy, export, and update commands


Copy

Syntax copy {flash:// | tftp://} {flash:// | tftp://}


copy {flash:// | usb://} {flash:// | usb://}
copy scp:// flash://

copy {tftp:// | scp:// | usb://} {backup-config | running-config | startup-


config}
copy {backup-config | running-config | startup-config} {tftp:// | scp:// |
usb://}

copy {backup-config | startup-config} running-config


copy {backup-config | running-config} startup-config
copy {running-config | startup-config} backup-config
copy tech-support {tftp:// | scp://}

Maintenance Commands 93 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Parameter flash:// Specifies either the source file that is in flash


memory or the destination file that must be stored
in flash memory. The flash:// parameter can be
one of the following files:
flash://startup-config
flash://running-config
flash://backup-config
flash://image0
flash://image1
flash://ram.log
flash://flash.log
tftp:// Specify the IP address of the remote TFTP server
and the remote file name. Use the following
format:
tftp://<ip-address>/<path-to-remote-file>
usb:// Specify the file name on the USB device. Use the
following format:
usb://<filename>
This parameter is supported only on switch
models GS728TPv2, GS728TPPv2, GS752TPv2,
and GS752TPP.
scp:// Specify the IP address of the remote SSH server
and the remote file name. Use the following
format:
scp://<username>@<ip-address>:<path-to-
remote-file>
running-config Selects the running configuration file.
startup-config Selects the startup configuration file.
backup-config Selects the backup configuration file.
tech-support Selects the technical support file.

Default No default value.

Mode Privileged EXEC

Usage The switch includes multiple types of files, many of which are important
for its management. The most common file operation is copy. The
copy command lets you upgrade, back up, and copy the following
types of files.
• Firmware images
• Configuration files
• Syslog files

Maintenance Commands 94 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Important: The numbering of the firmware images in the CLI differs


from the numbering in the device UI:
• image0 in the CLI = image1 in the device UI
• image1 in the CLI = image2 in the device UI

Example This example shows how to copy the running configuration to the
startup configuration:

Switch# copy running-config startup-config

This example shows how to back up the running configuration to a file


named test1.cfg on a remote TFTP server with IP address 192.168.0.1:

Switch# copy running-config tftp://192.168.0.1/test1.cfg


Uploading file...Please Wait...
Uploading Done

This example shows how to upgrade the startup configuration from a


file named test2.cfg on remote TFTP server with IP address 192.168.0.1:

Switch# copy tftp://192.168.0.1/test2.cfg startup-config


Downloading file...Please Wait...
Downloading Done
Upgrade config success. Do you want to reboot now? (y/n)n

This example shows how to back up the startup-config configuration to


a file named test3.cfg on a remote SSH server with IP address
192.168.0.1. The file is backed up using an account with user name
‘user’ and placed in the /home/user/test directory:

Switch# copy startup-config


scp://user@192.168.0.1:/home/user/test/test3.cfg
Uploading file. Please wait...
The authenticity of host '192.168.0.1 (192.168.0.1)' can't
be established.
ED25519 key fingerprint is
SHA256:dI8nnu4v2YrnaTCyYvV0Jn3vV/poRS4qoK38JD0aJr0.
This key is not known by any other names
Are you sure you want to continue connecting
(yes/no/[fingerprint])?
Warning: Permanently added '192.168.0.1' (ED25519) to the
list of known hosts.
user@192.168.0.1's password:
startup-config 100% 1500
1.5KB/s 00:00
Uploading Done
Success

Maintenance Commands 95 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

File management commands


save

Syntax save

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to save the running configuration to the startup
configuration file.
Note: This command has the same effect as the copy running-config
startup-config command.

Example This example shows how to save the running configuration to the
startup configuration file:

Switch# save
Success

This example shows how to display the startup configuration:

Switch# show startup-config


! Model: GS728TPv2
! System Description: NETGEAR 24-Port Gigabit PoE+ Smart
Managed Pro Switch with 4 SFP Ports (GS728TPv2)
……………

boot system

Syntax boot system {image0 | image1}

Parameter image0 Boots the switch from flash image partition 0


image1 Boots the switch from flash image partition 1

Default The default boot image is image0.

Maintenance Commands 96 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Mode Global Configuration

Usage The switch support two images, which lets you store a backup image in
the flash memory of the switch.
Use this command to select the active firmware image. If you select
image1 to become the new active firmware, image0 becomes the new
backup image.

Example This example shows how to select image1 as the active image:

Switch(config)# boot system image1


Select "image1" Success

show bootvar

Syntax show bootvar

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to show the image information in both partitions of
the flash memory. The output of the command also shows the currently
active image and the image that will be the active image after the
switch boots.

Example This example shows how to display the dual image information on the
switch:

Switch# show bootvar


Image Version Date Status File Name
----- ------- --------------------- -------- ----------------------
0 6.0.9.1 2021-09-22 16:53:53 Active GS728_752TP_TPP_V6.0.9.1.bix
1 6.0.9.2 2021-10-09 18:32:26 Not active* GS728_752TP_TPP_V6.0.9.2.bix

Maintenance Commands 97 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show startup-config

Syntax show startup-config

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to show the contents of the startup configuration for
the switch.
Note: The configuration file is text based.

Example This example shows how to the display the startup configuration for
the switch:

Switch# show startup-config


! Model: GS728TPv2
! System Description: NETGEAR 24-Port Gigabit PoE+ Smart
Managed Pro Switch with 4 SFP Ports (GS728TPv2)
!

……………

show running-config

Syntax show running-config [interfaces id]

Parameter id Show the content of the running configuration.


As an option, show the content of the running
configuration for a specific interface. The id
parameter represents the interface number,
allows a partial port name, and is not case-
sensitive.
Default No default value.

Mode Privileged EXEC

Usage Use the show running-config command to show the running


configuration for the switch.

Maintenance Commands 98 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Use the show running-config interfaces command to show the


running configuration for a specific interface.
Note: The configuration file is text based.

Example This example shows how to display the running configuration for the
switch:

Switch# show running-config


! Model: GS728TPv2
! System Description: NETGEAR 24-Port Gigabit PoE+ Smart
Managed Pro Switch with 4 SFP Ports (GS728TPv2)
!

……………

This example shows how to display the running configuration for


interface g1:

Switch# show running-config interfaces g1


interface g1
speed 1000

……………

show backup-config

Syntax show backup-config

Parameter

Default No default value.

Mode Privileged EXEC

Usage Use this command to show the backup configuration for the switch.
Note: The configuration file is text based.

Example This example shows how to the display the backup configuration for
the switch:

Switch# show backup-config


! Model: GS728TPv2
! System Description: NETGEAR 24-Port Gigabit PoE+ Smart
Managed Pro Switch with 4 SFP Ports (GS728TPv2)
!
……………

Maintenance Commands 99 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

show tech-support

Syntax show tech-support

Parameter

Default N/A

Mode Privileged EXEC

Usage Use this command to display system and configuration information


that can be beneficial to technical support.

Example This example shows how to display technical information for technical
support:

Switch(config)# show tech-support

!!!!!!!!!

------------------ System Information ------------------

System Name : Switch


System Location :
System Contact :
MAC Address : 00:01:02:03:04:05
IP Address : 192.168.0.239
Subnet Mask : 255.255.255.0
Board Name : GS728TPv2 (BID:2)
Hardware Version : 2
Loader Version : 1.0.0.1
Loader Date : 2017-12-28 09:35:22 UTC
Firmware Version : 6.0.9.2
Firmware Date : Oct 29 2021 - 14:16:17
System Object ID : 1.3.6.1.4.1.4526.100.4.48
System Up Time : 0 days, 17 hours, 2 mins, 50 secs

……………

Maintenance Commands 100 CLI Command Reference Manual


Smart Switches with Optional Remote/Cloud Management

Troubleshooting commands
ping

Syntax ping {a.b.c.d | hostname | x:x::x:x} [count number]

Parameter a.b.c.d Sets the IPv4 address to be pinged, which is


represented by a.b.c.d.
hostname Sets the host name, which is represented by
hostname.
x:x::x:x Sets the IPv6 address to be pinged, which is
represented by x:x::x:x.
count <number> As an option, specify how many times the ping
must be sent. The number parameter represents
the number of times, which can be from 1 to
999999999. If you do not use the count keyword
and do not specify the number parameter, the
ping is sent four times.

Default No default value.

Mode User EXEC


Privileged EXEC

Usage Use this command to ping an IPv4 address, IPV6 address, or hostname.

Example This example shows how to ping a host with IPv4 address
192.168.0.111:

Switch# ping 192.168.0.111


PING 192.168.0.111 (192.168.0.111): 56 data bytes
64 bytes from 192.168.0.111: icmp_seq=0 ttl=128 time=10.0
ms
64 bytes from 192.168.0.111: icmp_seq=1 ttl=128 time=0.0 ms
64 bytes from 192.168.0.111: icmp_seq=2 ttl=128 time=0.0 ms
64 bytes from 192.168.0.111: icmp_seq=3 ttl=128 time=0.0 ms

--- 192.168.0.111 ping statistics ---


4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 0.0/2.5/10.0 ms

Maintenance Commands 101 CLI Command Reference Manual

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy