Professional Documents
Culture Documents
Issue 01
Date 2019-06-29
and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.
All other trademarks and trade names mentioned in this document are the property of their respective
holders.
Notice
The purchased products, services and features are stipulated by the contract made between Huawei and the
customer. All or part of the products, services and features described in this document may not be within the
purchase scope or the usage scope. Unless otherwise specified in the contract, all statements, information,
and recommendations in this document are provided "AS IS" without warranties, guarantees or
representations of any kind, either express or implied.
The information in this document is subject to change without notice. Every effort has been made in the
preparation of this document to ensure accuracy of the contents, but all statements, information, and
recommendations in this document do not constitute a warranty of any kind, express or implied.
Website: http://e.huawei.com
Contents
1 HWTACACS AAA........................................................................................................................ 1
1.1 Overview of HWTACACS............................................................................................................................................. 1
1.2 HWTACACS Packets..................................................................................................................................................... 2
1.3 HWTACACS Authentication, Authorization, and Accounting Process.......................................................................11
1.4 HWTACACS Attributes............................................................................................................................................... 13
1 HWTACACS AAA
Both HWTACACS and RADIUS protocols can implement authentication, authorization, and
accounting. They are similar in that they both have the following characteristics:
l Client/Server model
l Share key used for encrypting user information
l Good flexibility and extensibility
HWTACACS is more reliable in transmission and encryption than RADIUS, and is more
suitable for security control. Table 1-1 lists the differences between HWTACACS and
RADIUS.
Command line authorization Supported. The command line Not supported. The
use is restricted by both the commands that a user
command level and AAA. can use depend on
When a user enters a their user level. A user
command, the command is can only use the
executed only after being commands of the same
authorized by the level as or lower level
HWTACACS server. than their user level.
Field Description
Field Description
service Type of the service requesting authentication, which varies depending on the
user type:
l PPP users: PPP(0x03)
l Administrators: LOGIN(0x01)
l Other users: NONE(0x00)
user Name of the user requesting authentication. The maximum length is 129.
Field Description
port Name of the user interface requesting authentication. The maximum length is
47.
l For management users, this field indicates the user terminal interface,
such as console0 and vty1. For example, the authen_type of Telnet users
is ASCII, service is LOGIN, and port is vtyx.
l For other users, this field indicates the user access interface.
Field Description
user_msg Character string entered by the login user. This field carries the user login
password to respond to the server_msg field in the Authentication Reply
packet.
flags Indicates whether the client displays the password entered by user in plain
text. The value 1 indicates that the password is not displayed in plain text.
server_msg Optional field. This field is sent by the server to the user to provide
additional information.
l Authorization Response: After receiving the Authorization Request packet, the server
sends this packet carrying the authorization result to the client.
HWTACACS Authorization Request packets.
NOTE
The meanings of the following fields in the Authorization Request packet are the same as those in the
Authentication Start packet, and are therefore not described here: priv_lvl, authen_type, authen_service,
user len, port len, rem_addr len, port, and rem_addr.
Field Description
authen_ser Type of the service requesting authentication, which varies depending on the
vice user type:
l PPP users: PPP(0x03)
l Administrators: LOGIN(0x01)
l Other users: NONE(0x00)
NOTE
The meanings of the following fields are the same as those in HWTACACS Authentication Reply
packet, and are therefore not described here: server_msg len, data len, and server_msg.
NOTE
The meanings of the following fields in the Accounting Request packet are the same as those in the
Authorization Request packet, and are therefore not described here: authen_method, priv_lvl,
authen_type, user len, port len, rem_addr len, port, and rem_addr.
authen_ser Type of the service requesting authentication, which varies depending on the
vice user type:
l PPP users: PPP(0x03)
l Administrators: LOGIN(0x01)
l Other users: NONE(0x00)
Field Description
The following describes the HWTACACS message exchange process shown in Figure 1-9:
NOTE
HWTACACS and TACACS+ protocols of other vendors can implement authentication, authorization,
and accounting. HWTACACS is compatible with other TACACS+ protocols because their
authentication procedures and implementations are the same.
Attribute Description
Name
autocmd Commands the system automatically execute after a user logs in.
bytes_in Traffic received by the device. K, M, and G represent KByte, MByte, and
GByte. No unit is displayed if byte is used.
Attribute Description
Name
bytes_out Traffic sent by the device. K, M, and G represent KByte, MByte, and
GByte. No unit is displayed if byte is used.
cmd Commands executed by the system shell. The maximum length is 251
characters. The complete command is encapsulated when the command is
recorded and the first keyword is encapsulated when the command is
authorized.
disc_cause Reason for disconnection. Only accounting stop packets carry this attribute.
The reasons for disconnection include:
l A user requests to go offline (1)
l Data forwarding is interrupted (2)
l Service is interrupted (3)
l Idle timeout (4)
l Session timeout (5)
l The administrator requests to go offline (7)
l The NAS is faulty (9)
l The NAS requests to go offline (10)
l The port is suspended (12)
l User information is incorrect (17)
l A host requests to go offline (18)
disc_cause_ Extended reason for disconnection. Only accounting stop packets carry this
ext attribute. The extended reasons for disconnection include:
l Unknown reason (1022)
l The EXEC terminal tears down the connection (1020)
l An online Telnet user forcibly disconnects this user (1022)
l The user cannot be switched to the SLIP/PPP client due to no remote IP
address (1023)
l PPP PAP authentication fails (1042)
l PPP receives a Terminate packet from the remote end (1045)
l The upper-layer device requests the device to tear down the PPP
connection (1046)
l PPP handshake fails (1063)
l Session times out (1100)
Attribute Description
Name
gw- Tunnel password. The value is a string of 1 to 248 characters. If the value
password contains more than 248 characters, only the first 248 characters are valid.
idletime Idle session timeout period. If a user does not perform any operation within
this period, the system disconnects the user.
l2tp-hello- Interval for sending L2TP Hello packets. The device does not support this
interval attribute.
l2tp-hidden- The attribute value pair (AVP) of L2TP. The device does not support this
avp attribute.
l2tp- If no session exists within this period, the L2TP tunnel is torn down. The
nosession- device does not support this attribute.
timeout
l2tp-group- L2TP group number. Other L2TP attributes take effect only if this attribute
num is delivered. Otherwise, other L2TP attributes are ignored.
l2tp-tos- TOS of L2TP. The device does not support this attribute.
reflect
nohangup Indicates whether the device automatically disconnects a user. This attribute
is valid only after the autocmd attribute is configured. It decides whether to
disconnect a user who has executed the autocmd command. The value can
be true or false:
l true: does not disconnect the user
l false: disconnects the user
Attribute Description
Name
protocol Protocol type. It belongs to service type, and is only valid for PPP and
connection services. The device supports four protocol types: pad, telnet, ip,
and vpdn. The protocol used depends on the service type:
l When the service type is connection, the protocol type can be pad or
telnet.
l When the service type is ppp, the protocol type can be ip or vpdn.
l For other service types, this attribute is not used.
task_id Task ID. The task IDs recorded when a task starts and ends must be the
same.
tunnel-id Local user name of the tunnel. The value is a string of 1 to 29 characters. If
the value contains more than 29 characters, only the first 29 characters are
valid.
tunnel-type Tunnel type. The device only supports the L2TP tunnel. The value of
tunnel-type is 3.
l EXEC authorization packets: Used by the HWTACACS server to control rights of the
management users logging in through Telnet, console port, SSH, and FTP.
l Command line authorization packets: Used by the device to authorize each command
line executed by the user. Only authorized command lines can be executed.
l Access user authorization packets: Used by the HWTACACS server to control the rights
of NAC users such as 802.1X and Portal users.
Just as with HWTACACS authorization packets, there are two types of HWTACACS
accounting packets: Accounting Request packets and Accounting Response packets.
HWTACACS accounting packets can also be classified into network accounting packets,
connection accounting packets, EXEC accounting packets, system accounting packets, and
command accounting packets, depending on the connection type. Different accounting
packets carry different attributes. For details, see Table 1-12. The following describes the use
of HWTACACS accounting packets for different connection types:
l Network accounting packets: Used when networks are accessed by PPP users. For
example, when a PPP user connects to a network, the server sends an accounting start
packet; when the user is using network services, the server periodically sends interim
accounting packets; when the user goes offline, the server sends an accounting stop
packet.
l Connection accounting packets: Used when users log in to the server through Telnet or
FTP clients. When a user connects to the device, the user can run commands to access a
remote server and obtain files from the server. The device sends an accounting start
packet when the user connects to the remote server and an accounting stop packet when
the user disconnects from the remote server.
l EXEC accounting packets: Used when users log in to the device through Telnet or FTP.
When a user connects to a network, the server sends an accounting start packet; when the
user is using network services, the server periodically sends interim accounting packets;
when the user goes offline, the server sends an accounting stop packet.
l System accounting packets: Used during fault diagnosis. The server records the system-
level events to help administrators monitor the device and locate network faults.
l Command accounting packets: When an administrator runs any command on the device,
the device sends the command to the HWTACACS server through a command
accounting stop packet so that the server can record the operations performed by the
administrator.
NOTE
acl N Y N
addr N N Y
addr-pool N N Y
autocmd N Y N
callback-line N Y Y
cmd Y N N
cmd-arg Y N N
dnaverage N N Y
dnpeak N N Y
dns-servers N N Y
ftpdir N Y N
gw-password N N Y
idletime N Y N
ip-addresses N N Y
l2tp-group-num N N Y
l2tp-tunnel-authen N N Y
nocallback-verify N Y N
nohangup N Y N
priv-lvl N Y N
source-ip N N Y
tunnel-type N N Y
tunnel-id N N Y
upaverage N N Y
addr Y Y Y Y Y N N N N N
bytes_in N Y Y N Y N Y Y N N
bytes_out N Y Y N Y N Y Y N N
cmd N N N Y Y N N N N Y
disc_caus N Y N N N N Y Y N N
e
Attribute Net Net Net Con Con EXE EXE EXE Syst Com
wor wor wor necti necti C C C em man
k k k on on Acco Acco Inter Acco d
Acco Acco Inter Acco Acco unti unti im unti Line
unti unti im unti unti ng ng Acco ng Acco
ng ng Acco ng ng Start Stop unti Stop unti
Start Stop unti Start Stop Pack Pack ng Pack ng
Pack Pack ng Pack Pack et et Pack et Stop
et et Pack et et et Pack
et et
disc_caus N Y N N N N Y Y N N
e_ext
elapsed_ti N Y Y N Y N Y Y Y N
me
paks_in N Y Y N Y N Y Y N N
paks_out N Y Y N Y N Y Y N N
priv-lvl N N N N N N N N N Y
protocol Y Y Y Y Y N N N N N
service Y Y Y Y Y Y Y Y Y Y
task_id Y Y Y Y Y Y Y Y Y Y
timezone Y Y Y Y Y Y Y Y Y Y
tunnel-id N N N N N N N N N N
tunnel- Y N N N N N N N N N
type
NOTE
If non-authentication is configured using the authentication-mode command, users can pass the
authentication using any user name or password. To protect the device and improve network security,
you are advised to enable authentication to allow only authenticated users to access the device or
network.
Procedure
l Configure an authentication scheme.
a. Run system-view
The system view is displayed.
b. Run aaa
The AAA view is displayed.
c. Run authentication-scheme scheme-name
An authentication scheme is created and the authentication scheme view is
displayed, or the view of an existing authentication scheme is displayed.
By default, two authentication schemes named default and radius are available on
the device. These two authentication schemes can be modified but not deleted.
d. Run authentication-mode hwtacacs
The HWTACACS authentication mode is specified.
By default, local authentication is used. The names of local users are case-
insensitive.
To use local authentication as the backup, run the authentication-mode hwtacacs
[ local | local-case ] command.
e. (Optional) Run authentication-super { hwtacacs | radius | super } *[ none ]
The authentication mode for upgrading user levels is specified.
The default mode is super (local authentication).
f. Run quit
The AAA view is displayed.
g. (Optional) Configure the account locking function.
i. Run remote-aaa-user authen-fail retry-interval retry-interval retry-time
retry-time block-time block-time
The remote AAA authentication account locking function is enabled, and the
authentication retry interval, maximum number of consecutive authentication
failures, and account locking period are configured.
By default, the remote AAA account locking function is enabled, the
authentication retry interval is 50 minutes, the maximum number of
consecutive authentication failures is 30, and the account locking period is 5
minutes.
ii. Run aaa-quiet administrator except-list { ipv4-address | ipv6-address }
&<1-32>
A user is configured to access the network using a specified IP address if the
user account is locked.
By default, a user cannot access the network if the user account is locked.
You can run the display aaa-quiet administrator except-list command to
query the specified IP addresses.
iii. Run remote-user authen-fail unblock { all | username username }
A remote AAA authentication account that has failed authentication is
unlocked.
h. (Optional) Run security-name enable
The security string function is enabled.
By default, the security string function is enabled.
i. (Optional) Run security-name-delimiter delimiter
A security string delimiter is set.
The default security string delimiter is * (asterisk).
j. (Optional) Run domainname-parse-direction { left-to-right | right-to-left }
The direction in which the user name and domain name are parsed is specified.
By default, a domain name is parsed from left to right.
k. Run quit
The system view is displayed.
l. (Optional) Run aaa-authen-bypass enable time time-value
The bypass authentication duration is set.
By default, the bypass authentication function is disabled.
l Configure an authorization scheme.
a. Run system-view
The system view is displayed.
b. Run aaa
The AAA view is displayed.
c. Run authorization-scheme authorization-scheme-name
An authorization scheme is created and the authorization scheme view is displayed,
or the view of an existing authorization scheme is displayed.
By default, an authorization scheme named default is available on the device. The
default authorization scheme can be modified but not deleted.
d. Run authorization-mode hwtacacs [ local | local-case ] [ none ]
The authorization mode is specified.
By default, local authorization is used. The names of local users are case-
insensitive.
If HWTACACS authorization is configured, you must configure an HWTACACS
server template and apply the template to the corresponding user domain.
e. (Optional) Run authorization-cmd privilege-level hwtacacs [ local ] [ none ]
Command-line authorization is enabled for users at a certain level.
By default, command-line authorization is disabled for users at a certain level.
If command-line authorization is enabled, you must configure an HWTACACS
server template and apply the template to the corresponding user domain.
f. Run quit
The AAA view is displayed.
g. Run quit
The system view is displayed.
h. (Optional) Run aaa-author-bypass enable time time-value
The bypass authorization duration is set.
By default, the bypass authorization is disabled.
i. (Optional) Run aaa-author-cmd-bypass enable time time-value
The bypass command-line authorization duration is set.
By default, the bypass command-line authorization is disabled.
l Configure an accounting scheme.
a. Run system-view
The system view is displayed.
b. Run aaa
The AAA view is displayed.
c. Run accounting-scheme accounting-scheme-name
An accounting scheme is created and the accounting scheme view is displayed, or
the view of an existing accounting scheme is displayed.
By default, the accounting scheme named default is available on the device. The
default accounting scheme can be modified but not deleted.
d. Run accounting-mode hwtacacs
The hwtacacs accounting mode is specified.
The default accounting mode is none.
e. (Optional) Run accounting start-fail { offline | online }
A policy for accounting-start failures is configured.
By default, users cannot go online if accounting-start fails.
f. (Optional) Run accounting realtime interval
Real-time accounting is enabled and the accounting interval is set.
By default, real-time accounting is disabled. The device performs accounting for
users based on their online duration.
g. (Optional) Run accounting interim-fail [ max-times times ] { offline | online }
The maximum number of real-time accounting failures is set, and a policy is
specified for the device if the maximum number of real-time accounting attempts
fail.
The default maximum number of real-time accounting failures is 3. The device will
keep the users online if three real-time accounting attempts fail.
----End
The HWTACACS server template settings such as the HWTACACS user name format and
shared key must be the same as those on the HWTACACS server.
Procedure
Step 1 Run system-view
HWTACACS is enabled.
An HWTACACS server template is created and the HWTACACS server template view is
displayed.
Step 5 Set parameters for interconnection between the device and an HWTACACS server.
Procedure Command Description
Set the shared key hwtacacs-server shared-key By default, no shared key is set for
for the cipher key-string an HWTACACS server.
HWTACACS
server.
(Optional) l Configure the user name to By default, the device does not
Configure the contain the domain name: change the user name entered by
format of the user hwtacacs-server user-name the user when sending packets to
name in the domain-included the HWTACACS server.
packet sent by the l Configure the original user
device to the name: hwtacacs-server
HWTACACS user-name original
server.
l Configure the user name not
to contain the domain name:
undo hwtacacs-server user-
name domain-included
(Optional) Set the hwtacacs-server source-ip By default, the device uses the IP
source IP address { ip-address | source-loopback address of the actual outbound
for interface- number } interface as the source IP address
communication encapsulated in HWTACACS
between the packets.
device and
HWTACACS
server.
Step 6 (Optional) Set the response timeout interval and activation interval for the HWTACACS
server.
Set the hwtacacs-server timer response- The default response timeout interval
response timeout interval for an HWTACACS server is 5
timeout seconds.
interval for If the device does not receive a
the response packet from an HWTACACS
HWTACA server within the response timeout
CS server. interval, it considers that the
HWTACACS server is unreachable
and then tries other authentication and
authorization methods.
Set the hwtacacs-server timer quiet The default interval for the primary
interval for interval HWTACACS server to restore to the
the primary active state is 5 minutes.
HWTACA
CS server
to restore
to the
active state.
NOTE
To ensure device security, you are advised to frequently change the password.
----End
NOTE
When the device is switched to the NAC common mode, only the administrator level, number of users
who can access the network using the same user name, and redirection ACL can be configured in the
service scheme.
Procedure
Step 1 Run system-view
The user is configured as the administrator and the administrator level for login is specified.
The value range of level is from 0 to 15. By default, the user level is not specified.
NOTE
Ensure that the IP address pool has been configured before running this command.
NOTE
You can only run the idle-cut command in the service scheme view to enable the idle-cut function for
common users (wireless users). If you need to perform idle-cut for administrators, run the local-user
idle-timeout command in the AAA view during the local authentication, and use RADIUS attribute 28
(Idle-Timeout) during the RADIUS authentication.
NOTE
Only users who are successfully authenticated support the configurations for limiting the number of
access users based on the same user name, and pre-connection users do not support such configurations.
NOTE
Before running this command, ensure that an ACL has been created using the acl or acl name command
and ACL rules have been configured using the rule command.
The priorities of the following access policies are in descending order:
ACL number delivered by the RADIUS server > ACL number configured on the local device > ACL
rule delivered by the RADIUS server through the attribute HW-Data-Filter numbered 26-82 > User
group delivered by the RADIUS server > User group configured on the local device > UCL group
delivered by the RADIUS server > UCL group configured on the local device
The RADIUS server delivers the ACL number, user group, and UCL group through the standard
attribute Filter-Id numbered 11.
l Run ucl-group { group-index | name group-name }
A UCL group is bound to the service scheme.
By default, no UCL group is bound to a service scheme.
Before running this command, ensure that a UCL group that identifies the user category
has been created and configured.
l Run user-vlan vlan-id
A user VLAN is configured in the service scheme.
By default, no user VLAN is configured in a service scheme.
Before running this command, ensure that a VLAN has been created using the vlan
command.
l Run voice-vlan
The voice VLAN function is enabled in the service scheme.
By default, the voice VLAN function is disabled in a service scheme.
To make this configuration take effect, ensure that a VLAN has been specified as the
voice VLAN using the link command and the voice VLAN function has been enabled on
the interface.
l Run qos-profile profile-name
A QoS profile is bound to the service scheme.
By default, no QoS profile is bound to a service scheme.
Before running this command, ensure that a QoS profile has been configured. The
procedure for configuring a QoS profile is as follows:
NOTE
Among all parameters in the QoS profile bound to the service scheme, only the parameters configured
using the following commands take effect.
l Run car cir cir-value [ pir pir-value ] [ cbs cbs-value pbs pbs-value ] { inbound |
outbound }
Traffic policing is configured in the QoS profile.
By default, traffic policing is not configured in a QoS profile.
l Run remark dscp dscp-value { inbound | outbound }
The action of re-marking DSCP priorities of IP packets is configured in the QoS profile.
By default, the action of re-marking DSCP priorities of IP packets is not configured in a
QoS profile.
l Run remark 8021p 8021p-value
The action of re-marking 802.1p priorities of VLAN packets is configured in the QoS
profile.
By default, the action of re-marking 802.1p priorities of VLAN packets is not configured
in a QoS profile.
l Run user-queue pir pir-value [ flow-queue-profile flow-queue-profile-name ] [ flow-
mapping-profile flow-mapping-profile-name ]
A user queue is created in the QoS profile to implement HQoS scheduling.
By default, no user queue is configured in a QoS profile.
----End
Procedure
Step 1 Run system-view
A domain is created and the domain view is displayed, or the view of an existing domain is
displayed.
NOTE
l If a user enters a user name that does not contain a domain name, the user is authenticated in the
default domain. In this case, you need to run the domain domain-name [ admin ] command and set
domain-name to configure a global default domain on the device.
l If a user enters a user name that contains a domain name during authentication, the user must enter
the correct value of domain-name.
Step 5 Apply a service scheme and an HWTACACS server template to the domain.
Procedure Command Description
Specify the state { active | block [ time-range When a domain is in the blocking
domain time-name &<1–4> ] } state, users in this domain cannot log
state. in. By default, a created domain is in
the active state.
Step 9 (Optional) Specify a permitted domain for wireless users. (This step applies only to wireless
users.)
Procedure Command Description
Return to quit -
the system
view.
----End