FS S3950-4T12S 12 Port Ethernet L2+ Managed Switch Instruction Manual

June 12, 2024
FS

FS S3950-4T12S 12 Port Ethernet L2+ Managed Switch

FS S3950-4T12S-12-Port-Ethernet-L2-Managed-Switch

Product Information

S3950-4T12S Switch CLI Reference Guide

Model: S3950-4T12S

Website: www.fs.com

Content

  1. Preface
  2. Basic Commands
  3. Ethernet Commands
  4. IP Service Commands
    • ARP Commands
    • DHCP Client Commands
  5. IP Routing Commands
  6. Multicast Commands
    • IGMP Snooping Commands
  7. Traffic Management Commands
    • QOS Commands
  8. Security Commands
  9. Reliability Commands
    • BHM Commands
  10. Device Management Commands
  11. Network Management Commands
  12. VPN Commands

Product Usage Instructions

Basic Commands:
The Basic Commands section provides information on the fundamental commands used in the S3950-4T12S switch.

Ethernet Commands:
The Ethernet Commands section provides information on the commands related to Ethernet configuration and management in the S3950-4T12S switch.

IP Service Commands:
The IP Service Commands section provides information on the commands related to IP services such as ARP and DHCP client configuration in the S3950-4T12S switch.

IP Routing Commands:
The IP Routing Commands section provides information on the commands related to IP routing configuration in the S3950-4T12S switch.

Multicast Commands:
The Multicast Commands section provides information on the commands related to multicast configuration in the S3950-4T12S switch. It includes IGMP Snooping Commands.

Traffic Management Commands:
The Traffic Management Commands section provides information on the commands related to traffic management, including QoS (Quality of Service) configuration, in the S3950-4T12S switch.

Security Commands:
The Security Commands section provides information on the commands related to security configuration in the S3950-4T12S switch.

Reliability Commands:
The Reliability Commands section provides information on the commands related to reliability configuration, including BHM (Bidirectional Forwarding Detection for High Availability) commands, in the S3950-4T12S switch.

Device Management Commands:
The Device Management Commands section provides information on the commands related to device management in the S3950-4T12S switch.

Network Management Commands:
The Network Management Commands section provides information on the commands related to network management in the S3950-4T12S switch.

VPN Commands:
The VPN Commands section provides information on the commands related to VPN (Virtual Private Network) configuration in the S3950-4T12S switch.

S3950-4T12S Switch CLI Reference Guide
Model: S3950-4T12S
www.fs.com

III

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Preface

Declaration

This document updates at irregular intervals because of product upgrade or other reason.

This document is for your reference only.

Audience

This document is for the following audiences:

System maintenance engineers Debugging and testing engineers Network monitoring engineers Field maintenance engineers

Conventions

Command syntax convention table
Syntax
Italic type with capital letters

Description
Use italic type with capital letters for the parameters of the commands.
Parameters are the parts which need to replace with the actual value.

(x|y|…)

Select one among the choices.

(x|y|…|)

Select one or none among the choices.

[x|y|…]

Select one or more among the choices.The choices can be selected repeatedly.

[x|y|…|]

Select one or more or none among the choices.The choices can be selected repeatedly.

{x|y|…}

Select one or more among the choices.The choices can be selected only once.

{x|y|…|}

Select one or more or none among the choices.The choices can be selected only once.

Select a number between x and y.

www.fs.com 1

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Basic Commands

System Configuration Commands

hostname Command Purpose To specify or modify the host name for the network server,use the”hostname”command in Global Configuration. To restore the configuration to the default,use the”no hostname”command. Command Syntax hostname NAME no hostname

Parameter

Parameter Description

Parameter Value

NAME

New host name for the network server

Host name is a string with 1-63 characters

Command Mode Global Configuration Default The default host name is Switch. Usage The host name is used in prompts and default configuration filenames. The name must also follow the rules for ARPANET host names.They have as interior characters only letters,digits,hyphens,and underline.Names must be 64 characters or fewer. Examples The following example changes the host name to”sandbox”: Switch#configure terminal Switch(config)#hostname sandbox sandbox(config)# Related Commands None 2.1.2 management ip address Command Purpose Use this command to set the management IP address on the Switch. To remove the management IP address,use the no form of this command. Command Syntax management ip address(A.B.C.D/M|A.B.C.D mask)(gateway A.B.C.D|)

www.fs.com 2

S3950-4T12S SWITCH CLI REFERENCE GUIDE

no management ip address management ipv6 address(X:X::X:X/M|X:X::X:X mask)(gateway X:X::X:X|) no management ipv6address

Parameter
A.B.C.D/M A.B.C.D mask
X:X::X:X/M X:X::X:X mask gateway A.B.C.D gateway X:X::X:X

Parameter Description
The management IPv4 address with mask length configured The management IPv4 address
and mask configured The management IPv6 address with mask length configured The management IPv6 address
and mask configured Add IPv4 gateway Add IPv6 gateway

Command Mode Global Configuration Default None Usage None Examples The following example sets the management ipv4 address: Switch#configure terminal Switch(config)#management ip address 192.168.100.100/24 The following example unsets the management ipv4 address: Switch#configure terminal Switch(config)#no management ip address The following example sets the management ipv6 address: Switch#configure terminal Switch(config)#management ipv6 address 2001:1000::1000/96 The following example unsets the management ipv6 address: Switch#configure terminal Switch(config)#no management ipv6 address Related Commands None 2.1.3 management route Command Purpose Use this command to set the gateway on the Switch for management ip.

Parameter Value
IPv4 address with mask length 132
IPv4 address and mask IPv4 address with mask length 1-
128 IPv6 address and mask
IPv4 address IPv6 address

www.fs.com 3

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Syntax management route(add|del)gateway A.B.C.D management ipv6 route(add|del)gateway X:X::X:X

Parameter
add del ipv6 gateway A.B.C.D X:X::X:X

Parameter Description
Add the route Del the route Configure IPv6 gateway Add gateway The IPv4 address of the gateway The IPv6 address of the gateway

Command Mode Global Configuration Default None Usage None Examples The following example sets the gateway of 192.168.100.254 for the switch: Switch#configure terminal Switch(config)#management route add gateway 192.168.100.254 The following example sets the gateway of 200110001 for the switch: Switch#configure terminal Switch(config)#management ipv6 route add gateway 2001:1000::1 Related Commands None 2.1.4 show management arp Command Purpose Use This command to show the ARP of the management port. Command Syntax show management arp Command Mode Privileged EXEC Default None

Parameter Value
IPv4 address IPv6 address

www.fs.com 4

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Usage None Examples The following example shows the ARP of the management port: Switch#show management arp Address Hardware Addr Interface —————-+——————–+———10.10.39.241 24:6e:96:62:3f:c4 mgmt-if 10.10.39.254 00:1e:08:09:67:6d mgmt-if Related Commands None 2.1.5 show management ip address Command Purpose Use This command to show the IP address of the management port. Command Syntax show management ip address show management ipv6 address Command Mode Privileged EXEC Default None Usage None Examples The following example shows the IP address of the management port: Switch#show management ip address Management IP address is:192.168.100.100/24 Gateway:192.168.100.254
Switch#show management ipv6 address Management IPv6 address is:2001:1000::1000/96 Gateway:2001:1000::1 Related Commands None
www.fs.com 5

S3950-4T12S SWITCH CLI REFERENCE GUIDE
2.1.6 show management interface Command Purpose Use this command to display the configurations and statistics on management interface. Command Syntax show management interface Command Mode Privileged EXEC Default None Usage None Examples The following example shows how to display the configurations and statistics on management interface: Switch#show management interface Management Interface current state:DOWN Description: Link encap:Ethernet HWaddr:94:EB:AB:88:2A:B4 Inet addr:192.168.100.102 Mask:255.255.255.0 Bcast:192.168.100.255 MTU:1500 Speed:10 Duplex:Half Auto-negotiation:Enable Received:2 Packets,128 Bytes(128.0 b) Transmitted:1 Packets,78 Bytes(78.0 b) Related Commands clear counters mgmt-if 2.1.7 clear counters mgmt-if Command Purpose Use this command to clear statistics counters on management interface. Command Syntax clear counters mgmt-if Command Mode Privileged EXEC Default None Usage None
www.fs.com 6

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Examples The following example shows how to clear statistics counters on management interface: Switch#clear counters mgmt-if Related Commands None 2.1.8 enable password Command Purpose Use this command to set the password which is needed when user enter Privileged EXEC mode. Command Syntax enable password(privilege LEVEL|)(8|)LINE no enable password

Parameter
Privilege LEVEL 8
LINE

Parameter Description
User privilege level Specifies a hidden password will
follow The password string

Parameter Value
Level value<1-4> –

Command Mode Global Configuration Default None Usage If this command is set,user need to provide the password when enter Privileged EXEC mode. Examples The following example shows how to set the password: Switch#configure terminal Switch(config)#enable password 123 Switch(config)#exit Switch#disable Switch>enable Password: Switch# Related Commands None

www.fs.com 7

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.1.9 terminal length Command Purpose To set the number of lines on the current terminal screen for the current session,use the terminal length command in EXEC mode.To restore the configuration to the default,use the no form of this command. Command Syntax terminal length LENGTH terminal no length

Parameter
LENGTH

Parameter Description
Number of lines on the screen

Parameter Value
The value is a number from 0 to 512. A value of zero disables pausing between screens of output

Command Mode Privileged EXEC Default Automatically detected by terminal screen length by default Usage The system uses the length value to determine when to pause during multiple-screen output.A value of zero prevents the switch from pausing between screens of output. Some types of terminal sessions do not require you to specify the screen length because the screen length specified can be learned by some remote hosts.For example,the rlogin protocol uses the screen length to set up terminal parameters on a remote UNIX host. Examples In the following example,the system is configured to prevent output from pausing if it exceeds the length of the screen: Switch#terminal length 0 Related Commands service terminal-length 2.1.10 service terminal-length Command Purpose To set the number of lines on the current terminal screen for all sessions,use the service terminal-length command in Global Configuration.To restore the configuration to the default,use the no form of this command. Command Syntax service terminal-length LENGTH no service terminal-length

www.fs.com 8

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
LENGTH

Parameter Description
Number of lines on the screen

Parameter Value
The value is a number from 0 to 512. A value of zero disables pausing between screens of output

Command Mode Global Configuration Default None Usage The system uses the length value to determine when to pause during multiple-screen output.A value of zero prevents the switch from pausing between screens of output. Some types of terminal sessions do not require you to specify the screen length because the screen length specified can be learned by some remote hosts.For example,the rlogin protocol uses the screen length to set up terminal parameters on a remote UNIX host. Examples In the following example,the system is configured to prevent output from pausing if it exceeds the length of the screen: Switch#configure terminal Switch(config)#service terminal-length 0 Related Commands terminal length 2.1.11 banner motd Command Purpose To set a single or multiline message banner that appears on the screen when someone logs in to the switch,use the banner motd command in Global Configuration.To restore the configuration to the default,use the no form of this command. Command Syntax banner motd line no banner motd

Parameter
LINE

Parameter Description
message string

Parameter Value
specify a visible character as delimiting character,enter the message between 2 delimiting characters.At most support 99 lines with 1023 character in each
line

Command Mode Global Configuration Default None

www.fs.com 9

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Usage None Examples The following example shows how to set a single message banner: Switch#configure terminal Switch(config)#banner motd# Enter TEXT message.End with the character’#’. this is a example message# Related Commands banner exec banner login 2.1.12 banner exec Command Purpose To set an exec banner to be displayed on all connected terminals and this banner appears when terminal in Privileged EXEC mode,use the banner motd command in Global Configuration.To restore the configuration to the default,use the no form of this command. Command Syntax banner exec line no banner exe

Parameter
LINE

Parameter Description
message string

Parameter Value
specify a visible character as delimiting character,enter the message between 2 delimiting characters.At most support 99 lines with 1023 character in each
line

Command Mode Global Configuration Default None Usage None Examples The following example shows how to set a single message banner: Switch#configure terminal Switch(config)#banner exec# Enter TEXT message.End with the character’#’. this is a example message#

www.fs.com 10

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Related Commands banner motd banner login 2.1.13 banner login Command Purpose To set a login banner to be displayed on all connected terminals,and this banner appears after the MOTD banner and before the login prompt,use the banner motd command in Global Configuration.To restore the configuration to the default,use the no form of this command. Command Syntax banner login line no banner login

Parameter
LINE

Parameter Description
message string

Parameter Value
specify a visible character as delimiting character, enter the message between 2 delimiting characters. At most support 99 lines with 1023 character in each
line

