Smart Switches CLI Manual EN
Smart Switches CLI Manual EN
NETGEAR, Inc.
December 2023 350 E. Plumeria Drive
202-12723-01 San Jose, CA 95134, USA
Smart Switches with Optional Remote/Cloud Management
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
• 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
Table of Contents .................................................................................................. 4
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
show ip ssh............................................................................................................................... 82
Traffic control commands ................................................................................................ 83
storm-control ........................................................................................................................... 83
storm-control action ............................................................................................................... 84
show storm-control ................................................................................................................. 85
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:
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.
‘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.
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.
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.
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
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#
Example This example shows how to enter Privileged EXEC mode (a password
is not required):
Switch> enable
Password:
Switch#
configure
Syntax configure
Parameter
Usage Use this command to enter Global Configuration mode, in which the
CLI prompt displays as follows:
Switch(config)#
Switch# configure
Switch(config)#
vlan
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)#
Syntax interface id
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)#
Switch# configure
Switch(config)# interface g2
Switch(config-if)#
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
Example This example shows how to enter Interface Configuration mode for
interface MultiGigabitEthernet 3:
Switch# configure
Switch(config)# interface MultiGigabitEthernet 3
Switch(config-if)#
Switch# configure
Switch(config)# interface xmg7
Switch(config-if)#
interface 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)#
Switch# configure
Switch(config)# interface range g6-g7,g10-g11
Switch(config-if-range)#
line ssh
Parameter
Usage Use this command to enter Line Configuration mode, in which the CLI
prompt displays as follows:
Switch(config-line)#
Switch# configure
Switch(config)# line ssh
Switch(config-line)#
end
Syntax end
Parameter
Usage Use this command to return to the privileged EXEC mode. Each mode,
except for the User EXEC mode, allows the end command.
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
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.
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>
System Commands
Management commands
system name
Usage Use this command to modify the system name of the switch. The
system name is also used as the CLI prompt.
system contact
Usage Use this command to set the contact information for the switch.
system location
Usage Use this command to set the location information for the switch.
Example This example shows how to set the system location information:
show info
Parameter
show environment
Parameter
show version
Parameter
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:
Parameter
Usage Use this command to show current CPU status and utilization.
status KBytes
------ ----------
free 43280
alloc 82360
CPU Utilization:
ip address
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.
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.
Example This example shows how to modify the IPv4 address of the switch:
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
ip default-gateway
Example This example shows how to modify the 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
ip dhcp
Syntax ip dhcp
no ip dhcp
Parameter
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.
Switch(config)# ip dhcp
ip bootp
Syntax ip bootp
no ip bootp
Parameter
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.
Switch(config)# ip bootp
show ip
Syntax show ip
Parameter
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
ipv6
Syntax ipv6
no ipv6
Parameter
Example This example shows how to disable IPv6 globally on the switch:
Switch(config)# no ipv6
ipv6 autoconfig
Parameter
ipv6 address
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.
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:
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.
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:
ipv6 dhcp
Parameter
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.
Parameter
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:
show clock
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.
Example This example shows how to display information about the clock of the
switch:
Time zone:
Acronym is
Offset is UTC+0
sntp
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.
Example This example shows how to set a remote SNTP server for the switch:
show sntp
Parameter
Usage Use this command to display the remote SNTP server information.
Example This example shows how to display the remote SNTP server
information:
PoE commands
power inline
Switch(config)#interface g1
Switch(config-if)# power inline never
Switch# show power inline interfaces g1
(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
Parameter
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:
This example shows how to display the PoE status for interface g1:
(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
LLDP commands
clear lldp 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.
Example This example shows how to clear the LLDP statistics globally:
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:
Parameter
Usage Use this command to display the LLDP MED configuration information
for the switch.
Example This example shows how to display the LLDP MED information:
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
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:
Parameter
Switching Commands
Interface commands
interface (for Gigabit switches)
Syntax interface id
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)#
Switch# configure
Switch(config)# interface g2
Switch(config-if)#
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
Example This example shows how to enter Interface Configuration mode for
interface MultiGigabitEthernet 3:
Switch# configure
Switch(config)# interface MultiGigabitEthernet 3
Switch(config-if)#
Switch# configure
Switch(config)# interface xmg7
Switch(config-if)#
interface 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)#
Switch# configure
Switch(config)# interface range g6-g7,g10-g11
Switch(config-if-range)#
clear interface
Usage Use this command to clear statistical counters for a specific interface.
Example This example shows how to clear the counters on interface g1:
description
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.
Switch(config)# interface g1
Switch(config-if)# description userport
Switch(config-if)# exit
Switch(config)# interface g2
Switch(config-if)# description “uplink port”
flowcontrol
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
jumbo-frame
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:
jumbo-frame 9216
show interfaces
Example This example shows how to display the counters for interface g1:
This example shows how to display the port status for interface g1:
This example shows how to display the protected port state for
interfaces g1 and g2:
Syntax speed {{10 | 100 | 1000} | {auto [10 | 100 | 1000 | 10/100 | 10/100/1000]}}
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 g1
Switch(config-if)# speed 100
Switch(config-if)# exit
Switch(config)# interface g2
Switch(config-if)# speed auto 10/100
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.
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:
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.
Default auto-detect
auto-nego
Syntax auto-nego
no auto-nego
Parameter
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
Switch(config)# interface g1
Switch(config-if)# shutdown
show fiber-transceiver
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:
LAG commands
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.
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:
lag type
Default Static
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:
……………
show lag
Parameter
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.
VLAN commands
vlan
Switch# configure
Switch (config)# vlan 100
Switch (config-vlan)#
name
Parameter name Set the name for the VLAN. The name parameter
can be a maximum of 32 characters.
Example This example adds interface g10 as a tagged member to VLANs 100,
101, 102, 103, 104, and 105:
Forbidden VLANs:
Vlan Name
------- -----------------------
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.
Forbidden VLANs:
Vlan Name
------- -----------------------
management-vlan
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
Switch(config)# no management-vlan
show vlan
Usage Use this command to display information about one or more VLANs.
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:
Forbidden VLANs:
Vlan Name
Auto-VoIP commands
voice-vlan
Syntax voice-vlan
no voice-vlan
Parameter
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.
voice-vlan vlan
Usage Use this command to configure the ID of the Auto-VoIP VLAN in OUI-
based mode.
Example This example sets VLAN 128 as the Auto-VoIP VLAN in OUI-based
mode:
voice-vlan cos
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.
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.
voice-vlan oui
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:
voip
Syntax voip
no voip
Parameter
Default Disabled
voip pri
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.
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:
voip act
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.
Example This example shows how to set the prioritization type to remark for Auto-
VoIP in protocol-based mode:
Parameter
Example This example shows how to display the spanning tree configuration:
Interfaces
Name State Prio.Nbr Cost Sts Role EdgePort Type
------ ------- -------- ----- ------ ---- -------- -----------
g23 enabled 128.23 19 Blk Desg No P2P (RSTP)
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:
Parameter
Example This example shows how to display the global MST configuration:
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:
This example shows how to display MSTP information for MST instance
1 on interface g23:
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.
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:
This example shows how to displays address table entries that contain
MAC address 00:11:22:33:44:55:
Routing Commands
IP routing commands
show ip interface
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.
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.
Parameter
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:
ARP commands
clear arp-cache
Parameter
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:
show arp
Parameter
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:
Parameter
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:
Global configuration:
ARP timeout: 1200 Seconds
ARP response: 1 Seconds
ARP retry: 4 times
ARP cache: 512
ARP renew: enabled
Security Commands
Management security commands
username
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.
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.
Example This example shows how to add a new user account with the
name NewUser and password QaZWSx123:
show username
Parameter
Usage Use this command to show all user accounts in the local database.
Example This example shows how to display all existing user accounts:
show users
Parameter
Usage Use this command to show information about all active users.
Example This example shows how to display information about all active users:
Access commands
ip ssh
Syntax ip ssh
no ip ssh
Parameter
Default Enabled
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.
Switch(config)# no ip ssh
SSH daemon disabled.
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
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:
ip ssh protocol
Default 2
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:
exec-timeout
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:
max-session
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:
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.
show ip ssh
Parameter
Usage Use this command to display the SSH configuration and status.
Example This example shows how to display the configuration and status of
SSH:
SSH Configuration
Switch(config)# interface g1
Switch(config-if)# storm-control broadcast level 10
storm-control action
Default All frames that exceed the threshold are discarded (dropped).
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:
show storm-control
Parameter
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.
Monitoring Commands
Port commands
show cable-diag
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:
Logging commands
clear logging
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:
show logging
Usage Use this command to show the log messages in RAM, flash memory, or
the SNMP trap logs.
Example This example shows the log messages stored in the RAM:
Aggregation: disabled
Aggregation aging time: 300 sec
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
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:
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:
Maintenance Commands
Reset commands
reboot
Syntax reboot
Parameter
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.
Switch# reboot
Are you sure you want to reboot the system? (Y/N)[N]y
Rebooting system ...
restore-defaults
Syntax restore-defaults
Parameter
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
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:
delete system
Usage Use this command to delete a firmware image that is stored in flash
memory.
Example This example shows how to delete firmware image1 from flash
memory:
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
Example This example shows how to copy the running configuration to the
startup configuration:
Syntax save
Parameter
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
boot system
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:
show bootvar
Parameter
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:
show startup-config
Parameter
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:
……………
show running-config
Example This example shows how to display the running configuration for the
switch:
……………
……………
show backup-config
Parameter
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:
show tech-support
Parameter
Default N/A
Example This example shows how to display technical information for technical
support:
!!!!!!!!!
……………
Troubleshooting commands
ping
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: