No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search

Reminder

To have a better experience, please upgrade your IE browser.

upgrade

CLI-based Configuration Guide - Security

AR500, AR510, AR531, AR550, AR1500, and AR2500 V200R010

This document provides the basic concepts, configuration procedures, and configuration examples in different application scenarios of the network management feature supported by the device.
Rate and give feedback :
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
HWTACACS AAA

HWTACACS AAA

Overview of HWTACACS

HWTACACS is a protocol that serves as an enhancement to TACACS (RFC 1492).

HWTACACS is used to perform authentication, authorization, and accounting for users accessing the Internet through Point-to-Point Protocol (PPP) or Virtual Private Dial-up Network (VPDN) and management users.

Both HWTACACS and RADIUS protocols can implement authentication, authorization, and accounting. They are similar in that they both have the following characteristics:
  • Client/Server model
  • Share key used for encrypting user information
  • Good flexibility and extensibility

HWTACACS is more reliable in transmission and encryption than RADIUS, and is more suitable for security control. Table 1-17 lists the differences between HWTACACS and RADIUS.

Table 1-17  Comparisons between HWTACACS and RADIUS

Item

HWTACACS

RADIUS

Data transmission

Uses TCP, which is more reliable.

Uses UDP, which is more efficient.

Encryption

Encrypts the entire packet, except the standard HWTACACS header.

Encrypts only the password field in the packet.

Authentication and authorization

Separates authentication from authorization so that they can be implemented on different security servers.

Combines authentication and authorization.

Command line authorization

Supported. The command line use is restricted by both the command level and AAA. When a user enters a command, the command is executed only after being authorized by the HWTACACS server.

Not supported. The commands that a user can use depend on their user level. A user can only use the commands of the same level as or lower level than their user level.

Application

Security control.

Accounting.

HWTACACS Packets

Unlike RADIUS packets, which all use the same format, HWTACACS packets (including HWTACACS Authentication Packet, HWTACACS Authorization Packet, and HWTACACS Accounting Packet) use different formats. Despite this, HWTACACS packets all share the same HWTACACS Packet Header.

HWTACACS Packet Header

The length of the HWTACACS packet header is 12 bytes, as shown in Figure 1-15.

Figure 1-15  HWTACACS packet header
Table 1-18  Fields in HWTACACS packet header
Field Description
major version Major version of the HWTACACS protocol. The current version is 0xc.
minor version Minor version of the HWTACACS protocol. The current version is 0x0.
type HWTACACS protocol packet type, including authentication (0x01), authorization (0x02), and accounting (0x03).
seq_no Packet sequence number in a session, ranging from 1 to 254.
flags Encryption flag on the packet body. This field contains 8 bits, of which only the first bit has a valid value. The value 0 indicates that the packet body is encrypted, and the value 1 indicates that the packet body is not encrypted.
session_id Session ID, which is the unique identifier of a session.
length Length of the HWTACACS packet body, excluding the packet header.
HWTACACS Authentication Packet Format
There are three types of HWTACACS authentication packets:
  • Authentication Start: When an authentication starts, the client sends this packet carrying the authentication type, user name, and authentication data to the server.
  • Authentication Continue: When receiving the Authentication Reply packet from the server, the client returns this packet if the authentication process has not ended.
  • Authentication Reply: When the server receives the Authentication Start or Authentication Continue packet from the client, the server sends this packet to the client to notify the client of the current authentication status.

HWTACACS Authentication Start packets.

Figure 1-16  HWTACACS Authentication Start packet format
Table 1-19  Fields in HWTACACS Authentication Start packet
Field Description
action Authentication action. Only the login authentication (0x01) action is supported.
priv_lvl User privilege level.
authen_type Authentication type, including:
  • CHAP(0x03)
  • PAP(0x02)
  • ASCII(0x01)
service

Type of the service requesting authentication, which varies depending on the user type:

  • PPP users: PPP(0x03)
  • Administrators: LOGIN(0x01)
  • Other users: NONE(0x00)
