The text of a manual · part 28 of 81
WS5000 Series Switch System Reference Guide: CH 8 CLI Command Reference, pages 233 to 242
Pages 233 to 242 of 728, from WS5000 Series Switch System Reference Guide
The original document is the PDF (12 MB). This is its text as extracted, unedited; tables and drawings read best in the PDF, and each page heading opens it at that page.
For the Symbol WS-5000
Page 233
CLI Command Reference This chapter describes the commands that are defined by the WS5000 Series Command Line Interface (CLI). Access the CLI by running a terminal emulation program on a computer that is connected to the serial port at the front of the switch, or by using Telnet via secure shell (SSH) to access the switch over the network. The default cli user is “cli”. The default username and password is admin and symbol, respectively.
8.1 CLI Overview Before you begin working with the WS5000 Series Switch CLI, review the following sections to gain some basic understandings of the CLI, in the following areas: •
About Contexts
•
About Instances
•
Basic Conventions
Page 234
8-2
WS 5000 Series System Reference
8.1.1 About Contexts For a WS5000 Series Switch, CLI commands are invoked within “contexts.” Contexts are hierarchical in a manner similar to directories are hierarchal in a traditional file system; in other words, contexts may contain other contexts. When you log into the switch, by default you are in the System context - this is the top of the context hierarchy. To enter a subcontext, type its name. The only subcontext of the System context is the Configure context. To get to the Configure Context from the System Context, type “configure” at the CLI prompt (as a convenience, you can also type “cfg” to access the Configure Context). When invoked, the CLI prompt changes to indicate the current context. For example: WS5000> cfg WS5000.(Cfg)>
Table 8.1 summarizes the context hierarchy found in the CLI for a WS5000 Series Switch. Named subcontexts are called Instances (or Instance Contexts). Instances are described further in About Instances on page 8-5. Table 8.1 CLI Context Hierarchy for a WS5000 Series Switch Main Context
Subcontext
Subcontext
System Context
Configuration (cfg)
AAA
Instance Context
Access Port (APort)
[APort_Name]
Access Control List (ACL)
[ACL_Name]
Access Port Policy (APPolicy)
[APPolicy_Name] banner Classification Element (CE)
[CE_Name]
Classification Group (CG)
[CG_Name]
Chassis Ethernet Port (Ethernet)
[Ethernet_Name]
Ethernet Policy (EtherPolicy)
[EtherPolicy_Name]
Events
Syslog
FTP
Firewall (FW) Host
[Host_Name]
Key Distribution Center Network Policy
[NP_Name]
Policy Object
[PO_Name]
Radius
Rogue AP
Subcontext
Page 235
CLI Command Reference
Main Context
Subcontext
Subcontext
Instance Context
8-3
Subcontext
Route Security Policy
[SecurityPolicy_Name]
Sensor
[Sensor_MAC]
SNMP Secure Shell Secure Sockets Layer Standby Switch Policy
[SPolicy_Name]
Restricted Channel
Telnet Tunnel
[GRE_Tunnel_Name]
User
[User_Name]
WLAN
[WLAN_Name]
WME
[WME_Name]
WVPN
Most of the switch configuration is performed in subcontexts of the Configuration context. For example, to drop into the WLAN subcontext you type “wlan” from the Configuration context: WS5000.(Cfg)> wlan WS5000.(Cfg).wlan>
To bump up a context level, type “..”: WS5000.(Cfg).wlan> .. ws5000.(Cfg)>
To jump to the system context use exit: WS5000.(Cfg).wlan> exit ws5000>
Note You can’t go “up and over” when navigating the CLI - constructions such as “.. context” or “../context” do not work.
8.1.2 CLI Indexing You can use CLI indexing and navigate to a subcontext by typing the index number instead of the context name. The following CLI contexts have the indexing functionality: •
AAA
•
Access Port
•
Access Control List
Page 236
8-4
WS 5000 Series System Reference
•
Access Port Policy
•
Classifier Element
•
Classification Group
•
Ethernet
•
Ethernet Policy
•
Events
•
Firewall
•
Host
•
Network Policy
•
Policy Object
•
Security Policy
•
Sensor
•
Switch Policy
•
Tunnel
•
User
•
WLAN
•
WME
The following example shows you how to use the index number 1 to access the Default Access Port Policy subcontext. WS5000.(Cfg).APPolicy> WS5000.(Cfg).APPolicy> show Available Access Port Policies: 1. Default Access Port Policy. 2. NewAP. WS5000.(Cfg).APPolicy> 1 Access Port Policy details for "Default Access Port Policy": Policy Name Description Basic Rate for 11a Supported Rate for 11a Basic Rate for 11b Supported Rate for 11b Basic Rate for 11g Supported Rate for 11g Basic Rate for FH Supported Rate for FH RF Preamble RTS Threshold DTIM Period DTIM Period BSS 2 DTIM Period BSS 3 DTIM Period BSS 4 Beacon Interval Allow MUs w/o Spectrum Mgmt
: Default Access Port Policy : Default Access Port Policy, only ESSID 101 and no security, and default network policy : 6,12,24 : 9,18,36,48,54 : 1,2 : 5.5,11 : 1,2,5.5,11 : 6,9,12,18,24,36,48,54 : 1 : 2 : short : 2347 Bytes : 10 : 10 : 10 : 10 : 100 : false
Page 237
CLI Command Reference
8-5
WLAN details for the Access Port policy 'Default Access Port Policy' WLAN Name Network Policy ---------------------Symbol Default Default Network Policy WS5000.(Cfg).APPolicy.[Default Access Port Policy]>
8.1.3 About Instances Most contexts contain “instances” of themselves. An instance, is like a named context; it is a set of configuration values that is identified by a name. Some contexts have pre-defined instances, but, in general, instances must be created. To create an instance, the add command is used with a <name> parameter. The following example creates a Switch Policy instance: WS5000.(Cfg)> switchpol Active Switch Policy name: Default Wireless Switch Policy Available Switch Policies: 1. Default Wireless Switch Policy. WS5000.(Cfg).SPolicy> add TestPolicy Adding Switch Policy... Status: Success. Active Switch Policy name: Default Wireless Switch Policy Available Switch Policies: 1. Default Wireless Switch Policy. 2. TestPolicy. Switch Policy details --------------------Policy Name : TestPolicy Description : Country : AU Channel for .11a : Auto (once) Channel for .11b : Auto (once) Channel for .11g : Auto (once) Power Level for .11a : 20 dBm Power Level for .11b : 20 dBm Power Level for .11g : 20 dBm Active EtherPolicy Name : Default Ethernet Policy # of APPolicies attached : 0 Include Adoption List details : List is Empty. Exclude Adoption List details : List is Empty. Default Adoption action for .11a : Deny. Default Adoption action for .11b : Deny. Default Adoption action for FH : Deny. Default Adoption action for .11g : Deny. Send SNMP trap on adoption deny : Disabled DS Coexistence : Disabled WS5000.(Cfg).SPolicy.[TestPolicy]>
Page 238
8-6
WS 5000 Series System Reference
When you create an instance, the command prompt changes to that instance’s context; the name of the instance context is shown in brackets. Like contexts, the available commands are based on the type of instance created, and are used to configure the instance specifically.
8.1.4 Basic Conventions Following are a few conventions to keep in mind while working within the command line interface: •
Pre-defined CLI commands and keywords are case-insensitive: cfg = Cfg = CFG. However, mostly for clarity, CLI commands and keywords are displayed in this guide using mixed case. For example, apPolicy, trapHosts, channelInfo.
•
The names of all context instances, whether system defined or created by you, are case-sensitive.
•
CLI commands can be concatenated when invoking them at the command line. For example, to jump from the System context to the myWLAN instance, you can enter a command as follows: WS5000> cfg wlan myWLAN WS5000.(Cfg).wlan.[myWLAN]>
Of course, concatenating commands is quicker than, for example, entering three commands: one to jump to the Cfg context, one to jump to the wlan context, and one to jump to the myWLAN instance): •
If an instance name (or other parameter) contains whitespace, the name must be enclosed in quotes: WS5000.(Cfg)> spol "Default Switch Policy" WS5000.(Cfg).SPolicy.[Default Switch Policy]>
•
To abort an unresponsive command, type <Ctrl>-c. That is, hold down the Control key and type c.
8.2 Common Commands Table 8.2 summarizes the commands common amongst many contexts and instance contexts within the WS5000 Series command line interface. Table 8.2 Common Commands Among Most Contexts Command
Description
Ref.
.. or end
Terminate a current session and moves up a context, hierarchically.
page 8-7 exit
Terminate a current session and returns to the “root” prompt.
page 8-7
? or help
Get the command information.
page 8-7 logout or bye
Close this session.
page 8-8 clear
Clear the screen.
page 8-8 emergencymode
Enable or disable Emergency mode.
page 8-8 history
Display command history within a context or instance page 8-9 ping
Ping a network host/IP address page 8-9 show commands
Display context specific attributes page 8-23
Page 239
CLI Command Reference
8-7
8.2.1 .. or end to all contexts and instances, except System Context Terminates the context or instance session, and changes the command prompt to be one higher. Syntax ..
or end or exit Parameters
None. Example WS5000.(Cfg).NP> .. WS5000.(Cfg)> end WS5000>
8.2.2 exit to all contexts and instances, except System Context Terminates the context session, and returns the prompt to the root (for example, WS5000>). For example, if you use the exit command in the ACL context, the prompt reverts to the System context prompt. Syntax exit Parameters
None. Example WS5000.(Cfg).ACL> exit WS5000>
8.2.3 ? or help to all contexts and instances Retrieves a list of commands supported given the context or instance. Syntax ?
or help Parameters
None. Example WS5000> ?
Page 240
8-8
WS 5000 Series System Reference or WS5000> help
8.2.4 logout or bye to all contexts and instances Closes or logs out of the current session. Syntax logout or bye Parameters
None. Example WS5000 logout or WS5000> bye
8.2.5 clear to all contexts and instances Clear the screen. Syntax clear Parameters
None. Example WS5000> clear
8.2.6 emergencymode to all contexts and instances Enables or disables the “Emergency” Switch Policy (ESP), a switch policy that can activated (enabled) at any time in case of an emergency. When ESP is deactivated (disabled), the previous switch policy is reactivated. To set the emergency policy, use the emergencymode command. Syntax > emergencyMode <enable_flag>
Page 241
CLI Command Reference
8-9
Parameters enable_flag
Indicates whether to enable or disable the ESP. Possible values are: • enable • disable
Example WS5000.<context_path> > emergencymode enable
8.2.7 history to all contexts and instances Display the history of commands invoked at the command prompt for any given context. Alternatively, using the keyboard “up arrow” key is a short-cut to retrieve (and reuse) commands that were used previously in a context session. Syntax history Parameters
None. Example WS5000.<context_path> > history
8.2.8 ping
Context, Configuration (Cfg) Context, Host Context Sends ICMP ECHO_REQUEST packets to a network host. Syntax ping [-Rdfnqrv] [-c count] [-i wait] [-l preload] [-p pattern] [-s packetsize] <host/IP_address>
Page 242
8-10
WS 5000 Series System Reference
Parameters
-Rdfnqrv
These optional flags are can be broken down as follows: • -R: Record route. Includes the RECORD_ROUTE option in the ECHO_REQUEST packet and displays the route buffer on returned packets. Note that the IP header is only large enough for nine such routes. Many hosts ignore or discard this option. • -d: Set the SO_DEBUG option on the socket being used. Essentially, this socket option is not used by Linux kernel. • -f: Flood ping. For every ECHO_REQUEST sent a period ``.'' is printed, while for ever ECHO_REPLY received a backspace is printed. This provides a rapid display of how many packets are being dropped. If interval is not given, it sets interval to zero and outputs packets as fast as they come back or one hundred times per second, whichever is more. Only the super-user may use this option with zero interval. • -n: Numeric output only. No attempt will be made to lookup symbolic names for host addresses. • -q: Quiet output. Nothing is displayed except the summary lines at startup time and when finished. • -r: Bypass the normal routing tables and send directly to a host on an attached interface. If the host is not on a directly-attached network, an error is returned. This option can be used to ping a local host through an interface that has no route through it provided the option -I is also used. • -v: Verbose output.
-c count
Stop after sending count ECHO_REQUEST packets. With deadline option, ping waits for count ECHO_REPLY packets, until the timeout expires.
-i wait
Wait interval of seconds between sending each packet. The default is to wait for one second between each packet normally, or not to wait in flood mode. Only super-user may set interval to values less 0.2 seconds.
-l preload
If preload is specified, ping sends that many packets not waiting for reply. Only the super-user may select preload more than 3.
-p pattern
You may specify up to 16 “pad” bytes to fill out the packet you send. This is useful for diagnosing data-dependent problems in a network. For example, -p ff will cause the sent packet to be filled with all ones.
-s packetsize
Specifies the number of data bytes to be sent. The default is 56, which translates into 64 ICMP data bytes when combined with the 8 bytes of ICMP header data.
host/IP_address
The name or IP address of the host to which the request packets are sent.
Example WS5000> ping WS5000 PING WS5000 (10.1.1.101): 56 data bytes 64 bytes from 10.1.1.101: icmp_seq=0 ttl=255 time=0.037 ms 64 bytes from 10.1.1.101: icmp_seq=1 ttl=255 time=0.042 ms 64 bytes from 10.1.1.101: icmp_seq=2 ttl=255 time=0.05 ms 64 bytes from 10.1.1.101: icmp_seq=3 ttl=255 time=0.052 ms --- WS5000 ping statistics --4 packets transmitted, 4 packets received, 0% packet loss round-trip min/avg/max = 0.037/0.045/0.052 ms WS5000>