Basic Command List. D-Link DGS-3000 series
Advertentie
Advertentie
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Chapter 2 Basic Command List
show session show serial_port
config serial_port {baud_rate [9600 | 19200 | 38400 | 115200] | auto_logout [never | 2_minutes | 5_minutes |
10_minutes | 15_minutes]} 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 {capability_advertised {10_half | 10_full |
100_half | 100_full | 1000_full}} | 10_half | 10_full | 100_half | 100_full | 1000_full {[master | slave]} | 10g_full ] | auto_negotiation [restart_an | remote_fault_advertised [disable | offline | link_fault | auto_negotiation_error]] | flow_control [enable | disable] | learning [enable | disable ] | state [enable | disable] | mdix [auto | normal | cross] | [description <desc 1-32> | clear_description] | auto_speed_downgrade [enable | disable]}(1)
show ports {<portlist>} {[description | err_disabled | auto_negotiation | details | media_type]}
2-1 show session
Description
This command is used to display a list of current users logged into the Switch.
Format show session
Parameters
None.
Restrictions
Only administrators and Operators can issue this command.
Example
To display the session entries:
8
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
DGS-3000-26TC:admin#show session
Command: show session
ID Live Time From Level Name
--- ------------ --------------------------------------- ----- ---------------
8 00:00:17.080 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-3000-26TC:admin#show serial_port
Command: show serial_port
Baud Rate : 115200
Data Bits : 8
Parity Bits : None
Stop Bits : 1
Auto-Logout : 10 mins
DGS-3000-26TC:admin#
2-3 config serial_port
Description
This command is used to configure the serial bit rate used to communicate with the management host and the idle connection auto logout time.
9
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
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 Administrators and Operators can issue this command.
Example
To configure baud rate:
DGS-3000-26TC:admin#config serial_port baud_rate 9600
Command: config serial_port baud_rate 9600
Success.
DGS-3000-26TC: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. The default setting is enabled.
Format enable clipaging
Parameters
None.
Restrictions
Only Administrators and Operators can issue this command.
Example
To enable pausing of the screen display when show command output reaches the end of the page:
10
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
DGS-3000-26TC:admin#enable clipaging
Command: enable clipaging
Success.
DGS-3000-26TC: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 Administrators and Operators can issue this command.
Example
To disable pausing of the screen display when show command output reaches the end of the page:
DGS-3000-26TC:admin#disable clipaging
Command: disable clipaging
Success.
DGS-3000-26TC:admin#
2-6 login
Description
This command is used to allow user login to the Switch.
Format login
Parameters
None.
Restrictions
None.
11
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Example
To login the Switch with a user name dlink:
DGS-3000-26TC:admin#login
Command: login
UserName:dlink
PassWord:****
DGS-3000-26TC:admin#
2-7 logout
Description
This command is used to logout from the command prompt.
Format logout
Parameters
None.
Restrictions
None.
Example
To logout from the current user:
DGS-3000-26TC:admin#logout
Command: logout
**********
* Logout *
**********
DGS-3000-26TC Gigabit Ethernet Switch
Command Line Interface
Firmware: Build 2.00.004
Copyright(C) 2016 D-Link Corporation. All rights reserved.
UserName:
2-8 ?
Description
This command is used to display a description of a specific command or general command.
12
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Format
?
Parameters
None.
Restrictions
None.
Example
To get “ping” command usage, descriptions:
DGS-3000-26TC:admin#? ping
Command: ? ping
Command: ping
Usage: [<ipaddr> | <domain_name 255>] { times <value 1-255> | timeout <sec 1-99>}
Description: Used to test the connectivity between network devices.
DGS-3000-26TC:admin#
2-9 clear
Description
This command is used to clear the screen.
Format clear
Parameters
None.
Restrictions
None.
Example
To clear screen:
DGS-3000-26TC:admin#clear
Command: clear
DGS-3000-26TC:admin#
13
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
2-10 show command_history
Description
This command is used to display command history.
Format show command_history
Parameters
None.
Restrictions
None.
Example
To display command history:
DGS-3000-26TC: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-3000-26TC: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
Only Administrators and Operators can issue this command.
14
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Example
To configure the number of command history:
DGS-3000-26TC:admin#config command_history 25
Command: config command_history 25
Success.
DGS-3000-26TC:admin#
2-12 config greeting_message
Description
This command is used to configure the greeting message (or banner).
Format config greeting_message {default}
Parameters
default - (Optional) Add this parameter to the config greeting_message command will return the greeting message (banner) to its original factory default entry.
Restrictions
Only Administrators and Operators can issue this command.
Example
To edit the banner:
DGS-3000-26TC:admin#config greeting_message
Command: config greeting_message
Greeting Messages Editor
===============================================================================
DGS-3000-26TC Gigabit Ethernet Switch
Command Line Interface
Firmware: Build 2.00.004
Copyright(C) 2016 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
-------------------------------------------------------------------------------
15
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
2-13 show greeting_message
Description
This command is used to display a greeting message.
Format show greeting_message
Parameters
None.
Restrictions
Only Administrators and Operators can issue this command.
Example
To display greeting message:
DGS-3000-26TC:admin#show greeting_message
Command: show greeting_message
================================================================================
DGS-3000-26TC Gigabit Ethernet Switch
Command Line Interface
Firmware: Build 2.00.004
Copyright(C) 2016 D-Link Corporation. All rights reserved.
================================================================================
DGS-3000-26TC: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-3000-
26TC: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 issuing the reset command, the current command prompt will remain the same. However, when issuing the reset system command, the command prompt will return to its original factory default value.
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.
16
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
Restrictions
Only Administrators and Operators can issue this command.
Example
To edit the command prompt:
DGS-3000-26TC:admin#config command_prompt Prompt#
Command: config command_prompt Prompt#
Success.
Prompt#:admin#
2-15 config terminal width
Description
This 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, another user login, the terminal width is default value.
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 - Specify the default terminal width setting. The default value is 80.
<value 80-200> - Enter the configured terminal width. The width is between 80 and 200 characters.
Restrictions
None.
Example
To configure the current terminal width:
DGS-3000-26TC:admin#config terminal width 120
Command: config terminal width 120
Success.
DGS-3000-26TC:admin#
17
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
2-16 show terminal width
Description
This 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-3000-26TC:admin#show terminal width
Command: show terminal width
Global terminal width : 80
Current terminal width : 80
DGS-3000-26TC:admin#
2-17 config ports
Description
This command is used to configure the Switch's Ethernet port settings.
Format config ports [<portlist> | all] {medium_type [fiber | copper]} {speed [auto {capability_advertised {10_half |
10_full | 100_half | 100_full | 1000_full}} | 10_half | 10_full | 100_half | 100_full | 1000_full {[master | slave]} |
10g_full] | auto_negotiation [restart_an | remote_fault_advertised [disable | offline | link_fault | auto_negotiation_error]] | flow_control [enable | disable] | learning [enable | disable] | state [enable | disable] | mdix [auto | normal | cross] | [description <desc 1-32> | clear_description] | auto_speed_downgrade [enable | disable]}(1)
Parameters
<portlist> - Enter a range of ports to be configured.
all - Specify all ports in the system, you may use the “all” parameter command.
medium_type - (Optional) Specify the medium type for the combo ports. This parameter is optional. For noncombo ports, the user doesn't need to specify medium_type in the command.
fiber - Specify the fiber port.
copper - Specify the copper port
speed - Specify the port speed.
auto - Specify the port auto negotiation speed.
capability_advertised - Specify that the capability will be advertised.
10_half - Specify the port speed to 10_half.
10_full - Specify the port speed to 10_full.
100_half - Specify the port speed to 100_half.
18
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
100_full - Specify the port speed to 100_full.
1000_full - Specify the port speed to 1000_full. Using master or slave mode in this mode is optional.
10_half - Specify the port speed to 10_half.
10_full - Specify the port speed to 10_full.
100_half - Specify the port speed to 100_half.
100_full - Specify the port speed to 100_full.
1000_full - Specify the port speed to 1000_full. While set port speed to 1000_full,user should specify master or slave mode for 1000BASE-T interface, and leave the 1000_full without any master or slave setting for other interface.
master - (Optional) Specify that the port(s) will be set to master.
slave - (Optional) Specify that the port(s) will be set to slave.
10g_full - Specify the port speed to 10g_full.
auto_negotiation - Specify that the auto-negotiation option will be configured.
restart_an - Specify to restart the auto-negotiation process.
remote_fault_advertised - Specify that the remote fault advertisement option will be configured.
disable - Specify to disable remote fault advertisement.
offline - Specify that a local device may indicate Offline prior to powering off, running transmitter tests, or removing the local device from the active configuration. If it is set and detected offline, it will advertise at the next auto-negotiation. It interacted for 1000Mbps MAUs.
link_fault - Specify that if set and local device was detected, a Link_Failure condition indicated by the loss of synchronization, will advertise at the next auto-negotiation. It interacted for 1000Mbps MAUs.
auto_negotiation_error - Specify the resolution which precludes operation between a local device and link partner advertised at the next auto-negotiation. It interacted for 1000Mbps MAUs.
flow_control - Turns on or turns off the flow control on one or more ports by enabling or disabling this function.
enable - Specify that the flow control option will be enabled.
disable - Specify that the flow control option will be disabled.
learning - Turns on or turns off the 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 - Enables or disables the specified port. If the specified 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 - The MDIX mode can be specified as auto, normal, and cross. If set to the normal state, the port is in the
MDIX mode and can be connected to PC NIC using a straight cable. If set to the cross state, the port is in the
MDI mode, and can be connected to a port (in the MDIX mode) on another switch through a straight cable.
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 - Specify the description of the port interface.
<desc 1-32> - Enter the port interface description. This value can be up to 32 characters long.
clear description - (Optional) Specify that the description field will be cleared.
auto_speed_downgrade - Specify to enable or disable the option to automatically downgrade the advertised speed. This setting has no effect when the port is working in the forced mode.
enable - Specify to enable the option to automatically downgrade the advertised speed.
disable - Specify to disable the option to automatically downgrade the advertised speed.
Restrictions
Only Administrators and Operators can issue this command.
Example
To configure the ports:
DGS-3000-26TC:admin# config ports 1-3 speed 10_full learning enable state enable flow_control enable
Command: config ports 1-3 speed 10_full learning enable state enable flow_control enable
Success.
DGS-3000-26TC:admin#
19
DGS-3000 Series Layer 2 Managed Gigabit Ethernet Switch CLI Reference Guide
2-18 show ports
Description
This command is used to display the current configurations of a range of ports. No parameter will show all ports.
Format show ports {<portlist>} {[description | err_disabled | auto_negotiation | details | media_type]}
Parameters
<portlist> - (Optional) Enter a range of ports to be displayed.
description - (Optional) Specify to display the port description.
err_disabled - (Optional)Specify to display disabled information.
auto_negotiation - (Optional) Specify to display detailed auto-negotiation information.
details - (Optional) Specify if port information is included in the display.
media_type - (Optional) Displays SFP information.
Restrictions
None.
Example
To display the port details:
DGS-3000-26TC:admin#show ports details
Command: show ports details
Port : 1
--------------------
Port Status : Link Up
Description :
HardWare Type : Gigabits Ethernet
MAC Address : B0-C5-54-30-00-A1
Bandwidth : 100000Kbit
Auto-Negotiation : Enabled
Duplex Mode : Full Duplex
Flow Control : Disabled
MDI : Cross
Address Learning : Enabled
Last Clear of Counter : 3 hours 9 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
20
Downloaden
Advertentie