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

HWTACACS Configuration Guide

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 Configuration Guide

HWTACACS Configuration Guide

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-1 lists the differences between HWTACACS and RADIUS.

Table 1-1 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 Format, HWTACACS Authorization Packet Format, and HWTACACS Accounting Packet Format) 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-1.

Figure 1-1 HWTACACS packet header

Table 1-2 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-2 HWTACACS Authentication Start packet format

Table 1-3 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-3 HWTACACS Authentication Continue packet format

Table 1-4 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-4 HWTACACS Authentication Reply packet format

Table 1-5 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-5 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-6 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.

HWTACACS Authentication Reply packets.

Figure 1-6 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-7 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:

  • Accounting Request: Contains authorization information.
  • Accounting Response: After receiving and recording an Accounting Request packet, the server returns this packet.

HWTACACS Accounting Request packets.

Figure 1-7 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-8 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-8 HWTACACS Accounting Response packet format

Table 1-9 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-9 shows the message exchange process.

Figure 1-9 HWTACACS message interaction

The following describes the HWTACACS message exchange process shown in Figure 1-9:

  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-10 describes the HWTACACS attributes supported by the device. The device can only parse the attributes included in the table.

Table 1-10 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-11. 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-12. 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-11 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-12 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

Using HWTACACS to Perform Authentication, Authorization, and Accounting

HWTACACS Authentication, Authorization, and Accounting

Similar to RADIUS, HWTACACS uses the client/server model to implement AAA for access users by communicating with the HWTACACS server.

HWTACACS protects a network from unauthorized access and supports command-line authorization. HWTACACS is more reliable in transmission and encryption than RADIUS, and is more suitable for security control.

Configuring an HWTACACS Server

If HWTACACS authentication and authorization are used, users' authentication, authorization, and accounting information needs to be configured on the HWTACACS server.

If a user wants to establish a connection with the access device through a network to obtain rights to access other networks and network resources, the access device transparently transmits the user's authentication, authorization, and accounting information to the HWTACACS server. The HWTACACS server determines whether the user can pass authentication based on the configured information. If the user passes the authentication, the RADIUS server sends an Access-Accept packet containing the user's authorization information to the access device. The access device then allows the user to access the network and grants rights to the user based on information in the Access-Accept packet.

Configuring AAA Schemes

Context

To use HWTACACS authentication, authorization, and accounting, set the authentication mode in the authentication scheme, authorization mode in the authorization scheme, and accounting mode in the accounting scheme to HWTACACS.