user len Length of the user name entered by a login user.
port len Length of the port field.
rem_addr len rem_addr field length.
data len Authentication data length.
user Name of the user requesting authentication. The maximum length is 129.
port

Name of the user interface requesting authentication. The maximum length is 47.

  • 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.
  • For other users, this field indicates the user access interface.
rem_addr IP address of the login user.
data Authentication data. Different data is encapsulated depending on the values of action and authen_type. For example, when PAP authentication is used, the value of this field is PAP plain-text password.

HWTACACS Authentication Continue packets.

Figure 1-17  HWTACACS Authentication Continue packet format
Table 1-20  Fields in HWTACACS Authentication Continue packet
Field Description
user_msg len Length of the character string entered by a login user.
data len Authentication data length.
flags Authentication continue flag.
  • 0: The authentication continues.
  • 1: The authentication has ended.
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.
data Authentication data. Different data is encapsulated depending on the values of action and authen_type. For example, when PAP authentication is used, the value of this field is PAP plain-text password.

HWTACACS Authentication Reply packets.

Figure 1-18  HWTACACS Authentication Reply packet format
Table 1-21  Fields in HWTACACS Authentication Reply packet
Field Description
status

Authentication status, including:

  • PASS (0x01): Authentication is successful.
  • FAIL (0x02): Authentication fails.
  • GETDATA (0x03): Request user information.
  • GETUSER (0x04): Request user name.
  • GETPASS (0x05): Request password.
  • RESTART (0x06): Request reauthentication.
  • ERROR (0x07): The authentication packets received by the server have errors.
  • FOLLOW (0x21): The server requests reauthentication.
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 len Length of the server_msg field.
data len Authentication data length.
server_msg Optional field. This field is sent by the server to the user to provide additional information.
data Authentication data, providing information to client.
HWTACACS Authorization Packet Format
There are two types of HWTACACS authorization packets:
  • Authorization Request: HWTACACS separates authentication from authorization. Therefore, a user can be authenticated by HWTACACS, and authorized using another protocol. If a user is authorized by HWTACACS, the client sends an Authorization Request packet carrying authorization information to the server.
  • Authorization Response: After receiving the Authorization Request packet, the server sends this packet carrying the authorization result to the client.

HWTACACS Authorization Request packets.

Figure 1-19  HWTACACS Authorization Request packet format
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.

Table 1-22  Fields in HWTACACS Authorization Request packet
Field Description
authen_method

Authentication method, including:

  • No authentication method configured (0x00)
  • None authentication (0x01)
  • Local authentication (0x05)
  • HWTACACS authentication (0x06)
  • RADIUS authentication (0x10)
authen_service Type of the service requesting authentication, which varies depending on the user type:
  • PPP users: PPP(0x03)
  • Administrators: LOGIN(0x01)
  • Other users: NONE(0x00)
arg_cnt Number of attributes carried in the Authorization Request packet.
argN Attribute of the Authorization Request packet. The value can be:
  • cmd: Indicates the first keyword of the command line to be authorized.
  • cmd-arg: Indicates the parameter in the command line to be authorized. The cmd-arg=<cr> is added at the end of the command line.

HWTACACS Authentication Reply packets.

Figure 1-20  HWTACACS Authorization Response packet format
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.

Table 1-23  Fields in HWTACACS Authorization Response packet
Field Description
status

Authorization status, including:

  • Authorization is successful (0x01)
  • The attributes in Authorization Request packets are modified by the TACACS server (0x02)
  • Authorization fails (0x10)
  • An error occurs on the authorization server (0x11)
  • An authorization server is respecified (0x21)
arg_cnt

Number of attributes carried in the Authorization Response packet.

argN Authorization attribute delivered by the HWTACACS authorization server.
HWTACACS Accounting Packet Format
There are two types of HWTACACS accounting packets:

HWTACACS Accounting Request packets.

Figure 1-21  HWTACACS Accounting Request packet format
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.

Table 1-24  Fields in HWTACACS Accounting Request packet
Field Description
flags Accounting type:
  • Start accounting (0x02)
  • Stop accounting (0x04)
  • Interim accounting (0x08)
