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 Access ing the Switch via the Serial 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.
DGS-3120-24TC Gigabit Ethernet Switch
Command Line Interface
Firmware: Build 4.00.015
Copyright(C) 2014 D-Link Corporation. All rights reserved.
UserName:
PassWord:
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.
NOTE: When Switches with different modes or different firmware versions are stacked together,
the following warning message will appear after the initial login:
Copyright(C) 2014 D-Link Corporation. All rights reserved.
UserName:
PassWord:
WARNING: The stacking members are working on different firmware.
1-2 Setting the Switch’s IP Address
Each Switch must be assigned its own IP Address, which is used for communic ation with an
SNMP network manager or other TCP/IP application (for example BOOTP, TFTP). The Switch’s
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.
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 for the S wit c h must be set before it can 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.
DGS-3120-24TC:admin# config ipif System ipaddress 10.24.22.100/255.0.0.0
DGS-3120-24TC:admin#
DGS-3120-24TC:admin#?
CTRL+CESCq Quit SPACEn Next Page ENTER Next Entry a All
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.
Command: config ipif System ipaddress 10.24.22.100/8
Success.
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.
There are a number of helpful features included in the CLI. Entering the ? command will displa y a
list of all of the top-level commands.
Command: config account
Next possible completions:
<username 15>
In this case, the command config account was entered with the parameter <username 15>. The
CLI will then prompt to enter the <username 15> 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.
Command: config account
Next possible completions:
<username 15>
In the above example, the command config account was entered without the required parameter
<username 15>, the CLI returned the Next possible completions: <username 15> 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 this 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 commands: prompt.
Available commands:
.. ? cable_diag cd
cfm change clear config
copy create debug del
delete dir disable download
enable erase execute format
install login logout md
move no ping ping6
rd reboot reconfig rename
reset save show smtp
telnet traceroute traceroute6 upload
The top-level commands consist of commands such as show or config. Most of these commands
require one or more param eter s to narr o w the 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.
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-3Command Syntax Symbols
Syntax Description
angle brackets < > Encloses a variable or value. Users must specify the variable or value.
For example, in the syntax
config command_history <value 1-40>
users must enter how many entries for <valu e 1-40> 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, operator, power_user or user-level
account when entering th e c ommand. DO NOT TYPE THE SQUARE
BRACKETS.
vertical bar | Separates mutually exclusive items in a list. For example, in the syntax
reset {[config | system]} {force_agree}
users must specify either the community or trap receiver in the command.
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 ports [<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-4Line E diting 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.
CTRL+R 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
Tab Help user to select appropriate token.
P or p Display the previous page.
N, n or Space Display the next page.
CTRL+C Escape from displayed pages.
ESC Escape from displayed pages.
Q or q Escape from displayed pages.
R or r refresh the displayed pages
A or 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.
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.
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.
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.
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To configure baud rate:
Command: config serial_port baud_rate 9600
Success.
2-4enable 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 displa y will not be r ef r eshed whe n cli pag in g is dis a ble d. T he def aul t s etti ng is e nab led .
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:
Command: enable clipaging
Success.
2-5dis able 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 screen display when s ho w c om mand output reaches the end of the p ag e:
Command: disable clipaging
Success.
2-6login
Description
This command is used to allow user login to the Switch.
<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
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.
Format
config command_prompt [<stri n g 16> | username | default]
default - Enter this command to return the command prompt to its original factory default value.
DGS-3120-24TC:admin#config command_prompt Prompt#
Prompt#:admin#
default - The default setting of terminal width. The default value is 80.
<value 80-200> - The terminal width which will be configured. The widt h is betw ee n 80 and 200
characters.
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To edit the command prompt:
Command: config command_prompt Prompt#
Success.
2-15config terminal 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, another user login, the term inal 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.
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
copper - Specify that the medium type will be set to copper.
speed - (Optional) Specify the port speed of the specified ports .
slave - Specify that the port(s) will be set to slave.
auto_negotiation - Specify to configure the auto-negotiation method.
and link partners will be advertised at the next auto-negotiation.
flow_control - (Optional) You can turn on or turn off flow control on one or more ports. By set
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.
disable - Specify that the learning option will be disabled.
state - (Optional) Enables or disables the specified port. If the specificed ports are in error-
disable - Specify that the port state will be disabled.
mdix - (Optional) The MDIX mode can be specified as auto, normal, and cross. If set to the
cross - Specify that the MDIX mode for the port will be set to cross.
description - (Optional) Specify the description of the port interface.
long.
clear_description - (Optional) Specify that the description field will be cleared.
Parameters
fiber - Specify that the medium type will be set to fiber.
auto - Set port speed to auto negotiation.
capability_advertised - (Optional) Specify that the capability will be advertised.
10_half - (Optional) Set port speed to 10_half.
10_full - (Optional) Set port speed to 10_full.
100_half - (Optional) Set port speed to 100_half.
100_full - (Optional) Set port speed to 100_full.
1000_full - (Optional) Set port speed to 1000_full.
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 - Set 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 - Specify that the port(s) will be set to master.
restart_an - Specify to restart auto-negoti ati on proc es s.
remote_fault_advertised – Specify that the fault conditions will be remotely advertised when
the next auto-negotiation process takes place.
disable - Remote fault advertisement is disabled.
offline - Local devices that were powered off or removed from the active configuration will
be advertised at the next auto-negotiation.
link_fault - Local devices that disconnected due to link failure will be advertised at the next
auto-negotiation.
auto_negotiation_error - The resolution that precludes operatio n bet ween loc al dev ic es
flow_control to enable or disable.
enable - Specify that the flow control option will be enabled.
enable - Specify that the learning option will be enabled.
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.
normal state, the port is in the MDIX mode and can be connected to PC NIC using a straight
cable. 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 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.
<desc 1-32> - Enter the port interface description here. This value can be up to 32 characters
DGS-3120-24TC:admin# create vlan v2 tag 2 type 1q_vlan advertisement
DGS-3120-24TC:admin#
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.
private_vlan – (Optional) Specify that the private VLAN type will be used.
advertisement - (Optional) Specify the VLAN as being able to be advertised out.
DGS-3120-24TC:admin# create vlan vlanid 10-30
DGS-3120-24TC:admin#
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:
Command: create vlan v2 tag 2 type 1q_vlan advertisement
Success.
3-2create 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 automatically 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.
This command allows you to configure multiple VLANs at one time. But conflicts will be generated
if you configure the name of multiple VLANs at one time.
<vlan_name 32> - (Optional) Enter the VLAN name to be displayed. The VLAN name can be up
to 32 characters long.
Parameters
listing the lowest switch number and the beginning port number on that switch, separated by a
colon. Then highest switch number, and the highest port number of the range (also separated
by a colon) are specified. The beginning and end of the port list range are separated by a
dash. For example, 1:3 would specify switch number 1, port 3. 2:4 specifies switch number 2,
port 4. 1:3-2:4 specifies all of the ports between switch 1, port 3 and switch 2, port 4 − in
enable - Specify that GVRP for the specified ports will be enabled.
enable - Specify that ingress checking will be enabled for the specified portlist.
types:
tagged_only - Only tagged packets can be accepted by this port.
Restrictions
Only Administrator and Operator-level users can issue this command.
Example
To sets the ingress checking status, the sending and receiving GVRP information:
This command is used to enable the auto-assignment of PVID.
If “Auto-assign PVID” is enabled, PV ID w ill be possi bl y changed by PVID or VLAN configuration.
When user configures a port to VLAN X’s untagged membership, this port’s PVID will be updated
with VLAN X. In the form of VLAN list command, PVID is updated with last item of VLAN list. When
user removes a port from the untagged membership of the PVID’s VLAN, the port’s PVID will be
assigned with “default VLAN” .
The default setting is enabled.
Format
enable pvid auto_assign
Parameters
None.
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
Example
To enable the auto-as s ig n PVID:
Command: enable pvid auto_assign
Success.
3-13disable pvid auto assign
Description
This command is used to disable auto assignment of PVID.
Only Administrator, Operator and Power-User level users can issue this command.
Example
To disable the auto-as s ig n PVI D:
Command: disable pvid auto_assign
Success.
3-14show pvid auto_assign
Description
This command is used to display the PVID auto-assignment state.
Format
show pvid auto_assign
Parameters
None.
Restrictions
None.
Example
To display PVID auto-assignment state:
Command: show pvid auto_assign
PVID Auto-assignment: Enabled
3-15config gvrp
Description
The config gvrp timer command set the GVRP timer’s value. The default value for Join time is 200
milliseconds; for Leave time is 600 milliseconds; for LeaveAll time is 10000 milliseconds.
Only Administrator, Operator and Power-User level users can issue this command.
Example
To configure the 802.1X authentication protocol to RADIUS EAP:
Command: config 802.1x auth_protocol radius_eap
Success.
4-7config 802.1x fwd_pdu system
Description
This command is used to globally control the forwarding of EAPOL PDU. When 802.1X
functionality is disabled globally or for a port, and if 802.1X fwd_pdu is enabled both globally and
for the port, a received EAPOL packet on the port will be flooded in the same VLAN to those ports
for which 802.1X fwd_pdu is enabled and 802.1X is disabled (globally or just for the port). The
default state is disabled.
Format
config 802.1x fwd_pdu system [enable | disable]
Parameters
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
Example
To configure forwarding of EAPOL PDU system state enable:
This command is used to control the forwarding of EAPOL PDU. When 802.1X functionality is
disabled globally or for a port, and if 802.1X fwd_pdu is enabled both globally and for the port, a
received EAPOL packet on the port will be flooded in the same VLAN to those ports for which
802.1X fwd_pdu is enabled and 802.1X is disabled (globally or just for the port). The default state
is disabled.
This command is used to enable or disable acception of authorized configuration.
When the authorization is enabled for 802.1X’s RADIUS authentication, the authorized attributes
(for example VLAN, 802.1p default priority, and ACL) assigned by the RADUIS server will be
accepted if the global authorization status is enabled.
CTRL+CESCq Quit SPACEn Next Page p Previous Page r Refresh
ports - Specify a range of ports to be configured.
all - Specify all ports to be configured.
authenticator - Specify the port that will enforce authentication before allowing access to
services that are accessible from that port. This port will adopt the authenticator role.
none - Disable authentication on the specified ports.
Command: show 802.1x auth_configuration ports 1:1
Port Number : 1:1
Capability : None
AdminCrlDir : Both
OpenCrlDir : Both
Port Control : Auto
QuietPeriod : 60 sec
TxPeriod : 30 sec
SuppTimeout : 30 sec
ServerTimeout : 30 sec
MaxReq : 2 times
ReAuthPeriod : 3600 sec
ReAuthenticate : Disabled
Forward EAPOL PDU On Port : Enabled
Max User On Port : 16
4-11config 802.1x capability
Description
This command is used to configure the port capability.
Format
config 802.1x capability ports [< p o rtlist> | all] [authenticator | none]
Parameters
<portlist> - Enter the list of ports used for the configuration here.
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
This command is used to limit the maximum number of users that can be learned via 802.1X
authentication. In addition to the global limitation, maximum user for per port is also limited. It is
specified by config 802.1x auth_parameter command.
<portlist> - Enter the list of ports used for the configuration here.
both - For bidirectional access control.
unauthorized by setting the parameter of port_control to be force_authorized or
force_unauthorized. Besides, the controlled port will reflect the outcome of authentication if
port_control is auto.
force_unauth - Force a specific port to be unconditionally unauthorized.
auto - The controlled port will reflect the outcome of authentication.
60 seconds and can be any value among 0 to 65535.
<sec 0-65535> - Enter the quiet period value here. This value must be between 0 and 65535
30 seconds and can be any integer value among 1 to 65535.
<sec 1-65535> - Enter the tx period value here. This value must be between 1 and 65535
supplicant. Its default value is 30 seconds and can be any integer value among 1 to 65535.
<sec 1-65535> - Enter the supplicant timeout value here. This value must be between 1 and
authentication server. Its default value is 30 seconds and can be any integer value among 1 to
65535.
<sec 1-65535> - Enter the server timeout value here. This value must be between 1 and
will retransmit an EAP Request packet to the supplicant. Its default value is 2 and can be any
integer number among 1 to 10.
<value 1-10> - Enter the maximum required value here. This value must be between 1 and
authentication timer. The default value is 3600.
<sec 1-65535> - Enter the re-authentication period value here. This value must be between 1
specific port.
enable - Specify to enable the re-authentication mechanism for a specific port.
<value 1-448> - Enter the maximum users value here. This value must be between 1 and
<portlist> - Enter the list of ports used for the configuration here.
<portlist> - Enter the list of ports used for the configuration here.
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
Example
To initialize the authentication state machine of some or all:
Command: config 802.1x init port_based ports all
Success.
4-16config 802.1x reauth
Description
This command is used to re-authenticate the device connected to the port. During the reauthentication period, the port status remains authorized until failed re-authentication.
Only Administrator, Operator and Power-User level users can issue this command.
Example
To re-authenticate the device connected to the port:
Command: config 802.1x reauth port_based ports all
Success.
4-17create 802.1x guest_vlan
Description
This command is used to assign a static VLAN to be guest VLAN. The specific VLAN which
assigned to guest VLAN must be existed. The specific VLAN which assigned to guest VLAN can’t
be deleting.
Format
create 802.1x guest_vlan <vlan_name 32>
Parameters
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
Example
To create a VLAN named “guestVLAN” as 802.1X guest VLAN:
Command: create 802.1x guest_vlan guestVLAN
Success.
4-18delete 802.1x guest_vlan
Description
This command is used to delete guest VLAN setting, but not delete the static VLAN. All ports
which enabled guest VLAN will remove to original VLAN after deleted guest VLAN.
ports - A range of ports enable or disable guest VLAN function.
all - Specify that all the port will be included in this configuration.
state - Specify the guest VLAN port state of the configured ports.
disable - Specify to be removed from the guest VLAN.
Format
delete 802.1x guest_vlan <vlan_name 32>
Parameters
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
Example
To delete the guest VLAN named “guestVLAN”:
Command: delete 802.1x guest_vlan guestVLAN
Success.
4-19config 802.1x guest_vlan
Description
This command is used to configure guest VLAN setting. If the specific port state is changed from
enabled state to disable state, this port will move to its original VLAN.
authentication data before being transmitted over internet. The maximum length of the key is
32.
to encrypt user’s authentication data before being transmitted over the Internet. The maximum
length of the key is 32.
<password 56> - The encrypted key string. The maximum length of the plain text key is 56
between the Switch and the RADIUS server. The range is 1 to 65535.
<udp_port_number 1-65535> - Enter the authentication port number here. This value must
<server_ip> - Enter the RADIUS server IP address here.
authentication data before being transmitted over internet. The maximum length of the key is
32.
to encrypt user’s authentication data before being transmitted over the Internet. The maximum
length of the key is 32.
<password 56> - The encrypted key string. The maximum length of the plain text key is 56
between the Switch and the RADIUS server. The range is 1 to 65535. The default value is
1812.
<udp_port_number 1-65535> - Enter the authentication port number here. This value must
be between 1 and 65535.
between the Switch and the RADIUS server. The range is 1 to 65535. The default value is
1813.
<udp_port_number 1-65535> - Enter the accounting port number here. This value must be
between 1 and 65535.
<sec 1-255> - Enter the timeout value here. This value must be between 1 and 255 seconds.
<int 1-20> - Enter the re-transmit value here. This value must be between 1 and 20.
Restrictions
Only Administrator, Operator and Power-User level users can issue this command.
This command is used to disable the authentication policy encryption. When disabled, TACACS+
and RADIUS key will be in the plain text form.
Format
disable authen_policy_en cryption
Parameters
None.
Restrictions
Only Administrator-level users can issue this command.
Example
To disable the authentication policy encryption:
Command: disable authen_policy_encryption
Success.
5-3enable pas s word encryption
Description
This command is used to enable password encryption. The user account configuration information
will be stored in the configuration file, and can be applied to the system later.
If the password encryption is enabled, the password will be in encrypted form.
Only Administrator-level users can issue this command.
Example
To enable the password encryption:
Command: enable password encryption
Success.
5-4dis able password encryption
Description
This command is used to disable password encryption. The user account configuration information
will be stored in the configuration file, and can be applied to the system later.
When password encryption is disabled, if the user specifies the password in plain text form, the
password will be in plan text form. However, if the user specifies the password in encrypted form,
or if the password has been converted to encrypted form by the last enable password encryption
command, the password will still be in the encrypted form. It can not be reverted to the plaintext.
Format
disable password encryption
Parameters
None.
Restrictions
Only Administrator-level users can issue this command.
This command is used to enable system access authentication policy.
Enable system access authentication policy. When authentication is enabled, the device will adopt
the login authentication method list to authenticate the user for login, and adopt the enable
authentication method list to authenticate the enable password for promoting the user‘s privilege to
Admin level.
Format
enable authen_policy
Parameters
None.
Restrictions
Only Administrator-level users can issue this command.
Example
To enable system access authentication policy:
Command: enable authen_policy
Success.
5-6dis able authen_policy
Description
This command is used to disable system access authentication policy.
Disable system access authentication policy. When authentication is disabled, the device will
adopt the local user account database to authenticate the user for login, and adopt the local
enable password to authenticate the enable password for promoting the user‘s privilege to Admin
level.
This command is used to create a user-defined method list of authentication methods for user
login. The maximum supported number of the login method lists is 8.
Configure a user-defined or default method list of authentication methods for user login. The
sequence of methods will effect the altercation result. For example, if the sequence is tacacs+ first,
then tacacs and local, when user trys to login, the authentication request will be sent to the first
server host in tacacs+ built-in server group. If the first server host in tacacs+ group is missing, the
authentication request will be sent to the second server host in tacacs+ group, and so on. If all
server hosts in tacacs+ group are missing, the authentication request will be sent to the first server
host in tacacs group…If all server hosts in tacacs group are missing, the local account database in
the device is used to authenticate this user. When user logins the device success full y while us ing
methods like tacacs/xtacacs/tacacs+/radius built-in or user-defined server groups or none, the
“user” privilege level is assigned only. If user wants to get admin privilege level, user must use the
“enable admin” command to promote his privilege level. But when local method is used, the
privilege level will depend on this account privilege level stored in the local device.
xtacacs - (Optional) Specify to authenticate by using the built-in server group called “xtacacs”.
tacacs+ - (Optional) Specify to authenticate by using the built-in server group called “tacacs+”.
radius - (Optional) Specify to authenticate by using the built-in server group called “radius”.
server_group - (Optional) Specify to authenticat e b y the user-defined server group.
<string 15> - Enter the server group value here. This value can be up 15 characters long.
local - (Optional) Specify to authenticate by local user account database in device.
Restrictions
Only Administrator-level users can issue this command.
Example
To configure a user-defined method list for user login:
tacacs+ tacacs local
Command: config authen_login method_list_name login_list_1 method tacacs+
tacacs local
Success.
5-10delete authen_login
Description
This command is used to delete a user-defined method list of authentication methods for user login.
Format
delete authen_login method_list_name <string 15>
Parameters
Restrictions
Only Administrator-level users can issue this command.
Example
To delete a user-defined method list for user login:
default - Display default user-defined method list for user login.
method_list_name - Display the specific user-defined method list for user login.
<string 15> - Enter the method list name here. This value can be up to 15 characters long.
all - Display all method lists for user login.
DGS-3120-24TC:admin# show authen_login method_list_name login_list_1
DGS-3120-24TC:admin#
<string 15> - The user-defined method list name. This value can be up to 15 characters long.
5-11show authen_login
Description
This command is used to display the method list of authentication methods for user login.
Format
show authen_login [default | method_list_name <string 15> | all]
Parameters
Restrictions
Only Administrator-level users can issue this command.
Example
To display a user-defined method list for user login:
Command: show authen_login method_list_name login_list_1
Method List Name Priority Method Name Comment
---------------- -------- --------------- -----------------login_list_1 1 tacacs+ Built-in Group
2 tacacs Built-in Group
3 mix_1 User-defined Group
4 local Keyword
5-12create authen_enable
Description
This command is used to create a user-defined method list of authentication methods for
promoting user's privilege to Admin level.
This command is used to configure a user-defined or default method list of authentication methods
for promoting user's privilege to Admin level. The sequence of methods will affect the altercation
result. For example, if the sequence is tacacs+ first, then tacacs and local_enable, when user try
to promote user's privilege to Admin level, the authentication request will be sent to the first server
host in tacacs+ built-in server group. If the first server host in tacacs+ group is missing, the
authentication request will be sent to the second server host in tacacs+ group, and so on. If all
server hosts in tacacs+ group are missing, the authentication request will be sent to the first server
host in tacacs group…If all server hosts in tacacs group are missing, the local enable password in
the device is used to authenticate this user’s password.
tacacs - (Optional) Authentication by the built-in server group “tacacs”.
xtacacs - (Optional) Authentication by the built-in server group “xtacacs”.
tacacs+ - (Optional) Authentication by the built-in server group “tacacs+”.
radius - (Optional) Authentication by the built-in server group “radius”.
server_group - (Opti ona l) Auth ent ic ati on b y the user-defined server group.
<string 15> - Enter the server group name here. This value can be up to 15 characters
long.
local_enable - (Optional) Authentication by local enable password in device.
Restrictions
Only Administrator-level users can issue this command.
<string 15> - Enter the server group name here. This value can be up to 15 characters long.
5-18create authen server_group
Description
This command is used to create a user-defined authentication server group. The maximum
supported number of server groups including built-in server groups is 8. Each group consists of 8
server hosts as maximum.
Format
create authen server_group <string 15>
Parameters
Restrictions
Only Administrator-level users can issue this command.
Example
To create a user-defined authentication server group:
Command: create authen server_group mix_1
Success.
5-19config authen server_group
Description
This command is used to add or remove an authentication server host to or from the specified
server group. Built-in server group “tacacs”, “xtacacs”, “tacacs+”, “radius” accepts the server host
with the same protocol only, but user-defined server group can accept server hosts with different
protocols.
tacacs - Built-in server group “tacacs”.
xtacacs - Built-in server group “xtacacs”.
tacacs+ - Built-in server group “tacacs+”.
radius - Built-in server group “radius”.
<string 15> - The user-defined server group name. This value can be up to 15 characters long.
tacacs - Specify that the TACACS authentication protocol will be used.
xtacacs - Specify that the XTACACS authentication protocol will be used.
tacacs+ - Specify that the TACACS+ authentication protocol will be used.
Restrictions
Only Administrator-level users can issue this command.
Example
To add an authentication server host to an server group:
This command is used to create an authentication server host. When an authentication server host
is created, IP address and protocol are the index. That means over 1 authentication protocol
tacacs - Server host’s authentication protocol.
xtacacs - Server host’s authentication protocol.
tacacs+ - Server host’s authentication protocol.
TACACS/XTACACS/TACACS+ is 49. Default value for RADIUS is 1812.
<int 1-65535> - Enter the authentication protocol port number here. This value must be
encryption will apply. This value is meaningless for TACACS and XTACACS.
<key_string 254> - Enter the TACACS+ or the RADIUS key here. This key can be up to 254
characters long.
none - No encryption for TACACS+ and RADIUS authentication. This value is meaningless
authentication.
Default value is 2.
Restrictions
Only Administrator-level users can issue this command.
Example
To create a TACACS+ authentication server host, its listening port number is 15555 and timeout
value is 10 seconds:
tacacs - Server host’s authentication protocol.
xtacacs - Server host’s authentication protocol.
tacacs+ - Server host’s authentication protocol.
TACACS/XTACACS/TACACS+ is 49. Default value for RADIUS is 1812.
encryption will apply. This value is meaningless for TACACS and XTACACS.
<key_string 254> - Enter the TACACS+ key here. This value can be up to 254 characters
long.
none - No encryption for TACACS+ and RADIUS authentication. This value is meaningless
authentication.
Default value is 2.
Restrictions
Only Administrator-level users can issue this command.
Example
To configure a TACACS+ authentication server host’s key value:
"This is a secret."
Command: config authen server_host 10.1.1.222 protocol tacacs+ key "This is a
This command is used to enter the administrator level privilege. Promote the "user" privilege level
to "admin" level. When the user enters this command, the authentication method tacacs, xtacacs,
tacacs+, user-defined server groups, local_enable or none will be used to aut he n ticate the us er .
Because TACACS, XTACACS and RADIUS don't support "enable" function in itself, if user wants
to use either one of these 3 protocols to do enable authentication, user must create a special
account on the server host first, which has a username "enable" and then configure its password
as the enable password to support "enab le" func tio n.
This command can not be used when auth ent ic at ion p olicy is disabled.
Format
enable admin
Parameters
None.
Restrictions
None.
Example
To enable administrator lever privilege:
Command: enable admin
PassWord:*****
Success.
5-30config admin local_enable
Description
This command is used to config the local enable password of administrator level privilege. When
the user chooses the “local_enable” method to promote the privilege level, the enable password of
local device is needed. When the password information is not specified in the command, the
sha_1 - Specify the password in SHA-1 encrypted form.
<password> - (Optional) The password for promoting the privilege level. The length for a
sensitive.
DGS-3120-24TC:admin#config admin local_enable
DGS-3120-24TC:admin#
system will prompt the user to input the password interactively. For this case, the user can only
input the plain text password. If the password is present in the command, the user can select to
input the password in the plain text form or in the encrypted form. The encryption algorithm is
based on SHA-I.
plain_text - Specify the password in plain text form.
password in plain-text form and SHA-1 encrypted form are different.
plain-text: Passwords can be from a minimum of 0 to a maximum of 15 characters.
SHA-1: The length of Encrypted passwords is fixed to 35 bytes longand the password is case-
Restrictions
Only Administrator-level users can issue this command.
Example
To configure the administrator password:
Command: config admin local_enable
Enter the old password:
Enter the case-sensitive new password:*****
Enter the new password again for confirmation:*****
Success.
5-31create aaa server_group
Description
This command is used to create a group of user-defined AAA servers. The maximum number of
supported server groups, including the built-in server groups, is 8. Each group can have a
maximum of 8 server hosts.
<string 15> - Specify the user-defined server group name.
DGS-3120-24TC:admin#create aaa server_group mix_1
DGS-3120-24TC:admin#
tacacs - Specify the built-in TACACS server group.
xtacacs - Specify the built-in XTACACS server group.
tacacs+ - Specify the built-in TACACS+ server group.
radius - Specify the built-in RADIUS server group.
group_name - Specify a user-defined server group.
<string 15> - Enter the name of the server group.
add - Add a server host to the server group.
delete - Remove a server host to the server group.
server_host - Specify the server host.
radius - Specify the server host using RADIUS protocol.
Parameters
Restrictions
Only Administrator-level users can issue this command.
Example
To create a user-defined AAA server group called “mix_1”:
Command: create aaa server_group mix_1
Success.
5-32config aaa server_group
Description
This command is used to add or remove an AAA server host to or from the specified server group.
The built-in TACACS, XTACACS, TACACS+, and RADIUS server groups only accept server hosts
with the same protocol, but a user-defined server group can accept server hosts with different
protocols.
<ipaddr> - Enter the IP address of the server host.
protocol - Specify the server host protocol.
tacacs - Specify the server host using TACACS protocol.
xtacacs - Specify the server host using XTACACS protocol.
tacacs+ - Specify the server host using TACACS+ protocol.
Restrictions
Only Administrator-level users can issue this command.
This command is used to create a user-defined list of accounting methods for accounting services
on the Switch. The maximum supported number of accounting method lists is 8.
Format
create accounting method_lis t_name <string 15>
Parameters
Restrictions
Only Administrator-level users can issue this command.
tacacs+ - Specify the built-in TACACS+ server group.
radius – Specify the built-in RADIUS server group.
server_group - Specify the user-defined server group. If the group contains TACACS and
XTACACS server, it will be skipped in account in g.
<string 15> - Enter the name of server group.
Restrictions
Only Administrator-level users can issue this command.
Example
To configure a user-defined method list called “shell_acct”, that specifies a sequence of the built-in
TACACS+ server group, followed by the RADIUS server group for accounting service on the
Switch: