Documente Academic
Documente Profesional
Documente Cultură
ii
AAA Configuration
When configuring AAA, go to these sections for information you are interested in:
z
Introduction to AAA
Introduction to RADIUS
Introduction to HWTACACS
Configuring AAA
Configuring RADIUS
Configuring HWTACACS
Troubleshooting AAA
Introduction to AAA
Authentication, Authorization, and Accounting (AAA) provides a uniform framework for configuring
these three security functions to implement network security management.
AAA usually uses a client/server model, where the client runs on the network access server (NAS) and
the server maintains user information centrally. In an AAA network, a NAS is a server for users but a
client for the AAA servers, as shown in Figure 1-1.
Figure 1-1 AAA networking diagram
When a user tries to establish a connection to the NAS and to obtain the rights to access other networks
or some network resources, the NAS authenticates the user or the corresponding connection. The NAS
can transparently pass the users AAA information to the server (RADIUS server or HWTACACS server).
The RADIUS/HWTACACS protocol defines how a NAS and a server exchange user information
between them.
In the AAA network shown in Figure 1-1, there is a RADIUS server and an HWTACACS server. You can
determine the authentication, authorization and accounting methods according to the actual
1-1
requirements. For example, you can use the HWTACACS server for authentication and authorization,
and the RADIUS server for accounting.
The three security functions are described as follows:
z
Authorization: Grants different users different rights. For example, a user logging into the server
can be granted the permission to access and print the files in the server.
Accounting: Records all network service usage information of users, including the service type,
start and end time, and traffic. In this way, accounting can be used for not only charging, but also
network security surveillance.
You can use AAA to provide only one or two security functions, if desired. For example, if your company
only wants employees to be authenticated before they access specific resources, you only need to
configure an authentication server. If network usage information is expected to be recorded, you also
need to configure an accounting server.
As described above, AAA provides a uniform framework to implement network security management. It
is a security mechanism that enables authenticated and authorized entities to access specific resources
and records operations of the entities. As the AAA framework thus allows for excellent scalability and
centralized user information management, it has gained wide application.
AAA can be implemented through multiple protocols. Currently, the device supports using RADIUS, and
HWTACACS for AAA, and RADIUS is often used in practice.
Introduction to RADIUS
Remote Authentication Dial-In User Service (RADIUS) is a distributed information interaction protocol in
a client/server model. RADIUS can protect networks against unauthorized access and is often used in
network environments where both high security and remote user access are required. Based on UDP,
RADIUS uses UDP port 1812 for authentication and 1813 for accounting. RADIUS defines the RADIUS
packet format and message transfer mechanism.
RADIUS was originally designed for dial-in user access. With the diversification of access methods,
RADIUS has been extended to support more access methods, for example, Ethernet access and ADSL
access. It uses authentication and authorization in providing access services and uses accounting to
collect and record usage information of network resources.
Client/Server Model
z
Client: The RADIUS client runs on the NASs located throughout the network. It passes user
information to designated RADIUS servers and acts on the responses (for example, rejects or
accepts user access requests).
Server: The RADIUS server runs on the computer or workstation at the network center and
maintains information related to user authentication and network service access. It listens to
connection requests, authenticates users, and returns the processing results (for example,
rejecting or accepting the user access request) to the clients.
In general, the RADIUS server maintains three databases, namely, Users, Clients, and Dictionary, as
shown in Figure 1-2:
1-2
Users: Stores user information such as the usernames, passwords, applied protocols, and IP
addresses.
Clients: Stores information about RADIUS clients, such as the shared keys and IP addresses.
Dictionary: Stores information about the meanings of RADIUS protocol attributes and their values.
Host
RADIUS server
1-3
The host initiates a connection request carrying the username and password to the RADIUS client.
3)
Having received the username and password, the RADIUS client sends an authentication request
(Access-Request) to the RADIUS server, with the user password encrypted by using the
Message-Digest 5 (MD5) algorithm and the shared key.
4)
The RADIUS server authenticates the username and password. If the authentication succeeds, it
sends back an Access-Accept message containing the users authorization information. If the
authentication fails, it returns an Access-Reject message.
5)
The RADIUS client permits or denies the user according to the returned authentication result. If it
permits the user, it sends a start-accounting request (Accounting-Request) to the RADIUS server.
6)
7)
8)
The host requests the RADIUS client to tear down the connection and the RADIUS client sends a
stop-accounting request (Accounting-Request) to the RADIUS server.
9)
The Code field (1-byte long) is for indicating the type of the RADIUS packet. Table 1-1 gives the
possible values and their meanings.
1-4
2)
Packet type
Description
Access-Request
Access-Accept
Access-Reject
Accounting-Request
Accounting-Response
The Identifier field (1-byte long) is for matching request packets and response packets and
detecting retransmitted request packets. The request and response packets of the same type have
the same identifier.
3)
The Length field (2-byte long) indicates the length of the entire packet, including the Code,
Identifier, Length, Authenticator, and Attribute fields. The value of the field is in the range 20 to
4096. Bytes beyond the length are considered the padding and are neglected upon reception. If the
length of a received packet is less than that indicated by the Length field, the packet is dropped.
4)
The Authenticator field (16-byte long) is used to authenticate replies from the RADIUS server, and
is also used in the password hiding algorithm. There are two kinds of authenticators: request
authenticator and response authenticator.
5)
The Attribute field, with a variable length, carries the specific authentication, authorization, and
accounting information for defining configuration details of the request or response. This field is
represented in triplets of Type, Length, and Value.
Type: One byte, in the range 1 to 255. It indicates the type of the attribute. Commonly used
attributes for RADIUS authentication, authorization and accounting are listed in Table 1-2.
Length: One byte for indicating the length of the attribute in bytes, including the Type, Length, and
Value fields.
Value: Value of the attribute, up to 253 bytes. Its format and content depend on the Type and
Length fields.
1-5
Attribute
No.
Attribute
User-Name
45
Acct-Authentic
User-Password
46
Acct-Session-Time
CHAP-Password
47
Acct-Input-Packets
NAS-IP-Address
48
Acct-Output-Packets
NAS-Port
49
Acct-Terminate-Cause
Service-Type
50
Acct-Multi-Session-Id
Framed-Protocol
51
Acct-Link-Count
Framed-IP-Address
52
Acct-Input-Gigawords
Framed-IP-Netmask
53
Acct-Output-Gigawords
10
Framed-Routing
54
(unassigned)
11
Filter-ID
55
Event-Timestamp
12
Framed-MTU
56-59
(unassigned)
13
Framed-Compression
60
CHAP-Challenge
14
Login-IP-Host
61
NAS-Port-Type
15
Login-Service
62
Port-Limit
16
Login-TCP-Port
63
Login-LAT-Port
17
(unassigned)
64
Tunnel-Type
18
Reply_Message
65
Tunnel-Medium-Type
19
Callback-Number
66
Tunnel-Client-Endpoint
20
Callback-ID
67
Tunnel-Server-Endpoint
21
(unassigned)
68
Acct-Tunnel-Connection
22
Framed-Route
69
Tunnel-Password
23
Framed-IPX-Network
70
ARAP-Password
24
State
71
ARAP-Features
25
Class
72
ARAP-Zone-Access
26
Vendor-Specific
73
ARAP-Security
27
Session-Timeout
74
ARAP-Security-Data
28
Idle-Timeout
75
Password-Retry
29
Termination-Action
76
Prompt
30
Called-Station-Id
77
Connect-Info
31
Calling-Station-Id
78
Configuration-Token
32
NAS-Identifier
79
EAP-Message
33
Proxy-State
80
Message-Authenticator
34
Login-LAT-Service
81
Tunnel-Private-Group-id
35
Login-LAT-Node
82
Tunnel-Assignment-id
1-6
No.
Attribute
No.
Attribute
36
Login-LAT-Group
83
Tunnel-Preference
37
Framed-AppleTalk-Link
84
ARAP-Challenge-Response
38
Framed-AppleTalk-Network
85
Acct-Interim-Interval
39
Framed-AppleTalk-Zone
86
Acct-Tunnel-Packets-Lost
40
Acct-Status-Type
87
NAS-Port-Id
41
Acct-Delay-Time
88
Framed-Pool
42
Acct-Input-Octets
89
(unassigned)
43
Acct-Output-Octets
90
Tunnel-Client-Auth-id
44
Acct-Session-Id
91
Tunnel-Server-Auth-id
The attribute types listed in Table 1-2 are defined by RFC 2865, RFC 2866, RFC 2867, and RFC 2868.
Vendor-ID (four bytes): Indicates the ID of the vendor. Its most significant byte is 0 and the other
three bytes contain a code complying with RFC 1700. The vendor ID of H3C is 2011.
1-7
Introduction to HWTACACS
HW Terminal Access Controller Access Control System (HWTACACS) is an enhanced security protocol
based on TACACS (RFC 1492). Similar to RADIUS, it uses a client/server model for information
exchange between NAS and HWTACACS server.
HWTACACS is mainly used to provide AAA services for Point-to-Point Protocol (PPP) users, Virtual
Private Dial-up Network (VPDN) users, and terminal users. In a typical HWTACACS application, a
terminal user needs to log into the device for operations, and HWTACACS authenticates, authorizes
and keeps accounting for the user. Working as the HWTACACS client, the device sends the username
and password to the HWTACACS sever for authentication. After passing authentication and being
authorized, the user can log into the device to perform operations.
RADIUS
1-8
Figure 1-6 Basic message exchange process of HWTACACS for a Telnet user
Host
HWTACACS client
HWTACACS server
1)
2)
Upon receiving the request, the HWTACACS client sends a start-authentication packet to the
HWTACACS server.
3)
The HWTACACS server sends back an authentication response requesting the username.
4)
Upon receiving the response, the HWTACACS client asks the user for the username.
5)
6)
After receiving the username from the user, the HWTACACS client sends to the server a
continue-authentication packet carrying the username.
7)
The HWTACACS server sends back an authentication response, requesting the login password.
8)
Upon receipt of the response, the HWTACACS client asks the user for the login password.
9)
10) After receiving the login password, the HWTACACS client sends to the HWTACACS server a
continue-authentication packet carrying the login password.
11) The HWTACACS server sends back an authentication response indicating that the user has
passed authentication.
1-9
12) The HWTACACS client sends the user authorization request packet to the HWTACACS server.
13) The HWTACACS server sends back the authorization response, indicating that the user is
authorized now.
14) Knowing that the user is now authorized, the HWTACACS client pushes the configuration interface
of the NAS to the user.
15) The HWTACACS client sends a start-accounting request to the HWTACACS server.
16) The HWTACACS server sends back an accounting response, indicating that it has received the
start-accounting request.
17) The user logs off.
18) The HWTACACS client sends a stop-accounting request to the HWTACACS server.
19) The HWTACACS server sends back a stop-accounting response, indicating that the
stop-accounting request has been received.
Local authentication: Configure local users and related attributes, including usernames and
passwords of the users to be authenticated.
Remote authentication: Configure the required RADIUS, HWTACACS schemes, and configure
user attributes on the servers accordingly.
2)
Configure the AAA methods: Reference the configured AAA schemes in the users ISP domains.
For login users, it is necessary to configure the authentication mode for logging into the user interface
as scheme. For detailed information, refer to Login Configuration of the System Volume.
1-10
Remarks
Required
Optional
Required
Optional
Optional
Optional
Optional
Optional
Optional
refer
Remarks
Required
Required
Optional
Required
Optional
Optional
Optional
Optional
Optional
Optional
Optional
Optional
Optional
1-11
to
Remarks
Required
Required
Optional
Optional
Required
Optional
Optional
Optional
Configuring AAA
By configuring AAA, you can provide network access service for legal users, protect the networking
devices, and avoid unauthorized access and repudiation. In addition, you can configure ISP domains to
perform AAA on accessing users.
In AAA, users are divided into LAN users (such as 802.1X users and MAC authentication users), login
users (such as SSH, Telnet, FTP, and terminal access users) and command line users (that is,
command line authentication users). Except for command line users, you can configure separate
authentication/authorization/accounting policies for all the other types of users. Command line users
can be configured with authorization policy independently.
Configuration Prerequisites
For remote authentication, authorization, or accounting, you must create the RADIUS or HWTACACS
scheme first. For RADIUS scheme configuration, refer to Configuring RADIUS. For HWTACACS
scheme configuration, refer to Configuring HWTACACS.
1-12
To do
Remarks
system-view
domain isp-name
Required
quit
Optional
You cannot delete the default ISP domain unless you change it to a non-default ISP domain (with
the domain default disable command) first.
If a user enters a username without an ISP domain name, the device uses the authentication
method configured for the default ISP domain to authenticate the user.
Remarks
system-view
domain isp-name
Optional
When created, an ISP domain
is in the active state by default,
and users in the domain can
request network services.
access-limit enable
max-user-number
Disabled by default
self-service-url enable
url-string
Optional
Optional
No limit by default
Optional
1-13
Disabled by default
A self-service RADIUS server, for example, Comprehensive Access Management System (CAMS) or
Intelligent Management Center (iMC), is required for the self-service server localization function to work.
With the self-service function, a user can manage and control his or her accounting information or card
number. A server with self-service software is a self-service server.
No authentication: All users are trusted and no authentication is performed. Generally, this method
is not recommended.
Local authentication: Authentication is performed by the NAS, which is configured with the user
information, including the usernames, passwords, and attributes. Local authentication features
high speed and low cost, but the amount of information that can be stored is limited by the
hardware.
Remote authentication: The access device cooperates with a RADIUS or HWTACACS server to
authenticate users. As for RADIUS, the device can use the standard RADIUS protocol or extended
RADIUS protocol in collaboration with systems like CAMS and iMC to implement user
authentication. Remote authentication features centralized information management, high capacity,
high reliability, and support for centralized authentication for multiple devices. You can configure
local authentication as the backup method to be used when the remote server is not available.
You can configure AAA authentication to work alone without authorization and accounting. By default,
an ISP domain uses the local authentication method.
Before configuring authentication methods, complete these three tasks:
z
Determine the access mode or service type to be configured. With AAA, you can configure an
authentication method specifically for each access mode and service type, limiting the
authentication protocols that can be used for access.
Determine whether to configure an authentication method for all access modes or service types.
Follow these steps to configure AAA authentication methods for an ISP domain:
To do
Remarks
system-view
domain isp-name
1-14
To do
authentication default
{ hwtacacs-scheme
hwtacacs-scheme-name
[ local ] | local | none |
radius-scheme
radius-scheme-name [ local ] }
authentication lan-access
{ local | none | radius-scheme
radius-scheme-name [ local ] }
authentication login
{ hwtacacs-scheme
hwtacacs-scheme-name
[ local ] | local | none |
radius-scheme
radius-scheme-name [ local ] }
Configure
a
HWTACACS
authentication scheme for user
level switching
authentication
super
hwtacacs-scheme
hwtacacs-scheme-name
Remarks
Optional
local by default
Optional
The default authentication
method is used by default.
Optional
The default authentication
method is used by default.
Optional
By default, no HWTACACS
authentication
scheme
is
configured.
The authentication method specified with the authentication default command is for all types of
users and has a priority lower than that for a specific access mode.
With an authentication method that references a RADIUS scheme, AAA accepts only the
authentication result from the RADIUS server. The Access-Accept message from the RADIUS
server does include the authorization information, but the authentication process ignores the
information.
If the primary authentication method is local or none, the system performs local authentication or
does not perform any authentication, and will not use any RADIUS or HWTACACS authentication
scheme.
The switches adopt hierarchical protection for command lines so as to inhibit users at lower levels
from using higher level commands to configure the switches. For details about configuring a
HWTACACS authentication scheme for low-to-high user level switching, refer to Switching User
Level in the Basic System Configuration.
1-15
No authorization: No authorization exchange is performed. Every user is trusted and has the
For HWTACACS authorization, configure the HWTACACS scheme to be referenced first. For
RADIUS authorization, the RADIUS authorization scheme must be the same as the RADIUS
authentication scheme; otherwise, it does not take effect.
2)
Determine the access mode or service type to be configured. With AAA, you can configure an
authorization scheme specifically for each access mode and service type, limiting the authorization
protocols that can be used for access.
3)
Determine whether to configure an authorization method for all access modes or service types.
Follow these steps to configure AAA authorization methods for an ISP domain:
To do
Remarks
system-view
domain isp-name
Specify
the
default
authorization method for all
types of users
authorization
default
{
hwtacacs-scheme
hwtacacs-scheme-name
[ local ] | local | none |
radius-scheme
radius-scheme-name [ local ] }
Specify
the
authorization
method for command line users
authorization
command
hwtacacs-scheme
hwtacacs-scheme-name
Optional
Specify
the
authorization
method for LAN users
authorization
lan-access
{ local | none | radius-scheme
radius-scheme-name [ local ] }
Optional
Specify
the
authorization
method for login users
authorization
login
{
hwtacacs-scheme
hwtacacs-scheme-name
[ local ] | local | none |
radius-scheme
radius-scheme-name [ local ] }
1-16
Optional
local by default
The
default
authorization
method is used by default.
The
default
authorization
method is used by default.
Optional
The
default
authorization
method is used by default.
The authorization method specified with the authorization default command is for all types of
users and has a priority lower than that for a specific access mode.
RADIUS authorization is special in that it takes effect only when the RADIUS authorization scheme
is the same as the RADIUS authentication scheme. In addition, if a RADIUS authorization fails, the
error message returned to the NAS says that the server is not responding.
With
the
radius-scheme
radius-scheme-name
local,
hwtacacs-scheme
If the primary authorization method is local or none, the system performs local authorization or
does not perform any authorization; it will never use the RADIUS or HWTACACS authorization
scheme.
The authorization information of the RADIUS server is sent to the RADIUS client along with the
authentication response message; therefore, you cannot specify a separate RADIUS authorization
server. If you use RADIUS for authorization and authentication, you must use the same scheme
setting for authorization and authentication; otherwise, the system will prompt you with an error
message.
No accounting: The system does not perform accounting for the users.
Local accounting: Local accounting is implemented on the access device. It is for collecting
statistics on the number of users and controlling the number of local user connections; it does not
provide statistics for user charge.
Remote accounting: The access device cooperates with a RADIUS server or HWTACACS server
for accounting of users. You can configure local accounting as the backup method to be used when
the remote server is not available.
2)
Determine the access mode or service type to be configured. With AAA, you can configure an
accounting method specifically for each access mode and service type, limiting the accounting
protocols that can be used for access.
3)
Determine whether to configure an accounting method for all access modes or service types.
Follow these steps to configure AAA accounting methods for an ISP domain:
1-17
To do
Remarks
system-view
domain isp-name
accounting optional
accounting
default
{
hwtacacs-scheme
hwtacacs-scheme-name
[ local ] | local | none |
radius-scheme
radius-scheme-name [ local ] }
accounting
login
{
hwtacacs-scheme
hwtacacs-scheme-name
[ local ] | local | none |
radius-scheme
radius-scheme-name [ local ] }
Optional
Disabled by default
Optional
local by default
Optional
The default accounting method
is used by default.
Optional
The default accounting method
is used by default.
With the accounting optional command configured, a user to be disconnected can still use the
network resources even when there is no available accounting server or communication with the
current accounting server fails.
The local accounting is not used for accounting implementation, but together with the attribute
access-limit command for limiting the number of local user connections. However, with the
accounting optional command configured, the limit on the number of local user connections is not
effective.
The accounting method specified with the accounting default command is for all types of users
and has a priority lower than that for a specific access mode.
With
the
radius-scheme
radius-scheme-name
local
or
hwtacacs-scheme
If the primary accounting method is local or none, the system performs local accounting or does
not perform any accounting, and will not use the RADIUS or HWTACACS accounting scheme.
Each local user belongs to a local user group and bears all attributes of the group, such as authorization
attributes. For details about local user group, refer to Configuring User Group Attributes.
When configuring local users and local user groups, pay attention to the effective ranges and priority
relationship of user group attributes and user attributes:
z
Authorization attributes
You can configure an authorization attribute in user group view or local user view, making the attribute
effective on all local users of the group or only the local user. An authorization attribute configured in
local user view takes precedence over the same attribute configured in user group view.
Follow these steps to configure the attributes for a local user:
To do
Enter system view
Remarks
Optional
local-user
password-display-mode { auto
| cipher-force }
local-user user-name
access-limit max-user-number
bind-attribute { call-number
call-number [ : subcall-number ] |
ip ip-address | location port
slot-number subslot-number
port-number | mac mac-address
| vlan vlan-id } *
1-19
Optional
By default, no service is
authorized to a local user.
Optional
By default, no binding
attribute is configured for a
local user.
To do
Remarks
Optional
By default, no authorization
attribute is configured for a
local user.
Optional
Specify the user group for the local
user
group group-name
Note that:
z
The access-limit command configured for a local user takes effect only when local accounting is
used.
Local authentication checks the service types of a local user. If the service types are not available,
the user cannot pass authentication.
With an authentication method that requires the username and password, including local
authentication, RADIUS authentication, HWTACACS authentication, the commands that a login
user can use after logging in depend on the level of the user. With other authentication methods,
which commands are available depends on the level of the user interface. For an SSH user using
public key authentication, the commands that can be used depend on the level configured on the
user interface. For details about authentication method and commands accessible to user interface,
refer to Login Configuration in the System Volume.
Binding attributes are checked upon authentication of a local user. If the checking fails, the user
fails the authentication. Therefore, be cautious when deciding which binding attributes should be
configured for a local user.
Every configurable authorization attribute has its definite application environments and purposes.
Therefore, when configuring authorization attributes for a local user, consider what attributes are
needed.
1-20
To do
Remarks
system-view
user-group group-name
Required
authorization-attribute { acl
acl-number |
callback-number
Configure the authorization attributes
for the user group
callback-number | idle-cut
minute | level level |
user-profile profile-name |
vlan vlan-id | work-directory
directory-name } *
Optional
By default, no
authorization attribute is
configured for a user
group.
system-view
Remarks
Required
Applies to only LAN access
user connections at present.
Remarks
1-21
Configuring RADIUS
The RADIUS protocol is configured on a per scheme basis. After creating a RADIUS scheme, you need
to configure the IP addresses and UDP ports of the RADIUS servers for the scheme. The servers
include authentication/authorization servers and accounting servers, or primary servers and secondary
servers. In other words, the attributes of a RADIUS scheme mainly include IP addresses of primary and
secondary servers, shared key, and RADIUS server type.
Actually, the RADIUS protocol configurations only set the parameters necessary for the information
interaction between a NAS and a RADIUS server. For these settings to take effect, you must reference
the RADIUS scheme containing those settings in ISP domain view. For information about the
commands for referencing a scheme, refer to Configuring AAA.
When there are users online, you cannot modify RADIUS parameters other than the retransmission
ones and the timers.
Remarks
system-view
radius scheme
radius-scheme-name
Required
Not defined by default
A RADIUS scheme can be referenced by more than one ISP domain at the same time.
Remarks
system-view
radius scheme
radius-scheme-name
1-22
To do
Remarks
primary authentication
ip-address
[ port-number ]
Required
secondary
authentication
ip-address
[ port-number ]
No authentication server by
default
If both the primary and secondary authentication/authorization servers are specified, the
secondary one is used when the primary one is unreachable.
In practice, you may specify two RADIUS servers as the primary and secondary
authentication/authorization servers respectively. At one time, a server can be the primary
authentication/authorization server for a scheme and the secondary authentication/authorization
servers for another scheme.
The IP addresses of the primary and secondary authentication/authorization servers for a scheme
cannot be the same. Otherwise, the configuration fails.
Remarks
system-view
radius scheme
radius-scheme-name
primary accounting
ip-address [ port-number ]
secondary accounting
ip-address [ port-number ]
stop-accounting-buffer
enable
Optional
retry stop-accounting
retry-times
Optional
retry realtime-accounting
retry-times
Optional
1-23
Required
Configure at least one of the
commands
No accounting server by default
Enabled by default
500 by default
5 by default
It is recommended to specify only the primary RADIUS accounting server if backup is not required.
If both the primary and secondary accounting servers are specified, the secondary one is used
when the primary one is not reachable.
In practice, you can specify two RADIUS servers as the primary and secondary accounting servers
respectively, or specify one server to function as the primary accounting server in a scheme and
the secondary accounting server in another scheme. Besides, because RADIUS uses different
UDP ports to receive authentication/authorization and accounting packets, the port for
authentication/authorization must be different from that for accounting.
You can set the maximum number of stop-accounting request transmission buffer, allowing the
device to buffer and resend a stop-accounting request until it receives a response or the number of
transmission retries reaches the configured limit. In the latter case, the device discards the packet.
You can set the maximum number of accounting request transmission attempts on the device,
allowing the device to disconnect a user when the number of accounting request transmission
attempts for the user reaches the limit but it still receives no response to the accounting request.
The IP addresses of the primary and secondary accounting servers cannot be the same. Otherwise,
the configuration fails.
Remarks
system-view
radius scheme
radius-scheme-name
key { accounting |
authentication } string
Required
No key by default
The shared key configured on the device must be the same as that configured on the RADIUS server.
to retransmit the RADIUS request. If the number of transmission attempts exceeds the specified limit
but it still receives no response, it considers that the authentication has failed.
Follow these steps to set the upper limit of RADIUS request retransmission attempts:
To do
Remarks
system-view
radius scheme
radius-scheme-name
retry retry-times
Optional
3 by default
The maximum number of retransmission attempts of RADIUS packets multiplied by the RADIUS
server response timeout period cannot be greater than 75.
Refer to the timer response-timeout command in the command manual for configuring RADIUS
server response timeout period.
Remarks
system-view
radius scheme
radius-scheme-name
Optional
server-type { extended |
standard }
If you change the type of RADIUS server, the data stream destined to the original RADIUS server
will be restored to the default unit.
When a third-party RADIUS is used, you can configure the RADIUS server to standard or
extended. When a CAMS or iMC server is used, you must configure the RADIUS server to
extended.
When both the primary and secondary servers are available, the device sends request packets to the
primary server.
Once the primary server fails, the primary server turns into the state of block, and the device turns to the
secondary server. In this case:
z
If the secondary server is available, the device triggers the primary server quiet timer. After the
quiet timer times out, the status of the primary server is active again and the status of the
secondary server remains the same.
If the secondary server fails, the device restores the status of the primary server to active
immediately.
If the primary server has resumed, the device turns to use the primary server and stops communicating
with the secondary server. After accounting starts, the communication between the client and the
secondary server remains unchanged.
Follow these steps to set the status of RADIUS servers:
To do
Remarks
system-view
radius scheme
radius-scheme-name
state secondary
authentication { active |
block }
Optional
active for every server
configured with IP address in
the RADIUS scheme
If both the primary server and the secondary server are in the blocked state, it is necessary to
manually turn the secondary server to the active state so that the secondary server can perform
authentication. If the secondary server is still in the blocked state, the primary/secondary
switchover cannot take place.
If one server is in the active state while the other is blocked, the primary/secondary switchover will
not take place even if the active server is not reachable.
The server status set by the state command cannot be saved in the configuration file and will be
restored to active every time the server restarts.
To do
Remarks
system-view
radius trap
{ accounting-server-down |
authentication-server-down }
Optional
radius scheme
radius-scheme-name
user-name-format
{ with-domain |
without-domain }
Disabled by default
Optional
By default, the ISP domain
name is included in the
username.
Optional
The defaults are as follows:
byte for data flows, and
one-packet for data packets.
Use either command
Set the
source IP
address for
the device to
use for
RADIUS
packets
In RADIUS
scheme view
nas-ip ip-address
quit
In system view
radius nas-ip ip-address
Some earlier RADIUS servers cannot recognize usernames that contain an ISP domain name. In
this case, the device must remove the domain name before sending a username including a
domain name. You can configure the user-name-format without-domain command on the
device for this purpose.
If a RADIUS scheme defines that the username is sent without the ISP domain name, do not apply
the RADIUS scheme to more than one ISP domain, thus avoiding the confused situation where the
RADIUS server regards two users in different ISP domains but with the same userid as one.
The unit of data flows sent to the RADIUS server must be consistent with the traffic statistics unit of
the RADIUS server. Otherwise, accounting cannot be performed correctly.
The nas-ip command in RADIUS scheme view is only for the current RADIUS scheme, while the
radius nas-ip command in system view is for all RADIUS schemes. However, the nas-ip
command in RADIUS scheme view takes precedence over the radius nas-ip command.
RADIUS server response timeout (response-timeout): If a NAS receives no response from the
RADIUS server in a period of time after sending a RADIUS request (authentication/authorization or
1-27
accounting request), it has to resend the request so that the user has more opportunity to obtain
the RADIUS service. The NAS uses the RADIUS server response timeout timer to control the
transmission interval.
z
Primary server quiet timer (timer quiet): If the primary server is not reachable, its state changes to
blocked, and the device will turn to the specified secondary server. If the secondary server is
reachable, the device starts this timer and communicates with the secondary server. After this
timer expires, the device turns the state of the primary server to active and tries to communicate
with the primary server while keeping the state of the secondary server unchanged. If the primary
server has come back into operation, the device interacts with the primary server and terminates its
communication with the secondary server.
Real-time accounting interval (realtime-accounting): This timer defines the interval for performing
real-time accounting of users. After this timer is set, the switch will send accounting information of
online users to the RADIUS server at the specified interval.
Remarks
system-view
radius scheme
radius-scheme-name
timer response-timeout
seconds
timer realtime-accounting
minutes
Optional
3 seconds by default
Optional
5 minutes by default
Optional
12 minutes by default
The maximum number of retransmission attempts of RADIUS packets multiplied by the RADIUS
server response timeout period cannot be greater than 75. This product is also the upper limit of the
timeout time of different access modules.
For an access module, the maximum number of retransmission attempts multiplied by the RADIUS
server response timeout period must be smaller than the timeout time. Otherwise, stop-accounting
messages cannot be buffered, and the primary/secondary server switchover cannot take place.
To configure the maximum number of retransmission attempts of RADIUS packets, refer to the
command retry in the command manual.
and dealing with accounting-on responses, and the device provides AAA services only after the
accounting-on feature completes its tasks. When the RADIUS servers of many RADIUS schemes (up to
16 schemes can be configured at present) are unavailable, the number of accounting-on packet
retransmission attempts is too big, or the retransmission interval of accounting-on packets is too long,
the accounting-on feature may take a long time, affecting user access negatively.
Follow these steps to configure accounting-on feature of a RADIUS server:
To do
Remarks
system-view
radius
scheme
radius-scheme-name
Enable accounting-on
accounting-on enable
Set
the
number
of
accounting-on
packet
retransmission attempts
Optional
accounting-on
interval seconds
Optional
Required
Disabled by default
enable
5 times by default
3 seconds by default
The accounting-on feature needs to cooperate with the H3C CAMS or iMC network management
system.
system-view
radius
radius-scheme-name
security-policy-server
ip-address
1-29
Remarks
scheme
Optional
Not specified by default
If more than one interface of the device is configured with user access authentication functions, the
interfaces may use different security policy servers. You can specify up to eight security policy
servers for a RADIUS scheme.
If the RADIUS server and the security policy server reside on the same physical device, you do not
need to configure the IP address of the security policy server.
The specified security policy server must be a security policy server or RADIUS server that is
correctly configured and working normally. Otherwise, the device will regard it as an illegal server.
system-view
Remarks
Optional
Enabled by default
Remarks
display stop-accounting-buffer
{ radius-scheme
radius-server-name | session-id
session-id | time-range start-time
stop-time | user-name user-name }
reset stop-accounting-buffer
{ radius-scheme
radius-server-name | session-id
session-id | time-range start-time
stop-time | user-name user-name }
Configuring HWTACACS
1-30
Different from RADIUS, except for deleting HWTACACS schemes and changing the IP addresses of
the HWTACACS servers, you can make any changes to HWTACACS parameters, no matter whether
there are users online or not.
Remarks
system-view
Create an HWTACACS
scheme and enter HWTACACS
scheme view
hwtacacs scheme
hwtacacs-scheme-name
Required
Remarks
system-view
hwtacacs scheme
hwtacacs-scheme-name
primary authentication
ip-address [ port-number ]
Required
secondary authentication
ip-address [ port-number ]
No authentication server by
default
1-31
It is recommended to specify only the primary HWTACACS authentication server if backup is not
required.
If both the primary and secondary authentication servers are specified, the secondary one is used
when the primary one is not reachable.
The IP addresses of the primary and secondary authentication servers cannot be the same.
Otherwise, the configuration fails.
You can remove an authentication server only when no active TCP connection for sending
authentication packets is using it.
Remarks
system-view
hwtacacs scheme
hwtacacs-scheme-name
primary authorization
ip-address [ port-number ]
Required
secondary authorization
ip-address [ port-number ]
No authorization server by
default
It is recommended to specify only the primary HWTACACS authorization server if backup is not
required.
If both the primary and secondary authorization servers are specified, the secondary one is used
when the primary one is not reachable.
The IP addresses of the primary and secondary authorization servers cannot be the same.
Otherwise, the configuration fails.
You can remove an authorization server only when no active TCP connection for sending
authorization packets is using it.
1-32
Remarks
To do
Remarks
hwtacacs scheme
hwtacacs-scheme-name
primary accounting
ip-address [ port-number ]
secondary accounting
ip-address [ port-number ]
stop-accounting-buffer
enable
Optional
retry stop-accounting
retry-times
Optional
Required
Configure at least one of the
commands
No accounting server by default
Enabled by default
100 by default
It is recommended to specify only the primary HWTACACS accounting server if backup is not
required.
If both the primary and secondary accounting servers are specified, the secondary one is used
when the primary one is not reachable.
The IP addresses of the primary and secondary accounting servers cannot be the same. Otherwise,
the configuration fails.
You can remove an accounting server only when no active TCP connection for sending accounting
packets is using it.
Remarks
system-view
hwtacacs scheme
hwtacacs-scheme-name
key { accounting |
authentication |
authorization } string
1-33
Required
No shared key exists by
default.
Remarks
system-view
hwtacacs scheme
hwtacacs-scheme-name
user-name-format
{ with-domain |
without-domain }
data-flow-format { data
{ byte | giga-byte | kilo-byte
| mega-byte } | packet
{ giga-packet | kilo-packet |
mega-packet |
one-packet } }*
In HWTACACS
scheme view
nas-ip ip-address
quit
In system view
hwtacacs nas-ip ip-address
Optional
By default, the ISP domain
name is included in the
username.
Optional
The defaults are as follows:
byte for data flows, and
one-packet for data packets.
Use either command
By default, the outbound port
serves as the source IP
address to send HWTACACS
packets.
If an HWTACACS server does not support a username with the domain name, you can configure
the device to remove the domain name before sending the username to the server.
The nas-ip command in HWTACACS scheme view is only for the current HWTACACS scheme,
while the hwtacacs nas-ip command in system view is for all HWTACACS schemes. However, the
nas-ip command in HWTACACS scheme view overwrites the configuration of the hwtacacs
nas-ip command.
Remarks
system-view
hwtacacs scheme
hwtacacs-scheme-name
timer response-timeout
seconds
1-34
Optional
5 seconds by default
Optional
5 minutes by default
To do
Set the real-time accounting
interval
Remarks
Optional
12 minutes by default
For real-time accounting, a NAS must transmit the accounting information of online users to the
HWTACACS accounting server periodically. Note that if the device does not receive any response
to the information, it does not disconnect the online users forcibly
The setting of the real-time accounting interval somewhat depends on the performance of the NAS
and the HWTACACS server: a shorter interval requires higher performance.
Remarks
display hwtacacs
[ hwtacacs-server-name
[ statistics ] ]
display stop-accounting-buffer
hwtacacs-scheme
hwtacacs-scheme-name
reset stop-accounting-buffer
hwtacacs-scheme
hwtacacs-scheme-name
The HWTACACS server is used for authentication, authentication, and accounting. Its IP address
is 10.1.1.1.
On the switch, set the shared keys for authentication, authorization, and accounting packets to
expert. Configure the switch to remove the domain name from a user name before sending the
user name to the HWTACACS server.
On the HWTACACS server, set the shared keys for packets exchanged with the switch to expert.
1-35
Internet
Telnet user
Switch
Configuration procedure
# Configure the IP addresses of the interfaces (omitted).
# Enable the Telnet server on the switch.
<Switch> system-view
[Switch] telnet server enable
# You can achieve the same result by setting default AAA methods for all types of users.
[Switch] domain bbb
[Switch-isp-bbb] authentication default hwtacacs-scheme hwtac
[Switch-isp-bbb] authorization default hwtacacs-scheme hwtac
[Switch-isp-bbb] accounting default hwtacacs-scheme hwtac
When telneting into the switch, a user enters username userid@bbb for authentication using domain
bbb.
1-36
The HWTACACS server is used for authorization. Its IP address is 10.1.1.2. On the switch, set the
shared keys for packets exchanged with the HWTACACS server to expert. Configure the switch to
remove the domain name from a user name before sending the user name to the HWTACACS
server.
The RADIUS server is used for accounting. Its IP address is 10.1.1.1. On the switch, set the shared
keys for packets exchanged with the RADIUS server to expert.
Configuration of separate AAA for other types of users is similar to that given in this example. The only
difference lies in the access type.
Configuration procedure
# Configure the IP addresses of various interfaces (omitted).
# Enable the Telnet server on the switch.
<Switch> system-view
[Switch] telnet server enable
1-37
When telneting into the switch, a user enters username telnet@bbb for authentication using domain
bbb.
The RADIUS server is responsible for both authentication and accounting. Its IP address is
10.1.1.1.
On the switch, set both the shared keys for authentication and accounting packets to expert; and
specify that the usernames sent to the RADIUS server carry the domain name.
1-38
Vlan-int2
192.168.1.70/24
SSH user
Internet
Switch
Configuration procedure
1)
This example assumes that the RADIUS server runs the CAMS server Version 2.10.
Set both the shared keys for authentication and accounting packets to expert
Specify the ports for authentication and accounting as 1812 and 1813 respectively
From the navigation tree, select User Management > User for Device Management, and then in the
right pane, click Add to enter the Add Account window and perform the following configurations:
z
2)
# Configure the IP address of VLAN interface 2, through which the SSH user accesses the switch.
<Switch> system-view
[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ip address 192.168.1.70 255.255.255.0
[Switch-Vlan-interface2] quit
# Generate RSA and DSA key pairs and enable the SSH server.
[Switch] public-key local create rsa
[Switch] public-key local create dsa
[Switch] ssh server enable
1-40
[Switch-radius-rad] quit
When using SSH to log in, a user enters a username in the form userid@bbb for authentication using
domain bbb.
3)
After the above configuration, the SSH user should be able to use the configured account to access the
user interface of the switch. The commands that the user can access depend on the settings for EXEC
users on the CAMS server.
Troubleshooting AAA
Troubleshooting RADIUS
Symptom 1: User authentication/authorization always fails.
Analysis:
1)
A communication failure exists between the NAS and the RADIUS server.
2)
The username is not in the format of userid@isp-name or no default ISP domain is specified for the
NAS.
3)
4)
5)
The RADIUS server and the NAS are configured with different shared key.
Solution:
Check that:
1)
The NAS and the RADIUS server can ping each other.
2)
The username is in the userid@isp-name format and a default ISP domain is specified on the NAS.
3)
4)
5)
The same shared key is configured on both the RADIUS server and the NAS.
The communication link between the NAS and the RADIUS server is down (at the physical layer
and data link layer).
2)
The NAS is not configured with the IP address of the RADIUS server.
3)
The UDP ports for authentication/authorization and accounting are not correct.
4)
The port numbers of the RADIUS server for authentication, authorization and accounting are being
used by other applications.
Solution:
Check that:
1-41
1)
The communication links between the NAS and the RADIUS server work well at both physical and
link layers.
2)
3)
UDP ports for authentication/authorization/accounting configured on the NAS are the same as
those configured on the RADIUS server.
4)
The port numbers of the RADIUS server for authentication, authorization and accounting are
available.
Symptom 3: A user is authenticated and authorized, but accounting for the user is not normal.
Analysis:
1)
2)
Configuration of the authentication/authorization server and the accounting server are not correct
on the NAS. For example, one server is configured on the NAS to provide all the services of
authentication/authorization and accounting, but in fact the services are provided by different
servers.
Solution:
Check that:
1)
2)
The authentication/authorization server and the accounting server are correctly configured on the
NAS.
Troubleshooting HWTACACS
Refer to Troubleshooting RADIUS if you encounter an HWTACACS fault.
1-42