Command Mode Global Configuration Default None Usage None Examples The following example shows how to set a single message banner: Switch#configure terminal Switch(config)#banner login# Enter TEXT message.End with the character’#’. this is a example message# Related Commands banner exec banner motd 2.1.14 show version Command Purpose To display the version information of the hardware and firmware,use the show version command in EXEC mode.

www.fs.com 11

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Syntax show version(slot ID|)

Parameter
ID

Parameter Description
slot id

Parameter Value
1-29

Command Mode Privileged EXEC Default None Usage None Examples The following example shows how to display version information of the hardware and firmware: Switch#show version Switch#show version NetworkOS Software,Switch,Version 5.3.8.5 Copyright(C)2018 Switch Vendor Inc.All rights reserved. The current running image is flash:/boot/uImage.p1010.48t4x.r_20181115 Switch uptime is 0 days,19 hours,8 minutes Hardware Type is 52TX Hardware Version is 1.1 SDRAM size 2048M Flash size 2048M EPLD Version is 2.1 BootRom Version is 6.1.2 System serial number is E101ZB14202C Current Web Version is 5.3.8.3 Related Commands None 2.1.15 line vty Command Purpose To set the max login VTY,use this command in Global Configuration.To restore the configuration to the default,use the no form of this command. Command Syntax line vty maximum MAX_VTY no line vty maximum line vty VTY

www.fs.com 12

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
MAX_VTY VTY

Parameter Description
Max login VTY Number of VTY

Parameter Value
The default value is 8.range<0-8> Range<0-7>

Command Mode Global Configuration Default 8 Usage None Examples The following example shows how to set the max VTY to 5: Switch#configure terminal Switch(config)#line vty maximum 5 The following example shows how to enter Line Configuration mode: Switch#configure terminal Switch(config)#line vty 2 Related Commands None 2.1.16 exec-timeout Command Purpose To set how much time the login user do not do any operation then the user should be forced to quit,use the no form of this command. Command Syntax exec-timeout MINUTES SECONDS no exec-timeout

Parameter
MINUTES SECONDS

Parameter Description
Timeout in minute Timeout in second

Parameter Value
Range<0-35791> Range<0-2147483>

Command Mode Line Configuration Default 600 seconds Usage When the user login again then config will be effected

www.fs.com 13

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Examples The following example shows how to set max time the login user do not do any operation then the user should be forced to quit: Switch#configure terminal Switch(config)#line vty 0 Swicth(config-line)#exec-timeout 3 200 Related Commands None 2.1.17 access-class Command Purpose To apply IPv4 ACL on line vty.To restore to default,use the no form of this command. Command Syntax access-class ACL-NAME in no access-class in

Parameter
ACL-NAME

Parameter Description
The name of the IPv4 acl

Parameter Value
A string with up to 40 characters

Command Mode Line Configuration Default No ACL Usage If an ACL be applied to line VTY,none of the entries in the ACL will be matched except for IP address and port number. Examples The following example shows how to apply IPv4 ACL on vty: Switch(config-line)#access-class acl4 in Related Commands ip access-list 2.1.18 reboot Command Purpose To reload the operating system,use the reload command in Privileged EXEC mode. Command Syntax reboot

www.fs.com 14

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Mode Privileged EXEC Default None Usage The reboot command halts the system.Use the reboot command after configuration information is entered into a file and saved to the startup configuration. Examples The following example is sample dialog from the reboot command: Switch#reboot Related Commands reload 2.1.19 schedule reboot at Command Purpose To schedule a reload of the software to take place at the specified time,use the schedule reboot at command in Global Configuration.To cancel the scheduled reboot task,use the no form of this command. Command Syntax schedule reboot at HH:MM(MM/DD|MM/DD/YYYY|YYYY/MM/DD) no schedule reboot

Parameter
HH:MM MM/DD MM/DD/YYYY
YYYY/MM/DD