authen_service Type of the service requesting authentication, which varies depending on the user type:
  • PPP users: PPP(0x03)
  • Administrators: LOGIN(0x01)
  • Other users: NONE(0x00)
arg_cnt Number of attributes carried in the Accounting Request packet.
argN Attribute of the Accounting Request packet.

HWTACACS Accounting Response packets.

Figure 1-22  HWTACACS Accounting Response packet format
Table 1-25  Fields in HWTACACS Accounting Response packet
Field Description
server_msg len Length of the server_msg field.
data len Length of the data field.
status Accounting status:
  • Accounting is successful (0x01)
  • Accounting fails (0x02)
  • No response (0x03)
  • The server requests reaccounting (0x21)
server_msg Information sent by the accounting server to the client.
data Information sent by the accounting server to the administrator.

HWTACACS Authentication, Authorization, and Accounting Process

This section describes how HWTACACS performs authentication, authorization, and accounting for Telnet users. Figure 1-23 shows the message exchange process.
Figure 1-23  HWTACACS message interaction

The following describes the HWTACACS message exchange process shown in Figure 1-23:
  1. A Telnet user sends a request packet.
  2. After receiving the request packet, the HWTACACS client sends an Authentication Start packet to the HWTACACS server.
  3. The HWTACACS server sends an Authentication Response packet to request the user name.
  4. After receiving the Authentication Response packet, the HWTACACS client sends a packet to query the user name.
  5. The user enters the user name.
  6. The HWTACACS client sends an Authentication Continue packet containing the user name to the HWTACACS server.
  7. The HWTACACS server sends an Authentication Response packet to request the password.
  8. After receiving the Authentication Response packet, the HWTACACS client queries the password.
  9. The user enters the password.
  10. The HWTACACS client sends an Authentication Continue packet containing the password to the HWTACACS server.
  11. The HWTACACS server sends an Authentication Response packet, indicating that the user has been authenticated.
  12. The HWTACACS client sends an Authorization Request packet to the HWTACACS server.
  13. The HWTACACS server sends an Authorization Response packet, indicating that the user has been authorized.
  14. The HWTACACS client receives the Authorization Response packet and displays the login page.
  15. The HWTACACS client sends an Accounting Request (start) packet to the HWTACACS server.
  16. The HWTACACS server sends an Accounting Response packet.
  17. The user requests to go offline.
  18. The HWTACACS client sends an Accounting Request (stop) packet to the HWTACACS server.
  19. The HWTACACS server sends an Accounting Response packet.
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.

HWTACACS Attributes

In the HWTACACS authorization or accounting packets, the argN field carries the information exchanged between a server and a client in the form of HWTACACS. This section describes the HWTACACS attributes in detail.

Overview of HWTACACS Attributes

Table 1-26 describes the HWTACACS attributes supported by the device. The device can only parse the attributes included in the table.

Table 1-26  Common HWTACACS attributes

Attribute Name

Description

acl

Authorization ACL ID.

addr

User IP address.

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.

bytes_out

Traffic sent by the device. K, M, and G represent KByte, MByte, and GByte. No unit is displayed if byte is used.

callback-line

Information sent from the authentication server and to be displayed to a user, such as a mobile number.

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.

cmd-arg

Parameter in the command line to be authorized. The cmd-arg=<cr> is added at the end of the command line.

disc_cause

Reason for disconnection. Only accounting stop packets carry this attribute. The reasons for disconnection include:
  • A user requests to go offline (1)
  • Data forwarding is interrupted (2)
  • Service is interrupted (3)
  • Idle timeout (4)
  • Session timeout (5)
  • The administrator requests to go offline (7)
  • The NAS is faulty (9)
  • The NAS requests to go offline (10)
  • The port is suspended (12)
  • User information is incorrect (17)
  • A host requests to go offline (18)

disc_cause_ext

