RY-LGSPXX-XX Example LGSP23-26 CLI User Guide 06.12.2018 ABOUT THIS GUIDE PURPOSE This guide gives specific information on how to operate CLI to manage this switch. AUDIENCE The guide is intended for use by network administrators who are responsible for operating and maintaining network equipment; consequently, it assumes a basic working knowledge of general switch functions, the RS-232 Console , Internet Protocol (IP), and Telnet Protocol. Revision History Release Date Revision Initial Release 2017/05/15 A1 2017/05/17 A2 2017/08/04 A3 CONTENTS ABOUT THIS GUIDE ..................................................................................................................................................... II REVISION HISTORY ........................................................................................................................................ III CONTENTS ............................................................................................................................................................ 1 1 CLI MANAGEMENT......................................................................................................................................... 3 1-1 LOGIN ......................................................................................................................................................................... 4 1-2 COMMANDS OF CLI....................................................................................................................................................... 5 1-3 GLOBAL COMMANDS OF CLI ........................................................................................................................................... 6 2 CABLEDIAG OF CLI ...................................................................................................................................... 9 3 CLEAR OF CLI .............................................................................................................................................10 4 CONFIGURE COMMANDS OF CLI ...................................................................................................................17 5 COPY COMMANDS OF CLI ................................................................................................................................125 6 DEBUG COMMANDS OF CLI..............................................................................................................................126 7 DELETE COMMANDS OF CLI .............................................................................................................................127 8 DIR COMMANDS OF CLI ...................................................................................................................................128 9 DISABLE COMMANDS OF CLI ............................................................................................................................129 10 DO COMMANDS OF CLI ..................................................................................................................................130 11 DOT1X OF CLI .................................................................................................................................................131 12 ENABLE OF CLI ................................................................................................................................................132 13 FIRMWARE OF CLI ..........................................................................................................................................133 14 IP OF CLI .........................................................................................................................................................134 15 NO OF CLI .......................................................................................................................................................135 16 PING OF CLI ....................................................................................................................................................136 17 RELOAD OF CLI ...............................................................................................................................................139 18 SEND OF CLI ...................................................................................................................................................140 19 SHOW OF CLI ..................................................................................................................................................141 20 TERMINAL OF CLI ...........................................................................................................................................204 21 TRACEROUTE OF CLI .....................................................................................................................................206 1 CLI Management The following description is the brief of the network connection. -- Locate the correct DB-9 (RS-232) cable with female DB-9 connector. RS-232 cable is used for connecting a terminal or termial emulator to the Managed Switch’s RJ45 port to access the command-line interface. -- Attach the RJ45 serial port on the switch’s front panel which used to connect to the switch for console configuration -- Attach the other end of the DB-9 cable to an ASCII terminal emulator or PC Com-1, 2 port. For example, PC runs Microsoft Windows HyperTerminal utility. -- At “Com Port Properties” Menu, configure the parameters as below: (see the next section) Baud rate 115200 Stop bits 1 Data bits 8 Parity N Flow control none 1-1 Login The command-line interface (CLI) is a text-based interface. User can access the CLI through either a direct serial connection to the device or a Telnet session (Default IP address: 192.168.1.1). The default uaser and password to login into the Managed Switch are listed below: Username: admin Password: Note: means empty string After you login successfully, the prompt will be shown as “#“ . See the following two figures. It means you behave as an administrator and have the privilege for setting the Managed Switch. If log as not the administrator, the prompt will be shown as “>”, it means you behave as a guest and are only allowed for setting the system under the administrator. Each CLI command has its privilege Username: admin Password: RY-LGSP23-26# 1-2 Commands of CLI The CLI is divided into serveral modes. If a user has enouth privilege to run a particular command, the user has to run the command in the correct mode. To see the commands of the mode, please input “?” after the system prompt, then all commands will be listed in the screen. The command modes are listed as belows: Command Modes MODE PROMPT COMMAND FUNCTION IN THIS MODE exec # Display current configuration, diagnostics, maintenance config (config)# Configure features other than those below Config-if (config-interface)# Configure ports Config-if-vlan (config-if-vlan)# Configure static vlan Config-line (config-line)# Line Configuration Config-impc-profile (config-impc-profile)# IPMC Profile Config-snmp-host (config-snmp-host)# SNMP Server Host Config-stp-aggr (config-stp-aggr)# STP Aggregation Config-dhcp-pool (config-dhcp-pool)# DHCP Pool Configuration Config-rfc2544-profile (config-rfc2544-profile)# RFC2544 Profile Commandsreside in the corresponding modes could runonly in that mode. If a user wants to run a particular command, the user has to change to the appropriate mode. The command modes are organized as a tree, and users start to in enable mode. The following table explains how to change from one mode to another. Change Between Command Modes MODE ENTER MODE LEAVE MODE exec -- -- config Configure terminal exit config-interfcae Interface exit config-vlan Interface vlan exit 1-3 Global Commands of CLI RY-LGSP23-26# ? CableDiag Cable Diagnostic keyword clear Reset functions configure Enter configuration mode copy Copy from source to destination debug Debugging functions delete Delete one file in flash: file system dir Directory of all files in flash: file system disable Turn off privileged commands do To run exec commands in config mode dot1x IEEE Standard for port-based Network Access Control enable Turn on privileged commands exit Exit from EXEC mode firmware Firmware upgrade/swap help Description of the interactive help system ip IPv4 commands logout Exit from EXEC mode more Display file no Negate a command or set its defaults ping Send ICMP echo messages reload Reload system. send Send a message to other tty lines show Show running system information terminal Set terminal line parameters traceroute traceroute program Exit Exit from EXEC mode. Syntax: exit Parameter: None. Example: RY-LGSP23-26(config)# exit RY-LGSP23-26# Help Description of the interactive help system. Syntax: help Parameter: None. Example: RY-LGSP23-26# help Help may be requested at any point in a command by entering a question mark '?'. If nothing matches, the help list will be empty and you must backup until entering a '?' shows the available options. Two styles of help are provided: 1. Full help is available when you are ready to enter a command argument (e.g. 'show ?') and describes each possible argument. 2. Partial help is provided when an abbreviated argument is entered and you want to know what arguments match the input (e.g. 'show pr?'.) RY-LGSP23-26# logout Exit from EXEC mode. Syntax: logout Parameter: none Example: RY-LGSP23-26# logout press ENTER to get started end Go back to EXEC mode. Syntax: end Example: (config)# end RY-LGSP23-26# 2 CABLEDIAG of CLI Cable Diagnostic keywor Syntax: CableDiag interface GigabitEthernet Parameter: Interface Interface keyword GigabitEthernet 1 Gigabit Ethernet Port Port ID in 1/1-26 Example: RY-LGSP23-26# CableDiag interface GigabitEthernet 1/1 Starting Cable Diagnostic - Please wait Interface Link Status Test Result Length ---------------------- ------------- ------------- ------------- GigabitEthernet 1/1 Link Down detect error or check cable length is between 7-120 meters RY-LGSP23-26# CableDiag interface GigabitEthernet 1/1 Starting Cable Diagnostic - Please wait Interface Link Status Test Result Length ---------------------- ------------- ------------- ------------- GigabitEthernet 1/1 Link Down detect error or check cable length is between 7-120 meters RY-LGSP23-26# 3 CLEAR of CLI Table : CLEAR Commands Command Function access Access management access-list Access list dot1x IEEE Standard for port-based Network Access Control ip Interface Internet Protocol config commands ipv6 IPv6 configuration commands lacp Clear LACP statistics lldp Clears LLDP statistics. logging Syslog mac MAC Address Table mvr Multicast VLAN Registration configuration sflow Statistics flow. spanning-tree STP Bridge statistics Clear statistics for a given interface access Access management. Syntax: clear access management statistics Parameter: management Access management configuration. statistics Statistics data. Example: RY-LGSP23-26# clear access management statistics RY-LGSP23-26# access-list Access list. Syntax: Clear access-list ace statistics Parameter: ace Access list entry statistics Traffic statistics Example: RY-LGSP23-26# clear access-list ace statistics RY-LGSP23-26# dot1x IEEE Standard for port-based Network Access Control. Syntax Clear dot1x statistics Clear dot1x statistics interface GigabitEthernet < PORT_TYPE_LIST> Parameter statistics Clears the statistics counters interface Interface GigabitEthernet 1 Gigabit Ethernet Port PORT_TYPE_LIST Port list in 1/1-26 for Gigabitethernet EXAMPLE RY-LGSP23-26# clear dot1x statistics interface GigabitEthernet 1/1-26 RY-LGSP23-26# ip Interface Internet Protocol config commands Syntax clear ip arp clear ip dhcp detailed statistics { server | client | snooping | relay | helper | all } [ interface ( [ ] ) ] clear ip dhcp relay statistics clear ip dhcp server binding clear ip dhcp server binding { automatic | manual | expired } clear ip dhcp server statistics clear ip dhcp snooping statistics [ interface ( [ ] ) ] clear ip igmp snooping [ vlan ] statistics clear ip statistics [ system ] [ interface vlan ] [ icmp ] [ icmp-msg ] Parameter arp Clear ARP cache dhcp Dynamic Host Configuration Protocol igmp Internet Group Management Protocol statistics Traffic statistics relay DHCP relay agent configuration snooping DHCP snooping interface Select an interface to configure GigabitEthernet 1 Gigabit Ethernet Port vlan IPv4 traffic interface VLAN identifier(s): VID EXAMPLE RY-LGSP23-26# clear ip arp RY-LGSP23-26# clear ip dhcp detailed statistics all interface GigabitEthernet 1/1-26 RY-LGSP23-26# clear ip dhcp relay statistics RY-LGSP23-26# clear ip dhcp server binding 192.168.1.11 RY-LGSP23-26# clear ip dhcp server binding automatic RY-LGSP23-26# clear ip dhcp server statistics RY-LGSP23-26# Clear ip dhcp snooping statistics interface GigabitEthernet 1/1-26 RY-LGSP23-26# clear ip igmp snooping vlan 1 statistics RY-LGSP23-26# clear ip statistics system interface RY-LGSP23-26# clear ip statistics system interface vlan 1 icmp icmp-msg 2 ipv6 IPv6 configuration commands. Syntax clear ipv6 mld snooping [ vlan ] statistics clear ipv6 neighbors clear ipv6 statistics [ system ] [ interface vlan ] [ icmp ] [ icmp-msg ] Parameter mld Multicasat Listener Discovery neighbors Ipv6 neighbors statistics Traffic statistics snooping Snooping MLD statistics Running MLD snooping counters vlan Ipv6 interface traffic VLAN identifier(s): VID icmp IPv6 ICMP traffic icmp-msg IPv6 ICMP traffic for designated message type interface Select an interface to configure system IPv6 system traffic < 0~255> ICMP message type ranges from 0 to 255 EXAMPLE RY-LGSP23-26# clear ipv6 mld snooping vlan 3 statistics RY-LGSP23-26# clear ipv6 neighbors RY-LGSP23-26# Clear ipv6 statistics system icmp icmp- msg 2 lacp Clear LACP statistics Syntax Clear lacp statistics Parameter statistics Clear all LACP statistics EXAMPLE RY-LGSP23-26# clear lacp statistics RY-LGSP23-26# lldp Clears LLDP statistics. Syntax Clear lldp statistics Clear lldp statistics| begin | exclude | include >< LINE > Parameter statistics Clears LLDP statistics. | Output modifiers begin Begin with the line that matches exclude Exclude lines that match include Include lines that match String to match output lines EXAMPLE RY-LGSP23-26# clear lldp statistics | begin LINE RY-LGSP23-26# logging Syslog. Syntax clear logging [ info ] [ warning ] [ error ] [ switch ] Parameter error Error info Information warning Warning EXAMPLE RY-LGSP23-26# clear logging info error warning RY-LGSP23-26# mac MAC Address Table. Syntax Clear mac address-table Parameter address-table Flush MAC Address table. EXAMPLE RY-LGSP23-26# clear mac address-table RY-LGSP23-26# mvr Multicast VLAN Registration configuration. Syntax clear mvr [ vlan | name ] statistics Parameter name MVR multicast name statistics Running MVR protocol counters vlan MVR multicast vlan < word16> MVR multicast VLAN name MVR multicast VLAN list EXAMPLE RY-LGSP23-26# clear mvr vlan 25 statistics RY-LGSP23-26# sflow Statistics flow. Syntax clear sflow statistics { receiver [ ] | samplers [ interface [ ] ( [ ] ) ] } Parameter interface Interface receiver Clear statistics for receiver. GigabitEthernet runtime Port list in 1/1-26 for Gigabitethernet EXAMPLE RY-LGSP23-26# clear sflow statistics interface GigabitEthernet 1/1-26 spanning-tree STP Bridge. Syntax clear spanning-tree { { statistics [ interface ( [ ] ) ] } | { detected-protocols [ interface ( [ ] ) ] } } Parameter detected-protocols Set the STP migration check statistics STP statistics interface Choose port GigabitEthernet Port list in 1/1-26 for Gigabitethernet EXAMPLE RY-LGSP23-26# clear spanning-tree detected-protocols interface GigabitEthernet 1/1-26 statistics Clear statistics for a given interface # Syntax clear statistics interface clear statistics Parameter GigabitEthernet Port list in 1/1-26 for Gigabitethernet EXAMPLE RY-LGSP23-26# clear statistics GigabitEthernet 1/1-26 RY-LGSP23-26# 4 CONFIGURE Commands of CLI Table : CONFIGURE Commands Command Function terminal Configure from the terminal aaa Authentication, Authorization and Accounting access Access management access-list Access list aggregation Aggregation mode banner Define a login banner clock Configure time-of-day clock default Set a command to its defaults dms Enable DMS Maste do To run exec commands in config mode dot1x IEEE Standard for port-based Network Access Control enable Modify enable password parameters end Go back to EXEC mode exit Exit from Configuration mode event Trap event severity level green-ethernet Green ethernet (Power reduction) gvrp Enable GVRP feature help Description of the interactive help system hostname Set system's network name interface Select an interface to configure ip Internet Protocol ipmc IPv4/IPv6 multicast configuration ipv6 IPv6 configuration commands lacp LACP settings line Configure a terminal line lldp LLDP configurations. logging Syslog loop-protect Loop protection configuration mac MAC table entries/configuration monitor Set monitor configuration. mvr Multicast VLAN Registration configuration no Negate a command or set its defaults ntp Configure NTP poe power over ethernet port-security Enable/disable port security globally. Privilege Command privilege parameters qos Quality of Service radius-server Configure RADIUS rmon Remote Monitoring sflow Statistics flow. smtp Set email information snmp-server Set SNMP server's configurations spanning-tree Spanning Tree protocol switch2go-management Switch2go Management configuration system Set the SNMP server's configurations tacacs-server Configure TACACS+ upnp Set UPnP's configurations username Establish User Name Authentication vlan VLAN commands voice Voice appliance attributes web Web terminal Configure from the terminal. Syntax configure terminal EXAMPLE RY-LGSP23-26# configure terminal RY-LGSP23-26(config)# aaa Authentication, Authorization and Accounting. SYNTAX aaa authentication login { console | telnet | ssh | http } { { local | radius | tacacs } [ { local | radius | tacacs } [ { local | radius | tacacs } ] ] } Parameter authentication Authentication login Login console Configure Console http Configure HTTP ssh Configure SSH telnet Configure Telnet local Use local database for authentication radius Use RADIUS for authentication tacacs Use TACACS+ for authentication EXAMPLE RY-LGSP23-26(config)# aaa authentication login http radius RY-LGSP23-26(config)# access Access management. SYNTAX access management access management [ to ] { [ web ] [ snmp ] [ telnet ] | all } Parameter management Access management configuration < 1-16> ID of access management entry < 1-4094> The VLAN ID for the access management entry < ipv4_addr> Start IPv4 address < ipv6_addr> Start IPv6 address all All services snmp SNMP service telnet TELNET/SSH service to End address of the range web Web service EXAMPLE RY-LGSP23-26(config)# access management 10 3 192.168.1.1 all RY-LGSP23-26(config)# access-list Table : configure – access-list Commands Command Function ace Access list entry rate-limiter Rate limiter ace Access list entry. SYNTAX access-list ace{ update<1-256> | <1-256> } [action< deny | filter | permit >] access-list ace{ update<1-256> | <1-256> } [dmac-type < any | broadcast | multicast | unicast >] access-list ace{ update<1-256> | <1-256> } [frametype < any | arp | etype | ipv4 | ipv4-icmp | ipv4-tcp | ipv4- udp | ipv6 | ipv6-icmp | ipv6-tcp | ipv6-udp >] access-list ace{ update<1-256> | <1-256> } [ ingress] [ ingress interface { | } | any } ] access-list ace{ update<1-256> | <1-256> } [ logging [ disable ] ] access-list ace{ update<1-256> | <1-256> } [ lookup [ disable ] ] access-list ace{ update<1-256> | <1-256> } [ mirror [ disable ] ] access-list ace{ update<1-256> | <1-256> } [ next { <1-256> | last } ] access-list ace{ update<1-256> | <1-256> } [ policy <0-255> [ policy-bitmask <0x0-0xFF> ] ] access-list ace{ update<1-256> | <1-256> } [ rate-limiter { <1-16> | disable } ] access-list ace{ update<1-256> | <1-256> } [redirect | interface { | } | disable } ] access-list ace{ update<1-256> | <1-256> } [shutdown] access-list ace{ update<1-256> | <1-256> } [ tag { tagged | untagged | any } ] access-list ace{ update<1-256> | <1-256> } [ tag-priority { <0-7> | any } ] access-list ace{ update<1-256> | <1-256> }[ vid { <1-4095> | any } ] Parameter action Access list action dmac-type The type of destination MAC address frametype Frame type ingress Ingress logging Logging frame information lookup Second lookup mirror Mirror frame to destination mirror port next insert the current ACE before the next ACE ID policy Policy rate-limiter Rate limiter redirect Redirect frame to specific port shutdown Shutdown incoming port tag Tag tag-priority Tag priority vid VID field deny Deny filter Filter permit Permit any Don't-care the type of destination MAC address broadcast Broadcast destination MAC address multicast Multicast destination MAC address unicast Unicast destination MAC address any Don't-care the frame type arp Frame type of ARP etype Frame type of etype ipv4 Frame type of IPv4 ipv4-icmp Frame type of IPv4 ICMP ipv4-tcp Frame type of IPv4 TCP ipv4-udp Frame type of IPv4 TCP ipv6 Frame type of IPv4 ipv6-icmp Frame type of IPv6 ICMP ipv6-tcp Frame type of IPv6 TCP ipv6-udp Frame type of IPv6 UDP interface Select an interface to configure Gigabitethernet * All switches or All ports Gigabitethernet 1 Gigabit Ethernet port Port ID in the format of switch-no/port-no ex, 1/1-26 for Gigabitethernet * or Gigabitethernet * All Switches or All ports Gigabitethernet 1 Gigabit Ethernet Port Port list in 1/1-26 any Don't-care the ingress interface <0-255> Policy ID policy-bitmask The bitmask for policy ID <0x0-0xFF> The value of policy bitmask <1-4095> The value of VID field <0-7> The value of tag priority EXAMPLE RY-LGSP23-26(config)# access-list ace 10 action deny RY-LGSP23-26(config)# rate-limiter Rate limiter. SYNTAX access-list rate-limiter [ <1~16> ] { pps <0-3276700> | 100kbps <0-10000> } Parameter 100kbps 100k bits per second Rate limiter ID Rate value <0-10000> Rate value EXAMPLE RY-LGSP23-26(config)# access-list rate-limiter 100kbps 111 RY-LGSP23-26(config)# aggregation Aggregation mode. SYNTAX aggregation mode { [ dmac ] [ ip ] [ dmac ] [ port ] } Parameter mode Traffic distribution mode dmac Destination MAC affects the distribution ip IP address affects the distribution port IP port affects the distribution smac Source MAC affects the distribution EXAMPLE RY-LGSP23-26(config)# aggregation mode ip port dmac smac RY-LGSP23-26(config)# banner Define a login banner SYNTAX banner [ motd ] banner exec banner login Parameter c banner-text c, where 'c' is a delimiting character exec Set EXEC process creation banner login Set login banner motd Set Message of the Day banner EXAMPLE RY-LGSP23-26(config)# banner exec LINE Enter TEXT message. End with the character 'L'. L RY-LGSP23-26(config)# clock Configure time-of-day clock. SYNTAX clock set clock summer-time date [ [ ] ] clock summer-time recurring [ [ ] ] clock timezone [ ] Parameter set set clock summer-time Configure summer (daylight savings) time timezone Configure time zone yyyy/mm/dd