When configuring HWTACACS authentication, you can configure local authentication or non-authentication as the backup. This allows local authentication to be implemented if HWTACACS authentication fails. When configuring HWTACACS authorization, you can configure local authorization or non-authorization as the backup.

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

  • Configure an authentication scheme.
    1. Run system-view

      The system view is displayed.

    2. Run aaa

      The AAA view is displayed.

    3. 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.

    4. 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.

    5. (Optional) Run authentication-super { hwtacacs | radius | super } *[ none ]

      The authentication mode for upgrading user levels is specified.

      The default mode is super (local authentication).

    6. Run quit

      The AAA view is displayed.

    7. (Optional) Configure the account locking function.
      1. 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.

      2. 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.

      3. Run remote-user authen-fail unblock { all | username username }

        A remote AAA authentication account that has failed authentication is unlocked.

    8. (Optional) Run security-name enable

      The security string function is enabled.

      By default, the security string function is enabled.

    9. (Optional) Run security-name-delimiter delimiter

      A security string delimiter is set.

      The default security string delimiter is * (asterisk).

    10. (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.

    11. Run quit

      The system view is displayed.

    12. (Optional) Run aaa-authen-bypass enable time time-value

      The bypass authentication duration is set.

      By default, the bypass authentication function is disabled.

  • Configure an authorization scheme.
    1. Run system-view

      The system view is displayed.

    2. Run aaa

      The AAA view is displayed.

    3. 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.

    4. 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.

    5. (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.

    6. Run quit

      The AAA view is displayed.

    7. Run quit

      The system view is displayed.

    8. (Optional) Run aaa-author-bypass enable time time-value

      The bypass authorization duration is set.

      By default, the bypass authorization is disabled.

    9. (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.

  • Configure an accounting scheme.
    1. Run system-view

      The system view is displayed.

    2. Run aaa

      The AAA view is displayed.

    3. 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.

    4. Run accounting-mode hwtacacs

      The hwtacacs accounting mode is specified.

      The default accounting mode is none.

    5. (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.

    6. (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.

    7. (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

Configuring an HWTACACS Server Template

Context

When configuring an HWTACACS server template, you must specify the IP address, port number, and shared key of a specified HWTACACS server. Other settings, such as the HWTACACS user name format and traffic unit, have default values and can be modified based on network requirements.

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

  1. Run system-view

    The system view is displayed.

  2. Run hwtacacs enable

    HWTACACS is enabled.

    By default, HWTACACS is enabled.

  3. Run hwtacacs-server template template-name

    An HWTACACS server template is created and the HWTACACS server template view is displayed.

    By default, no HWTACACS server template is configured on the device.

  4. Configure HWTACACS authentication, authorization, and accounting servers.

    Configuration

    Command

    Description

    Configure an HWTACACS authentication server.

    hwtacacs-server authentication ip-address [ port ] [ public-net | vpn-instance vpn-instance-name ] [ secondary | third ]

    By default, no HWTACACS authentication server is configured.

    Configure an HWTACACS authorization server.

    hwtacacs-server authorization ip-address [ port ] [ public-net | vpn-instance vpn-instance-name ] [ secondary | third ]

    By default, no HWTACACS authorization server is configured.

    Configure an HWTACACS accounting server.

    hwtacacs-server accounting ip-address [ port ] [ public-net | vpn-instance vpn-instance-name ] [ secondary | third ]

    By default, no HWTACACS accounting server is configured.

  5. Set parameters for interconnection between the device and an HWTACACS server.

    Procedure

    Command

    Description

    Set the shared key for the HWTACACS server.

    hwtacacs-server shared-key cipher key-string

    By default, no shared key is set for an HWTACACS server.

    (Optional) Configure the format of the user name in the packet sent by the device to the HWTACACS server.

    • Configure the user name to contain the domain name: hwtacacs-server user-name domain-included
    • Configure the original user name: hwtacacs-server user-name original
    • Configure the user name not to contain the domain name: undo hwtacacs-server user-name domain-included

    By default, the device does not change the user name entered by the user when sending packets to the HWTACACS server.

    (Optional) Set the HWTACACS traffic unit.

    hwtacacs-server traffic-unit { byte | kbyte | mbyte | gbyte }

    The default HWTACACS traffic unit on the device is bytes.

    (Optional) Set the source IP address for communication between the device and HWTACACS server.

    hwtacacs-server source-ip { ip-address | source-loopback interface- number }

    By default, the device uses the IP address of the actual outbound interface as the source IP address encapsulated in HWTACACS packets.

  6. (Optional) Set the response timeout interval and activation interval for the HWTACACS server.

    Procedure

    Command

    Description

    Set the response timeout interval for the HWTACACS server.

    hwtacacs-server timer response-timeout interval

    The default response timeout interval for an HWTACACS server is 5 seconds.

    If the device does not receive a response packet from an HWTACACS server within the response timeout interval, it considers that the HWTACACS server is unreachable and then tries other authentication and authorization methods.

    Set the interval for the primary HWTACACS server to restore to the active state.

    hwtacacs-server timer quiet interval

    The default interval for the primary HWTACACS server to restore to the active state is 5 minutes.

  7. Run quit

    The system view is displayed.

  8. (Optional) Run hwtacacs-server accounting-stop-packet resend { disable | enable number }

    Retransmission of accounting-stop packets is enabled and the number of packets that can be retransmitted each time is specified.

    By default, retransmission of accounting-stop packets is enabled, and 100 account-stop packets can be retransmitted each time.

  9. Run return

    The user view is displayed.

  10. (Optional) Run hwtacacs-user change-password hwtacacs-server template-name

    The password saved on the HWTACACS server is changed.

    NOTE:

    To ensure device security, you are advised to frequently change the password.

(Optional) Configuring a Service Scheme

Context

Users must obtain authorization information before going online. You can configure a service scheme to manage authorization information about users.

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

  1. Run system-view

    The system view is displayed.

  2. Run aaa

    The AAA view is displayed.

  3. Run service-scheme service-scheme-name

    A service scheme is created and the service scheme view is displayed.

    By default, no service scheme is configured on the device.

  4. Run admin-user privilege level level

    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.

  5. Configure server information.

    Step

    Command

    Remarks

    Configure a DHCP server group.

    dhcp-server group group-name

    By default, no DHCP server group is configured in a service scheme.

    Configure the IP address of the primary DNS server.

    dns ip-address

    By default, no primary DNS server is configured in a service scheme.

    Configure the IP address of the secondary DNS server.

    dns ip-address secondary

    By default, no secondary DNS server is configured in a service scheme.

    Configure the primary WINS server.

    wins ip-address

    By default, no primary WINS server is configured in a service scheme.

    Configure the secondary WINS server.

    wins ip-address secondary

    By default, no secondary WINS server is configured in a service scheme.

  6. Run ip-pool pool-name [ move-to new-position ]

    An IP address pool is bound to the service scheme or an existing IP address pool is moved.

    By default, no IP address pool is bound to a service scheme.

    NOTE:

    Ensure that the IP address pool has been configured before running this command.

  7. Run policy-route next-hop-ip-address [ vlan-id ]

    Policy-based routing (PBR) is configured in the service scheme.

    By default, PBR is not configured in a service scheme.

  8. Run redirect-acl { acl-number | name acl-name }

    The ACL used for redirection is configured in the service scheme.

    By default, no ACL used for redirection is configured in a service scheme.

  9. Run idle-cut idle-time flow-value [ inbound | outbound ]

    The idle-cut function is enabled for domain users and the idle-cut parameters are set.

    By default, the idle-cut function is disabled for domain users.

    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.

  10. Run access-limit user-name max-num number

    The maximum number of users who are allowed to access the network using the same user name is configured.

    By default, the number of users who are allowed to access the network using the same user name is not limited, and is determined by the maximum number of access users supported by the device.

    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.

  11. Run priority priority-value

    The user priority is configured in the service scheme.

    By default, the user priority is 0.

    NOTE:

    This function takes effect only for wireless users.

  12. Configure network access control parameters in the service scheme.

    • Run acl-id acl-number

      An ACL is bound to the service scheme.

      By default, no ACL is bound to a service scheme.

    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.

    • 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.

    • 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.

    • 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.

    • 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.

    1. In the system view, run qos-profile name profile-name

      A QoS profile is created and the QoS profile view is displayed.

    2. Configure traffic policing and packet processing priority in the QoS profile view.
    • 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.

    • 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.

    • 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.

    • 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.

Applying AAA Schemes to a Domain

Context

The created authentication scheme, authorization scheme, accounting scheme, and HWTACACS server template are in effect only when they are applied to a domain.

Procedure

  1. Run system-view

    The system view is displayed.

  2. Run aaa

    The AAA view is displayed.

  3. Run domain domain-name [ domain-index domain-index ]

    A domain is created and the domain view is displayed, or the view of an existing domain is displayed.

    The device has two default domains:

    • default: Used by common access users
    • default_admin: Used by administrators
    NOTE:
    • 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.
    • If a user enters a user name that contains a domain name during authentication, the user must enter the correct value of domain-name.

  4. Apply AAA schemes to the domain.

    Procedure

    Command

    Description

    Apply an authentication scheme to the domain.

    authentication-scheme scheme-name

    By default, the authentication scheme default is applied to the default_admin domain, and the authentication scheme named radius is applied to the default domain and other domains.

    Apply an authorization scheme to the domain.

    authorization-scheme authorization-scheme-name

    By default, no authorization scheme is applied to a domain.

    Apply an accounting scheme to the domain.

    accounting-scheme accounting-scheme-name

    By default, the accounting scheme default is applied to a domain. In this accounting scheme, non-accounting is used and real-time accounting is disabled.

  5. Apply a service scheme and an HWTACACS server template to the domain.

    Procedure

    Command

    Description

    (Optional) Apply a service scheme to the domain.

    service-scheme service-scheme-name

    By default, no service scheme is applied to a domain.

    Apply an HWTACACS server template to the domain.

    hwtacacs-server template-name

    By default, no HWTACACS server template is applied to a domain.

  6. (Optional) Configure other functions for the domain.

    Procedure

    Command

    Description

    Specify the domain state.

    state { active | block [ time-range time-name &<1–4> ] }

    When a domain is in the blocking state, users in this domain cannot log in. By default, a created domain is in the active state.

    Apply a user group to the domain.

    user-group group-name

    By default, no user group is applied to a domain.

  7. (Optional) Run statistic enable

    Traffic statistics collection is enabled for users in the domain.

    By default, traffic statistics collection is disabled for users in a domain.

  8. (Optional) Configure a domain name parsing scheme. (If domain name parsing is configured in both the AAA view and authentication profile view, the device preferentially uses the configuration in the authentication profile. The configuration in the authentication profile applies only to wireless users.)

    Procedure

    Command

    Description

    AAA view

    Exit from the domain view.

    quit

    -

    Specify the domain name parsing direction.

    domainname-parse-direction { left-to-right | right-to-left }

    The domain name can be parsed from left to right, or from right to left.

    By default, the domain name is parsed from left to right.

    Set the domain name delimiter.

    domain-name-delimiter delimiter

    A domain name delimiter can be any of the following: \ / : < > | @ ' %.

    The default domain name delimiter is @.

    Specify the domain name location.

    domain-location { after-delimiter | before-delimiter }

    The domain name can be placed before or after the delimiter.

    By default, the domain name is placed after the domain name delimiter.

    Set the security string delimiter.

    security-name-delimiter delimiter

    The default security string delimiter is * (asterisk).

    Authentication profile view

    Exit from the AAA view.

    quit

    -

    Create an authentication profile and enter the authentication profile view.

    authentication-profile name authentication-profile-name

    By default, the device has six built-in authentication profiles: default_authen_profile, dot1x_authen_profile, mac_authen_profile, portal_authen_profile, dot1xmac_authen_profile, and multi_authen_profile.

    Specify the domain name parsing direction.

    domainname-parse-direction { left-to-right | right-to-left }

    The domain name can be parsed from left to right, or from right to left.

    By default, the domain name parsing direction is not specified.

    Set the domain name delimiter.

    domain-name-delimiter delimiter

    A domain name delimiter can be any of the following: \ / : < > | @ ' %.

    By default, no domain name delimiter is set.

    Specify the domain name location.

    domain-location { after-delimiter | before-delimiter }

    The domain name can be placed before or after the delimiter.

    By default, the domain name location is not specified.

    Set the security string delimiter.

    security-name-delimiter delimiter

    By default, no security string delimiter is set.

  9. (Optional) Specify a permitted domain for wireless users. (This step applies only to wireless users.)

    Procedure

    Command

    Description

    Return to the system view.

    quit

    -

    Create an authentication profile and enter the authentication profile view.

    authentication-profile name authentication-profile-name

    By default, the device has six built-in authentication profiles: default_authen_profile, dot1x_authen_profile, mac_authen_profile, portal_authen_profile, dot1xmac_authen_profile, and multi_authen_profile.

    Specify a permitted domain for wireless users.

    permit-domain name domain-name &<1-4>

    By default, no permitted domain is specified for wireless users.

    After a permitted domain is specified in an authentication profile, only users in the permitted domain can be subject to authentication, authorization, and accounting.

Verifying the HWTACACS AAA Configuration

Procedure

  • Run the display aaa configuration command to check the AAA summary.
  • Run the display authentication-scheme [ authentication-scheme-name ] command to verify the authentication scheme configuration.
  • Run the display authorization-scheme [ authorization-scheme-name ] command to verify the authorization scheme configuration.
  • Run the display accounting-scheme [ accounting-scheme-name ] command to verify the accounting scheme configuration.
  • Run the display recording-scheme [ recording-scheme-name ] command to verify the recording scheme configuration.
  • Run the display service-scheme [ name name ] command to verify the service scheme configuration.
  • Run the display hwtacacs-server template [ template-name ] command to verify the HWTACACS server template configuration.
  • Run the display hwtacacs-server template template-name verbose command to check statistics about HWTACACS authentication, accounting, and authorization.
  • Run the display hwtacacs-server accounting-stop-packet { all | number | ip ip-address } command to verify information about accounting-stop packets of the HWTACACS server.
  • Run the display domain [ name domain-name ] command to verify the domain configuration.
  • Run the display aaa statistics access-type-authenreq command to display the number of authentication requests.
  • Run the display access-user user-name-table statistics { all | username username } command to check statistics on users who are allowed to access the network using the user name.
Download
Updated: 2019-07-03

Document ID: EDOC1100092137

Views: 1435

Downloads: 109

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next