Parameter Description
The hour and minutes Specify the date for current
year(MM/DD format) Specify the date(MM/DD/YYYY format,year range is[2000,2037]) Specify the date(YYYY/MM/DD
format

Parameter Value
The time range is 00:00­23:59 date range is[1/1,12/31] year range is[2000,2037] year range is[2000,2037]

Command Mode Global Configuration Default No scheduled reboot task is defined. Usage If you specify the month and day,the reload is scheduled to take place at the specified time and date.If you do not specify the month and day,the reload takes place at the specified time on the current day.

www.fs.com 15

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Examples The following example is sample dialog from the schedule reboot at command: Switch#configure terminal Switch(config)#schedule reboot at 12:12 2008/12/25 Related Commands schedule reboot delay 2.1.20 schedule reboot delay Command Purpose To schedule a reload of the software to take place after the specified time,use the schedule reboot delay command in Global Configuration.To cancel the scheduled reboot task,use the no form of this command. Command Syntax schedule reboot delay{HH:MM|MINUTES} no schedule reboot

Parameter
HH:MM MINUTES

Parameter Description
The hour and minutes The minutes

Parameter Value
The time range is 00:00­23:59 The range is 1-720

Command Mode Global Configuration Default No scheduled reboot task is defined. Usage None Examples The following example is sample dialog from the schedule reboot delay command: Switch#configure terminal Switch(config)#schedule reboot delay 300 Related Commands schedule reboot at 2.1.21 boot system Command Purpose To specify the system image that the switch loads at startup,use the following boot system commands in Privileged EXEC mode. Command Syntax boot system(tftp:mgmt-if SERVERIP|flash:/)FILE_NAME

www.fs.com 16

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
flash:/
tftp mgmt-if SERVERIP FILE_NAME

Parameter Description
System image file for next booting
System image file for next booting
Management port The tftp server ip The file name that will be used to load at startup

Parameter Value

The full path and file name, up to 255 characters

Command Mode Privileged EXEC Default None Usage Management IP address in startup-config file will be used as source address when system boot via TFTP. Examples The following example is sample dialog from the boot system command: Switch#boot system flash:/boot/Internal-1.0.0.25.bin Related Commands show boot 2.1.22 show boot Command Purpose To display the current image and the image the next startup will load,use the show boot command in Privileged EXEC mode. Command Syntax show boot Command Mode Privileged EXEC Default None Usage None Examples The following is sample output from the show boot command:

www.fs.com 17

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Switch#show boot The current boot image version is:E330-3.0.0.23.it The current running image is:tftp://10.10.29.160/humberOS-e330-ma-v3.0.0.23.it.r.bin The next running image is:tftp://10.10.29.160/humberOS-e330-ma-v3.0.0.23.it.r.bin Related Commands show boot images 2.1.23 show boot images Command Purpose To display all booting images available in the flash system,use the show boot images command in Privileged EXEC mode. Command Syntax show boot images Command Mode Privileged EXEC Default None Usage None Examples The following is sample output from the show boot images command: Switch#show boot images System image files list: Current boot image version:1.0.0.25 Create Time Version File name =============================================================== *2011-07-25 10:58:29 v3.0.0.22it Internal-.00.22.bin Related Commands show boot 2.1.24 show memory Command Purpose To display memory utilization information about the active processes,use the show memory command in Privileged EXEC mode. Command Syntax show memory(all|bgp|bhm|chsm|dhclient|dot1x|imi|ipv6|lacp|ldp|lib|mstp|nsm|oamd|onmd|ospf|pim|ptp|rip|rsvp|shal|summary)

Parameter
all bgp bhm

Parameter Description
All memory information Border Gateway Protocol(BGP)
Health monitoring

Parameter Value

www.fs.com 18

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Mode Privileged EXEC Default None Usage None

Parameter
chsm dhclient dhcpd dhcprelay dhcprelay6
dot1x
imi ipv6 lacp ldp lib mstp nsm oamd onmd ospf pim ptp rip rsvp shal summary monitor

Parameter Description
Chassis management DHCP client module
DHCP DHCP relay DHCP relay6(IPv6) IEEE 802.1X Port-Based Access
Control Integrated Management
Interface(IMI) Internet Protocol version 6(IPv6)
Link Aggregation Control Protocol(LACP)
Label Distribution Protocol(LDP) Library information Spanning Tree
Protocols(STP/RSTP/MSTP) Network Service Module(NSM)
Bidirectional Forwarding Detection(BFD)
LLDP and EFM_OAM Open Shortest Path First(OSPF)
Protocol Independent Multicast(PIM)
Precision Time Protocol(PTP) Routing Information Protocol(RIP)
Resource Reservation Protocol(RSVP)
Hal server monitoring Summary memory information
monitor

Parameter Value

www.fs.com 19

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Examples The following is sample output from the show memory command with keyword bgp: Switch#show memory bgp Library memories for BGP Memory type Alloc cells Alloc bytes ======================================================== Temporary memory:6596 322216 Hash:10 320 Hash index:10 40960 Hash bucket:55 880 Link list:13 400 Link list node:115 1840 Show:1 512 Show page:1 8192 Show server:1 64 Prefix IPv4:6 48 Route table:6 48 Route node:309 19776 Vector:3383 324768 Vector index:3383 48824 SNMP subtree:8 6144 Host config:1 16 Message of The Day:1 128 IMI Client:2 1056 VTY master:1 16 VTY if:52 39936 VTY connected:3 192 Message handler:2 128 Host:1 96 Log information:2 128 Context:1 512 Memories for BGP Memory type Alloc cells Alloc bytes ========================================================== BGP structure:1 768 BGP VR structure:1 384 BGP global structure:1 64 BGP peer:1 2048 Ext community:1 16 BGP as list master:1 32 Community list handler:1 32 BGP Damp Reuse List Array:1 2048 BGP table:31 248 BGP VRF list:1 64 Related Commands show processes memory sorted 2.1.25 show cpu traffic-limit Command Purpose Use this command to show the CPU traffic-limit configurations. Command Syntax show cpu traffic-limit Command Mode Privileged EXEC
www.fs.com 20

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Default None Usage None Examples The following is sample output from the show cpu traffic-limit: Switch#show cpu traffic-limit reason rate(pps)class bpdu 64 3 cfm 512 2 slow-protocol 128 1 eapol 128 0 erps 128 2 smart-link 128 2 udld 128 3 arp 640 1 dhcp 128 0 rip 64 1 ldp 512 1 ospf 256 1 pim 128 1 vrrp 512 1 rsvp 512 1 ipda 1024 0 icmp-redirect 128 0 mcast-rpf-fail 128 1 macsa-mismatch 128 0 port-security-discard 128 0 vlan-security-discard 128 0 mtu-dontfrag 64 0 mtu-frag 64 0 ptp 512 2 ip-option 512 0 ucast-ttl-fail 64 0 mpls-ttl-fail 64 0 igmp 128 2 sflow-ingress 128 0 sflow-egress 128 0 fwd-to-cpu 64 0 mpls-tp- pwoam 128 2 Total rate:2048(pps) Related Commands None 2.1.26 show processes cpu sorted Command Purpose To display CPU utilization information about the active processes sorted by percentage in a device,use the show processes cpu sorted command in Privileged EXEC mode. Command Syntax show process cpu sorted Command Mode Privileged EXEC
www.fs.com 21

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Default None Usage None Examples The following is sample output from the show process cpu sorted: Switch#show processes cpu sorted PID TIME%CPU TTY COMMAND 924 00:20:03 2.0?hsrvd 956 00:07:17 0.7?nsm 1007 00:02:44 0.2?imi 959 00:01:24 0.1?snmpd 1317 00:00:01 0.1 pts/0 imish 5 00:00:45 0.0?events/0 983 00:00:23 0.0?mstpd 985 00:00:15 0.0?onmd 966 00:00:15 0.0?lacpd 963 00:00:12 0.0?bhm 929 00:00:12 0.0?chsm 964 00:00:11 0.0?oamd 919 00:00:10 0.0?ntpd 1003 00:00:08 0.0?pimd 942 00:00:08 0.0?sshd 957 00:00:08 0.0?dhcrelay 973 00:00:07 0.0?authd 1005 00:00:07 0.0?ldpd 977 00:00:07 0.0?rmond 1021 00:00:07 0.0?ripd 1027 00:00:07 0.0?ospfd 1032 00:00:07 0.0?bgpd 1 00:00:05 0.0?init 779 00:00:04 0.0?jffs2_gcd_mtd1 1106 00:00:01 0.0?imish 3 00:00:00 0.0?ksoftirqd/0 916 00:00:00 0.0?syslog-ng 65 00:00:00 0.0?bdi-default 965 00:00:00 0.0?ptpd 917 00:00:00 0.0?crond 63 00:00:00 0.0?sync_supers 1096 00:00:00 0.0?telnetd 6 00:00:00 0.0?khelper 105 00:00:00 0.0?khungtaskd 2 00:00:00 0.0?kthreadd 4 00:00:00 0.0?watchdog/0 9 00:00:00 0.0?netns 10 00:00:00 0.0?async/mgr 66 00:00:00 0.0?kblockd/0 73 00:00:00 0.0?kseriod 88 00:00:00 0.0?rpciod/0 106 00:00:00 0.0?kswapd0 157 00:00:00 0.0?aio/0 164 00:00:00 0.0?nfsiod 171 00:00:00 0.0?crypto/0 712 00:00:00 0.0?mtdblockd 741 00:00:00 0.0?kpsmoused 789 00:00:00 0.0?PETH/Tx 912 00:00:00 0.0?angel 1098 00:00:00 0.0?telnetd 1414 00:00:00 0.0 pts/0 imish 1415 00:00:00 0.0 pts/0 more 1416 00:00:00 0.0?ps
www.fs.com 22

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Related Commands None 2.1.27 show processes cpu history Command Purpose To display CPU utilization information for a period of time,use the show processes cpu history command in Privileged EXEC mode,the period of 1s,1min,5min could be shown. Command Syntax show process cpu history Command Mode Privileged EXEC Default None Usage None Examples The following is sample output from the show processes cpu history command: Switch#show processes cpu history CPU usage for five seconds:4.17%;one minute:3.70%;five minutes:3.68% Related Commands None 2.1.28 show processes memory sorted Command Purpose To display memory utilization information about the active processes sorted by percentage in a device,use the show processes memory sorted command in Privileged EXEC mode.Here,CPU usage for each process means the CPU timeslice used by this process from the process was started to this command has been operated. Command Syntax show processes memory sorted(core|physical|virtual)

Parameter
core physical virtual

Parameter Description
Size in physical pages of the core image of the process
Non-swapped physical memory that a task has used
Virtual memory usage of entire process

Parameter Value

www.fs.com 23

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Command Mode
Privileged EXEC
Default
None
Usage
None
Examples
The following is sample output from the show processes memory sorted command without keywords:
Switch#show processes memory sorted Total:256108;Used:89644;Free:166464;Buffers:0 PID TTY RSS VSZ SZ COMMAND 1317 pts/0 9516 13104 3276 imish 1106?9428 13104 3276 imish 1463 pts/0 7436 13104 3276 imish 956?6836 14644 3661 nsm 1007?5948 9624 2406 imi 924?5912 17652 4413 hsrvd 959?3336 8076 2019 snmpd 1032?2724 8204 2051bgpd 1027?2488 7140 1785 ospfd 1003?2472 7152 1788 pimd 957?2340 6572 1643 dhcrelay 983?2336 6592 1648 mstpd 1021?2324 6600 1650 ripd 1005?2320 6732 1683 ldpd 942?2284 6772 1693 sshd 985?2208 6592 1648 onmd 929?2132 7168 1792 chsm 966?2028 6140 1535 lacpd 973?2028 6284 1571 authd 965?2024 6408 1602 ptpd 964?1952 6364 1591 oamd 977?1948 6200 1550 rmond 963?1708 5980 1495 bhm 919?1120 3792 948 ntpd 916?1060 2300 575 syslog-ng 1465 pts/0 764 2516 629 ps 917?668 3040 760 crond 1?656 2928 732 init 1464 pts/0 472 1668 417 more 1096?416 2928 732 telnetd 1098?272 2928 732 telnetd 912?172 1496 374 angel 2?0 0 0 kthreadd 3?0 0 0 ksoftirqd/0 4?0 0 0 watchdog/0 5?0 0 0 events/0 6?0 0 0 khelper 9?0 0 0 netns 10?0 0 0 async/mgr 63?0 0 0 sync_supers 65?0 0 0 bdi-default 66?0 0 0 kblockd/0 73?0 0 0 kseriod 88?0 0 0 rpciod/0 105?0 0 0 khungtaskd 106?0 0 0 kswapd0 157?0 0 0 aio/0 164?0 0 0 nfsiod 171?0 0 0 crypto/0 712?0 0 0 mtdblockd
www.fs.com 24

S3950-4T12S SWITCH CLI REFERENCE GUIDE
741?0 0 0 kpsmoused 779?0 0 0 jffs2_gcd_mtd1 789?0 0 0 PETH/Tx Related Commands None 2.1.29 terminal monitor Command Purpose To copy debug output to the current terminal line,use the terminal monitor command in Privileged EXEC mode. Command Syntax terminal monitor terminal no monitor Command Mode Privileged EXEC Default None Usage None Examples The following is sample output from the terminal monitor command: Switch#terminal monitor Jan 1 16:09:30 DUT1 IMISH-6:ready to service Related Commands None 2.1.30 configure terminal Command Purpose To enter Global Configuration,use configure terminal command in Privileged EXEC mode. Command Syntax configure terminal Command Mode Privileged EXEC Default None
www.fs.com 25

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Usage Use this command to enter Global Configuration.Note that commands in this mode are written to the running configuration file as soon as you enter them(using the Enter key/Carriage Return). After you enter the configure command,the system prompt changes from#to(config)#,indicating that the switch is in Global Configuration.To leave Global Configuration and return to Privileged EXEC mode,type end or press Ctrl-Z. Examples In the following example,the user enters Global Configuration: Switch#configure terminal Switch(config)# Enter configuration commands, one per line.End with CNTL/Z. Switch(config)# Related Commands enable disable 2.1.31 disable Command Purpose To exit Privileged EXEC mode and return to user EXEC mode,enter the disable command in EXEC mode. Command Syntax disable Command Mode Privileged EXEC Default None Usage None Examples In the following example,the user enters Privileged EXEC mode using the enable command,then exits back to user EXEC mode using the disable command.Note that the prompt for user EXEC mode is>,and the prompt for Privileged EXEC mode is#: Switch#configure terminal Switch>enable Password: Switch#disable Switch> Related Commands enable
www.fs.com 26

S3950-4T12S SWITCH CLI REFERENCE GUIDE
2.1.32 enable Command Purpose To enter Privileged EXEC mod,use the enable command in user EXEC or Privileged EXEC mode. Command Syntax enable Command Mode User EXEC Privileged EXEC Default None Usage None Examples In the following example,the user enters Privileged EXEC mode using the enable command.The system prompts the user for a password before allowing access to the Privileged EXEC mode.The password is not printed to the screen.The user then exits back to user EXEC mode using the disable command.Note that the prompt for user EXEC mode is the greater than symbol(>),and the prompt for Privileged EXEC mode is the number sign(#).: Switch#configure terminal Switch>enable Password: Switch#disable Switch> Related Commands disable 2.1.33 end Command Purpose To end the current configuration session and return to Privileged EXEC mode,use the end command in Global Configuration. Command Syntax end Command Mode Global Configuration Default None Usage This command will bring you back to Privileged EXEC mode regardless of what configuration mode or configuration sub-mode you are in. This global configuration command can be used in any configuration mode.
www.fs.com 27

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Use this command when you are done configuring the system and you want to return to EXEC mode to perform verification steps. Examples In the following example,the end command is used to exit from interface configuration mode and return to Privileged EXEC mode.A show command is used in Privileged EXEC mode to verify the configuration: Switch#configure terminal Switch(config)#interface eth-0-1 Switch(config-if)#end Switch#show interface eth-0-1 Related Commands exit 2.1.34 exit(global) Command Purpose To exit any configuration mode to the lower mode in the CLI mode hierarchy,use the exit command in any configuration mode. Command Syntax exit Command Mode All Configuration Mode Default None Usage The exit command is used in the CLI to exit from the current command mode to the lower mode in the CLI mode hierarchy. For example,use the exit command in Global Configuration to return to Privileged EXEC mode.Use the exit command in interface,line,or router configuration mode to return to Global Configuration. Examples The following example displays an exit from the interface configuration mode to return to the Global Configuration: Switch#configure terminal Switch(config-if)#exit Switch(config)# Related Commands end exit(EXEC) 2.1.35 exit(EXEC) Command Purpose To close an active terminal session by logging off the switch,use the exit command in EXEC mode. Command Syntax exit
www.fs.com 28

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Command Mode Privileged EXEC Default None Usage Use the exit command in EXEC mode to exit the active session(log off the device).This command can be used in any EXEC mode(such as User EXEC mode or Privileged EXEC mode)to exit from the EXEC process. Examples In the following example,the exit(global)command is used to move from Global Configuration to Privileged EXEC mode,the disable command is used to move from Privileged EXEC mode to user EXEC mode,and the exit(EXEC)command is used to log off(exit the active session): Switch#configure terminal Switch(config)#exit Switch#disable Switch>exit Related Commands quit 2.1.36 quit Command Purpose To close an active terminal session by logging off the switch,use the quit command in EXEC mode. Command Syntax quit Command Mode All Configuration Mode Default None Usage Use the quit command in EXEC mode to exit the active session(log off the device).This command can be used in any EXEC mode(such as User EXEC mode or Privileged EXEC mode)to exit from the EXEC process. Examples In the following example,the quit command is used to move from Global Configuration to Privileged EXEC mode,the disable command is used to move from Privileged EXEC mode to user EXEC mode,and the quit command is used to log off(exit the active session): Switch#configure terminal Switch(config)#quit Switch#disable Switch>quit Related Commands exit
www.fs.com 29

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.1.37 cd Command Purpose Change the current directory to dir,use the cd command in EXEC mode. Command Syntax cd(dir|)

Parameter
dir

Parameter Description
(Optional)The directory or file systems followed by a colon. If
flash:argument is specified, change the current directory to
flash:.If udisk:argument is specified, change the current directory to udisk:.If you don’t use USB device, failed to cd udisk

Parameter Value

Command Mode Privileged EXEC Default The initial default file system is flash:.If you do not specify a directory on a file system,the default is the root directory on that file system. Usage For all EXEC commands that have an optional file system argument,the system uses the file system specified by the cd command when you omit the optional file system argument.For example,the dir EXEC command,which displays a list of files on a file system,contain an optional file system argument.When you omit this argument,the system lists the files on the file system specified by the cd command. Examples In the following example,the cd command is used to set the default file system to the Flash memory.: Switch#configure terminal DUT1#cd DUT1#pwd flash:/ In the following example,the cd command is used to set the default file system to the USB device: Switch#configure terminal storage device DUT1#cd udisk: DUT1#pwd udisk:/ In the following example,the cd command is used to set the file system without plug in the USB mass storage device: Switch#cd udisk: %Failed to cd udisk::No such file or directory In the following example,the cd command is used to set the file system with plug in the USB mass storage device Related Commands dir ls

www.fs.com 30

S3950-4T12S SWITCH CLI REFERENCE GUIDE

pwd 2.1.38 copy Command Purpose To copy file system,use the copy command in Privileged EXEC mode. Command Syntax copy source-name destination-name

Parameter
source-name destination-name

Parameter Description
The location URL of the source file to be copied. The source can be
either local or remote The destination URL of the copied file. The destination can be either
local or remote

Parameter Value

Command Mode Privileged EXEC Default None Usage The exact format of the source and destination URLs varies according to the file or directory location.You may enter a particular file or a filename that follows the standard file system syntax(filesystem:[/filepath][/filename]). Examples The following example shows how to get image from TFTP server through in band management interface.: Switch#copy tftp://192.168.0.1/image flash:/boot/image Download from URL to temporary file. Get file from tftp://192.168.0.1/image ……………………………………………………………………………………………….. Received 15591515 bytes in 16.6 seconds Copy the temporary file to its destination. ……………………………………………………………………………………………….. 15591515 bytes in 69.8 seconds,218 kbytes/second The following example shows how to get image from TFTP server through out band management interface: Switch#copy mgmt-if tftp://192.168.0.1/image flash:/boot/image Related Commands delete 2.1.39 delete Command Purpose To delete a file on the flash,use the delete command in Privileged EXEC mode.

www.fs.com 31

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Syntax delete file-name

Parameter
file-name

Parameter Description
The file name that is supposed to be deleted

Parameter Value

Command Mode Privileged EXEC Default None Usage If you attempt to delete the configuration file or image,the system prompts you to confirm the deletion.Also,if you attempt to delete the system specified file such as DHCP snooping bindings,the system prompts you to confirm the deletion. Examples The following example deletes the file named test from the flash: Switch#delete flash:/test Are you sure to delete flash:/test?[confirm]:y Related Commands copy 2.1.40 dir Command Purpose To display a list of files on a file system,use the dir command in EXEC mode. Command Syntax dir(flash:|udisk :|)(directory-name|)(file-name|)

Parameter
flash
udisk
directory-name file-name

Parameter Description
The flash system The USB mass storage device.If you don’t use USB mass storage
device, failed to dir udisk The directory in flash or udisk
The file name

Parameter Value


Command Mode Privileged EXEC Default None

www.fs.com 32

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Usage Use the dir(Flash file system)command to display flash or udisk information. Examples The following is sample output from the dir command.: Switch#dir Directory of flash:/ total 42 drwxr-xr-x 2 0 Jul 30 15:42 boot drwxr-xr-x 3 0 Jan 1 1970 conf drwxr-xr-x 2 0 Jan 1 1970 log -rw-r—–1 1020 Jul 29 19:18 startup-config.conf -rw-r–r–1 10270 Jul 30 10:10 syslog -rw-r–r–1 6886 Jul 29 23:59 syslog.1.gz 63.0M bytes total(30.4M bytes free) Switch#cd udisk: Switch#dir Directory of udisk:/ total 12 drwxrwxrwx 2 4096 Jun 2 2011test drwxrwxrwx 2 4096 Jun 8 2011test1 drwxrwxrwx 2 4096 Jun 7 2011test2 3.7G bytes total(3.7G bytes free) The following is sample output from udisk if plug in the USB mass storage device.: Switch#cd udisk: Switch#dir Directory of udisk:/ total 12 drwxrwxrwx 2 4096 Jun 2 2011 test drwxrwxrwx 2 4096 Jun 8 2011 test1 drwxrwxrwx 2 4096 Jun 7 2011 test2 3.7G bytes total(3.7G bytes free) Related Commands ls 2.1.41 ls Command Purpose To display a list of files on a file system,use the ls command in EXEC mode. Command Syntax ls(flash:|udisk:|)(directory-name|)(file-name|)

Parameter
flash
udisk
directory-name file-name

Parameter Description
The flash system The USB mass storage device.If you don’t use USB mass storage
device, failed to dir udisk The directory in flash or udisk
The file name

Parameter Value


www.fs.com 33

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Mode Privileged EXEC Default None Usage None Examples The following is sample output from the ls command: Switch#ls Directory of flash:/ total 42 drwxr-xr-x 2 0 Jul 30 15:42 boot drwxr-xr-x 3 0 Jan 1 1970 conf drwxr-xr-x 2 0 Jan 1 1970 log -rw-r—–1 1020 Jul 29 19:18 startup-config.conf -rw-r–r–1 10270 Jul 30 10:10 syslog -rw-r–r–1 6886 Jul 29 23:59 syslog.1.gz 63.0M bytes total(30.4M bytes free) Related Commands dir 2.1.42 more Command Purpose To display the contents of a file,use the more command in EXEC mode. Command Syntax more(flash:|udisk:)(directory-name|)file-name

Parameter
flash
udisk
directory-name file-name

Parameter Description
The flash system The USB mass storage device.If you don’t use USB mass storage
device, failed to dir udisk The directory in flash or udisk
The file name

Command Mode Privileged EXEC Default None Usage The system can only display a file in ASCII format.

Parameter Value


www.fs.com 34

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Examples The following partial sample output displays the configuration file named startup-config in flash: Switch#more flash:/startup-config.conf Related Commands dir ls 2.1.43 mkdir Command Purpose To create a new directory in a Flash file system or udisk device,use the mkdir command in EXEC mode. Command Syntax mkdir directory-name

Parameter
directory-name

Parameter Description
The directory in flash or udisk

Parameter Value

Command Mode Privileged EXEC Default None Usage This command is valid only for local file systems. Examples The following example creates a directory named newdir in Flash.: Switch#mkdir flash:/newdir The following example creates a directory named newdir in USB mass storage device if plug in it: Switch#mkdir udisk:/newdir Related Commands rmdir dir 2.1.44 rename Command Purpose To rename a file in a Class C Flash file system or udisk device,use the rename command in EXEC mode. Command Syntax rename old-filename new-filename

www.fs.com 35

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
old-filename new-filename

Parameter Description
The original file name in flash The new file name in flash

Parameter Value

Command Mode Privileged EXEC Default None Usage This command is valid only for local file systems Examples In the following example,the file named startup- config.conf-bak is renamed startup-config.conf-bak2: Switch#configure terminal Switch1#rename udisk:/wus udisk:/wu Are you sure to rename udisk:/wus?[confirm] Related Commands None 2.1.45 rmdir Command Purpose To remove an existing directory in a Flash file system or udisk device,use the rmdir command in Privileged EXEC mode. Command Syntax rmdir directory-name

Parameter
directory-name

Parameter Description
The directory in flash

Parameter Value

Command Mode Privileged EXEC Default None Usage This command is valid only for local file systems Examples The following example deletes a directory named newdir:

www.fs.com 36

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Switch#rmdir flash:/newdir Are you sure to delete newdir?[yes/no]:y Related Commands mkdir dir 2.1.46 tar create Command Purpose To create an new tar file in a Flash file system or udisk device,use the tar create command in Privileged EXEC mode. Command Syntax tar create tar-file-name source-directory

Parameter
tar-file-name source-directory

Parameter Description
The file name of the new tar file The source directory in flash

Parameter Value

Command Mode Privileged EXEC Default None Usage The source-directory must be a directory Examples The following example creates a tar file named tar1: Switch#tar create udisk:/tar1 udisk:/wu Related Commands tar table tar xtract 2.1.47 tar table Command Purpose To display files in the tar file,use the tar table command in Privileged EXEC mode. Command Syntax tar table tar-file-name

Parameter
tar-file-name

Parameter Description
The file name of the new tar file

Parameter Value

www.fs.com 37

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Mode Privileged EXEC Default None Usage The tar-file-name must be a in the flash Examples The following example shows files in a tar file named tar1: Switch#tar table udisk:/tar1 Related Commands tar create 2.1.48 tar xtract Command Purpose To untar files in the tar file,use the tar xtract command in Privileged EXEC mode. Command Syntax tar xtract tar-file destination-directory

Parameter
tar-file destination-directory

Parameter Description
The file name of the tar file The destination directory

Parameter Value

Command Mode Privileged EXEC Default None Usage The destination-directory must exist in the flash.You can use mkdir to create a new directory Examples The following shows an example to extract a tar file named tar1 into a directory name dir1: Switch#tar xtract flash:/tar1 flash:/mydir Related Commands tar create tar table

www.fs.com 38

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.1.49 show diagnostic-information Command Purpose Display diagnstic- information including syslog files,core dump files,tcam entries,running-config ,startup-config,version,clock,memory and logging buffer. Command Syntax show diagnostic-information(bgp|ospf|

Parameter
bgp ospf

Parameter Description
BGP protocol diagnostic information
OSPF protocol diagnostic information

Parameter Value

Command Mode Privileged EXEC Default None Usage None Examples The following example show diagnostic-information: Switch#show diagnostic-information Related Commands None 2.1.50 tar diagnostic-information Command Purpose To put diagnostic-information to a Flash file system,udisk device,ftp server or tftp server,use the tar diagnostic-information command in Privileged EXEC mode.Syslog files,core dump files,tcam entries,running-config,startup- config,version,clock,memory and logging buffer are included in this tarfile. Command Syntax tar diagnostic-information(mgmt-if|)destination-directory/tar- file

Parameter
destination-directory tar-file

Parameter Description
The destination directory, such as flash, udisk, tftp or ftp server The file name of the tar file

Parameter Value

Command Mode Privileged EXEC

www.fs.com 39

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Default None Usage The destination-directory must reachable and disk is enough Examples The following shows an example to put a diagnostic-information tar file to flash: Switch#tar diagnostic-information flash:/diag.tar.gz Related Commands None 2.1.51 format Command Purpose To format udisk,all data on udisk:will be lost. Command Syntax format udsik:

Parameter
udsik:

Parameter Description
The USB mass storage device. If you don’t use USB mass storage
device, failed to format udisk

Command Mode Application Configuration Default None Usage The destination- directory must exist Examples The following shows an example to format USB mass storage device: Switch#configure terminal Switch(config)#format udisk: WARNING:All data on udisk:will be lost!!! And format operation may take a while. Are you sure to process with format?[yes/no]:yes Related Commands None

Parameter Value

www.fs.com 40

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.1.52 umount Command Purpose To uninstall the USB mass storage device before plug out it from the switch. Command Syntax umount udsik:

Parameter
udisk:

Parameter Description
The USB mass storage device. If you don’t use USB mass storage
device, failed to format udisk

Parameter Value

Command Mode Application Configuration Default None Usage USB mass storage device must exist in the system.You can use umount command to uninstall the USB mass storage device Examples The following shows an example to umount USB mass storage device: Switch#configure terminal Switch(config)#umount udisk: After this operation,you can not use USB disk. Are you sure to continue?[yes/no]:yes Related Commands None 2.1.53 reset factory-config Command Purpose Reset to factory configuration. Command Syntax reset factory- config Command Mode Privileged EXEC Default None Usage Device will restore the saved configuration to factory configuration when select yes,and prompt to save configuration when rebooting,please select NO.

www.fs.com 41

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Examples The following shows an example to reset factory configuration: Switch#configure terminal DUT1#reset factory-config
This action will reset the saved configuration immediately. Running-config will be erased after reboot.Continue?[yes/no]: Related Commands None 2.1.54 show factory-config Command Purpose To display the factory configuration. Command Syntax show factory-config Command Mode Privileged EXEC Default None Usage None Examples The following shows an example to display factory configuration DUT1#show factory-config: DUT1#show factory-config Related Commands None 2.1.55 show route-mac Command Purpose To display the route MAC address of this device. Command Syntax show route-mac Command Mode Privileged EXEC Default None
www.fs.com 42

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Usage All interfaces on a device share the same single route-mac. Examples The following shows an example to display route-mac of this device: Switch#show route-mac Route MAC is:222c.12fd.6c00 ! Related Commands None
2.2 User Management Commands
2.2.1 username Command Purpose Use this command to create or delete a local user account on the switch. Command Syntax username WORD no username WORD

Parameter
username WORD

Parameter Description
Establish User Name Authentication User name

Parameter Value

Command Mode Global Configuration Default None Usage None Examples This is a sample output from this command displaying how to add a user named testName: Switch#configure terminal Switch(config)#username testName Related Commands None

www.fs.com 43

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.2.2 username password Command Purpose Use this command to add username and password. Command Syntax username WORD password(8|)LINE

Parameter
WORD Password
(8|) LINE

Parameter Description
User name Password for username Specifies a hidden password will
follow User password string

Parameter Value

Command Mode Global Configuration Default None Usage None Examples This is a sample output from this command displaying how to add a user named testName and with the password of 123456: Switch#configure terminal Switch(config)#username testName password 123456 Related Commands None 2.2.3 username secret Command Purpose Use this command to add username and password and the password will be encrypted by the switch. Command Syntax username WORD secret LINE

Parameter
WORD secret LINE

Parameter Description
User name Specify the secret for the user
User privilege level

Parameter Value

www.fs.com 44

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Mode Global Configuration Default None Usage None Examples This is a sample output from this command displaying how to add a user named testName and with the password of 123456: Switch#configure terminal Switch(config)#username testName secret 123456 Related Commands None 2.2.4 username privilege Command Purpose Use this command to set a local user account with privilege level on the switch. Command Syntax username WORD privilege<1-4>

Parameter
username WORD privilege<1-4>

Parameter Description
User name ser privilege level

Parameter Value

Command Mode Global Configuration Default None Usage None Examples This is a sample output from this command displaying how to add a user with privilege level of 2: Switch#configure terminal Switch(config)#username testName privilege 2 Related Commands None

www.fs.com 45

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.2.5 username service-type Command Purpose Use this command to set the user service type. Command Syntax username WORD service-type({rpc- api|ssh|telnet|web}|all|none)

Parameter
username WORD service-type

Parameter Description
User name User service type(include rpc-api,
ssh, telnet, web)

Parameter Value

Command Mode Global Configuration Default Allow all user service type Usage None Examples This is a sample show how to set only support rpc-api user service-type: Switch#configure terminal Switch(config)#username testName service-type rpc-api Related Commands None 2.2.6 username privilege password Command Purpose Use this command to set a local user account with privilege level and password on the switch. Command Syntax username WORD privilege<1-4>password(8|)LINE

Parameter
WORD privilege<1-4>
8 LINE

Parameter Description
User name User privilege level Specifies a HIDDEN password will
follow User privilege level

Parameter Value

Command Mode Global Configuration

www.fs.com 46

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Default None Usage None Examples This is a sample output from this command displaying how to add a user with privilege level of 2 and password of 123456: Switch#configure terminal Switch(config)#username testName privilege 2 password 123456 Related Commands None 2.2.7 re-username newname Command Purpose Use this command to reset username. Command Syntax re-username WORD newname WORD

Parameter
re-username WORD newname WORD

Parameter Description
Old user name New user name

Parameter Value

Command Mode Global Configuration Default None Usage None Examples This is a sample output from this command displaying how to reset username: Switch#configure terminal Switch(config)#re-username testName newname newname Related Commands None 2.2.8 cipher detect Command Purpose Use this command to set high level of cipher detect.

www.fs.com 47

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Syntax cipher detect(strong|normal|none)

Parameter
strong normal none

Parameter Description
Cipher must contain digital, normal char and special char Cipher must contain digital and
normal char Disable security check

Parameter Value

Command Mode Global Configuration Default None Usage This cmd will make all un-strong clear text passwords lost Examples This is a sample output from this command displaying how to set high level of cipher detect: Switch#configure terminal Switch(config)#cipher detect strong Related Commands None
2.3 FTP Commands
2.3.1 ftp Command Purpose To exchange files between local and remote ftp server,use the ftp command in Privileged EXEC mode. Command Syntax ftp(mgmt- if|)host

Parameter
mgmt-if HOST

Parameter Description
Management port IPv4, IPv6 address or name of the
remote host

Parameter Value
Support IPv4/IPv6 address or
hostname

Command Mode Privileged EXEC Default None

www.fs.com 48

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Usage Use the ftp command to upload and download files from remote ftp server. Examples The following example shows how to connect ftp server by ipv4 address: Switch#ftp mgmt-if 10.10.29.160 Connected to 10.10.29.160. 220———-Welcome to Pure-FTPd———220-You are user number 1 of 50 allowed. 220-Local time is now 09:00.Server port:21. 220-IPv6 connections are also welcome on this server. 220 You will be disconnected after 15 minutes of inactivity. Name(10.10.29.160:root):root 331 User root OK.Password required Password: 230-User root has group access to:wheel disk adm sys daemon 230-bin root 230 OK.Current directory is/root Remote system type is UNIX. Using binary mode to transfer files. ftp> The following example shows how to connect ftp server by ipv6 address: Switch#ftp mgmt-if 2001:1000::2

Connected to 2001:1000::2(2001:1000::2). 220 Serv-U FTP Server v10.2 ready… Name(2001:1000::2:root):Username 331 User name okay,need password. Password: 230 User logged in,proceed. Remote system type is UNIX. Using binary mode to transfer files. ftp> Related Commands None 2.3.2 ftp vrf Command Purpose To exchange files between local and remote ftp server in VPN,use the ftp vrf command in Privileged EXEC mode. Command Syntax ftp vrf WORD

Parameter
WORD

Parameter Description
VPN Routing/Forwarding instance name

Parameter Value
A string with 1-15 characters

Command Mode Privileged EXEC

www.fs.com 49

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Default None Usage None Examples Switch#ftp vrf testvrf Related Commands None 2.3.3 ftp username Command Purpose To create an FTP username,use the ftp username command in Global Configuration.To remove an FTP username,use the no form of this command. Command Syntax ftp username USERNAME no ftp username

Parameter
USERNAME

Parameter Description
The user name of the remote FTP server

Parameter Value
Up to 31 characters

Command Mode Global Configuration Default None Usage The username must also follow the rules.They must start with a letter,and have as interior characters only letters,digits,and underline.Names must be 31 characters or fewer. Examples The following example creates an FTP username”abc”: Switch#configure terminal Switch(config)#ftp username abc Related Commands ftp password ftp passive

www.fs.com 50

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.3.4 ftp password Command Purpose To create the password of an FTP username,use the ftp password command in Global Configuration.To remove the password of an FTP username,use the no form of this command. Command Syntax ftp password(8|)LINE no ftp password

Parameter
LINE 8

Parameter Description
The password of the user name of the remote FTP server
Specifies a hidden password will follow

Parameter Value
Up to 128 characters –

Command Mode Global Configuration Default No ftp password is defined. Usage The password will be encrypted in running-config if service password- encryption is enabled. Examples The following example creates the ftp password: Switch#configure terminal Switch(config)#ftp password abc Related Commands ftp username ftp passive 2.3.5 ftp passive Command Purpose To set the FTP mode in passive mode,use the ftp passive command in Global Configuration.To restore the configuration to the default,use no form of this command. Command Syntax ftp passive no ftp passive Command Mode Global Configuration

www.fs.com 51

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Default FTP works in Active mode. Usage None Examples The following example sets the ftp mode to passive: Switch#configure terminal Switch(config)#ftp passive Related Commands ftp username ftp password 2.3.6 show ftp Command Purpose To display the ftp configurations,use show ftp command in Privileged EXEC mode. Command Syntax show ftp Command Mode Privileged EXEC Default None Usage None Examples The following example displays the ftp configurations: Switch#show ftp ftp passive mode:on ftp username:root ftp password:unencrypted, abc Switch# Related Commands ftp username ftp password
www.fs.com 52

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.3.7 copy GFILENAME GURLNAME Command Purpose Use this command to copy local file to ftp server. Command Syntax copy GFILENAME(vrf VRF_NAME|)(mgmt-if|-a SRC_ADDR|-si SRC_INTF)GURLNAME

Parameter
mgmt-if vrf WORD GFILENAME
GURLNAME -a SRC_ADDR -si SRC_INTF

Parameter Description

Parameter Value

Management port

VPN Routing/Forwarding instance

A string with 1-15 characters

Copy from local file

The full path and file name, up to 255 characters

Copy to local file

The full path and file name, up to 255 characters

Copy with assigned IP

Copy with assigned Interface

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy local file to ftp server: Switch#copy flash:/test.c ftp:/username:password@1.1.1.1:21/running-config Related Commands None 2.3.8 copy GURLNAME GFILENAME Command Purpose Use this command to copy file from ftp server to local. Command Syntax copy(vrf VRF_NAME|)(mgmt-if|-a SRC_ADDR|-si SRC_INTF)GURLNAME GFILENAME

Parameter
mgmt-if vrf WORD

Parameter Description
Management port VPN Routing/Forwarding instance

Parameter Value
A string with 1-15 characters

www.fs.com 53

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
GURLNAME
GFILENAME -a SRC_ADDR -si SRC_INTF

Parameter Description
Copy from URL
Copy to local file Copy with assigned IP Copy with assigned Interface

Parameter Value
The full path and file name, up to 255 characters
The full path and file name, up to 255 characters –

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy file from ftp server to local: Switch#copy ftp://username:password@1.1.1.1:21/test.c flash:test1.c get file from ftp://username:password@1.1.1.1:21/test.c . Received 225 bytes in 0.3 seconds Related Commands None
2.4 TFTP Commands
2.4.1 copy GFILENAME GURLNAME Command Purpose Use this command to copy local file to tftp server. Command Syntax copy GFILENAME(vrf VRF_NAME|)(mgmt-if|-a SRC_ADDR|-si SRC_INTF)GURLNAME

Parameter
mgmt-if vrf WORD GFILENAME
GURLNAME -a SRC_ADDR -si SRC_INTF

Parameter Description
Management port VPN Routing/Forwarding instance
Copy from local file
Copy to local file Copy with assigned IP Copy with assigned Interface

Parameter Value
A string with 1-15 characters The full path and file name, up to
255 characters The full path and file name, up to
255 characters –

www.fs.com 54

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy local file to tftp server: Switch#copy flash:/test.c tftp://1.1.1.1/running-config Related Commands None 2.4.2 copy GURLNAME GFILENAME Command Purpose Use this command to copy file from tftp server to local. Command Syntax copy(vrf VRF_NAME|)(mgmt-if|-a SRC_ADDR|-si SRC_INTF)GURLNAME GFILENAME

Parameter
mgmt-if vrf WORD GURLNAME
GFILENAME -a SRC_ADDR -si SRC_INTF

Parameter Description

Parameter Value

Management port

VPN Routing/Forwarding instance

A string with 1-15 characters

Copy from URL

The full path and file name, up to 255 characters

Copy to local file

The full path and file name, up to 255 characters

Copy with assigned IP

Copy with assigned Interface

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy file from tftp server to local:

www.fs.com 55

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Switch#copy tftp://1.1.1.1/test.c flash:test1.c get file from tftp://1.1.1.1/test.c . Received 225 bytes in 0.3 seconds Related Commands None 2.4.3 copy running-config mgmt-if Command Purpose Use this command to copy running-config to tftp server. Command Syntax copy running-config(mgmt- if|)GURLNAME

Parameter
startup-config mgmt-if
GURLNAME

Parameter Description
Copy from current system configuration
Management port
Copy to URL

Parameter Value

The full path and file name, up
to 255 characters

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy running-config to tftp server: Switch#copy running-config tftp://1.1.1.1/running-config Building configuration… send file to tftp://1.1.1.1/running-config … Sent 40198 bytes in 8.3 seconds Related Commands None 2.4.4 copy mgmt-if startup-config Command Purpose Use this command to copy startup-config from tftp server.

www.fs.com 56

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Syntax copy(mgmt-if|)GURLNAME startup-config

Parameter
mgmt-if GURLNAME
startup-config

Parameter Description
Management port Copy from URL
Copy to startup system configuration

Parameter Value
The full path and file name, up to
255 characters

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy startup-config from tftp server: Switch#copy tftp://1.1.1.1/startup-config startup-config get file from tftp://1.1.1.1/startup-config .. Sent 32252 bytes in 6.4 seconds Related Commands None
2.5 scp Commands
2.5.1 copy GFILENAME GURLNAME Command Purpose Use this command to copy local file to scp server. Command Syntax copy GFILENAME(mgmt-if|)GURLNAME

Parameter
mgmt-if GFILENAME
GURLNAME

Parameter Description
Management port Copy from local file
Copy to local file

Parameter Value
The full path and file name, up to
255 characters The full path and file name, up to
255 characters

www.fs.com 57

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy local file to scp server: Switch#copy flash:/test.c scp://1.1.1.1/running-config Related Commands None 2.5.2 copy GURLNAME GFILENAME Command Purpose Use this command to copy file from scp server to local. Command Syntax copy(mgmt-if|)GURLNAME GFILENAME

Parameter
mgmt-if GURLNAME
GFILENAME

Parameter Description
Management port Copy from URL
Copy to local file

Parameter Value
The full path and file name, up to
255 characters The full path and file name, up to
255 characters

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy file from scp server to local: Switch#copy scp://1.1.1.1/test.c flash:test1.c get file from scp://1.1.1.1/test.c . Received 225 bytes in 0.3 seconds

www.fs.com 58

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Related Commands None 2.5.3 copy running-config mgmt-if Command Purpose Use this command to copy running-config to scp server. Command Syntax copy running-config(mgmt-if|)GURLNAME

Parameter
startup-config mgmt-if
GURLNAME

Parameter Description
Copy from current system configuration
Management port
Copy to URL

Parameter Value
The full path and file name, up to 255 characters

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy running-config to scp server: Switch#copy running-config mgmt-if scp://1.1.1.1/running-config Building configuration… send file to scp://1.1.1.1/running-config … Sent 40198 bytes in 8.3 seconds Related Commands None 2.5.4 copy mgmt-if startup-config Command Purpose Use this command to copy startup-config from scp server. Command Syntax copy(mgmt-if|)GURLNAME startup-config

www.fs.com 59

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
mgmt-if GURLNAME
startup-config

Parameter Description
Management port Copy from URL
Copy to startup system configuration

Parameter Value
The full path and file name, up to
255 characters

Command Mode Privileged EXEC Default None Usage None Examples This is a sample output from the command displaying how to copy startup-config from scp server: Switch#copy scp://1.1.1.1/startup-config startup-config get file from scp://1.1.1.1/startup-config .. Sent 32252 bytes in 6.4 seconds Related Commands None
2.6 Telnet Commands
2.6.1 telnet Command Purpose Use this command from the switch to access the other devices in the network. Command Syntax telnet(-a SRC_ADDR)(vrf WORD |mgmt-if)HOST(PORT|)

Parameter
-a SRC_ADDR vrf WORD mgmt-if
HOST
PORT

Parameter Description
Telnet with assigned IP VPN Routing/Forwarding instance
Management port IPv4,IPv6 address or name of the
remote host TCP Port number

Parameter Value
A string with 1-15 characters
Support IPv4/IPv6 address or
hostname 1-65535

Command Mode Privileged EXEC

www.fs.com 60

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Default None Usage None Examples This example shows how to Telnet from the switch to a remote host: Switch#telnet mgmt-if 10.10.29.247 Entering character mode Escape character is’^]’. TestOS, Version 2.3(62), fcs Switch#telnet 2001:1000::1 Entering character mode Escape character is’^]’. DUT1# Related Commands None 2.6.2 telnet server source address Command Purpose To configure the source address of telnet server on your switch,use the telnet server source address command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax telnet server source address(vrf NAME|)IP_ADDR no telnet server source address

Parameter
vrf NAME IP_ADDR

Parameter Description
Specify a vrf to provide telnet server
Configure IP address for telnet server working inband

Parameter Value
A string with 1-15 characters IPv4 Address

Command Mode Global Configuration Default None Usage You can use this command to modify the address which telnet server works on,and specify a vrf to provide telnet server.The source address can only be 0.0.0.0 or loopback interface’s address,0.0.0.0 indicates that the SSH server address is not specified. Examples The following example shows how to specify telnet server source address:

www.fs.com 61

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Switch#configure terminal Switch(config)#telnet server source address vrf vpn1 10.10.10.1 Related Commands None 2.6.3 telnet server source port Command Purpose To configure the TCP port for telnet server working inband on your switch,use the telnet server source command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax telnet server source port NUMBER no telnet server source port

Parameter
port NUMBER

Parameter Description
Configure TCP port for telnet server working inband

Parameter Value
1025-65535

Command Mode Global Configuration Default None Usage The CLI of”no telnet server source port”will configure TCP port for telnet server working inband with default value of 23. Examples The following example shows how to set the TCP port for telnet server working inband on the switch: Switch#configure terminal Switch(config)#telnet server source port 2323 Related Commands None 2.6.4 telnet server source mgmt-if port Command Purpose To configure the TCP port for telnet server working outband on your switch,use the telnet server source command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax telnet server source mgmt-if port NUMBER no telnet server source mgmt-if port

www.fs.com 62

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
mgmt-if port NUMBER

Parameter Description
Configure TCP port for telnet server working outband

Parameter Value
1025-65535

Command Mode Global Configuration Default None Usage The CLI of”no telnet server sourc mgmt-if port”will configure TCP port for telnet server working outband with default value of 23. Examples The following example shows how to set the TCP port for telnet server working outband on the switch: Switch#configure terminal Switch(config)#telnet server source mgmt-if port 2323 Related Commands None
2.7 SSH Commands
2.7.1 ip ssh server Command Purpose To enable SSH service,use ip ssh server enable command in Global Configuration.To disable SSH service,use ip ssh server disable command. Command Syntax ip ssh server(enable|disable)

Parameter
enable disable

Parameter Description
Turn on the SSH service Turn off the SSH service

Parameter Value

Command Mode Global Configuration Default SSH service is enabled. Usage None Examples The following example enables the SSH service on your switch:

www.fs.com 63

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Switch#configure terminal Switch(config)#ip ssh server enable Related Commands show ip ssh server status 2.7.2 ip ssh server authentication-retries Command Purpose To configure Secure Shell(SSH)authentication retry times on your switch,use the ip ssh server authentication-retries command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax ip ssh server authentication-retries COUNT no ip ssh server authentication-retries

Parameter
COUNT

Parameter Description
The number of retries,with a maximum of 6 authentication
retries

Parameter Value
1-6

Command Mode Global Configuration Default The default is 6. Usage None Examples The following examples configure SSH authentication retry times on your switch: Switch#configure terminal Switch(config)#ip ssh server authentication-retries 3 Related Commands show ip ssh server status 2.7.3 ip ssh server authentication-timeout Command Purpose To configure Secure Shell(SSH)authentication timeout on your switch,use the ip ssh server authentication-timeout command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax ip ssh server authentication-timeout SECONDS no ip ssh server authentication-timeout

www.fs.com 64

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
SECONDS

Parameter Description
The number of seconds until timeout disconnects

Parameter Value
1-120 seconds

Command Mode Global Configuration Default The default is 120 seconds. Usage None Examples The following examples configure SSH authentication timeout on your switch: Switch#configure terminal Switch(config)#ip ssh server authentication-timeout 100 Related Commands show ip ssh server status 2.7.4 ip ssh server authentication-type Command Purpose To configure Secure Shell(SSH)authentication type on your switch,use the ip ssh server authentication-type command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax ip ssh server authentication-type(all|{password|public-key|rsa}) no ip ssh server authentication-type

Parameter
all password public-key
rsa

Parameter Description
Enable all authentication type Enable password authentication
Enable SSHv2 public key authentication
Enable SSHv1 rsa authentication

Parameter Value

Command Mode Global Configuration Default The default authentication type is all. Usage None

www.fs.com 65

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Examples The following examples configure SSH authentication type on the switch: Switch#configure terminal Switch(config)#ip ssh server authentication- type password Related Commands show ip ssh server status 2.7.5 ip ssh server host-key rsa key Command Purpose To configure Secure Shell(SSH)host-key on your switch,use the ip ssh server host-key rsa key command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax ip ssh server host-key rsa key KEYNAME no ip ssh server host- key rsa

Parameter
KEYNAME

Parameter Description
The key value for host key

Parameter Value
Up to 32 characters

Command Mode Global Configuration Default None Usage Host-key is used to combining public key to generate a session.When SSH login,modifing host-key can cause connection closed. Examples The following examples configure SSH host key on your switch: Switch#configure terminal Switch(config)#ip ssh server host-key rsa key KEY1 Related Commands show ip ssh server status 2.7.6 ip ssh server rekey-interval Command Purpose To configure Secure Shell(SSH)rekey interval on your switch,use the ip ssh server rekey-interval command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax ip ssh server rekey-interval MINUTE no ip ssh server rekey-interval

www.fs.com 66

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
MINUTE

Parameter Description
The rekey interval in minutes

Parameter Value
1-1440 minutes

Command Mode Global Configuration Default The default interval is 60 minutes. Usage None Examples The following examples configure SSH rekey interval on your switch: Switch#configure terminal Switch(config)#ip ssh server rekey- interval 30 Related Commands show ip ssh server status 2.7.7 ip ssh server version Command Purpose To configure Secure Shell(SSH)version on your switch,use the ip ssh server version command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax ip ssh server version(1|2|all) no ip ssh server version

Parameter
1 2
all

Parameter Description
Switch runs only SSH Version 1 Switch runs only SSH Version 2 Version 1 and Version 2 are both
supported

Parameter Value

Command Mode Global Configuration Default The default SSH version is 2. Usage You can use this command with the 2 keyword to ensure that your switch will not inadvertently establish a weaker SSH Version 1 connection.

www.fs.com 67

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Examples The following example shows that only SSH Version 1 support is configured: Switch#configure terminal Switch(config)#ip ssh server version 1 Related Commands show ip ssh server status 2.7.8 ip ssh server source address Command Purpose To configure the source address of Secure Shell(SSH)server on your switch,use the ip ssh server source command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax ip ssh server source address{vrf NAME|}IP_ADDR no ip ssh server source address

Parameter
vrf NAME IP_ADDR

Parameter Description
Specify a vrf to provide SSH server Configure IP address for SSH server working inband

Parameter Value
Up to 15 characters IPv4 Address

Command Mode Global Configuration Default None Usage You can use this command to modify the address which SSH server works on,and specify a vrf to provide SSH server.The source address can only be 0.0.0.0 or loopback interface’s address,0.0.0.0 indicates that the SSH server address is not specified. Examples The following example shows how to set SSH server inbind address: Switch#configure terminal Switch(config)#ip ssh server source address 10.10.10.1 Related Commands ip ssh server 2.7.9 ip ssh server source port Command Purpose To configure the TCP port for SSH server working inband on your switch,use the ip ssh server source command in Global Configuration.To restore the default value,use the no form of this command.

www.fs.com 68

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Syntax ip ssh server source port NUMBER no ip ssh server source port

Parameter
port NUMBER

Parameter Description
Configure TCP port for SSH server working inband

Parameter Value
1025-65535

Command Mode Global Configuration Default None Usage The CLI of”no ip ssh server source port”will configure TCP port for SSH server working inband with default value of 22. Examples The following example shows the special port is configured: Switch#configure terminal Switch(config)#ip ssh server source port 2222 Related Commands ip ssh server 2.7.10 ip ssh server source mgmt-if port Command Purpose To configure the TCP port for SSH server working outband on your switch,use the ip ssh server source command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax ip ssh server source mgmt-if port NUMBER no ip ssh server source mgmt-if port

Parameter
mgmt-if port NUMBER

Parameter Description
Configure TCP port for SSH server working outband

Parameter Value
1025-65535

Command Mode Global Configuration Default None Usage The CLI of”no ip ssh server source mgmt-if port”will configure TCP port for SSH server working outband with default value of 22.

www.fs.com 69

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Examples The following example shows the special port is configured: Switch#configure terminal Switch(config)#ip ssh server source mgmt-if port 2222 Related Commands ip ssh server 2.7.11 show ip ssh server session Command Purpose To display the session information for Secure Shell(SSH),use the show ip ssh server session command in Privileged EXEC mode. Command Syntax show ip ssh server session Command Mode Privileged EXEC Default None Usage None Examples The following example shows the current SSH sessions: Switch#show ip ssh server session Version Encryption Hmac User IP State ================================================================= 2.0 aes128-cbc hmac-md5 abc 10.10.29.22 Session started Related Commands show ip ssh server status 2.7.12 show ip ssh server status Command Purpose To display the version and configuration data for Secure Shell(SSH),use the show ip ssh server status command in Privileged EXEC mode. Command Syntax show ip ssh server status Command Mode Privileged EXEC Default None
www.fs.com 70

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Usage None Examples The following example shows the current SSH configurations: Switch#show ip ssh server status SSH server enabled Version:1.99 Authentication timeout:33 second(s) Authentication retries:6 time(s) Server key lifetime:60 minute(s) Authentication type:password, public- key Related Commands show ip ssh server session 2.7.13 rsa key generate Command Purpose To create a key by system,use the rsa key generate command in Global Configuration. Command Syntax rsa key KEYNAME generate

Parameter
KEYNAME

Parameter Description
The name of the key

Command Mode Global Configuration Default None Usage Use the rsa key command to create a key by system. Examples The following example creates a key named KEY1: Switch#configure terminal Switch(config)#rsa key KEY1 generate Generating RSA private key,1024 bit long modulus Please waiting for a moment:done! Public exponent is 65537(0x10001) Generate RSA key successfully Switch(config)# Related Commands show rsa keys

Parameter Value
Up to 32 characters

www.fs.com 71

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.7.14 rsa key Command Purpose To create a key,use the rsa key command in Global Configuration. Command Syntax rsa key KEYNAME

Parameter
KEYNAME

Parameter Description
The name of the key

Command Mode Global Configuration Default None Usage Use the rsa key command to create a key. Examples The following example creates a key named KEY1: Switch#configure terminal Switch(config)#rsa key KEY1 Switch(config-rsa-key)# Related Commands show rsa keys 2.7.15 key format Command Purpose To specify the key format,use the key format command in RSA key configuration mode. Command Syntax key format(der|pem)

Parameter
der pem

Parameter Description
The format is der The format is pem

Command Mode Rsa Key Configuration Default The default key format is DER.

Parameter Value
Up to 32 characters
Parameter Value

www.fs.com 72

S3950-4T12S SWITCH CLI REFERENCE GUIDE
Usage None Examples The following example specify the key format of KEY1 as der: Switch#configure terminal Switch(config)#rsa key KEY1 Switch(config-rsa- key)#key format der Related Commands rsa key 2.7.16 key string end Command Purpose To exit the rsa key configuration mode to Global Configuration and apply all rsa key configurations,use the key string end command in RSA key configuration mode. Command Syntax key string end Command Mode Rsa Key Configuration Default None Usage None Examples The following example shows exit the rsa key configuration mode: Switch#configure terminal Switch(config)#rsa key KEY1 Switch(config-rsa-key)#key string end Switch(config)# Related Commands rsa key 2.7.17 key type Command Purpose To specify the key type,use the key type command in RSA key configuration mode. Command Syntax key type(public|private)
www.fs.com 73

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
public private

Parameter Description
Specify the key as a public key Specify the key as a private key

Command Mode Rsa Key Configuration Default None Usage None Examples The following example specifies the key type of KEY1 as public key: Switch#configure terminal Switch(config)#rsa key KEY1 Switch(config-rsa- key)#key type public Related Commands rsa key 2.7.18 reset Command Purpose To clear all key configurations,use the reset command in RSA key configuration mode. Command Syntax reset Command Mode Rsa Key Configuration Default None Usage None Examples The following example shows to clear all configurations for the key KEY1: Switch#configure terminal Switch(config)#rsa key KEY1 Switch (config-rsa-key)#reset Related Commands rsa key

Parameter Value

www.fs.com 74

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.7.19 validate Command Purpose To check the validation of the key strings,use the validate command in RSA key configuration mode. Command Syntax validate Command Mode Rsa Key Configuration Default None Usage None Examples The following example shows to validate key strings of the key KEY1: Switch#configure terminal Switch(config)#rsa key KEY1 Switch(config-rsa- key)#validate Related Commands rsa key 2.7.20 KEYLINE Command Purpose To add key strings from the screen directly,type any strings in RSA key configuration mode except the keywords in this mode. Command Syntax KEYLINE

Parameter
KEYLINE

Parameter Description
key line

Parameter Value
key line string

Command Mode Rsa Key Configuration Default None Usage Type any key string. Examples The following example shows to type a key string of the key KEY1:

www.fs.com 75

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Switch#configure terminal Switch(config)#rsa key KEY1 Switch(config-rsa- key)#00302017 4A7D385B 1234EF29 335FC973 Switch(config-rsa-key)#2DD50A37 C4F4B0FD 9DADE748 429618D5 Related Commands validate 2.7.21 rsa key export Command Purpose To export the key file to a specified destination,use the rsa key export command in Global Configuration. Command Syntax rsa key KEYNAME export url DEST_FILE(public|private)(der|der-hex|pem|ssh1|ssh2)

Parameter
KEYNAME
DEST_FILE
public private
der der-hex
pem ssh1 ssh2

Parameter Description
Specify the key name to display The destination file path and name Specify the key as a public key Specify the key as a private key DER format DER HEX format PEM format SSHv1 format Specify the key format

Parameter Value
Up to 32 characters The full path and file name, up
to 255 characters –

Command Mode Global Configuration Default None Usage Use the rsa key generate command to generate a key. Examples The following example shows to export the key KEY1 to flash as a public key: Switch#configure terminal Switch(config)#rsa key KEY1 export url flash:/key1.pub public ssh2 The following example shows to export the key KEY2 to flash as a private key: Switch#configure terminal Switch(config)#rsa key KEY2 export url flash:/key1 private ssh1

www.fs.com 76

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Related Commands rsa key generate rsa key import 2.7.22 rsa key import Command Purpose To import the key file from a specified source,use the rsa key import command in Global Configuration. Command Syntax rsa key KEYNAME import url SRC_FILE(public|private)(der|der-hex|pem|ssh1|ssh2)

Parameter
KEYNAME
SRC_FILE
public private
der der-hex
pem ssh1 ssh2

Parameter Description
Specify the key name to display The destination file path and name Specify the key as a public key Specify the key as a private key DER format DER HEX format PEM format SSHv1 format Specify the key format

Parameter Value
Up to 32 characters The full path and file name, up to
255 characters –

Command Mode Global Configuration Default None Usage Use the rsa key to generate command to generate a key. Examples The following example shows to import the key KEY1 to flash as a public key: Switch#configure terminal Switch(config)#rsa key KEY1 import url flash:/key1.pub public ssh2 The following example shows to import the key KEY2 to flash as a private key: Switch#configure terminal Switch(config)#rsa key KEY2 import url flash:/key1 private ssh1 Related Commands rsa key generate

www.fs.com 77

S3950-4T12S SWITCH CLI REFERENCE GUIDE

rsa key export 2.7.23 show rsa key Command Purpose To display the details of the keys,use the show rsa key command in Privileged EXEC mode. Command Syntax show rsa key KEYNAME

Parameter
KEYNAME

Parameter Description
Specify the key name to display

Parameter Value
Up to 32 characters

Command Mode Privileged EXEC Default None Usage None Examples The following example displays the detailed information of the key named”KEY1″: Switch#show rsa key KEY1 RSA key information: ============================================================ Name:KEY1 Type:private Modulus:1024 bit Usage count:0 Private key DER code: 30820258 0201 00 028180 9B3E9726 6405BD54 692F172A901F3879 C947366E 5703D282 AA31707F 214D38C9 Related Commands show rsa keys 2.7.24 show rsa keys Command Purpose To display the brief information of all the keys,use the show rsa keys command in Privileged EXEC mode. Command Syntax show rsa keys Command Mode Privileged EXEC

www.fs.com 78

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Default None Usage Use the rsa key generate command to generate a key. Examples The following example displays the brief information of the keys: Switch#show rsa keys Name Type Usage Modulus ============================================================ key1 private 0 1024 key2 public 0 1024 Related Commands show rsa key 2.7.25 ssh Command Purpose To connect to the remote SSH server,use the ssh command in Privileged EXEC mode. Command Syntax ssh-l NAME({-i KEYNAME|-p DPORT|-v(1|2)|-c{3des|des |3des-cbc|aes128-cbc|aes192-cbc|aes256-cbc}|-m{hmac-md5-128|hmac-md596|hmac- sha1-160|hmac-sha1-96}|-o numberofpasswordprompts NUM|-a A.B.C.D}|)(mgmt- if|)(A.B.C.D|X:X::X:X|HOST)

Parameter
-l NAME
-i KEYNAME
-p DPORT -v(1|2) -c 3des des
3des-cbc aes128-cbc aes192-cbc aes256-cbc
-m
hmac-md5-128
hmac-md5-96

Parameter Description
Log in using this user name Specify the name of RSA private
key Specify the remote port Specify SSH protocol version Select encryption algorithm Triple DES(SSHv1 only)
DES(SSHv1 only) Triple DES(SSHv2 only) AES 128 bits(SSHv2 only) AES 192 bits(SSHv2 only) AES 256 bits(SSHv2 only) Select HMAC algorithm MD5 based HMAC(128 bits,SSHv2
only) MD5 based HMAC(96 bits,SSHv2
only)

Parameter Value
Up to 31 characters
Up to 32 characters
1-65535 –

www.fs.com 79

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
hmac-sha1-160
hmac-sha1-96 -o numberofpasswordprompts NUM
-a A.B.C.D mgmt-if A.B.C.D
X:X::X:X
HOST

Parameter Description
SHA1 based HMAC(160 bits,SSHv2 only)
SHA1 based HMAC(96 bits,SSHv2 only)
Specify number of password prompts with
Ssh with assigned IP Use Management port Specify IP address of remote
system Specify IPv6 address of remote
system Specify hostname of remote
system

Command Mode Privileged EXEC Default None Usage None Examples The following example displays the usage of this command: Switch#ssh-l aaa-v 2 1.1.1.1 aaa@1.1.1.1’s password: Switch# Related Commands ip ssh server
2.8 Time&Timezone Commands
2.8.1 clock set datetime Command Purpose Use this command to set system current date and time on the Switch. Command Syntax clock set datetime HH:MM:SS MONTH DAY YEAR

Parameter Value
The range in[1,7] IPv4 Address IPv4 Address IPv6 Address –

www.fs.com 80

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
HH:MM:SS
MONTH DAY YEAR

Parameter Description
Specify the time in hours(24-hour format),minutes,and seconds.The
time specified is relative to the configured time zone
Specify the month by name Specify the day by date in the
month Specify the year

Parameter Value
HH:MM:SS in 24-hour format.
Should be in range 1 to 12 Should be in range 1 to 31 Should be in range 1993 to 2035

Command Mode Global Configuration Default The default time is based from UTC. Usage If no other source of time is available,you can manually configure the time and date after the system is restarted.The time remains accurate until the next system restart.We recommend that you use manual configuration only as a last resort.If you have an outside source to which the switch can synchronize,you do not need to manually set the system clock. Examples This example shows how to manually set the system clock to 132 p.m.on July 23,2014: Switch#configure terminal Switch(config)#clock set 13:32:00 23 7 2014 Related Commands show clock 2.8.2 clock set timezone Command Purpose Use this command to set the time zone on the Switch. To restore to the default time of UTC,use the no form of this command. Command Syntax clock set timezone ZONE(add|minus )hours-offset[minutes-offset][seconds-offset] no clock set timezone

Parameter
ZONE add minus

Parameter Description

Parameter Value

Specify the zone name

the length should be[3,32),and only[a-zA-Z_]is supported,and the
first and last character must be alphabet.

Specify the time offset is positive from UTC

Specify the time offset is negative from UTC

www.fs.com 81

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
HOUR_OFFSET MINUTES_OFFSET
SECCONDS_OFFSET

Parameter Description
Specify the time offset in hours [optional]Specify the time offset in minutes,should be in range 0 to
59 [optional]Specify the time offset
in seconds

Parameter Value
0-18 0-59
0-59

Command Mode Global Configuration Default The default time zone should be UTC. Usage None Examples The following example sets the Atlantic Canada time zone is 3.5 hours less than UTC: Switch#configure terminal Switch(config)#clock set timezone Canada minus 3 30 The following example sets the time zone named ZZZ is 5 hours faster than UTC: Switch#configure terminal Switch(config)#clock set timezone ZZZ add 5 Related Commands show clock(detail) 2.8.3 clock set summer- time Command Purpose Use this command to set summer time(daylight saving time)in areas where it starts and ends on a particular day each year(recurring)or on specified year(date). To restore to the default time of UTC,use the no form of this command. Command Syntax clock set summer-time ZONE recurring start-time end-time offset clock set summer-time ZONE date start- time end-time offset no clock set summer-time

Parameter

Parameter Description

Parameter Value

ZONE

Specify the summer zone name

The length should be[3,32),and only[a-zA-Z_]is supported,and the
first and last character must be alphabet.

www.fs.com 82

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
recurring date
START_TIME
END_TIME OFFSET

Parameter Description

Parameter Value

Specify that summer time starts

and ends on a particular day of

the week each year

Specify that summer time starts

and ends on a particular day of

the specified year

Specify the start time of summer time

For recurring summer time,the format should be
month,day,hh:mm:ss or(first|second|third|fourth|last)DA Y<1-12>HH:MM:SS,while for date summer time,the format should
be month,day,year,hh:mm:ss

Specify the end time of summer time

For recurring summer time,the format should be
month,day,hh:mm:ss or(first|second|third|fourth|last)DA Y<1-12>HH:MM:SS,while for date summer time,the format should
be month,day,year,hh:mm:ss

For offset,specify the number of minutes to add during summer
time.The default is 60.

1-120 minutes

Command Mode Global Configuration Default Summer time should be disabled by default. Usage The first part of the clock summer-time global configuration command specifies when summer time begins,and the second part specifies when it ends.All times are relative to the local time zone.The start time is relative to standard time.The end time is relative to summer time.If the starting month is after the ending month,the system assumes that you are in the southern hemisphere. Examples This example shows how to specify that summer time starts on june 1st at 0200 and ends on the October 31 at 0200: Switch#configure terminal Switch(config)#clock set summer-time stime recurring 6 1 02:00:00 10 31 02:00:00 120 This example shows how to specify that summer time starts on March the second Wednesday at 0200 and ends on the August the last Friday at 0100: Switch#configure terminal Switch(config)#clock set summer-time stime recurring second Wed 3 02:0:0 last Fri 8 01:0:0 60 Related Commands show clock(detail) 2.8.4 show clock Command Purpose Use this command to display the current time and date configuration.

www.fs.com 83

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Command Syntax show clock(detail|)

Parameter
detail

Parameter Description
Display the configured timezone and summer time information in addition to current date and time

Command Mode Privileged EXEC Default None Usage None Examples This example displays current time and date in detail: Switch#show clock detail 10:43:00 beijing Fri Oct 25 2013 Time zone:(GMT+08:00:00)beijing Related Commands show clock 2.8.5 show timezones Command Purpose Use this command to display all the timezones in world. Command Syntax show timezons Command Mode Privileged EXEC Default None Usage None Examples This example displays all the current timezones: Switch#show timezones (GMT+00:06:04)Europe/Andorra

Parameter Value

www.fs.com 84

S3950-4T12S SWITCH CLI REFERENCE GUIDE

(GMT+03:41:12)Asia/Dubai (GMT+04:36:48)Asia/Kabul (GMT-04:07:12)America/Antigua (GMT-04:12:16)America/Anguilla (GMT+01:19:20)Europe/Tirane (GMT+02:58:00)Asia/Yerevan (GMT-04:36:00)America/Curacao (GMT+00:52:56)Africa/Luanda (GMT+11:06:24)Antarctica/McMurdo McMurdo Station,Ross Island

(GMT+00:00:00)Antarctica/South_Pole Amundsen-Scott Station,South Pole (GMT-04:32:32)Antarctica/Rothera Rothera Station,Adelaide Island (GMT-04:16:24)Antarctica/Palmer Palmer Station,Anvers Island Related Commands show clock
2.9 License Commands
2.9.1 generate device identifier Command Purpose To generate device identifier,use this command in Privileged EXEC mode. Command Syntax generate device identifier(mgmt-if|)GURLNAME generate device identifier(GFILENAME|)

Parameter
mgmt-if GURLNAME GFILENAME

Parameter Description
Management port URL name
local file name

Parameter Value

Command Mode Privileged EXEC Default None Usage This command will generate the unique device identifier(UDI)on the current device,customer can get license for the current device form the vendor with UDI. Examples The following example shows how to generate UDI: Switch#generate device identifier mgmt-if tftp://10.10.38.160/device.udi Related Commands None

www.fs.com 85

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.9.2 show license Command Purpose To show license on the device,use the show license command in Privileged EXEC mode. Command Syntax show license(GFILENAME|)

Parameter
GFILENAME

Parameter Description
local file name

Parameter Value

Command Mode Privileged EXEC Default None Usage This command will show the license on the current device. Examples The following example shows how to show license: Switch#show lincese License files:

flash:/ma.lic: Created Time:Fri Dec 6 17:22:23 CST 2013 Vendor:Vendor1 Customer:Customer1 Device MAC:00:1E:08:09:03:00 Feature Set:QINQ MVR ERPS MEF ETHOAM VPWS VPLS HVPLS SMLK TPOAM OSPF PIM_SM IGMP VRF MPLS LDP BGP RSVP OSPF_TE EXTEND_ACL PTP BFD SSM IPV6 OSPF6 PIM_SM6 MVR6 RIPNG TUNNEL_V6 Related Commands None
2.10 HTTP commands Commands
2.10.1 service http Command Purpose To enable HTTP service,use service http enable command in Global Configuration.To disable HTTP service,use service http disable command. Command Syntax service http(enable|disable)

www.fs.com 86

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
enable disable

Parameter Description
Turn on the HTTP service Turn off the HTTP service

Parameter Value

Command Mode Global Configuration Default HTTP service is disabled. Usage The WEB image should be loaded first. Examples The following example shows how to enable HTTP service: Switch#configure terminal Switch(config)#service http enable Related Commands http server load http timeout 2.10.2 service https Command Purpose To enable HTTPS service,use service http enable command in Global Configuration.To disable HTTPS service,use service http disable command. Command Syntax service https(enable|disable)

Parameter
enable disable

Parameter Description
Turn on the HTTPS service Turn off the HTTPS service

Parameter Value

Command Mode Global Configuration Default HTTPS service is disabled. Usage The WEB image should be loaded first. Examples The following example shows how to enable HTTPS service:

www.fs.com 87

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Switch#configure terminal Switch(config)#service https enable Related Commands http server load http timeout 2.10.3 http server load Command Purpose To load WEB image,user the http server load command. Command Syntax http server load FILENAME

Parameter
FILENAME

Parameter Description
Name of WEB image

Command Mode Global Configuration Default None Usage None Examples The following example shows how to specify web image: Switch#configure terminal Switch(config)#http server load flash:/webImage.bin Related Commands service http enable service https enable http timeout 2.10.4 http timeout Command Purpose To configure the expire time of online web users. Command Syntax http timeout TIMEOUT

Parameter Value

www.fs.com 88

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
TIMEOUT

Parameter Description
Online web user expire time.

Parameter Value
The range is[1,60],unit is minute.

Command Mode Global Configuration Default 20min. Usage None Examples The following example shows how to configure http timeout: Switch#configure terminal Switch(config)#http timeout 30 Related Commands http server load service http enable service https enable 2.10.5 http server source address Command Purpose To configure the source address of WEB server on your switch,use the http server source address command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax http server source address(vrf NAME|)A.B.C.D no http server source address

Parameter
vrf NAME A.B.C.D

Parameter Description
Specify a vrf to provide WEB server
Configure IP address for WEB server working

Parameter Value
A string with 1-15 characters –

Command Mode Global Configuration Default None

www.fs.com 89

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Usage You can use this command to modify the address which WEB server works on,and specify a vrf to provide WEB server.The source address can only be 0.0.0.0 or loopback interface’s address,0.0.0.0 indicates that the WEB server address is not specified. Examples The following example shows how to set inband http server address: Switch#configure terminal Switch(config)#http server source address 10.10.10.1 Related Commands http server load service http enable service https enable 2.10.6 http server source port Command Purpose To configure the TCP port for HTTP server working inband on your switch,use the http server source port command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax http server source port PORT no http server source port

Parameter
PORT

Parameter Description
Configure TCP port for HTTP server working inband

Parameter Value
1025-65535

Command Mode Global Configuration Default None Usage The CLI of”no http server source port”will configure TCP port for HTTP server working inband with default value of 80. Examples The following example shows how to set inband http server TCP port: Switch#configure terminal Switch(config)#http server source port 1080 Related Commands http server load service http enable service https enable

www.fs.com 90

S3950-4T12S SWITCH CLI REFERENCE GUIDE

2.10.7 http server source ssl-port Command Purpose To configure the TCP port for HTTPS server working inband on your switch,use the http server source ssl- port command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax http server source ssl-port PORT no http server source ssl-port

Parameter
PORT

Parameter Description
Configure TCP port for HTTPS server working inband

Parameter Value
1025-65535

Command Mode Global Configuration Default None Usage The CLI of”no http server source ssl-port”will configure TCP port for HTTPS server working inband with default value of 443. Examples The following example shows how to set inband https server TCP port: Switch#configure terminal Switch(config)#http server source port 10443 Switch#configure terminal Switch(config)#http server source ssl-port 10443 Related Commands http server load service http enable service https enable 2.10.8 http server source mgmt-if port Command Purpose To configure the TCP port for HTTP server working outband on your switch,use the http server source mgmt-if port command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax http server source mgmt-if port PORT no http server source mgmt-if port

www.fs.com 91

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
PORT

Parameter Description
Configure TCP port for HTTP server working outband

Parameter Value
1025-65535

Command Mode Global Configuration Default None Usage The CLI of”no http server source mgmt-if port”will configure TCP port for HTTP server working outband with default value of 80. Examples The following example shows how to set outband http server TCP port: Switch#configure terminal Switch(config)#http server source mgmt-if port 1080 Related Commands http server load service http enable service https enable 2.10.9 http server source mgmt-if ssl-port Command Purpose To configure the TCP port for HTTPS server working outband on your switch,use the http server source mgmt-if ssl-port command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax http server source mgmt-if ssl-port PORT no http server source mgmt-if port

Parameter
PORT

Parameter Description
Configure TCP port for HTTPS server working outband

Parameter Value
1025-65535

Command Mode Global Configuration Default None Usage The CLI of”no http server source mgmt-if ssl-port”will configure TCP port for HTTPS server working outband with default value of 443.

www.fs.com 92

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Examples The following example shows how to set outband https server TCP port: Switch#configure terminal Switch(config)#http server source port 10443 Related Commands http server load service http enable service https enable 2.10.10 http authentication aaa Command Purpose To configure the AAA method list for web login on your switch,use the http authentication aaa command in Global Configuration.To restore the default value,use the no form of this command. Command Syntax http authentication(local|aaa(login-authentication|exec- authorization)(default|LISTNAME)) no http authentication(aaa(login- authentication|exec-authorization))

Parameter
local aaa login-authentication exec-authorization default LISTNAME

Parameter Description
Configure web login authentication by local
Configure web login authentication by AAA Configure web login authentication method list Configure web login authorization method list Set method list name default Set method list name

Parameter Value
Up to 31 characters

Command Mode Global Configuration Default default web login method is local Usage The CLI of”http authentication(local|aaa(login-authentication|exec- authorization)(default|LISTNAME))”can only be configured when AAA is enable. Examples The following example shows how to set web AAA login method to be default.: Switch#configure terminal Switch(config)#http authentication aaa login-authentication default

www.fs.com 93

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Related Commands aaa new-model aaa authentication login aaa authorization exec
2.11 RPC-API commands Commands
2.11.1 service rpc-api Command Purpose To enable RPC-API service,use service rpc-api enable command in Global Configuration.To disable RPC-API service,use service rpc-api disable command. Command Syntax service rpc-api(enable(port PORT|ssl(ssl-port SSLPORT|)|)(vrf NAME|)|disable) service rpc-api disable

Parameter
enable disable
PORT
vrf NAME ssl
SSLPORT

Parameter Description
Turn on the RPC-API service Turn off the RPC-API service
TCP port number. TCP port number. By default,the RPC-API service listens on TCP port 80(HTTP) VPN Routing/Forwarding instance Enable SSL(HTTPS) TCP port number. TCP port number. By default,the RPC-API service listens on TCP port 443(HTTPS)

Parameter Value

1025-65535
A string with 1-15 characters –
1025-65535

Command Mode Global Configuration Default Disabled. Usage None Examples The following example shows how to enable RPC-API service: Switch#configure terminal Switch(config)#service rpc-api enable port 2000 Related Commands show services rpc-api

www.fs.com 94

S3950-4T12S SWITCH CLI REFERENCE GUIDE
service rpc-api auth-mode 2.11.2 service rpc-api auth-mode Command Purpose To enable RPC-API HTTP Basic authentication. Command Syntax service rpc-api auth- mode basic no service rpc-api auth-mode Command Mode Global Configuration Default Disabled. Usage Once enable or disable RPC-API HTTP Basic authentication,and users want to continue to use RPC-API service,users must re-enable it. Examples The following example shows how to enable RPC-API HTTP Basic authentication: Switch#configure terminal Switch(config)#service rpc-api auth-mode basic Related Commands service rpc-api enable show services rpc-api 2.11.3 show services rpc-api Command Purpose To show RPC-API configuration information. Command Syntax show services rpc-api Command Mode Privileged EXEC Default None Usage None Examples The following example shows the configuration information:
www.fs.com 95

S3950-4T12S SWITCH CLI REFERENCE GUIDE Switch(config)#show services rpc-api RPC API services configuration: HTTP server:shutdown,port:80,authentication mode:none Related Commands service rpc-api enable
www.fs.com 96

S3950-4T12S SWITCH CLI REFERENCE GUIDE

3 Ethernet Commands
3.1 Interface Commands
3.1.1 bandwidth Command Purpose Use this command to set the bandwidth of the port. To return the bandwidth to default value,use the no form of this command. Command Syntax bandwidth BANDWIDTH no bandwidth

Parameter
BANDWIDTH

Parameter Description
port bandwidth

Command Mode Interface Configuration Default None Usage None Examples The following example set the bandwidth of the port: Switch#configure terminal Switch(config)#interface eth-0-1 Switch(config-if)#bandwidth 1000 The following example returns the bandwidth to default value: Switch#configure terminal Switch(config-if)#no bandwidth Related Commands duplex speed 3.1.2 clear counters Command Purpose Use this command to clear the counters on the physical interface. Command Syntax clear counters(IFNAME|)

Parameter Value
1-100000000,unitkbps

www.fs.com 97

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Parameter
IFNAME

Parameter Description
Only clear the specified interface statistics

Parameter Value
Support physical/aggregation ports

Command Mode Privileged EXEC Default None Usage The clear counters command clears all current interface counters from the interface unless you specify optional arguments that clear only a specific interface type from a specific interface number. Examples The following example clears the counters on all interfaces: Switch#clear counters The following example clears the counters on the interface eth-0-1: Switch#clear counters eth-0-1 The following example clears the counters on the agg1: Switch#clear counters agg1 Related Commands None 3.1.3 description Command Purpose Use this command to set the description on the interface. To remove the description on the interface,use the no form of this command. Command Syntax description LINE no description

Parameter
LINE

Parameter Description
The description on the interface

Parameter Value
should be no more than 240 characters,and the character can
not include`?’

Command Mode Interface Configuration Default None

www.fs.com 98

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Usage None Examples The following example sets the description on the interface: Switch#configure terminal Switch(config)#interface eth-0-1 Switch (config-if)#description Ethernet The following example removes the description on the interface: Switch#configure terminal Switch(config-if)#no description Related Commands None 3.1.4 duplex Command Purpose Use the duplex interface configuration command to specify the duplex mode of operation for a port.Use the no form of this command to return the port to its default value. Command Syntax duplex(auto|full|half ) no duplex

Parameter
auto full half

Parameter Description
Enable automatic duplex configuration;port automatically detects whether it should run in
full-duplex or half-duplex mode,depending on the attached
device mode
Enable full-duplex mode
Enable half-duplex mode(only for interfaces operating at 10 or 100 Mb/s).You can not configure half-
duplex mode for interfaces operating at 1000 or10,000 Mb/s

Parameter Value

Command Mode Interface Configuration Default auto Usage The command is not allowed to be set on 10G port or optical mode of combo port.

www.fs.com 99

S3950-4T12S SWITCH CLI REFERENCE GUIDE

Examples The following example sets the duplex mode to auto: Switch#configure terminal Switch(config)#interface eth-0-1 Switch(config-if)#

References

Read User Manual Online (PDF format)

Read User Manual Online (PDF format)  >>

Download This Manual (PDF format)

Download this manual  >>

Related Manuals