Extended reason for disconnection. Only accounting stop packets carry this attribute. The extended reasons for disconnection include:
  • Unknown reason (1022)
  • The EXEC terminal tears down the connection (1020)
  • An online Telnet user forcibly disconnects this user (1022)
  • The user cannot be switched to the SLIP/PPP client due to no remote IP address (1023)
  • PPP PAP authentication fails (1042)
  • PPP receives a Terminate packet from the remote end (1045)
  • The upper-layer device requests the device to tear down the PPP connection (1046)
  • PPP handshake fails (1063)
  • Session times out (1100)

dnaverage

Downstream average rate, in bit/s.

dnpeak

Downstream peak rate, in bit/s.

dns-servers

IP address of the primary DNS server.

elapsed_time

Online duration, in seconds.

ftpdir

Initial directory of an FTP user.

gw-password

Tunnel password. The value is a string of 1 to 248 characters. If the value 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

Interval for sending L2TP Hello packets. The device does not support this attribute.

l2tp-hidden-avp

The attribute value pair (AVP) of L2TP. The device does not support this attribute.

l2tp-nosession-timeout

If no session exists within this period, the L2TP tunnel is torn down. The device does not support this attribute.

l2tp-group-num

L2TP group number. Other L2TP attributes take effect only if this attribute is delivered. Otherwise, other L2TP attributes are ignored.

l2tp-tos-reflect

TOS of L2TP. The device does not support this attribute.

l2tp-tunnel-authen

Indicates whether the L2TP tunnel is authenticated:

  • 0: not authenticated
  • 1: authenticated

l2tp-udp-checksum

UPD packet checksum.

nocallback-verify

No authentication is required for callback.

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:

  • true: does not disconnect the user
  • false: disconnects the user

paks_in

Number of packets received by the device.

paks_out

Number of packets sent by the device.

priv-lvl

User level.

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:
  • When the service type is connection, the protocol type can be pad or telnet.
  • When the service type is ppp, the protocol type can be ip or vpdn.
  • 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.

timezone

Local time zone.

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.

service

Service type, which can be accounting or authorization.

source-ip

Local IP address of the tunnel.

upaverage

Upstream average rate, in bit/s.

uppeak

Upstream peak rate, in bit/s.

HWTACACS Attributes Available in Packets
There are two types of HWTACACS authorization packets: Authorization Request packets and Authorization Response packets. However, HWTACACS authorization packets can also be classified into EXEC authorization packets, command line authorization packets, and access user authorization packets, depending on the usage scenario. Different authorization packets carry different attributes. For details, see Table 1-27. The following describes the use of HWTACACS authorization packets for different usage scenarios:
  • EXEC authorization packets: Used by the HWTACACS server to control rights of the management users logging in through Telnet, console port, SSH, and FTP.
  • Command line authorization packets: Used by the device to authorize each command line executed by the user. Only authorized command lines can be executed.
  • 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-28. The following describes the use of HWTACACS accounting packets for different connection types:
  • 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.
  • 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.
  • 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.
  • System accounting packets: Used during fault diagnosis. The server records the system-level events to help administrators monitor the device and locate network faults.
  • 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:
  • Y: The packet supports this attribute.
  • N: The packet does not support this attribute.
Table 1-27  HWTACACS attributes available in authorization packets

Attribute

Command Line Authorization Packet

EXEC Authorization Response Packet

Access User Authorization Response Packet

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

Table 1-28  HWTACACS attributes available in accounting packets

Attribute

Network Accounting Start Packet

Network Accounting Stop Packet

Network Interim Accounting Packet

Connection Accounting Start Packet

Connection Accounting Stop Packet

EXEC Accounting Start Packet

EXEC Accounting Stop Packet

EXEC Interim Accounting Packet

System Accounting Stop Packet

Command Line Accounting Stop Packet

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_cause

N

Y

N

N

N

N

Y

Y

N

N

disc_cause_ext

N

Y

N

N

N

N

Y

Y

N

N

elapsed_time

N

Y

Y

N

Y

N

Y

Y

Y

N

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-type

Y

N

N

N

N

N

N

N

N

N

Translation
Download
Updated: 2019-05-20

Document ID: EDOC1100034236

Views: 95324

Downloads: 53

Average rating:
This Document Applies to these Products
Related Documents
Related Version
Share
Previous Next