D-Link DGS-3120-48PC, DGS-3120 Reference Manual

ll
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
I
Chapter 1 Using Command Line Interface ............................................................................................. 1
Chapter 2 Basic Command List ............................................................................................................. 8
Chapter 3 802.1Q VLAN Command List .............................................................................................. 23
Chapter 4 802.1X Command List ......................................................................................................... 39
Chapter 5 Access Authentication Control Command List .................................................................... 64
Chapter 6 Access Control List (ACL) Command List ........................................................................... 85
Chapter 7 Access Control List (ACL) Egress Command List (EI Mode Only) ................................... 105
Chapter 8 Address Resolution Protocol (ARP) Command List .......................................................... 124
Chapter 9 ARP Spoofing Prevention Command List ......................................................................... 129
Chapter 10 Asymmetric VLAN Command List ..................................................................................... 131
Chapter 11 Auto-Configuration Command List .................................................................................... 133
Chapter 12 Basic Commands Command List ...................................................................................... 135
Chapter 13 BPDU Attack Protection Command List ............................................................................ 152
Chapter 14 Cable Diagnostics Command List ..................................................................................... 157
Chapter 15 Command Logging Command List.................................................................................... 160
Chapter 16 Compound Authentication Command List ........................................................................ 162
Chapter 17 Configuration Command List ............................................................................................. 171
Chapter 18 Configuration Trap Command List .................................................................................... 176
Chapter 19 Connectivity Fault Management (CFM) Command List (EI Mode Only)........................... 178
Chapter 20 Connectivity Fault Management (CFM) Extension Command List (EI Mode Only) .......... 206
Chapter 21 CPU Interface Filtering Command List ............................................................................. 210
Chapter 22 Debug Software Command List ........................................................................................ 221
Chapter 23 DHCP Local Relay Command List .................................................................................... 233
Chapter 24 DHCP Relay Command List .............................................................................................. 237
Chapter 25 DHCP Server Screening Com mand List ........................................................................... 254
Chapter 26 DHCPv6 Relay Command List (EI Mode Only) ................................................................ 258
Chapter 27 D-Link Unidirectional Link Detection (DULD) Command List (EI Mode Only) .................. 263
Chapter 28 Ethernet Ring Protection Switching (ERPS) Command List (EI Mode Only).................... 265
Chapter 29 Filter Command List .......................................................................................................... 275
Chapter 30 Filter Database (FDB) Command List ............................................................................... 278
Chapter 31 Flash File System (FFS) Command List ........................................................................... 288
Chapter 32 Gratuitous ARP Command List ......................................................................................... 299
Chapter 33 IGMP / MLD Snooping Command List .............................................................................. 305
Chapter 34 IP-MAC-Port Binding (IMPB) Command List (EI Mode Only) ........................................... 349
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
II
Chapter 35 IPv6 Neighbor Discover Command List (EI Mode Only) ................................................... 365
Chapter 36 IPv6 Route Command List (EI Mode Only) ....................................................................... 369
Chapter 37 Japanese Web-Based Access Control (JWAC) Command List ....................................... 372
Chapter 38 Jumbo Frame Command List ............................................................................................ 396
Chapter 39 Layer 2 Protocol Tunneling (L2PT) Command List ........................................................... 398
Chapter 40 Link Aggregation Command List ....................................................................................... 402
Chapter 41 Link Layer Discovery Protocol (LLDP) Command List ...................................................... 409
Chapter 42 Loop Back Detection (LBD) Command List ...................................................................... 435
Chapter 43 MAC Notification Command List ....................................................................................... 441
Chapter 44 MAC-based Access Control Command List ...................................................................... 446
Chapter 45 MAC-based VLAN Command List..................................................................................... 462
Chapter 46 Mirror Command List ......................................................................................................... 465
Chapter 47 MSTP debug enhancement Command List ...................................................................... 468
Chapter 48 Multicast Filter Command List ........................................................................................... 475
Chapter 49 Multicast VLAN Command List ......................................................................................... 486
Chapter 50 Multiple Spanning Tree Protocol (MSTP) Command List ................................................. 500
Chapter 51 Network Load Balancing (NLB) Command List ................................................................ 513
Chapter 52 Network Monitoring Command List ................................................................................... 519
Chapter 53 OAM Commands (EI Mode Only) ..................................................................................... 526
Chapter 54 Peripherals Command List ................................................................................................ 534
Chapter 55 Ping Command List ........................................................................................................... 540
Chapter 56 Port Security Command List ............................................................................................. 542
Chapter 57 Power over Ethernet (PoE) Command List ....................................................................... 550
Chapter 58 Power Saving Command List ............................................................................................ 555
Chapter 59 PPPoE Circuit ID Insertions Command List (EI Mode Only) ............................................ 561
Chapter 60 Protocol VLAN Command List .......................................................................................... 565
Chapter 61 QinQ Command List (EI Mode Only) ................................................................................ 571
Chapter 62 Quality of Service (QoS) Command List ........................................................................... 579
Chapter 63 Remote Switched Port ANalyzer (RSPAN) Command List............................................... 596
Chapter 64 RPC PortMapper Command List ....................................................................................... 602
Chapter 65 Safeguard Engine Command List ..................................................................................... 604
Chapter 66 SD Card Management Command List .............................................................................. 606
Chapter 67 Secure Shell (SSH) Command List ................................................................................... 613
Chapter 68 Secure Sockets Layer (SSL) Command List .................................................................... 621
Chapter 69 sFlow Command List (EI Mode Only) ............................................................................... 627
Chapter 70 Show Technical Support Command List ........................................................................... 639
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
III
Chapter 71 Simple Mail Transfer Protocol (SMTP) Command List ..................................................... 642
Chapter 72 Simple Network Management Protocol (SNMP) Command List ...................................... 647
Chapter 73 Single IP Management Command List ............................................................................. 673
Chapter 74 Stacking Command List .................................................................................................... 683
Chapter 75 Syslog and Trap Source-interface Command List ............................................................ 691
Chapter 76 System Log Command List ............................................................................................... 695
Chapter 77 System Severity Command List ........................................................................................ 707
Chapter 78 Telnet Client Command List .............................................................................................. 709
Chapter 79 TFTP Client Command List ............................................................................................... 710
Chapter 80 Time and SNTP Command List ........................................................................................ 715
Chapter 81 Trace Route Command List .............................................................................................. 722
Chapter 82 Traffic Control Command List ........................................................................................... 725
Chapter 83 Traffic Segmentation Command List ................................................................................. 730
Chapter 84 Trusted Host Command List ............................................................................................. 732
Chapter 85 Unicast Routing Command List ......................................................................................... 736
Chapter 86 VLAN Trunking Command List .......................................................................................... 741
Chapter 87 Voice VLAN Command List ............................................................................................... 746
Chapter 88 Web-Based Access Control (WAC) Command List .......................................................... 757
Chapter 89 Password Recovery Command List .................................................................................. 772
Appendix A Mitigating ARP Spoofing Attacks Using Packet Content ACL .......................................... 774
Appendix B Password Recovery Procedure ......................................................................................... 781
Appendix C System Log Entries ........................................................................................................... 783
Appendix D Trap Log Entries ................................................................................................................ 798
Appendix E RADIUS Attributes Assignment ......................................................................................... 806
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
1
Chapter 1 Using Command Line
Interface
The Switch can be managed through the Switch’s serial port, Telnet, SNMP or the Web-based management agent. The Command Line Interface (CLI) can be used to configure and manage the Switch via the serial port or Telnet interfaces.
This manual provides a reference for all of the commands contained in the CLI. Every command will be introduced in terms of purpose, format, description, parameters, and examples. Configuration and management of the Switch via the Web-based management agent are discussed in the Web UI Reference Guide. For detailed information on installing hardware please also refer to the Hardware Installation Guide.
1-1 Accessing the Switch via the Seri al Port
The Switch’s serial port’s default settings are as follows:
115200 baud
no parity
8 data bits
1 stop bit
A computer running a terminal emulation program capable of emulating a VT-100 terminal and a serial port configured as above are then connected to the Switch’s Console port via an included RS-232 to RJ-45 convertor cable.
With the serial port properly connected to a management computer, the following screen should be visible. If this screen does not appear, try pressing Ctrl+r to refresh the console screen.
DGS-3120-24TC Gigabit Ethernet Switch
Command Line Interface
Firmware: Build 2.00.010
Copyright(C) 2011 D-Link Corporation. All rights reserved.
UserName: PassWord:
DGS-3120-24TC:admin#
There is no initial username or password. Just press the Enter key twice to display the CLI input cursor − DGS-3120-24TC:admin# . This is the command line where all commands are input.
1-2 Setting the Switch’s IP Address
Each Switch must be assigned its own IP Address, which is used for communication with an SNMP network manager or other TCP/IP application (for example BOOTP, TFTP). The Switch’s
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
2
default IP address is 10.90.90.90. You can change the default Switch IP address to meet the specification of your networking address scheme.
The Switch is also assigned a unique MAC address by the factory. This MAC address cannot be changed, and can be found on the initial boot console screen – shown below.
Boot Procedure V2.00.003
-------------------------------------------------------------------------------
Power On Self Test ........................................ 100 %
MAC Address : 00-01-02-03-04-00 H/W Version : A1
Please Wait, Loading V2.00.010 Runtime Image .............. 100 %
UART init ................................................. 100 %
Starting runtime image
Device Discovery .......................................... \
The Switch’s MAC address can also be found in the Web management program on the Switch Information (Basic Settings) window on the Configuration menu.
The IP address f or the S w it ch must be set before it ca n be managed with the Web-based manager. The Switch IP address can be automatically set using BOOTP or DHCP protocols, in which case the actual address assigned to the Switch must be known.
Starting at the command line prompt, enter the commands config ipif System ipaddress xxx.xxx.xxx.xxx/yyy.yyy.yyy.yyy. Where the x’s represent the IP address to be assigned to the IP interface named System and the y’s represent the corresponding subnet mask.
Alternatively, you can enter config ipif System ipaddress xxx.xxx.xxx.xxx/z. Where the x’s represent the IP address to be assigned to the IP interface named System and the z represents the corresponding number of subnets in CIDR notation.
The IP interface named System on the Switch can be assigned an IP address and subnet mask which can then be used to connect a management station to the Switch’s Telnet or Web-based management agent.
DGS-3120-24TC:admin# config ipif System ipaddress 10.24.22.100/255.0.0.0
Command: config ipif System ipaddress 10.24.22.100/8
Success.
DGS-3120-24TC:admin#
In the above example, the Switch was assigned an IP address of 10.24.22.100 with a subnet mask of 255.0.0.0. The system message Success indicates that the command was executed successfully. The Switch can now be configured and managed via Telnet, SNMP MIB browser and the CLI or via the Web-based management agent using the above IP address to connect to the Switch.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
3
There are a number of helpful features included in the CLI. Entering the ? command will display a list of all of the top-level commands.
.. ? cable_diag ports cd cfm linktrace cfm lock md cfm loopback change drive clear clear address_binding dhcp_snoop binding_entry ports clear arptable clear attack_log clear cfm pkt_cnt clear counters clear fdb clear igmp_snooping data_driven_group clear igmp_snooping statistics counter clear log clear mac_based_access_control auth_state clear mld_snooping data_driven_group clear mld_snooping statistics counter clear port_security_entry
CTRL+C ESC q Quit SPACE n Next Page ENTER Next Entry a All
When entering a command without its required parameters, the CLI will prompt you with a Next possible completions: message.
DGS-3120-24TC:admin# config account
Command: config account Next possible completions: <username>
DGS-3120-24TC:admin#
In this case, the command config account was entered with the parameter <username>. The CLI will then prompt to enter the <username> with the message, Next possible completions:. Every command in the CLI has this feature, and complex commands have several layers of parameter prompting.
In addition, after typing any given command plus one space, users can see all of the next possible sub-commands, in sequential order, by repeatedly pressing the Tab key.
To re-enter the previous command at the command prompt, press the up arrow cursor key. The previous command will appear at the command prompt.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
4
DGS-3120-24TC:admin# config account
Command: config account Next possible completions: <username>
DGS-3120-24TC:admin# config account
In the above example, the command config account was entered without the required parameter <username>, the CLI returned the Next possible completions: <username> prompt. The up
arrow cursor control key was pressed to re-enter the previous command (config account) at the command prompt. Now the appropriate username can be entered and the config account command re-executed.
All commands in the CLI function in this way. In addition, the syntax of the help prompts are the same as presented in th is manual angle brackets < > indicate a numerical value or character string, braces { } indicate optional parameters or a choice of parameters, and brackets [ ] indicate required parameters.
If a command is entered that is unrecognized by the CLI, the top-level commands will be displayed under the Available comm an ds: prompt.
GS-3120-24TC:admin#the
Available commands: .. ? cable_diag cd cfm change clear config copy create debug del delete dir disable download enable erase execute format login logout md move no ping ping6 rd reboot reconfig rename reset save show smtp telnet traceroute traceroute6 upload
DGS-3120-24TC:admin#
The top-level commands consist of commands such as show or config. Most of these commands require one or more param eters to nar ro w th e top-level command. This is equivalent to show what? or config what? Where the what? is the next parameter.
For example, entering the show command with no additional parameters, the CLI will then display all of the possible next parameters.
DGS-3120-24TC:admin#show
Command: show Next possible completions:
802.1p 802.1x access_profile account accounting acct_client address_binding arp_spoofing_prevention arpentry asymmetric_vlan attack_log auth_client auth_diagnostics auth_session_statistics auth_statistics authen
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
5
authen_enable authen_login authen_policy authentication
authorization autoconfig bandwidth_control boot_file bpdu_protection cfm command command_history config cpu current_config device_status dhcp_local_relay dhcp_relay dot1v_protocol_group dscp egress_access_profile egress_flow_meter environment erps error fdb filter flow_meter gratuitous_arp greeting_message gvrp hol_prevention igmp_snooping ipfdb ipif ipif_ipv6_link_local_auto iproute ipv6 ipv6route jumbo_frame lacp_port limited_multicast_addr link_aggregation lldp log log_save_timing log_software_module loopdetect mac_based_access_control mac_based_access_control_local mac_based_vlan mac_notification max_mcast_group mcast_filter_profile mirror mld_snooping multicast multicast_fdb nlb packet password_recovery per_queue poe port port_group port_security port_security_entry port_vlan ports power_saving private_vlan pvid qinq radius rmon router_ports rspan safeguard_engine scheduling scheduling_mechanism serial_port session sflow sim snmp sntp ssh ssl stack_device stack_information stacking_mode storage_media_info stp switch syslog system_severity tech_support terminal time time_range traffic traffic_segmentation trap trusted_host utilization vlan vlan_translation vlan_trunk voice_vlan wac
DGS-3120-24TC:admin#
In the above example, all of the possible next parameters for the show command are displayed. At the next command prompt, the up arrow was used to re-enter the show command, followed by the account parameter. The CLI then displays the user accounts configured on the Switch.
1-3 Command Syntax Symbols
Syntax
Description
angle brackets < >
Encloses a variable or value. Users must specify the variable or value.
For example, in the syntax create ipif <ipif_name 12 > {<network_address>} <vlan_name 32>
{secondary | state [enable | disable] | proxy_arp [ ena ble | disable ] {local [enable | disable]}}
users must supply an IP interface name for <ipif_name 12> ,a VLAN name for <vlan_name 32> and an address for <network_address>
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
6
when entering the command. DO NOT TYPE THE ANGLE
BRACKETS.
square brackets [ ]
Encloses a required value or list of required arguments. Only one
value or argument must be specified. For example, in the syntax create account [admin | operator | power_user | user] <username
15> {encrypt [plain_text | sha_1] <password>} users must specify either the admin-level or user-level account when
entering the command. DO NOT TYPE THE SQUARE BRACKETS.
vertical bar |
Separates mutually exclusive items in a list, one of which must be
entered. For example, in the syntax create ipif <ipif_name 12> {<network_address>} <vlan_name 32>
{secondary | state [enable | disable] | proxy_arp [enable | disable] {local [enable | disable]}}
users must specify either the community or trap receiver in the command. DO NOT TYPE THE VERTICAL BAR.
braces { }
Encloses an optional value or a list of optional arguments. One or
more values or arguments can be specified. For example, in the syntax reset {[config | system]} {force_agree} users may choose configure or system in the command. DO NOT
TYPE THE BRACES.
parentheses ( )
Indicates at least one or more of the values or arguments in the
preceding syntax enclosed by braces must be specified. For example, in the syntax
config bpdu_protection por t s [<portlist > | all] {state [enable | disable] | mode [drop | block | shutdown]}(1)
users have the option to specify hops or time or both of them. The "(1)" following the set of braces indicates at least one argum ent or value within the braces must be specified. DO NOT TYPE THE PARENTHESES.
ipif <ipif_name 12>
metric <value 1-31>
12 means the maximum length of the IP interface name.
1-31 means the legal range of the metric value.
1-4 Line Editing Keys
Keys
Description
Delete Delete character under cursor and shift remainder of line to left.
Backspace
Delete character to left of cursor and shift remainder of line to left.
Insert
Toggle on and off. When toggled on, inserts text and shifts previous
text to right.
Left Arrow
Move cursor to left.
Right Arrow
Move cursor to right
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
7
Tab
Help user to select appropriate token.
P
Display the previous page.
N or Space
Display the next page.
CTRL+C Escape from displayed pages.
ESC
Escape from displayed pages.
Q
Escape from displayed pages.
R refresh the displayed pages a Display the remaining pages. (The screen display will not pause again.)
Enter
Display the next line.
The screen display pauses when the show command output reaches the end of the page. In the above example, all of the possible next parameters for the show command are displayed. At
the next command prompt, the up arrow was used to re-enter the show command, followed by the account parameter. The CLI then displays the user accounts configured on the Switch.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
8
Chapter 2 Basic Command List
show session
show serial_port
config serial_port {bau d_rate [9600 | 19200 | 38400 | 115200] | auto_logout [n e ver | 2_m inutes |
5_minutes | 10_minutes | 15_m inutes]}
enable clipaging
disable clipaging
login
logout
?
clear
show command_history
config command_history <value 1-40>
config greeting_message {default}
show greeting_message
config command_prompt [<string 16> | username | default]
config terminal width [default | <value 80-200>]
show terminal width
config ports [<portlist> | all] {medium_type [fiber | copper]} {speed [auto | 10_half | 10_full |
100_half | 100_full | 1000_full {[master | slave]} ] | flow_control [enable | disable] | learning [enable | disable] | state [enable | disable] |mdix [auto | nor mal | cross] | [description <desc 1-
32> | clear_description]}
show ports {<portlist>} {[description | err_dis ab led | detai ls | media_type]}
2-1 show session
Description
This command is used to display a list of currently users which are login to CLI sessions.
Format
show session
Parameters
None.
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To disable the password encryption:
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
9
DGS-3120-24TC:admin#show session
Command: show session
ID Live Time From Level User
--- ------------ --------------------------------------- ----- --------------­ 8 00:04:17.870 Serial Port admin Anonymous
Total Entries: 1
CTRL+C ESC q Quit SPACE n Next Page p Previous Page r Refresh
2-2 show serial_port
Description
This command is used to display the current serial port settings.
Format
show serial_port
Parameters
None.
Restrictions
None.
Example
To display the serial port setting:
DGS-3120-24TC:admin# show serial_port
Command: show serial_port
Baud Rate : 9600 Data Bits : 8 Parity Bits : None Stop Bits : 1 Auto-Logout : 10 minutes
DGS-3120-24TC:admin#
2-3 config serial_port
Description
This command is used to configure the serial bit rate that will be used to communicate with the management host and the auto logout time for idle connections.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
10
Format
config serial_port {baud_rate [9600 | 19200 | 38400 | 115200] | auto_logout [never | 2_minutes | 5_minutes | 10_minutes | 15_minutes]}
Parameters
baud_rate - (Optional) The serial bit rate that will be used to communicate with the management
host. The default baud rate is 115200.
9600 - Specify the serial bit rate to be 9600. 19200 - Specify the serial bit rate to be 19200. 38400 - Specify the serial bit rate to be 38400.
115200 - Specify the serial bit rate to be 115200.
auto_logout - (Optional) The auto logout time out setting:
never - Never timeout. 2_minutes - When idle over 2 minutes, the device will auto logout. 5_minutes - When idle over 5 minutes, the device will auto logout. 10_minutes - When idle over 10 minutes, the device will auto logout.
15_minutes - When idle over 15 minutes, the device will auto logout.
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To configure baud rate:
DGS-3120-24TC:admin# config serial_port baud_rate 9600
Command: config serial_port baud_rate 9600
Success.
DGS-3120-24TC:admin#
2-4 enable clipaging
Description
This command is used to enable the pausing of the screen display when the show command output reaches the end of the page. For those show commands that provide the display refresh function, the display wil l not be refreshed when clipagin g is dis a ble d. T he def aul t s etti ng is e nab led .
Format
enable clipaging
Parameters
None.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
11
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To enable pausing of the screen display when show command output reaches the end of the page:
DGS-3120-24TC:admin# enable clipaging
Command: enable clipaging
Success.
DGS-3120-24TC:admin#
2-5 disable clipaging
Description
This command is used to disable the pausing of the screen display when the show command output reaches the end of the page. The default setting is enabled.
Format
disable clipaging
Parameters
None.
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To disable pausing of the s c r een disp lay when show command output reaches the end of the p ag e:
DGS-3120-24TC:admin# disable clipaging
Command: disable clipaging
Success.
DGS-3120-24TC:admin#
2-6 login
Description
This command is used to allow user login to the Switch.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
12
Format
login
Parameters
None.
Restrictions
None.
Example
To login the Switch with a user name dlink:
DGS-3120-24TC:admin# login
Command: login
UserName:dlink PassWord:****
DGS-3120-24TC:admin#
2-7 logout
Description
This command is used to logout the facility.
Format
logout
Parameters
None.
Restrictions
None.
Example
To logout current user:
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
13
DGS-3120-24TC:admin# logout
Command: logout
********** * Logout * ********** Press any key to login...
DGS-3120-24TC Gigabit Ethernet Switch Command Line Interface
Firmware: Build 2.00.010 Copyright(C) 2011 D-Link Corporation. All rights reserved.
UserName:
2-8 ?
Description
This command is used to display the usage description for all commands or the specific one.
Format
?
Parameters
None.
Restrictions
None.
Example
To get “ping” command usage, descriptions:
DGS-3120-24TC:admin#? ping
Command: ? ping
Command: ping Usage: <ipaddr> { times <value 1-255> | timeout <sec 1-99>} Description: Used to test the connectivity between network devices.
DGS-3120-24TC:admin#
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
14
2-9 clear
Description
The command is used to clear screen.
Format
clear
Parameters
None.
Restrictions
None.
Example
To clear screen:
DGS-3120-24TC:admin# clear
Command: clear
DGS-3120-24TC:admin#
2-10 show command_history
Description
The command is used to display command history.
Format
show command_history
Parameters
None.
Restrictions
None.
Example
To display command history:
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
15
DGS-3120-24TC:admin#show command_history
Command: show command_history
? ping login show serial_port show session ? config bpdu_protection ports ? reset ? create account ? create ipif show the ?
DGS-3120-24TC:admin#
2-11 config command_history
Description
This command is used to configure the number of commands that the Switch can recall. The Switch “remembers” upto the last 40 commands you entered.
Format
config command_history <value 1-40>
Parameters
<value 1-40> - Enter the number of commands that the Switch can recall. This value must be
between 1 and 40.
Restrictions
None.
Example
To configure the number of command history:
DGS-3120-24TC:admin# config command_history 25
Command: config command_history 25
Success.
DGS-3120-24TC:admin#
2-12 config greeting_message
Description
This command is used to configure the greeting message (or banner).
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
16
Format
config greeting_message {default}
Parameters
default - (Optional) Adding this parameter to the “config greeting_message” command will return
the greeting message (banner) to its original factory default entry.
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To edit the banner:
DGS-3120-24TC:admin#config greeting_message
Command: config greeting_message
Greeting Messages Editor ================================================================================
DGS-3120-24TC Gigabit Ethernet Switch Command Line Interface
Firmware: Build 2.00.010 Copyright(C) 2011 D-Link Corporation. All rights reserved. ================================================================================
<Function Key> <Control Key> Ctrl+C Quit without save left/right/ Ctrl+W Save and quit up/down Move cursor Ctrl+D Delete line Ctrl+X Erase all setting Ctrl+L Reload original setting
--------------------------------------------------------------------------------
2-13 show greet ing_message
Description
The command is used to display greeting message.
Format
show greeting_message
Parameters
None.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
17
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To display greeting message:
DGS-3120-24TC:admin#show greeting_ message
Command: show greeting_message
================================================================================ DGS-3120-24TC Gigabit Ethernet Switch Command Line Interface
Firmware: Build 2.00.010 Copyright(C) 2011 D-Link Corporation. All rights reserved.
================================================================================
DGS-3120-24TC:admin#
2-14 config command_prompt
Description
This command is used to modify the command prompt. The current command prompt consists of four parts: “product name” + “:” + ”user level” + ”#” (e.g.
“DGS-3120-24TC:admin#”). This command is used to modify the first part (1. “product name”) with a string consisting of a maximum of 16 characters, or to be replaced with the users’ login user name.
When users issue the “reset” command, the current command prompt will remain in tact. Yet, issuing the “reset system” will return the command prompt to its original factory default value.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
18
Format
config command_prompt [<string 16> | username | default]
Parameters
<string 16> - Enter the new command prompt string of no more than 16 characters.
username - Enter this command to set the login username as the command prompt.
default - Enter this command to return the command prompt to its original factory default value.
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To edit the command prompt:
DGS-3120-24TC:admin#config command_prompt Prompt#
Command: config command_prompt Prompt#
Success.
Prompt#:admin#
2-15 config term inal width
Description
The command is used to set current terminal width. The usage is described as below:
1. Users login and configure the terminal width to 120, this configuration take effect on this login section. If users implement “save” command, the configuration is saved. After users log out and log in again, the terminal width is 120.
2. If user did not save the configuration, an oth er us er logi n, the terminal width is default val ue.
3. If at the same time, two CLI sessions are running, once section configure to 120 width and save it, the other section will not be effected, unless it log out and then log in.
Format
config terminal width [default | <value 80-200>]
Parameters
default - The default setting of terminal width. The default value is 80.
<value 80-200> - The term inal wid th whic h wi ll be confi gured. T he widt h is bet wee n 80 and 200
characters.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
19
Restrictions
None.
Example
To configure the current terminal width:
DGS-3120-24TC:admin# config terminal width 120
Command: config terminal width 120
Success.
DGS-3120-24TC:admin#
2-16 show ter minal width
Description
The command is used to display the configuration of current terminal width.
Format
show terminal width
Parameters
None.
Restrictions
None.
Example
To display the configuration of current terminal width:
DGS-3120-24TC:admin#show terminal width
Command: show terminal width
Global terminal width : 80 Current terminal width : 80
DGS-3120-24TC:admin#
2-17 config ports
Description
This commands is used to configure the Switch's port settings.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
20
Format
config ports [<portlist> | all] {m edium_type [fiber | copper]} {speed [auto | 10_half | 10_full | 100_half | 100_full | 1000_full {[master | slave]} ] | flow_control [enable | disable] | learning [enable | disable] | state [enable | disable] |mdix [auto | normal | cross] | [description <desc 1-32> | clear_description]}
Parameters
<portlist> - Enter a list of ports used here.
all - Specify that all the ports will be used for this configuration.
medium_type - (Optional) Specify the medium type while the configure ports are combo ports
fiber - Specify that the medium type will be set to fiber.
copper
- Specify that the medium type will be set to copper.
speed - (Optional) Specify the port speed of the specified ports .
auto - Set port speed to auto negotiation. 10_half - Set port speed to 10_half. 10_full - Set port speed to 10_full. 100_half - Set port speed to 100_half. 100_full - Set port speed to 100_full._ 1000_full - 1000_full set port speed to 1000_full. While set port speed to 1000_full,user
should specify master or slave mode for 1000 base TX interface, and leave the 1000_full without any master or slave setting for other interface.
master - Specify that the port(s) will be set to master.
slave - Specify that the port(s) will be set to slave.
flow_control - (Optional) You can turn on or turn off flow control on one or more ports. By set
flow_control to enable or disable.
enable - Specify that the flow control option will be enabled.
disable - Specify that the flow control option will be disabled.
learning - (Optional) You can turn on or turn off MAC address learning on one or more ports.
enable - Specify that the learning option will be enabled.
disable - Specify that the learning option will be disabled.
state - (Optional) Enables or disables the specified port. If the specificed ports are in error-
disabled status , configure their state to enable will recover these ports from disabled to enable state.
enable - Specify that the port state will be enabled.
disable - Specify that the port state will be disabled.
mdix - (Optional) MDIX mode can be specified as auto, normal, and cross. If set to normal state,
the port is in MDIX mode and can be connected to PC NIC using a straight cale. If set to cross state, the port is in mdi mode, and can be connected to a port (in mdix mode) on another switch thru a straight cabe.
auto - Specify that the MDIX mode for the port will be set to auto. normal - Specify that the MDIX mode for the port will be set to normal.
cross - Specify that the MDIX mode for the port will be set to cross.
description - (Optional) Specify the description of the port interface.
<desc 1-32> - Enter the port interface description here. This value can be up to 32 characters
long.
clear_description - ( Opt ional) Spec ify that the description field will be cleared.
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To configure the ports:
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
21
DGS-3120-24TC:admin#config ports all medium_type copper speed auto
Command: config ports all medium_type copper speed auto
Success.
DGS-3120-24TC:admin#
2-18 show port s
Description
This command is used to display the current configurations of a range of ports.
Format
show ports {<portlist>} {[description | err_disabled | details | media_type]}
Parameters
ports - Specify a range of ports to be displayed.
<portlist> - (Optional) Enter the list of ports to be configured here.
description - (Optional) Indicates if port description will be included in the display .
err_disabled - (Optional) Indicates if ports are disabled by some reasons will be displayed. details - (Optional) Displays the port details.
media_type
- (Optional) Displays port transceiver type.
Restrictions
None.
Example
To display the port details:
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
22
DGS-3120-24TC:admin#show ports details
Command: show ports details
Port : 1:1
-------------------­Port Status : Link Down Description : HardWare Type : Gigabits Ethernet MAC Address : 00-01-02-03-04-10 Bandwidth : 1000000Kbit Auto-Negotiation : Enabled Duplex Mode : Full Duplex Flow Control : Disabled MDI : Auto Address Learning : Enabled Last Clear of Counter : 0 hours 10 mins ago BPDU Hardware Filtering Mode: Disabled Queuing Strategy : FIFO TX Load : 0/100, 0 bits/sec, 0
packets/sec RX Load : 0/100, 0 bits/sec, 0
packets/sec
CTRL+C ESC q Quit SPACE n Next Page p Previous Page r Refresh
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
23
Chapter 3 802.1Q VLAN Command List
create vlan <vlan_name 32> tag <vlanid 2-4094> {type [1q_vlan | private_vlan]} {advertisement}
create vlan vlanid <vidlist> {type [1q_vlan | private_vlan]} {advertisement}
delete vlan <vlan_name 32>
delete vlan vlanid <vidlist>
config vlan <vlan_name 32> {[add [tagged | untagged | forbidde n] | del ete] <p ort list> |
advertisement [enable | disable]}(1)
config vlan vlanid <vidlist> {[add [tagged | untagged | forbidden] | delete] <portlist > |
advertisement [enable | disable] | name <vlan_name 32>}(1)
config port_vlan [<portlist> | all] {gvrp_state [enable | disable] | ingres s _chec king [enable |
disable] | acceptable_fram e [tagged _only | admit_all] | pvid <vlanid 1-4094>}(1)
show vlan {<vlan_name 32>}
show vlan ports {<portlist>}
show vlan vlanid <vidlist>
show port_vlan {<portlist>}
enable pvid auto_assign
disable pvid auto_assign
show pvid auto_assign
config gvrp [timer [join | leave | leaveall] < value 100-100000> | nni_bpdu_addr [dot1d | dot1ad]]
show gvrp
enable gvrp
disable gvrp
config private_vlan [<vlan_name 32> | vid <vlanid 2-4094>] [add [isolated | community] | remove]
[<vlan_name 32> | vlanid <vidlist>]
show private_vlan {[<vlan_name 32> | vlanid<vidlist > ]}
3-1 create vlan
Description
This command is used to create a VLAN on the Switch. The VLAN ID must be always specified for creating a VLAN.
Format
create vlan <vlan_name 32> tag <vlanid 2-4094> {type [1q_vlan | private_vlan]} {advertisement}
Parameters
vlan - The name of the VLAN to be created.
<vlan_name 32> - Enter the VLAN name here. The VLAN name can be up to 32 characters
long.
tag - The VLAN ID of the VLAN to be created.
<vlanid 2-4094> - Enter the VLAN ID here. The VLAN ID value must be between 2 and 4094.
type - (Optional) Specify the type of VLAN here.
1q_vlan - (Optional) Specify that the type of VLAN used is based on the 802.1Q standard.
private_vlan – (Option al) Spec ify that the private VLAN type will be used.
advertisement - (Optional) Specify the VLAN as being able to be advertised out.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
24
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
Example
To create a VLAN with name “v2” and VLAN ID 2:
DGS-3120-24TC:admin# create vlan v2 tag 2 type 1q_vlan advertisement
Command: create vlan v2 tag 2 type 1q_vlan advertisement
Success.
DGS-3120-24TC:admin#
3-2 create vlan vlanid
Description
This command is used to create more than one VLANs at a time. A unique VLAN name (e.g. VLAN10) will be automaticall y assigned by the system. The automatic assignment of VLAN name is based on the following rule: “VLAN”+ID. For example, for VLAN ID 100, the VLAN name will be VLAN100. If this VLAN name is conflict with the name of an existing VLAN, then it will be renamed based on the following rule: “VLAN”+ID+”ALT”+ collision count. For example, if this conflict is the second collision, then the name will be VLAN100ALT2.
Format
create vlan vlanid <vidlist> {type [1q_vlan | private_vlan]} {advertisement}
Parameters
vlanid - The VLAN ID list to be created.
<vidlist> - Enter the VLAN ID list here.
type - (Optional) Specify the type of VLAN to be created.
1q_vlan - (Optional) Specify that the VLAN created will be a 1Q VLAN.
private_vlan – (Option al) Spec ify that the private VLAN type will be used.
advertisement - (Optional) Specify the VLAN as being able to be advertised out.
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
Example
To create some VLANs using VLAN ID:
DGS-3120-24TC:admin# create vlan vlanid 10-30
Command: create vlan vlanid 10-30
Success.
DGS-3120-24TC:admin#
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
25
3-3 delete vlan
Description
This command is used to delete a previously configured VLAN by the name on the Switch.
Format
delete vlan <vlan_name 32>
Parameters
vlan - The VLAN name of the VLAN to be deleted.
<vlan_name 32> - Enter the VLAN name here. This name can be up to 32 characters long.
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
Example
To remove a vlan v1:
DGS-3120-24TC:admin# delete vlan v1
Command: delete vlan v1
Success.
DGS-3120-24TC:admin#
3-4 delete vlan vlanid
Description
This command is used to delete one or a number of previously configured VLAN by VID list.
Format
delete vlan vlanid <vidlist>
Parameters
vlanid - The VLAN ID list to be deleted.
<vidlist> - Enter the VLAN ID list here.
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
xStack® DGS-3120 Series Managed Switch CLI Reference Guide
26
Example
To remove VLANs from 10-30:
DGS-3120-24TC:admin# delete vlan vlanid 10-30
Command: delete vlan vlanid 10-30
Success.
DGS-3120-24TC:admin#
3-5 config vlan
Description
This command is used to configure a VLAN based on the name.
Format
config vlan <vlan_name 32> {[add [tagged | untagged | forbidden] | delete] <portlist> | advertisement [enable | disable]}(1)
Parameters
<vlan_name 32> - Enter the VLAN name you want to add ports to. This name can be up to 32
characters long.
add - (Optional) Specif y to add tagged, untagg ed or for bidden por ts to the VLAN.
tagged - Specify the additional ports as tagged. untagged - Specify the additional ports as untagged.
forbidden
- Specify the additional ports as forbidden.
delete - (Optional) Specify to delete ports from the VLAN.
<portlist> - (Optional) Enter the list of ports used for the configuration here.
advertisement - (Optional) Specify the GVRP state of this VLAN.
enable - Specify to enable advertisement for this VLAN.
disable - Specify to disable advertisement for this VLAN.
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
Example
To add 4 through 8 of unit 2 as tagged ports to the VLAN v1:
DGS-3120-24TC:admin# config vlan v1 add tagged 2:4-2:8
Command: config vlan v1 add tagged 2:4-2:8
Success.
DGS-3120-24TC:admin#
Loading...
+ 783 hidden pages