The text of a manual · part 29 of 81
WS5000 Series Switch System Reference Guide: CH 8 CLI Command Reference, pages 243 to 252
Pages 243 to 252 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 243
CLI Command Reference
8-11
8.3 System Context Table 8.3 summarizes the commands within this context. Table 8.3 System Context Command Summary Command
Description
Ref.
? or help
Get the command information page 8-11 logout or bye
Close this session page 8-12 clear
Clear the screen page 8-12 configure
Change to the Configuration Context to configure system attributes page 8-12 copy
Copy files between the Switch and TFTP/FTP server page 8-13 delete
Delete an image/config file from the system page 8-14 description
Set description text page 8-15 directory
Display the available image/config files in the system page 8-15 emergencymode
Enable or disable Emergency mode page 8-15 export
Export log files from the switch to the TFTP server page 8-16 history
Display command history within a context or instance page 8-16 install
Install primary/standby or Kerberos config page 8-17 logdir
Display the user saved log files page 8-18 name
Set or change the name page 8-19 ping
Ping a network host/IP address page 8-19 remove
Remove a log file shown by ‘logdir’ command page 8-20 restore
Restore a system image or configuration page 8-21 rfping
Send a WNMP Ping to an Access Port page 8-21 save
Save the current system configuration to a file page 8-22 service
Switches to the Service mode page 8-22 show commands
Display system context specific attributes page 8-23
8.3.1 ? or help
Context Retrieves a list of commands supported given the context or instance. Syntax ?
or help
Page 244
8-12
WS 5000 Series System Reference
Parameters
None. Example WS5000> ?
or WS5000> help
8.3.2 logout or bye
Context Closes or logs out of the current session. Syntax logout or bye Parameters
None. Example WS5000 logout or WS5000> bye
8.3.3 clear
Context Clear the screen. Syntax clear Parameters
None. Example WS5000 > clear
8.3.4 configure
Context Puts the user in the Configuration (Cfg) Context to configure system attributes. See Configuration (Cfg) Context on page 8-45 for more details. Syntax configure
Page 245
CLI Command Reference
8-13
Parameters
None. Example WS5000 > configure WS5000.(Cfg)>
Note As a shortcut, “cfg” can be used instead of “configure”.
8.3.5 copy
Context Copies a file from the WS5000 to a (T)FTP server, or vice versa. TFTP can be used to transfer *.sys.img, *.cfg, and *.sym files. FTP can be used to transfer .krb, .sys.img, .cfg, and .sym files. The default protocol is TFTP. The default user for FTP: anonymous The default mode for FTP: binary If using FTP, and the user is not anonymous (using -u option), CLI prompts the user to enter password.
!
IMPORTANT! DO NOT USE THIS COMMAND FOR FILES LARGER THAN 32MB.
Syntax copy <source> <destination> [-u user] [-m mode]
For TFTP: copy <source> <destination>
For FTP: copy <source> <destination> [ -u <ftp_user> ] [ -m <ftp_mode> ] Parameters source
The source of the file. Possible values are: • [protocol:]//<host_name or IP>/[file_name]. For example, ftp://<ipAddress/path/[file_name]. If a filename is not supplied, the system will prompt for one, in addition to a password. • tftp • ftp • system • . • <filename, including path>
Page 246
8-14
WS 5000 Series System Reference destination
The destination of the file. Possible values are: • tftp • ftp • system • . • / • [protocol:]//<hostname or IP address> ftp_user
FTP username. Default is ftpuser.
mode
FTP transfer mode, either ascii or binary. Default is binary.
protocol
Either ‘ftp’ or ‘tftp’
Example WS5000.(Cfg)> copy tftp system Enter the file name to be copied from TFTP server : backup.sys.img IP address of the TFTP server : 10.1.1.1 Copying 'backup.sys.img' from tftp://10.1.1.1 to Switch...
or WS5000.(Cfg)> copy ftp://100.10.10.1/ftpimages/DefaultConfig.cfg system Copying 'DefaultConfig.cfg' from ftp://100.10.10.1/ftpimages/ to Switch...
8.3.6 delete
Context Deletes the specified image or config file from the WS5000. Use the directory command to list the files that can be deleted. Note As a shortcut, “del” can be used instead of “delete”.
Syntax delete <filename> Parameters filename
Name of file to be deleted.
Example WS5000> directory Date & Time Jan 25 Jan 25 Jan 25
15:11 15:35 14:05
Bytes 15155 18819400 6517
File Name WS5000Defaults_v2.1.0.0-008D.cfg WS5000_v2.1.0.0-008D.sys.img cmd_template.sym
WS5000> delete WS5000Defaults_v2.1.0.0-008D.cfg
Page 247
CLI Command Reference
8-15
8.3.7 description
Context Sets a description about the switch displayed with system information. Syntax description <description_text> Parameters description_text
Enter a brief description of the Wireless Switch.
Example WS5000> description “Fifth Floor Switch”
8.3.8 directory
Context Lists the image and configuration files that are stored on the WS5000. Note As a shortcut, “dir” can be used instead of “directory”.
Syntax directory Parameters
None. Example WS5000> directory Date & Time Jan 25 Jan 25 Jan 25
15:11 15:35 14:05
Bytes 15155 18819400 6517
File Name WS5000Defaults_v2.1.0.0-008D.cfg WS5000_v2.1.0.0-008D.sys.img cmd_template.sym
8.3.9 emergencymode
Context 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 248
8-16
WS 5000 Series System Reference
Parameters enable_flag
Indicates whether to enable or disable the ESP. Possible values are: • enable • disable
Example WS5000.<context_path> > emergencymode enable
8.3.10 export
Context Copy the log files from switch to remote TFTP server. Use logdir to view the list of user log files that can be exported. Syntax WS5000 > export Parameter
This command is interactive and asks for destination
Remote TFTP host filename
Log file name to be exported to the remote TFTP server username
Enter the user name which you mentioned at the time of logfile creation when using diag command.The default user name is admin.
Example WS5000> export Creating the Event list... Enter the log file name :
8.3.11 history
Context Displays the history of the last 300 commands used. Syntax WS5000 > history Parameters
None Example Command history... 1. copy ftp://157.235.188.237/home/pavank/dom/dominfo -u pavank -m bin 2. copy ftp://157.235.188.237/home/pavank/dom/dominfo system -u pavank -m bin 3. WS5000> copy ftp://157.235.188.237/home/pavank/dom/dominfo system -u pavank -m bin 4. Enter the user password : *********** 5. Copying 'dominfo' from ftp://157.235.188.237 to Switch... 6. Data connection mode : BINARY (Connecting as 'pavank')
Page 249
CLI Command Reference
8-17
7. Status : 550 Failed to change directory. 8. clear 9. export 10. clear 11. export 12. export 13. clear 14. history
8.3.12 install
Context Configures the switch’s failover role as Primary or Standby, and applies all settings specified in the command file (.sym). Alternatively, this command is used to update Kerberos principals from a specified Kerberos file (.krb), without reset. Syntax install <install_option> [filename] Parameters install_option
One of: • primary – Configures the switch to act as Primary, and applies all settings specified in the file <filename>. If the command file is not specified, install instead uses the default “command.sym” file, if present. If “command.sym” is also not present, install will not change anything. • standby – Configures the switch to act as Standby, and applies all settings as described for the primary parameter value. • kerberos – Updates the Kerberos principals from the settings in the < filename> file (.krb), without reset. • runcli – Configures the switch with the commands in the CLI commands filename
Command (*.sym) or Kerberos (*.krb) file to use, which contains configuration settings. The default .sym file is command.sym
Example WS5000.(Cfg)> install primary cmd_template.sym Begin command file processing... Begin parsing command file for download and logging parameters... Command file was parsed successfully. Current Image Version is 2.1.0. FS patch will not be installed. Begin processing image file... Nothing to do. Skipping... Begin processing config file... Nothing to do. Skipping... Validating IP parameters... ERROR: Hostname or IP has not been provided! Cannot set switch to Primary. ERROR: IP parameter validation failed. Rebooting the switch... WS5000.(Cfg)> install standby cmd_template.sym Begin command file processing... Begin parsing command file for download and logging parameters... Command file was parsed successfully. Current Image Version is 2.1.0. FS patch will not be installed.
Page 250
8-18
WS 5000 Series System Reference
Begin processing image file... Nothing to do. Skipping... Begin processing config file... Nothing to do. Skipping... Validating IP parameters... ERROR: Hostname or IP has not been provided! Cannot set switch to Primary. ERROR: IP parameter validation failed. Rebooting the switch...
8.3.13 logdir
Context Lists all the user saved log files (history, syslog). For example capturing Packets on ethernet 1 and saving that captured file can be listed by command logdir.It does not list image or config files.Use directory command to list image/config files. Syntax WS5000 > logdir or WS5000 > logdir user <username> Parameter username
The name of the user, whose logs are to be displayed
Example WS5000.(Cfg)> .. WS5000> service Enter CLI Service Mode password: ******** Enabling CLI Service Mode commands...... done. SM-WS5000> capture packet ifname eth1 enable Start Packet Capture.... sending ioctl to capture packet SM-WS5000> cfg SM-WS5000.(Cfg)> save packet examplepacketcapture Saving captured packets....done SM-WS5000.(Cfg)> logdir File Name Bytes Date & time ======================================================== examplepacketcapture.pktbin
25835
Sun Feb 12 17:26:39 2006
Page 251
CLI Command Reference
8-19
8.3.14 name
Context Use the name command to change the system name. Syntax name <system_name> Parameters system_name
The new name of the switch.
Example WS5000> name MiamiWS5000 Configuring name... Status : Success. MiamiWS5000>
8.3.15 ping
Context Sends ICMP ECHO_REQUEST packets to a network host. Syntax ping <host/ip_address> OPTIONS: ping [-Rdfnqrv] [-c count] [-i wait] [-l preload] [-p pattern][-s packetsize] <host> 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.
Page 252
8-20
WS 5000 Series System Reference
-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
The name 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>
8.3.16 remove
Context Removes specified log file. Syntax remove
<filename> [username - optional]
Parameters filename
The name of the file that needs to be deleted username
The name of the user, from whose storage area, the log file is to be deleted
Example WS5000.cfg>logdir File Name Bytes Date & time ======================================================== Log1.history 7833 Thu Jan 19 04:36:16 2006 WS5000.(Cfg)> remove Log1.history Removing file 'Log1.history'.... done.