Wireless Access Controller (AC and Fit AP) V200R022C00 CLI-based Configuration Guide
Understanding NAC
- Overview of NAC
- Understanding 802.1X Authentication
- Understanding MAC Address Authentication
- Understanding Portal Authentication
- Multi-mode Authentication
- NAC Escape Mechanism
- Terminal Type Identification
- iConnect Terminal Authentication
- Logical Process of NAC Authentication
Overview of NAC
Definition
Network Access Control (NAC) is an end-to-end security control technology that authenticates users who attempt to access the network to ensure network security.
Comparison Between Three NAC Authentication Modes
NAC provides 802.1X authentication, MAC address authentication, and Portal authentication. You can select a proper authentication mode or a combination of multiple authentication modes based on your application scenarios. The combination of multiple authentication modes varies according to the device type and configuration. Table 25-63 compares the three NAC authentication modes.
Item |
802.1X Authentication |
MAC Address Authentication |
Portal Authentication |
---|---|---|---|
Application scenario |
New network with concentrated users and high requirements for information security |
Authentication of dumb terminals such as printers and fax machines |
Scenario where users are sparsely distributed and move frequently |
Client |
Required |
Not required |
Not required |
Advantage |
High security |
No client required |
Flexible deployment |
Disadvantage |
Inflexible deployment |
Complex management and MAC address registration required |
Low security |
NAC and AAA
To configure NAC, you must enable authentication, authorization, and accounting (AAA). NAC and AAA work together to implement access authentication.
- NAC is used for interaction between users and access devices. It controls the user access mode (802.1X, MAC address, or Portal), as well as the parameters and timers used during network access. NAC ensures secure and stable connections between authorized users and access devices.
- AAA is used for interaction between access devices and authentication servers. AAA provides authentication, authorization, and accounting for access users to control their network access rights.
Understanding 802.1X Authentication
Overview of 802.1X Authentication
Definition
802.1X defines a port-based network access control and authentication protocol that prevents unauthorized clients from connecting to a LAN through publicly accessible ports unless they are properly authenticated.
Benefits
- 802.1X is a Layer 2 protocol and does not involve Layer 3 processing. It does not require high performance of access devices, reducing network construction costs.
- Authentication packets and data packets are transmitted through different logical interfaces, improving network security.
802.1X Authentication System
As shown in Figure 25-77, the 802.1X authentication system uses a standard client/server architecture with three components: client, access device, and authentication server.
- The client is usually a user terminal. The user triggers 802.1X authentication using client software. The client must support Extensible Authentication Protocol over LAN (EAPoL).
- The access device is usually a network device that supports the 802.1X protocol. It provides a port, either physical or logical, for the client to access the LAN.
- The authentication server, typically a RADIUS server, carries out authentication, authorization, and accounting on users.
802.1X Authentication Protocol
Overview
- The EAP packets transmitted between the client and access device are encapsulated in EAPoL format and transmitted across the LAN.
- You can determine to use either of the following authentication modes between the access device and authentication server based on the client support and network security requirements:
- EAP termination mode: The access device terminates EAP packets and encapsulates them into RADIUS packets. The authentication server then uses the standard RADIUS protocol to implement authentication, authorization, and accounting.
- EAP relay mode: The access device directly encapsulates the received EAP packets into EAP over RADIUS (EAPoR) packets, and then transmits these packets over a complex network to the authentication server.
EAP Packet
Field |
Bytes |
Description |
---|---|---|
Code |
1 |
Indicates the type of an EAP data packet. The options are as follows:
|
ID |
1 |
Is used to match a Response packet with the corresponding Request packet. |
Length |
2 |
Indicates the length of an EAP data packet, including the Code, ID, Length, and Data fields. Bytes outside the range of the Length field are treated as padding at the data link layer and ignored on reception. |
Data |
Zero or multiple bytes |
The format of the Data field is determined by the Code field.
|
Type Field Value |
Packet Type |
Description |
---|---|---|
1 |
Identity |
Requests or returns the user name information entered by a user. |
2 |
Notification |
Transmits notification information about some events, such as password expiry and account locking. It is an optional message. |
3 |
NAK |
Indicates negative acknowledgment and is used only in a Response packet. For example, if the access device uses an authentication method not supported by the client to initiate a request, the client can send a Response/NAK packet to notify the access device of the authentication methods supported by the client. |
4 |
MD5-Challenge |
Indicates that the authentication method is MD5-Challenge. |
5 |
OTP |
Indicates that the authentication method is One-Time Password (OTP). For example, during e-banking payment, the system sends a one-time password through an SMS message. |
6 |
GTC |
Indicates that the authentication method is Generic Token Card (GTC). A GTC is similar to an OTP except that a GTC usually corresponds to an actual device. For example, many banks in China provide a dynamic token for users who apply for e-banking. This token is a GTC. |
13 |
EAP-TLS |
Indicates that the authentication method is EAP-TLS. |
21 |
EAP-TTLS |
Indicates that the authentication method is EAP-TTLS. |
25 |
EAP-PEAP |
Indicates that the authentication method is EAP-PEAP. |
254 |
Expanded Types |
Indicates an expanded type, which can be customized by vendors. |
255 |
Experimental use |
Indicates a type for experimental use. |
EAPoL Packet
EAPoL is a packet encapsulation format defined by the 802.1X protocol. EAPoL is mainly used to transmit EAP packets over a LAN between the client and access device. The following figure shows the format of an EAPoL packet.
Field |
Bytes |
Description |
---|---|---|
PAE Ethernet Type |
2 |
Indicates the protocol type. The value is fixed at 0x888E. |
Protocol Version |
1 |
Indicates the protocol version number supported by the EAPoL packet sender.
|
Type |
1 |
Indicates the type of an EAPoL data packet:
Note that the EAPoL-Start, EAPoL-Logoff, and EAPoL-Key packets are transmitted only between the client and access device. |
Length |
2 |
Indicates the data length, that is, the length of the Packet Body field, in bytes. The value 0 indicates that the Packet Body field does not exist. For the EAPoL-Start and EAPoL-Logoff packets, the values of the Length field are both 0. |
Packet Body |
Depending on the packet content |
Indicates the data content. |
EAPoR
To support EAP relay, the following attributes are added to the RADIUS protocol:
- EAP-Message: is used to encapsulate EAP packets.
- Message-Authenticator: is used to authenticate and verify authentication packets to protect against spoofed packets.
The following figure shows the format of an EAPoR packet.
Field |
Bytes |
Description |
---|---|---|
Code |
1 |
Indicates the type of a RADIUS packet. |
Identifier |
1 |
Is used to match a Response packet with the corresponding Request packet, and to detect the Request packet retransmitted within a certain period. After the client sends a Request packet, the authentication server sends a Response packet with the same Identifier value as the Request packet. |
Length |
2 |
Indicates the length of a RADIUS packet. Bytes outside the range of the Length field are treated as padding and ignored on reception. If the length of a received packet is less than the Length value, the packet is discarded. |
Response Authenticator |
16 |
Is used to verify the Response packet sent by the RADIUS server and encrypt the user password. |
Attributes |
Variable length |
Indicates the packet content body, which carries authentication, authorization, and accounting information and provides configuration details of the Request and Response packets. The Attributes field may contain multiple attributes, each of which consists of Type, Length, and Value.
|
Guidelines for Selecting Authentication Modes
- The EAP relay mode simplifies the processing on the access device and supports various authentication methods. However, the authentication server must support EAP and have high processing capability. The commonly used authentication modes include EAP-TLS, EAP-TTLS, and EAP-PEAP. EAP-TLS has the highest security because it requires a certificate to be loaded on both the client and authentication server. EAP-TTLS and EAP-PEAP are easier to deploy since the certificate needs to be loaded only on the authentication server, but not the client.
- The main advantage of the EAP termination mode is that mainstream RADIUS servers support both Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP) authentication, meaning that there is no need to upgrade servers. However, because this mode must extract client authentication information from EAP packets sent by clients and encapsulate it into standard RADIUS packets, the EAP termination mode results in a heavy workload on the device. In addition, the device does not support other EAP authentication methods except MD5-Challenge. In CHAP authentication, passwords are transmitted in cipher text; in PAP authentication, passwords are transmitted in plain text. CHAP provides higher security and is recommended.
802.1X Authentication Process
802.1X Authentication Triggering
- A client sends an EAPoL-Start packet.
- A client sends a DHCP, ARP, or any other packet.
- The access device sends an EAP-Request/Identity packet.
- A client associates with the access device.
Authentication Processes in EAP Relay and EAP Termination Modes
In the 802.1X authentication system, the access device exchanges information with the RADIUS server in EAP relay or EAP termination mode. Figure 25-81 and Figure 25-82 show the 802.1X authentication processes in EAP relay and EAP termination modes, respectively. In the following processes, a client associates with the access device to trigger 802.1X authentication.
A client associates with the access device to trigger 802.1X authentication.
The access device sends an EAP-Request/Identity packet to request the identity information of the client.
The client sends an EAP-Response/Identity packet carrying its identity information to the access device.
The access device encapsulates the received EAP-Response/Identity packet into a RADIUS Access-Request packet, and sends the resulting packet to the RADIUS server.
The RADIUS server receives the RADIUS Access-Request packet carrying the client's identity information, and starts to negotiate the EAP authentication method with the client. The RADIUS server encapsulates a RADIUS Access-Challenge packet with an EAP authentication method for negotiation with the client, and sends the packet to the access device.
The access device forwards the EAP information in the received RADIUS Access-Challenge packet to the client.
The client parses the received EAP information to obtain the EAP authentication method selected by the RADIUS server. If the client supports this method, it sends an EAP-Response packet encapsulated with this method to the access device. If the client does not support this method, it encapsulates an EAP-Response packet with the EAP authentication method it supports, and sends the packet to the access device.
- The access device encapsulates a RADIUS packet with the EAP information carried in the received EAP-Response packet, and sends the RADIUS packet to the RADIUS server.
- Upon receipt of the RADIUS packet, the RADIUS server checks whether it supports the EAP authentication method specified in the packet. If so, negotiation of the EAP authentication method succeeds, and authentication starts. The following assumes that the negotiated EAP authentication method is EAP-PEAP authentication. The server then encapsulates a RADIUS packet with its certificate and sends the packet to the access device. After receiving the RADIUS packet, the access device forwards the certificate information to the client. The client verifies the server certificate (optional), negotiates TLS parameters with the RADIUS server, and establishes a TLS tunnel with the server. This tunnel is used to transmit TLS-encrypted user information among the client, access device, and RADIUS server. If negotiation of the EAP authentication method between the client and server fails, the authentication process is terminated, and the access device is notified of the authentication failure and disconnects the client.
- After authenticating the client, the RADIUS server sends a RADIUS Access-Accept packet to notify the access device of successful authentication, and delivers a key to the access device. The access device will use this key to perform handshake with the client.
- After receiving the RADIUS Access-Accept packet, the access device sends an EAP-Success packet to the client, changes the port state to authorized, and allows the user to access the network through the port. The access device performs handshake with the client using the key received from the RADIUS server. When the handshake is successful, the client successfully associates with the access device.
- To go offline, the client sends an EAPoL-Logoff packet to the access device.
- The access device changes the port state from authorized to unauthorized and sends an EAP-Failure packet to the client.
In EAP termination mode, the access device negotiates the EAP authentication method with the client, and sends user information to the RADIUS server for authentication. In EAP relay mode, in contrast, such negotiation is performed between the client and server; the access device is only responsible for encapsulating RADIUS packets with EAP packets and transparently transmitting the RADIUS packets to the authentication server.
802.1X Authorization
Authentication checks whether the identity of the user who attempts to access the network is valid. Authorization specifies the network access rights that the authorized user can have, that is, the resources that the authorized user can access. VLANs, ACLs, and UCLs are often used for authorization. RADIUS authorization is used as an example. For details about other authorization methods and more authorization parameters, see Authorization Scheme.
VLAN
- Tunnel-Type: This attribute must be set to VLAN or 13.
- Tunnel-Medium-Type: This attribute must be set to 802 or 6.
- Tunnel-Private-Group-ID: The value can be a VLAN ID, VLAN description, VLAN name, or VLAN pool.
ACL
After a user is authenticated, the authentication server assigns an ACL to the user. Then, the access device controls the user packets according to the ACL.
- If the user packets match the permit rule in the ACL, the packets are allowed to pass through.
- If the user packets match the deny rule in the ACL, the packets are discarded.
The RADIUS server can assign an ACL to a user in either of the following modes:
- Static ACL assignment: The RADIUS server uses the standard RADIUS attribute Filter-Id to assign an ACL ID to the user. In this mode, the ACL and corresponding rules are configured on the access device in advance.
- Dynamic ACL assignment: The RADIUS server uses the RADIUS attribute HW-Data-Filter to assign an ACL ID and corresponding rules to the user. In this mode, the ACL ID and ACL rules are configured on the RADIUS server.
User Group
A user group consists of users (terminals) with the same attributes such as the role and rights, which is similar to the user group in the Windows system.
User group-based authorization applies to scenarios where a large number of users need to go online concurrently while resources are limited. Each user group can be associated with different ACLs, CAR policies, user VLANs, and packet priorities for access control. To use user group-based authorization delivered by the RADIUS server, ensure that the user group has been configured on the device (the user group does not need to be applied to the AAA domain).
Like static ACL-based authorization, the RADIUS server also uses the standard attribute Filter-Id to deliver user group information. The device preferentially considers the parsing result of Filter-Id to be an ACL ID. If this ACL ID does not exist on the device, the device considers the parsing result to be a user group. If the user group also does not exist on the device, authorization fails.
User group-based authorization delivered by the RADIUS server takes precedence over that configured on the device. If user group-based authorization delivered by the RADIUS server fails, user group-based authorization configured on the device is used.
802.1X Re-authentication
Re-authentication for 802.1X-Authenticated Users
If the administrator modifies parameters such as access rights and authorization attributes of an online user on the authentication server, re-authentication of the user must be performed to ensure user validity. After re-authentication is configured for online 802.1X-authenticated users, the device sends the locally saved online user authentication information to the authentication server. If the user authentication information is the same as that on the authentication server, the user keeps online. Otherwise, the user is logged out and needs to be re-authenticated. Table 25-68 lists the re-authentication modes for 802.1X-authenticated users.
Configuration Completed On |
To |
Configuration Command |
---|---|---|
Access device |
Perform periodic re-authentication for 802.1X-authenticated users. |
dot1x reauthenticate dot1x timer reauthenticate-period reauthenticate-period-value |
Perform one-time re-authentication for a user with the specified MAC address. |
dot1x reauthenticate mac-address mac-address |
|
RADIUS server |
Deliver the standard RADIUS attributes Session-Timeout and Termination-Action. The Session-Timeout attribute specifies the online duration timer of a user. The value of Termination-Action is set to 1, indicating that the user is re-authenticated when the online duration timer expires. |
N/A |
Re-authentication for Users in Abnormal Authentication State
The access device records entries for users in pre-connection state (that is, users who have not been authenticated or have failed the authentication), and grants corresponding network access rights to the users. You can configure the access device to re-authenticate these users based on user entries, so that they can obtain normal network access rights in a timely manner.
If a user fails the re-authentication before the user entry aging time expires, the access device deletes the user entry and revokes the granted network access rights. If a user is successfully re-authenticated before the user entry aging time expires, the access device adds a user-authenticated entry and grants corresponding network access rights to the user. Table 25-69 lists the methods of configuring re-authentication modes for users in abnormal authentication state.
Logout of 802.1X-authenticated Users
- The RADIUS server still performs accounting for the users, causing incorrect accounting.
- Unauthorized users may spoof IP addresses and MAC addresses of authorized users to access the network.
- If there are many offline users, these users are still counted as access users of the device. As a result, other users may fail to access the network.
The access device needs to detect user logout immediately, delete the user entry, and instruct the RADIUS server to stop accounting.
A user may log out in the following scenarios: The user proactively logs out on the client, the access device controls user logout, and the RADIUS server logs out the user.
A Client Logs Out
A user sends an EAPoL-Logoff packet through the client software to log out. Upon receipt of the packet, the access device returns an EAP-Failure packet to the client and changes the port status from authorized to unauthorized.
The Access Device Controls User Logout
An administrator can run the cut access-user command on an access device to log out users. If an administrator detects that an unauthorized user is online or wants a user to go offline and then go online during a test, the administrator can run a command on the access device to log out the user.
The RADIUS Server Logs Out a User
The RADIUS server logs out a user using either of the following methods:
- Sends a Disconnect Message (DM) to an access device to log out a user.
- Uses the standard RADIUS attributes Session-Timeout and Termination-Action. The Session-Timeout attribute specifies the online duration timer of a user. The value of Termination-Action is set to 0, indicating that the user is disconnected by the RADIUS server when the online duration timer expires.
802.1X Timers
802.1X relies on several timers to control the number of packet retransmission times and timeout interval. This section outlines the timers on the device that are relevant to the 802.1X authentication process.
Timeout Timers for EAP-Request/Identity Packets
This section discusses the timers that control the timeout and retry behavior of an 802.1X-enabled interface for sending EAP-Request/Identity packets.
During 802.1X authentication, the device sends an EAP-Request/Identity packet for the user name. The device waits for a period of time defined by a timer, and then sends another EAP-Request/Identity packet if no response is received. The number of times it resends the EAP-Request/Identity packets is defined by the dot1x retry max-retry-value variable.
Figure 25-84 shows the operation of the timer. If EAP-Request/Identity packets time out, the device sends an EAP failure packet to the client and starts a failover mechanism (Portal authentication or granting specified access permissions) if configured. In this situation, the timer is defined by the dot1x timer tx-period tx-period command. The total time it takes for 802.1X to time out is determined by the following formula:
Timeout = (max-retry-value +1) x tx-period-value
Timeout Timers for EAP-Request/MD5 Challenge Packets
This section discusses the timers that control the timeout and retry behavior of an 802.1X-enabled interface for sending EAP-Request/MD5 Challenge packets.
During 802.1X authentication, the device sends an EAP-Request/MD5 Challenge packet to request the client's password in ciphertext. It waits for a period of time defined by the client timeout timer, and then sends another EAP-Request/MD5 Challenge packet. The number of times it resends the EAP-Request/MD5 Challenge packets is defined by the dot1x retry max-retry-value variable. This prevents repeated retransmission of authentication requests, which occupies lots of resources.
As shown in Figure 25-85, EAP-Request/MD5 Challenge packets time out, and then the device sends an EAP Failure packet to the client and starts a failover mechanism (MAC address authentication, Portal authentication, or granting specified access permissions) if configured. The total time it takes for EAP-Request/MD5 Challenge packets to time out is determined by the following formula:
Timeout = (max-retry-value + 1) x client-timeout-value
Quiet Timer
This section discusses the timer that controls when 802.1X restarts after the number of failed 802.1X authentication attempts within 60 seconds reaches the value specified by the dot1x quiet-times fail-times command.
If 802.1X authentication fails and there are no failover mechanisms enabled, the device waits for a period of time known as the quiet-period (configured by the dot1x timer quiet-period quiet-period-value command). During this period of time, the device discards users' 802.1X authentication request packets, avoiding frequent authentication failures.
Understanding MAC Address Authentication
Overview of MAC Address Authentication
Definition
MAC address authentication controls network access rights of users based on interfaces and MAC addresses of terminals.
Benefits
- No client software needs to be installed on terminals.
- During MAC address authentication, users do not need to enter a user name or password.
- Dumb terminals that do not support 802.1X authentication, such as printers and fax machines, can be authenticated.
Authentication System
As shown in Figure 25-87, the MAC address authentication system is a typical client/server structure which consists of three types of entities: terminal, access device, and authentication server.
- Terminal: refers to a terminal that attempts to access the network.
- Access device: functions as the network access control point that enforces enterprise security policies. It allows, rejects, isolates, or restricts network access of users based on the security policies customized for enterprise networks.
- Authentication server: checks whether the identities of users who attempt to access the network are valid and assigns network access rights to users who have valid identities.
User Name Format
The user name and password used by a terminal for MAC address authentication must be configured on the access device in a format listed in the following table. By default, the user name and password are both the MAC address of a terminal.
User Name for MAC Address Authentication | Password | Application Scenario |
---|---|---|
MAC address of a terminal | Either the MAC address of the terminal or a specified password | Application to a network with a small number of terminals whose MAC addresses are easy to obtain, for example, when a few printers need to access the network. |
Specified user name | Specified password | Applicable to a network with reliable terminals. Multiple terminals connected to an interface use the same user name and password for MAC address authentication. In this case, only one account needs to be configured on the authentication server to meet the authentication requirements of all the terminals. |
MAC Address Authentication Process
- PAP: The device arranges the MAC address, shared key, and random value in sequence, performs hash processing on them using the MD5 algorithm, and encapsulates the hash result into the User-Password attribute.
- CHAP: The device arranges the CHAP ID, MAC address, and random value in sequence, performs hash processing on them using the MD5 algorithm, and encapsulates the hash result into the CHAP-Password and CHAP-Challenge attributes.
- The access device receives an ARP, DHCP, DHCPv6, or ND packet from a terminal, which triggers MAC address authentication.
- The access device generates a random value, arranges the terminal MAC address, shared key, and random value in sequence, and performs hash processing on them using the MD5 algorithm. It then encapsulates the user name, hash result, and random value into a RADIUS authentication request packet, and sends the packet to the RADIUS server for MAC address authentication.
- Based on the received random value, the RADIUS server performs hash processing on the combination of the user MAC address, shared key, and random value in the local database using the MD5 algorithm. If the hash result is the same as that carried in the received packet, the RADIUS server sends an authentication accept packet to the access device, indicating that MAC address authentication of the user is successful. The user is then allowed to access the network.
MAC Authorization
Authentication checks whether the identity of the user who attempts to access the network is valid. Authorization specifies the network access rights that an authorized user can have, that is, the resources that the authorized user can access. VLANs, ACLs, and UCLs are often used for authorization. RADIUS authorization is used as an example. For details about other authorization methods and more authorization parameters, see Authorization Scheme.
VLAN
- Tunnel-Type: This attribute must be set to VLAN or 13.
- Tunnel-Medium-Type: This attribute must be set to 802 or 6.
- Tunnel-Private-Group-ID: The value can be a VLAN ID, VLAN description, VLAN name, or VLAN pool.
ACL
After a user is authenticated, the authentication server assigns an ACL to the user. Then, the access device controls the user packets according to the ACL.
- If the user packets match the permit rule in the ACL, the packets are allowed to pass through.
- If the user packets match the deny rule in the ACL, the packets are discarded.
The RADIUS server can assign an ACL to a user in either of the following modes:
- Static ACL assignment: The RADIUS server uses the standard RADIUS attribute Filter-Id to assign an ACL ID to the user. In this mode, the ACL and corresponding rules are configured on the access device in advance.
- Dynamic ACL assignment: The RADIUS server uses the RADIUS attribute HW-Data-Filter to assign an ACL ID and corresponding rules to the user. In this mode, the ACL ID and ACL rules are configured on the RADIUS server.
User Group
A user group consists of users (terminals) with the same attributes such as the role and rights, which is similar to the user group in the Windows system.
User group-based authorization applies to scenarios where a large number of users need to go online concurrently while resources are limited. Each user group can be associated with different ACLs, CAR policies, user VLANs, and packet priorities for access control. To use user group-based authorization delivered by the RADIUS server, ensure that the user group has been configured on the device (the user group does not need to be applied to the AAA domain).
Like static ACL-based authorization, the RADIUS server also uses the standard attribute Filter-Id to deliver user group information. The device preferentially considers the parsing result of Filter-Id to be an ACL ID. If this ACL ID does not exist on the device, the device considers the parsing result to be a user group. If the user group also does not exist on the device, authorization fails.
User group-based authorization delivered by the RADIUS server takes precedence over that configured on the device. If user group-based authorization delivered by the RADIUS server fails, user group-based authorization configured on the device is used.
MAC Address Re-authentication
Users Who Have Passed MAC Address Authentication
If the administrator modifies parameters such as access rights and authorization attributes of an online user on the authentication server, the user needs to be re-authenticated to ensure user validity. Table 25-70 describes the re-authentication mode for users who have passed MAC address authentication.
Configuration Completed On |
To |
Configuration Command |
---|---|---|
Access device |
Perform periodic re-authentication for users who have passed MAC address authentication. After receiving a RADIUS Access-Accept packet from the authentication server, the access device starts the re-authentication timer specified by reauthenticate-period-value. When the timer expires, the access device requests the RADIUS server to perform MAC address re-authentication for the user. |
mac-authen reauthenticate mac-authen timer reauthenticate-period reauthenticate-period-value |
Perform one-time re-authentication for a user with the specified MAC address. |
mac-authen reauthenticate mac-address mac-address |
|
RADIUS server |
Deliver the standard RADIUS attributes Session-Timeout and Termination-Action. The Session-Timeout attribute specifies the online duration timer of a user. The value of Termination-Action is set to 1, indicating that the user is re-authenticated when the online duration timer expires. |
N/A |
Users in Abnormal Authentication State
According to Logical Process of MAC Address Authentication, exceptions may occur during MAC address authentication. For example, the RADIUS server may go Down or user authentication may fail. By default, users in abnormal authentication state have no network access rights. Generally, the users are granted with some network access rights. When the online period of a user reaches the user entry aging time, the device deletes the user entry and revokes the network access rights granted to the user. You can configure the access device to re-authenticate these users based on user entries, so that they can obtain normal network access rights in a timely manner. Table 25-71 describes the method of configuring re-authentication for users in abnormal authentication state.
Logout of MAC Address Authentication Users
- The RADIUS server still performs accounting for the users, causing incorrect accounting.
- Unauthorized users may spoof IP addresses and MAC addresses of authorized users to access the network.
- If there are many offline users, these users are still counted as access users of the device. As a result, other users may fail to access the network.
The Access Device Controls User Logout
Run a command to log out the user.
The RADIUS Server Logs Out a User
The RADIUS server controls user logout in either of the following methods:
- Sends a Disconnect Message (DM) to an access device to log out a user.
- Uses the standard RADIUS attributes Session-Timeout and Termination-Action. The Session-Timeout attribute specifies the online duration timer of a user. The value of Termination-Action is set to 0, indicating that the user is disconnected by the RADIUS server when the online duration timer expires.
Quiet Timer for MAC Address Authentication
This section discusses the timer that controls when MAC address authentication restarts after the number of failed MAC address authentication attempts within 60 seconds reaches the value specified by the mac-authen quiet-timers fail-times command.
If a user fails MAC address authentication, the access device waits for a period of time specified by the mac-authen timer quite-period quiet value command. During this period, the access device discards the MAC address authentication requests sent from the user. The quiet timer effectively prevents system resource wastes and brute force attacks on the user name and password. Figure 25-90 shows the operation of the quiet timer for MAC address authentication.
Understanding Portal Authentication
Overview of Portal Authentication
Definition
Portal authentication, also known as web authentication, authenticates end users on host systems that do not run an IEEE 802.1X client. Portal authentication websites are typically referred to as Portal websites. When accessing the Internet, a user must first perform authentication on the Portal website. If the authentication fails, the user can access only certain network resources. After the authentication succeeds, the user can access more network resources.
Benefits
- Ease of use: In most cases, Portal authentication directly authenticates a user on a web page, without any additional software required on the terminal.
- Convenient operations: Portal authentication allows for value-added services on the Portal page, including advertisement push and enterprise publicity.
- Mature technology: Portal authentication has been widely used in networks of carriers, fast food chains, hotels, and schools.
- Flexible deployment: Portal authentication implements access control at the access layer or at the ingress of key data.
- Flexible user management: Portal authentication can be performed on users based on the combination of user names and any one of VLANs, IP addresses, and MAC addresses.
Device Roles
The Portal authentication system primarily consists of four components: client, access device, Portal server, and authentication server, as shown in Figure 25-91.
- Client: a host that has a browser running Hypertext Transfer Protocol (HTTP) or Hypertext Transfer Protocol Secure (HTTPS) installed.
- Access device: a switch or router, which provides the following functions:
- Redirects all HTTP or HTTPS requests of users on authentication subnets to the Portal server before authentication.
- Interacts with the Portal server and authentication server to implement user identity authentication, authorization, and accounting during authentication.
- Grants users access to specified network resources after successful authentication.
- Portal server: a server system that receives authentication requests from clients, provides free Portal services and authentication pages, and exchanges client authentication information with an access device.
- Authentication server: interacts with the access device to implement user authentication, authorization, and accounting.
A Portal server can be an external Portal server or a built-in Portal server integrated into an access device. The access device with a built-in Portal server implements basic Portal server functions, including web-based login and logout, and improves flexibility of Portal authentication. However, it cannot completely replace an independent Portal server, and does not support extended functions of an external Portal server, such as MAC address-prioritized Portal authentication.
Due to limited storage space, functions, and performance of access devices, the built-in Portal server applies to scenarios requiring simple functions and having a smaller number of access users, for example, small restaurants that provide Internet access services.
Portal Authentication Protocol
During Portal authentication, HTTP/HTTPS and Portal protocols are used.
- The Portal server sends a Portal authentication request carrying the user name and password to an access device through the Portal protocol. The Portal protocol is compatible with the Portal 2.0 protocol of China Mobile Communications Corporation (CMCC), and supports basic functions of the Portal 2.0 protocol. For details, see Portal Authentication Process Based on the Portal Protocol.
- The Portal server instructs the client to initiate a Portal authentication request to the access device through the HTTP or HTTPS protocol. The client then initiates a Portal authentication request carrying the user name and password to the access device through the HTTP or HTTPS protocol. For details, see HTTP- or HTTPS-based Portal Authentication Process.
It is recommended that an access device use the Portal protocol to communicate with the Portal server. If the Portal server does not support the Portal protocol, the access device can use the HTTP or HTTPS protocol.
If a built-in Portal server is used for Portal authentication, the access device supports only the Portal protocol.
The HTTP or HTTPS protocol can be used as the Portal access protocol or Portal authentication protocol. This section describes the Portal authentication protocols supported by access devices.
Portal Protocol
Packet Format
A Portal packet consists of a fixed-length header and variable-length attribute fields in the type, length, value (TLV) format. Figure 25-92 shows the Portal packet format.
Packet Fields
Version
Portal protocol version. The length is 1 byte, and the default value is 0x02.
Type
Portal protocol packet type. The length is 1 byte.
Packet Type |
Value |
Description |
---|---|---|
REQ_CHALLENGE |
0x01 |
Challenge request packet sent from the Portal server to an access device. |
ACK_CHALLENGE |
0x02 |
Packet sent from the access device to the Portal server in response to a challenge request packet. |
REQ_AUTH |
0x03 |
Authentication request packet sent from the Portal server to the access device. |
ACK_AUTH |
0x04 |
Packet sent from the access device to the Portal server in response to an authentication request packet. |
REQ_LOGOUT |
0x05 |
Logout request packet sent from the Portal server to the access device. |
ACK_LOGOUT |
0x06 |
Packet sent from the access device to the Portal server in response to a logout request packet. |
AFF_ACK_AUTH |
0x07 |
Authentication success response packet sent from the Portal server to the access device. |
NTF_LOGOUT |
0x08 |
Packet sent from the access device to the Portal server to notify forcible user logout. |
REQ_INFO |
0x09 |
Information query packet sent from the Portal server to the access device. |
ACK_INFO |
0x0a |
Packet sent from the access device to the Portal server in response to an information query packet. |
ACK_NTF_LOGOUT |
0x0e |
Packet sent from the Portal server to notify the access device that users have been logged out. |
USER_SYN |
0x10 |
User information synchronization request packet sent from the Portal server to the access device. |
ACK_USER_SYN |
0x11 |
Packet sent from the access device to the Portal server in response to a user information synchronization request packet. |
STATUS_NOTIFY |
0x81 |
Status notification packet periodically sent from the Portal server to the access device. |
ACK_STATUS_NOTIFY |
0x82 |
Packet sent from the access device to the Portal server in response to a status notification packet. |
MAC_QUERY |
0x30 |
MAC cache query packet sent from the access device to the Portal server. |
ACK_MAC_QUERY |
0x31 |
MAC cache query response packet sent by the Portal server to the access device. |
AuthType
Authentication mode. The length is 1 byte. Two authentication modes are supported:
CHAP authentication: is three-way handshake authentication and transmits user names and passwords in cipher text. The AuthType field for CHAP authentication is 0.
PAP authentication: is two-way handshake authentication and transmits user names and passwords in plain text. The AuthType field for PAP authentication is 0x01.
REQ_CHALLENGE and ACK_CHALLENGE are exchanged only in CHAP authentication. CHAP authentication is more secure and reliable than PAP, and is recommended if high security is required.
Rsvd
Reserved for future use. It is 1 byte in length and is 0 in all packets.
SerialNo
Serial number of a packet. It is 2 bytes in length and is randomly generated by the Portal server. The Portal server must ensure that the serial numbers of all packets in the same authentication process are the same and that the serial numbers of packets in different authentication processes are different within a certain period.
RequestID
Packet ID. It is 2 bytes in length and is generated by an access device. A packet ID must be unique.
UserIP
IP address of a Portal user. It is 4 bytes in length.
UserPort
Reserved for future use. It is 2 bytes in length and is 0 in all packets.
ErrCode
Error code. It is 1 byte in length and is used together with the Type field.
When the Type field displays 0x01, 0x03, 0x07, 0x09, 0x0e, 0x10, 0x11, 0x30, 0x31, 0x81, or 0x82:
The ErrCode field is meaningless and the value is 0.
When the Type field displays 0x02:
- If the ErrCode field displays 0, the access device notifies the Portal server that the challenge request is successful.
- If the ErrCode field displays 0x01, the access device notifies the Portal server that the challenge request is denied.
- If the ErrCode field displays 0x02, the access device notifies the Portal server that the connection has been established.
- If the ErrCode field displays 0x03, the access device notifies the Portal server that a user is being authenticated and it should try again later.
- If the ErrCode field displays 0x04, the access device notifies the Portal server that the challenge request of the user fails.
- If the ErrCode field displays 0xfd, the access device notifies the Portal server that the user is not found (the user has roamed or gone offline).
When the Type field displays 0x04:
- If the ErrCode field displays 0, the access device notifies the Portal server that the user has been authenticated successfully.
- If the ErrCode field displays 0x01, the access device notifies the Portal server that the user authentication request is denied.
- If the ErrCode field displays 0x02, the access device notifies the Portal server that the connection has been established.
- If the ErrCode field displays 0x03, the access device notifies the Portal server that a user is being authenticated and it should try again later.
- If the ErrCode field displays 0x04, the access device notifies the Portal server that the user fails the authentication due to an error, for example, incorrect user name.
- If the ErrCode field displays 0x05, the access device notifies the Portal server that the user fails the authentication because the number of online Portal users has reached the maximum value.
- If the ErrCode field displays 0x06, the access device notifies the Portal server that the user authentication fails because it is authenticating the user in another mode.
- If the ErrCode field displays 0xfd, the access device notifies the Portal server that the user is not found (the user has roamed or gone offline).
When the Type field displays 0x05:
- If the ErrCode field displays 0, the Portal server sends a logout request packet to the access device.
- If the ErrCode field displays 0x01, the Portal server sends a packet to the access device if the Portal server does not receive any response packet from the access device with the period defined by the corresponding timer.
When the Type field displays 0x06:
- If the ErrCode field displays 0, the access device notifies the Portal server that the user has gone offline.
- If the ErrCode field displays 0x01, the access device notifies the Portal server that the user's logout request is denied.
- If the ErrCode field displays 0x02, the access device notifies the Portal server that the user fails to go offline.
When the Type field displays 0x08:
If the ErrCode field displays 0x02, the access device notifies the Portal server that the user is logged out.
When the Type field displays 0x0a:
- If the ErrCode field displays 0, the access device notifies the Portal server that the information query packet has been processed successfully.
- If the ErrCode field displays 0x01, the access device notifies the Portal server that the information query packet fails to be processed because this function is not supported.
- If the ErrCode field displays 0x02, the access device notifies the Portal server that the information query packet fails to be processed due to an error, for example, incorrect information query packet format.
AttrNum
Number of attributes in the Attribute field. It is 1 byte in length. The Attribute field contains a maximum of 255 attributes.
Authenticator
Authentication key. It is 16 bytes and is calculated using the MD5 algorithm.
Attribute
Variable-length field. It is composed of multiple attributes in the TLV format.
AttrType: indicates an attribute type. The length is 1 byte.
AttrLen: indicates the length (1 byte) of the Attribute field, which is the sum of the lengths of the AttrType, AttrLen, and AttrValue fields.
AttrValue: indicates a specific attribute value, for example, user name and password. The length cannot exceed 253 bytes.
AttrValue |
AttrType |
AttrValue Length (Bytes) |
Description |
Packet Type Carrying This Attribute |
---|---|---|---|---|
UserName |
0x01 |
1-253 |
User name in the format of user name@domain name, for example, test@huawei.com. |
REQ_AUTH |
PassWord |
0x02 |
1-128 |
User-entered password. |
REQ_AUTH |
Challenge |
0x03 |
16 |
Authentication key encrypted in CHAP mode. |
ACK_CHALLENGE |
ChapPassWord |
0x04 |
16 |
Password encrypted in CHAP mode. |
REQ_AUTH |
TextInfo |
0x05 |
2-253 |
Used to transparently transmit the prompt information provided by a third-party authentication device, such as a RADIUS server, to the Portal server. This attribute carries a character string without the end character \0. A packet may carry multiple such attributes but is recommended to carry only one attribute. |
ACK_AUTH, REQ_AUTH (only in Portal 1.0) |
Port |
0x08 |
1-51 |
Port number in the following formats:
|
REQ_INFO, ACK_INFO |
Bas_IP |
0x0a |
4 |
IP address of the AC to which a user roams. |
ACK_AUTH, ACK_CHALLENGE |
User_Mac |
0x0b |
6 |
User MAC address. |
ACK_AUTH, ACK_LOGOUT, NTF_LOGOUT, ACK_CHALLENGE, ACK_INFO, REQ_CHALLENGE, REQ_AUTH, REQ_LOGOUT |
User_Private_IP |
0x0d |
4-252 |
User IPv4 address. |
USER_SYN, ACK_USER_SYN |
WebAuthenInfo |
0x40 |
1-247 |
Used to transmit the user input on web pages to the RADIUS server. A packet may carry multiple such attributes. |
REQ_AUTH |
User_IPV6 |
0xf1 |
16 |
User IPv6 address. |
REQ_CHALLENGE, ACK_CHALLENGE, REQ_AUTH, ACK_AUTH, REQ_LOGOUT, ACK_LOGOUT, AFF_ACK_AUTH, NTF_LOGOUT, REQ_INFO, ACK_INFO |
HTTP/HTTPS Protocol
Introduction
HTTP is a transport protocol used to transport World Wide Web (WWW) data.
HTTPS is a secure HTTP and also known as HyperText Transfer Protocol over Transport Layer Security (HTTP over TLS) or HyperText Transfer Protocol over Secure Socket Layer (HTTP over SSL). HTTPS uses HTTP for communication and SSL/TLS for data encryption.
HTTPS is primarily used for identity authentication to protect data privacy and integrity.
Client Request Methods
During Portal authentication, the Portal server instructs the client to use the HTTP or HTTPS protocol to initiate a Portal authentication request to an access device. The client then sends an authentication request to the access device. The request packet carries the HTTP request method and HTTP request body (the requested data includes the user name, password, and other parameters).
Currently, the device supports the following HTTP request methods:
POST: The requested data is stored in the body of an HTTP request packet and is not a part of a URL. Therefore, the data is not easy to intercept and has high security. The device supports this request method by default.
GET: The requested data is appended to a URL and separated from the URL by a question mark (?). The data is a part of the URL, so it is visible to all users, is easy to intercept, and has poor security.
After receiving an authentication request packet, the access device parses the request packet to obtain parameters including the user name and password. The access device then sends the obtained user name and password to the RADIUS server for authentication. The parameter names in a request packet must comply with specific specifications. Otherwise, the device cannot parse the request packet, leading to user authentication failures. Table 25-72 lists the parameters in a request packet. For example, after receiving a POST request packet (username=abc&password=YsHsjx_202206&client_mac=00e0fc123456&initurl=http://portalserver.example.com/login), the device using default parameter names fails to parse the packet. This is because the client_mac parameter specifying the user MAC address in the packet is different from the default macaddress parameter used on the device.
Therefore, when HTTP or HTTPS is used for Portal authentication, ensure that the parameter names configured on the Portal server are the same as those configured on the device.
Default Parameter Name |
Description |
Mandatory or Optional |
---|---|---|
cmd |
User operation command |
Mandatory |
login |
User login |
User login operations: optional |
logout |
User logout |
User logout operations: mandatory |
initurl |
Initial login URL |
Optional |
username |
User name |
User login operations: mandatory User logout operations: not required |
password |
Password |
User login operations: mandatory User logout operations: not required |
ipaddress |
User IP address |
Optional (The device uses the source IP address of an HTTP packet to identify a user.) |
macaddress |
User MAC address |
Optional |
The values of the preceding parameters cannot contain spaces, but can contain ampersands (&) and equal signs (=), which need to be escaped to %26 and %3d, respectively.
The following is an example of a URL in GET mode. HTTPS request data is appended to the URL.
- User login: http://192.168.1.1:8000/login?username=example&password=YsHsjx_202206
- User logout: http://192.168.1.1:8000/login?cmd=logout&ipaddress=192.0.2.1
The following is an example of a URL in POST mode. HTTPS request data is stored in the body of an HTTP request packet and is not a part of the URL. For example, "username=example" and "password=YsHsjx_202206" in the preceding URL for user login in GET mode need to be placed in the body of an HTTP request packet in POST mode.
- User login: http://192.168.1.1:8000/login
User Management
When a user administrator needs to remotely manage access users through a remote host or Portal server, the administrator can manage access users through HTTP or HTTPS on the remote host or Portal server. The management operations include connecting users, disconnecting users, authorizing user groups, and deregistering users (changing users to the pre-connection state).
The parameters in the user management request packet received by the device must comply with specific specifications. Otherwise, the device cannot parse the packet. Table 25-73 lists these parameters. For example, the device receives a POST request packet for user login, which contains the following parameters: cmd=login&client-mac=00e0-fc12-3456&ip-address=192.0.2.10&username=abc&password=YsHsjx_202206&ssid=example-wifi.
Parameter |
Description |
Mandatory or Optional |
---|---|---|
cmd |
User operation:
|
Mandatory |
client-mac |
User MAC address |
Optional |
ip-address |
User IP address |
Mandatory |
username |
User name |
|
password |
User password |
|
ssid |
SSID to which the user connects |
Optional |
usergroup |
Authorization user group |
|
The values of the preceding parameters cannot contain spaces or ampersands (&).
After receiving a request packet, the device sends a response packet to the remote host or Portal server. Table 25-74 lists the parameters in a response packet.
Portal Authentication Process
The first thing to do during authentication is to initiate authentication. There are two methods for triggering Portal authentication:
Active authentication
In this mode, a user actively accesses the Portal server for identity authentication. The user accesses the Portal authentication website through a browser, enters the IP address of the Portal server in the browser, and then enters the user name and password on the displayed web page for authentication.
Redirect authentication
In this mode, a user enters a non-authentication website address and is redirected to the Portal authentication website for authentication.
Portal Authentication Process Based on the Portal Protocol
This section describes the Layer 2 authentication process of an external Portal server. The authentication process of a built-in Portal server is similar to that of an external Portal server.
Figure 25-93 shows the packet exchange in the Layer 2 Portal authentication process based on the Portal protocol.
The authentication process is described as follows:
Before authentication, the client establishes a pre-connection with the access device. The access device creates a user online entry for the client and grants the client access to certain network resources.
The client initiates an HTTP connection request.
Upon receipt of the HTTP connection request packet, the access device determines whether to permit the packet. If the HTTP packet is destined for the Portal server or a publicly available network resource, the access device permits the packet. If the HTTP packet is destined for other addresses, the access device sends the URL of the Portal authentication page to the client.
The client sends an HTTP connection request to the Portal server based on the obtained URL.
The Portal server returns the Portal authentication page to the client.
- The user enters the user name and password on the Portal authentication page. The client then sends a Portal authentication request to the Portal server.
- (Optional) The Portal server sends a Portal challenge request packet (REQ_CHALLENGE) to the access device. This step is performed only when CHAP authentication is used between the Portal server and access device. If PAP authentication is used, steps 7 and 8 are not performed.
- (Optional) The access device sends a Portal challenge response packet (ACK_CHALLENGE) to the Portal server.
- The Portal server encapsulates the entered user name and password into a Portal authentication request packet (REQ_AUTH) and sends the packet to the access device.
- The access device encapsulates the entered user name and password into a RADIUS authentication request packet (ACCESS-REQUEST) and sends the packet to the RADIUS server.
The RADIUS server authenticates the user name and password. If authentication succeeds, the RADIUS server sends an authentication accept packet (ACCESS-ACCEPT) to the access device. If authentication fails, the RADIUS server sends an authentication reject packet (ACCESS-REJECT) to the access device.
The ACCESS-ACCEPT packet also contains user authorization information because RADIUS authorization is combined with authentication and cannot be separated.
- The access device permits or denies the user access according to the authentication result. If the user access is permitted, the access device sends an accounting start request packet (ACCOUNTING-REQUEST) to the RADIUS server.
- The RADIUS server replies with an accounting start response packet (ACCOUNTING-RESPONSE), starts accounting, and adds the user to the local online user list.
- The access device sends the Portal authentication result (ACK_AUTH) to the Portal server and adds the user to the local online user list.
- The Portal server sends the Portal authentication result to the client to inform the client of successful authentication and adds the user to the local online user list.
- The Portal server sends an authentication acknowledgment packet (AFF_ACK_AUTH) to the access device.
HTTP- or HTTPS-based Portal Authentication Process
Figure 25-94 shows the packet exchange in the HTTP-based Portal authentication process.
The exchange of HTTPS packets is similar to that of HTTP packets except that HTTPS packets need to be encrypted and decrypted.
The authentication process is described as follows:
Before authentication, the client establishes a pre-connection with the access device. The access device creates a user online entry for the client and grants the client access to some network resources.
The client initiates an HTTP connection request.
Upon receipt of the HTTP connection request packet, the access device determines whether to permit the packet. If the HTTP packet is destined for the Portal server or a publicly available network resource, the access device permits the packet. If the HTTP packet is destined for other addresses, the access device redirects the client to the Portal authentication page.
The client sends an HTTP connection request to the Portal server based on the obtained URL.
The Portal server returns the Portal authentication page to the client.
- The user enters the user name and password on the Portal authentication page. The client then sends a Portal authentication request to the Portal server.
- The Portal server instructs the client to send a Portal authentication request to the access device.
- The client sends a Portal authentication request (HTTP POST/GET) to the access device.
- The access device sends a RADIUS authentication request packet (ACCESS-REQUEST) to the RADIUS server based on the obtained user name and password.
The RADIUS server authenticates the user name and password. If authentication succeeds, the RADIUS server sends an authentication accept packet (ACCESS-ACCEPT) to the access device. If authentication fails, the RADIUS server sends an authentication reject packet (ACCESS-REJECT) to the access device.
The ACCESS-ACCEPT packet also contains user authorization information because RADIUS authorization is combined with authentication and cannot be separated.
- The access device permits or denies the user access according to the authentication result. If the user access is permitted, the access device sends an accounting start request packet (ACCOUNTING-REQUEST) to the RADIUS server.
- The RADIUS server replies with an accounting start response packet (ACCOUNTING-RESPONSE), starts accounting, and adds the user to the local online user list.
- The access device returns the Portal authentication result to the client and adds the user to the local online user list.
HTTP- or HTTPS-based Portal Redirection Process
HTTP-based Portal Redirection Process
HTTP is a stateless application-layer protocol that transmits data on basis of TCP/IP. It functions as a request–response protocol in the client/server model and is the most widely used network protocol.
The HTTP interaction process is simple. HTTP-based access starts following a TCP three-way handshake, as shown in Figure 25-95.
- When the URL accessed by a client is a domain name, the DNS server needs to resolve the domain name. As such, the DNS server IP address must be configured in an authentication-free rule on the device. This requirement does not apply if the URL accessed by a client is an IP address.
- When a pre-connection is established for a client, the client uses HTTP to detect whether the domain name of the client device's vendor is reachable. This action triggers HTTP redirection.
HTTPS-based Portal Redirection Process
Compared with HTTP redirection, HTTPS redirection adds Transport Layer Security (TLS) link establishment. During TLS negotiation, a client needs to verify the server certificate, which is purchased from a valid certificate authority and bound to the website's domain name. This prevents website spoofing from untrusted websites or interceptors, ensuring network security. After the negotiation succeeds, subsequent HTTP packets are encrypted and transmitted over the SSL channel, ensuring information confidentiality.
- When the URL accessed by a client is a domain name, the DNS server needs to resolve the domain name. As such, the DNS server IP address must be configured in an authentication-free rule on the device. This requirement does not apply if the URL accessed by a client is an IP address.
- When a pre-connection is established for a client, the client uses HTTPS to detect whether the domain name of the client device's vendor is reachable. This action triggers HTTPS redirection.
- Exchange encryption parameters.
- Verify the server certificate.
- Exchange data keys.
When a client receives a certificate from the device, the browser displays the warning message "Your connection is not private". In this case, click Advanced and then Proceed to server address to access the Portal server. This warning message is displayed because the access device intercepts the original HTTPS request from the client, and forges a response from the HTTPS website. This response carries a device certificate that is not issued by a certificate authority and does not contain the URL of the HTTPS website accessed by the client (because the device cannot predict the URL of the HTTPS website accessed by the client). As a result, the client does not trust the certificate received from the device and therefore displays this warning message.
Portal Authorization
Authentication is used to check whether the identity of the user who attempts to access the network is valid. Authorization is used to specify the network access rights that an authorized user can have, that is, the resources that the authorized user can access. ACLs and UCL groups are often used for authorization. RADIUS authorization is used as an example. For details about other authorization methods and more authorization parameters, see AAA Authorization Scheme.
ACL
After a user is authenticated, the authentication server assigns an ACL to the user. Then, the access device controls the user packets according to the ACL.
- If the user packets match the permit rule in the ACL, the packets are allowed to pass through.
- If the user packets match the deny rule in the ACL, the packets are discarded.
The RADIUS server can assign an ACL to a user in either of the following modes:
- Static ACL assignment: The RADIUS server uses the standard RADIUS attribute Filter-Id to assign an ACL ID to the user. In this mode, the ACL and corresponding rules are configured on the access device in advance.
- Dynamic ACL assignment: The RADIUS server uses the RADIUS attribute HW-Data-Filter to assign an ACL ID and corresponding rules to the user. In this mode, the ACL ID and ACL rules are configured on the RADIUS server.
User Group
A user group consists of users (terminals) with the same attributes such as the role and rights, which is similar to the user group in the Windows system.
User group-based authorization applies to scenarios where a large number of users need to go online concurrently while resources are limited. Each user group can be associated with different ACLs, CAR policies, and packet priorities for access control. To use user group-based authorization delivered by the RADIUS server, ensure that the user group has been configured on the device (the user group does not need to be applied to the AAA domain).
Like static ACL-based authorization, the RADIUS server also uses the standard attribute Filter-Id to deliver user group information. The device preferentially considers the parsing result of Filter-Id to be an ACL ID. If this ACL ID does not exist on the device, the device considers the parsing result to be a user group. If the user group also does not exist on the device, authorization fails.
User group-based authorization delivered by the RADIUS server takes precedence over that configured on the device. If user group-based authorization delivered by the RADIUS server fails, user group-based authorization configured on the device is used.
free-rule
A free rule allows users to obtain certain network access rights before they are authenticated, to meet basic network access requirements.
Logout of Portal Authentication Users
- The RADIUS server still performs accounting for the users, causing incorrect accounting.
- Unauthorized users may spoof IP addresses and MAC addresses of authorized users to access the network.
- If there are many offline users, these users are still counted as access users of the device. As a result, other users may fail to access the network.
The access device needs to detect user logout immediately, delete the user entry, and instruct the RADIUS server to stop accounting.
- A client logs out proactively.
- An access device controls user logout.
- The authentication server or Portal server logs out a user.
A Client Logs Out
A user proactively initiates logout. For example, when the user clicks the logout button, the client sends a logout request to the Portal server.
For Portal authentication using the Portal protocol, after receiving a logout request from a user, the Portal server notifies the client that the user goes offline, without waiting for the access device to confirm the logout. For Portal authentication based on the HTTP or HTTPS protocol, after receiving a logout request from a user, the Portal server instructs the client to send a logout notification to the access device.
Portal authentication based on the Portal protocol
Figure 25-98 shows the logout process.
- The client sends a logout request to the Portal server.
- The Portal server sends a user logout response to the client and sends a logout notification packet (REQ_LOGOUT) to the access device.
The access device sends an accounting stop request packet (ACCOUNTING-REQUEST) to the RADIUS server and disconnects the user. The access device sends a logout response packet (ACK_LOGOUT) to the Portal server.
After receiving the ACK_LOGOUT message, the Portal server disconnects the user.
- The RADIUS server returns an accounting stop response packet (ACCOUNTING-RESPONSE) and disconnects the user.
Portal authentication based on the HTTP or HTTPS protocol
- The client sends a logout request to the Portal server.
- The Portal server instructs the client to send a user logout request to the access device and disconnects the user.
- The client sends a logout request to the access device.
- The access device sends an ACCOUNTING-REQUEST message to the RADIUS server and disconnects the user. The access device sends a logout response packet (ACK_LOGOUT) to the client.
- The RADIUS server returns an ACCOUNTING-RESPONSE message and disconnects the user.
The Access Device Controls User Logout
An administrator can run a command on an access device to log out users. If an administrator detects that an unauthorized user is online or wants a user to go offline and then go online during a test, the administrator can run a command on the access device to log out the user.
The Authentication Server Logs Out a User
The authentication server logs out a user using either of the following methods:
- Sends a Disconnect Message (DM) to an access device to log out a user.
- Uses the standard RADIUS attributes Session-Timeout and Termination-Action. The Session-Timeout attribute specifies the online duration timer of a user. The value of Termination-Action is set to 0, indicating that the user is disconnected by the RADIUS server when the online duration timer expires.
Figure 25-100 shows the user logout process controlled by the RADIUS server by sending a DM.
The RADIUS server sends a DM Request to the access device.
The access device sends an NTF_LOGOUT message to the Portal server and disconnects the user. In addition, the access device sends a DM ACK and an ACCOUNTING-REQUEST message to the RADIUS server.
When HTTP or HTTPS is used, the access device does not send an NTF_LOGOUT message to the Portal server.
The Portal server sends an AFF_ACK_LOGOUT message to the access device and disconnects the user. The RADIUS server sends an ACCOUNTING-RESPONSE message to the access device and disconnects the user.
The Portal Server Logs Out a User
When an administrator deregisters a user or the Portal server detects that a user is offline, the Portal server disconnects the user and sends a REQ_LOGOUT message to the access device.
Figure 25-101 shows the user logout process controlled by the Portal server. The Portal protocol is used as an example. For the HTTP/HTTPS protocol, the process is similar except that the Portal server does not send a logout notification to the access device.
- The Portal server sends an REQ_LOGOUT message to the access device.
The access device sends an accounting stop request packet (ACCOUNTING-REQUEST) to the RADIUS server and disconnects the user. The access device sends a logout response packet (ACK_LOGOUT) to the Portal server.
After receiving the ACK_LOGOUT message, the Portal server disconnects the user.
- The RADIUS server returns an ACCOUNTING-RESPONSE message and disconnects the user.
Portal Timers
As described in Table 25-75, an access device supports the following timers.
Portal Timer |
Purpose |
Application Scenario |
---|---|---|
To prevent frequent authentication upon user authentication failures. Frequent authentication may cause DoS attacks and waste system resources. |
External Portal server that uses the Portal or HTTP/HTTPS protocol or built-in Portal server that uses the Portal protocol |
|
To ensure that online Portal users can go offline and new Portal authentication users can go online if communication between the access device and Portal server is interrupted due to a network fault or the Portal server is faulty. |
External Portal server that uses the Portal or HTTP/HTTPS protocol |
|
To ensure that online Portal users can go offline and correct accounting is performed for users who have already gone offline if communication between the access device and Portal server is interrupted due to a network fault or the Portal server is faulty. |
External Portal server that uses the Portal protocol |
|
To prevent the following situation: If the network between the access device and Portal server is unstable or packets are lost, the Portal server may fail to receive the user logout packet from the access device. In this case, the user is displayed as disconnected on the access device but is still displayed as online on the Portal server. |
External Portal server that uses the Portal protocol |
|
To prevent the following situation: When a user goes offline due to browser closing or network disconnection, user information is still retained on the access device. As a result, accounting is inaccurate or other users cannot go online. |
Built-in Portal server that uses the Portal protocol |
Quiet Timer
This section discusses the timer that controls when Portal authentication restarts after the number of failed Portal authentication attempts within 60 seconds reaches the value specified by the portal quiet-times fail-times command.
If the number of a user's failed Portal authentication attempts within 60 seconds reaches the specified value, the access device waits for a period of time specified by the portal timer quiet-period quiet-period-value command. During this period, the access device discards the Portal authentication requests sent from the user. Figure 25-102 shows the operation of the quiet timer by using the Portal protocol as an example.
Portal Server Detection Timer
This section discusses the timer that controls the interval at which the Portal server state is detected. The value of the timer is specified by the server-detect interval interval-period command.
There are two Portal server detection modes: Portal-based and HTTP-based. For Portal-based Portal authentication, the device supports both of the two modes. For HTTP- or HTTPS-based Portal authentication, the device supports only HTTP-based Portal server detection.
In Portal-based Portal server detection mode: The Portal server periodically (at an interval of Ts) sends heartbeat packets to the access device. If the access device receives Portal heartbeat packets or other authentication packets from the Portal server before the Portal server detection timer expires, detection is successful and the access device considers the Portal server to be reachable and in Up state. Otherwise, Portal server detection fails. When the number of consecutive detection failures reaches the maximum number specified by the server-detect max-times times command, the access device changes the status of the Portal server from Up to Down.
In HTTP-based Portal server detection mode: The access device periodically sends HTTP packets to the Portal server and expects a response packet from the Portal server. If the access device receives a response packet within the specified detection interval (configured using server-detect interval interval-period), the detection is successful. Otherwise, the detection fails. When the number of consecutive detection failures reaches the maximum number specified by the server-detect max-times times command, the access device changes the status of the Portal server from Up to Down.
The Portal server detection process is shown in Figure 25-103 and Figure 25-104.
It is recommended that the value of interval-period configured on the access device be greater than the heartbeat packet interval configured on the Portal server.
Additionally, the access device takes the following actions to inform administrators of the Portal server states in real time and ensure that users have certain network access rights:
- Sends alarms: When the status of a Portal server is changed, the access device sends an alarm to the NMS. The alarm information records the IP address and status of the Portal server.
- Sends logs: When the status of a Portal server is changed, the access device sends a log to the NMS. The log information records the IP address and status of the Portal server.
- Enables the Portal escape mechanism. If the number of Portal servers in Up state is equal to or less than the minimum number (specified by the server-detect critical-num critical-num command), the access device disables Portal authentication so that all Portal users can access specified network resources. For details about authorization methods, see "The Portal server is Down" in NAC Escape Mechanism. When the access device receives a heartbeat packet or other authentication packets (for example, a user logout packet) from the Portal server, or HTTP-based Portal server detection success, the access device changes the status of the Portal server to Up. If the number of Portal servers in Up state is greater than the minimum value, Portal authentication is restored.
User Information Synchronization Timer
This section discusses the timer that controls the interval at which user information is synchronization. The value of the timer is specified by the user-sync interval interval-period command.
The Portal server periodically (at an interval of Tps) encapsulates online user information into a USER_SYN message (a user synchronization request packet) and sends it to the access device. Upon receipt of the USER_SYN message, the access device compares the online user information in the USER_SYN message with the local online user information.
- For user information that exists both in the USER_SYN message and on the access device, the access device marks the user information as synchronized.
- For user information that exists only on the access device but not in the USER_SYN message, the access device considers that user information fails to be synchronized. If information about a user fails to be synchronized before the synchronization timer expires, the synchronization failure is counted as 1. When the number of synchronization failures reaches the value specified by the user-sync max-times times command, the access device deletes the user information and logs out the user.
- For user information that exists only in the USER_SYN message but not on the access device, the access device encapsulates the user information into an ACK_USER_SYN message and sends the message to the Portal server. The Portal server then deletes the corresponding user information.
Figure 25-105 shows the process of synchronizing user information.
This function is applicable only to the external Portal server that uses the Portal protocol. Currently, the access device can synchronize user information only with Agile Controller-Campus, iMaster NCE-Campus, and Huawei Symantec TSM Portal server. When the Portal server is Agile Controller-Campus or iMaster NCE-Campus, you need to enable online user information synchronization on the server.
It is recommended that the product of interval-period and times be greater than the interval for the Portal server to send USER_SYN messages. Otherwise, the access device may log out users if it receives no USER_SYN message from the Portal server after the maximum number of synchronization failures is reached.
User Logout Retransmission Timer
This section discusses the timer that controls the timeout and retry behavior of a Portal authentication-enabled interface for sending NTF-LOGOUT messages.
During Portal authentication, after a Portal authentication user goes offline, the access device sends an NTF-LOGOUT message to instruct the Portal server to delete the user information. The access device waits for a period of time defined by the user logout retransmission timer, and sends another NTF-LOGOUT message if no response is received. The timer and the number of times it resends the NTF-LOGOUT messages are configured by the portal logout resend times timeout period command.
Figure 25-106 shows the operation of the user logout retransmission timer.
User Heartbeat Detection Timer
This section discusses the timer that controls the interval at which a built-in Portal server detects heartbeats of clients. The interval is specified by the portal local-server keep-alive interval interval-value command.
After a user is authenticated, the Portal server pushes a connection holding page that has a heartbeat program embedded to the user. The client then periodically sends heartbeat packets to the access device, indicating that the user is online. If the access device receives a heartbeat packet from the client, it resets the user heartbeat detection timer. If the access device does not receive any heartbeat packet or authentication packet from the client before the user heartbeat detection timer expires, the access device considers the user offline and logs out the user. Figure 25-107 shows the process of detecting user heartbeats by the built-in Portal server.
- Forcible mode: If the access device does not receive a heartbeat packet from a user before the user heartbeat detection timer expires, the access device logs out the user.
- Automatic mode: The access device checks whether the client browser supports the heartbeat program. If so, the forcible mode is used. If not, the access device does not detect user heartbeats. This mode is recommended to prevent user logout if the browser does not support the heartbeat program.
On the Windows 7 system, the heartbeat program is supported by Internet Explorer 8, FireFox 3.5.2, Google Chrome 28.0.1500.72, and Opera 12.00.
Browsers using Java1.7 and later versions do not support the heartbeat program.
Customizing the Built-in Portal Server Page
When a built-in Portal server is used for authentication, the device used as the built-in Portal server forcibly pushes authentication pages to users. Authentication pages include the login page, authentication success page, online page, and logout success page.
The device supports login page customization to meet various user requirements. You can load the logo, advertisement image, usage instructions, and warranty disclaimer on the login page, and change the background image or color of the login page.
Built-in Portal Server Page Customization Specifications
File Naming Specifications
The file names of primary index pages cannot be customized and must be the file name listed in Table 25-76. Users can customize other file names. Ensure that the file name does not contain Chinese characters and the file name length does not exceed 127 characters.
Primary Index Page |
File Name |
Description |
---|---|---|
Login page |
index.html login.html |
Before being authenticated, a user can access a device to connect to the network. The device redirects the user to the index.html page, and the login page is displayed. The user needs to request the login.html page on the index.html page. login.html is a Post request that is used to submit a user's user name and password. |
Authentication success page |
auth_success.html |
If the submitted user name and password pass server authentication, the device displays the authentication success page. To help the user know the online duration, the authentication success page displays the login and logout time. |
Authentication failure page |
auth_failure.html |
If the submitted user name and password fail server authentication, the device displays the authentication failure page. To help the user log in again, the authentication failure page must provide the Login button. |
Online page |
hasonline.html |
If the user has passed authentication and goes online again for authentication, the device displays the online page. To help the user log out easily, the online page must provide the Logout button. |
Connection page |
hasconnect.html |
If a user initiates an online request again while waiting to be authenticated, the device displays a connection page, indicating that the system is processing an authentication request. |
Logout success page |
logout_success.html |
When a user logs out successfully, the device displays the logout success page. To help the user log in again, the logout success page must provide the Login button. The logout success page (without the Login button) is triggered by the standby AC. The user cannot go to the login page from the logout success page. |
Logout success page (without the Login button) |
logout_success_without_login.html |
|
Logout failure page |
logout_failure.html |
When a user fails to log out, the device displays the logout failure page. To help the user log out again, the logout failure page must provide the Logout button. |
Secondary address allocation waiting page |
pnprealloc.html |
If secondary address allocation is not complete for a Plug and Play (PNP) user during authentication, the device displays the PNP waiting page, indicating that the user needs to wait for secondary address allocation. |
Page Request Specifications
The built-in Portal server accepts only Get and Post requests.
Get requests are used to obtain static files on authentication pages, including .png and .css files.
Post requests are used to submit user names and passwords and to log in and log out.
The background image, advertisement image, and logo image used by the PC must be named background-1.jpg, ad.png, and logo.png, respectively. The background image, advertisement image, and logo image used by a phone must be bg_phone.jpg, ad_phone.png, and logo_phone.png, respectively. The background image, advertisement image, and logo image used by WeChat must be bg_wechat.jpg, ad_wechat.png, and logo_wechat.png, respectively. Additionally, these images must be stored in /custom. Otherwise, the device does not support customization of these images.
Attribute Specifications in Post Requests
Forms on authentication pages must be edited according to the following rules:
The URL must contain the protocol type, gateway address, and port number, such as "<%=HuaWei_GetProtocol()%>://<%=HuaWei_GetUserGateWayIP()%>:<%=HuaWei_GetPort()%>/login". Otherwise, user information cannot be sent to the Portal server.
The fixed user name attribute is username and the fixed password attribute is password.
There must be an attribute that indicates the user login or logout: type = submit. The value is Login or Logout.
A login Post request must contain three attributes: username, password, and Login.
A logout Post request must contain the Logout attribute.
The page that must contain a login Post request is login.html.
The following example lists some scripts of the login.html page.
<form id="LoginForm" name="LoginForm" method="post" action="<%=HuaWei_GetProtocol()%>://<%=HuaWei_GetUserGateWayIP()%>:<%=HuaWei_GetPort()%>/login" onSubmit ='return CheckSubmit()' style="height:310px; margin-left:0px; margin-top:0px;" target="_top"> <INPUT type="submit" id="sub1" name="Login" style="height:100px; margin-top:3px; margin-bottom:3px;" /> <div id="lab_Username" style="display:none">Username:</div> <input type="text" name="username" maxlength="66" class="loginTxt" autocomplete="off" disableautocomplete placeholder="Username" style="background-image:(./image/user.jpg);background-repeat:no-repeat;padding-left:30px;height:45px;width:300px;background-position:left center;background-color:white;border:1px solid gray;display:inline" /> <div id="lab_PassWord" style="display:none">Password:</div> <input name="password" type="password" id="password" maxlength="128" class="loginTxt" autocomplete="off" disableautocomplete placeholder="Password" style="background-image:(./image/passcode.jpg);background-repeat:no-repeat;padding-left:30px;height:45px;width:300px;background-position:left center;background-color:white;border:1px solid gray;" /> <INPUT type="hidden" name="RedirectUrl" value=""> <INPUT type="hidden" name="anonymous" value="<%=HuaWei_GetAnonymous()%>"> <INPUT type="hidden" name="anonymousurl" value="<%=HuaWei_GetAnonymous()%>"> </form>
The pages that must contain a logout Post request are hasonline.html, auth_success.html, and logout_failure.html.
The following example lists some scripts of the hasonline.html page.
<form name=LogoutForm method=post action="<%=HuaWei_GetProtocol()%>://<%=HuaWei_GetUserGateWayIP()%>:<%=HuaWei_GetPort()%>/logout"> <input onClick="logout()" name="submit" type=submit value="Logout" class="none"> </form>
Page Content Modification Specifications
Currently, the default page file package (portalpage.zip) only provides HTML files in Chinese and English. If a user needs to change the language, the user can only modify the descriptive content displayed on the page.
Visit Huawei enterprise technical support website, download the product software package, and decompress the product software package to obtain the portalpage.zip file.
Decompress the portalpage.zip file. You can modify the descriptive content displayed on the page in the HTML file, but cannot modify names and directory structure of the primary index pages in the folder. For example, you can modify the Login Time displayed on the auth_success.html page.
<tr bgcolor="#B0DFFF"><td width="35%" align="center">Login Time:</td> <td > <INPUT type="hidden" name="HiddenLoginTime" size=25 value="<%=HuaWei_GetLoginTime()%>"> <INPUT name="LoginTime" size=20 maxlength="80" style="HEIGHT: 20Px; BACKGROUND-COLOR: #B0DFFF; BORDER-BOTTOM: #B0DFFF 1px double; BORDER-LEFT: #B0DFFF 1px double; BORDER-RIGHT: #B0DFFF 1px double; BORDER-TOP: #B0DFFF 1px double; COLOR: #000000" readonly > </td> </tr>
- After modifying the content, perform operations based on the page file compression and storage specifications.
Page File Compression and Storage Specifications
After all authentication pages have been edited, these pages must be compressed into a ZIP file. The ZIP file name cannot contain spaces.
The ZIP file can be uploaded to the device using FTP and stored in the root directory of the device.
The following example shows the storage directory of a ZIP file.
<HUAWEI> dir *.zip
Directory of sdcard:/
Idx Attr Size(Byte) Date Time(LMT) FileName
0 -rw- 146,825 Aug 30 2016 04:19:19 portalpage-normal.zip
1 -rw- 251,704 Aug 25 2016 18:07:28 portalpage.zip
2 -rw- 251,711 Aug 25 2016 19:01:37 portalpage1.zip
3 -rw- 251,709 Aug 25 2016 19:07:44 portalpage2.zip
1,969,388 KB total (1,681,124 KB free)
Script Functions on Pages
Table 25-77 lists script functions on pages. Select these script functions as required.
Script Function |
Description |
---|---|
HuaWei_GetUserGateWayIP |
Obtains a user gateway address to construct a URL so as to request pages from the built-in Portal server. |
HuaWei_GetUserOnlineTime |
Obtains the user online duration. This function is not used on authentication pages. |
HuaWei_GetUserIp |
Obtains a user IP address, which is displayed on the authentication success page and online page to notify the user of the obtained IP address. |
HuaWei_GetUserName |
Obtains user name information, which is displayed on the authentication success page and online page to notify the user of the login user name. |
HuaWei_GetChallenge |
Obtains the challenge and converts the challenge into displayable characters. This function is not used on authentication pages. |
HuaWei_GetLoginTime |
Obtains the user login time. The time is the device time and displayed on the authentication success page and online page to notify the user of the login time. |
HuaWei_GetAuthMode |
Obtains the user authentication mode, PAP or CHAP, which is used for exchange with the built-in Portal server. This function is not used on authentication pages. |
HuaWei_GetAccessPageName |
Obtains the requested page name. This function is not used on authentication pages. |
HuaWei_GetUserMAC |
Obtains the user MAC address, which carries user's MAC information in the secondary address allocation page address bar. |
HuaWei_GetHeartBeatInterval |
Obtains the client's packet detection time, which is set to one third of the heartbeat packet interval. This function is not used on authentication pages. |
HuaWei_GetProtocol |
Obtains the protocol type to construct a URL so as to request pages from the built-in Portal server. |
HuaWei_GetPort |
Obtains the port number of HTTP packets that trigger Portal redirection to construct a URL so as to request pages from the built-in Portal server. |
Customizing the Login Page of the Built-in Portal Server
When a built-in Portal server is used for authentication, the device used as the built-in Portal server forcibly pushes the login page to users. The users can enter the user name and password on the login page for authentication.
The device supports login page customization to meet various user requirements. For example, you can load the logo, advertisement image, usage instruction, and warranty disclaimer on the login page, and change the background image or color of the login page.
In Figure 25-108, a user uses the login page of the default package portalpage.zip.
In Figure 25-109, the portal local-server logo load logo-file command is used to load the logo image on the login page. The size of the logo image must be equal to or less than 128 KB. The image of 591 x 80 pixels is recommended.
In Figure 25-110, the portal local-server ad-image load ad-image-file command is used to load the advertisement image on the login page. The size of the advertisement image must be equal to or less than 256 KB. The image of 670 x 405 pixels is recommended.
In Figure 25-111, the portal local-server page-text load string command is used to load the usage instruction on the login page.
In Figure 25-112, the portal local-server policy-text load string command is used to load the warranty disclaimer on the login page.
In Figure 25-113, the portal local-server background-image load { background-image-file | default-image1 } command is used to change the background image of the login page.
Multi-mode Authentication
MAC Address-Prioritized Portal Authentication
MAC address-prioritized Portal authentication allows disconnected users who passed Portal authentication to access the network again within a certain period of time after the disconnection, without entering the user name and password, as long as they pass MAC address authentication. To use this function, you need to configure MAC address authentication and Portal authentication on the device, and enable MAC address-prioritized Portal authentication and configure the MAC address validity period on the authentication server. After users pass Portal authentication, they can access the network again through MAC address authentication within the MAC address validity period.
Authentication Process
On the network shown in Figure 25-114, when a client is to be authenticated for the first time, the access device sends the client's MAC address to the RADIUS server. However, authentication fails because the RADIUS server does not find the client's MAC address. Then Portal authentication is triggered for the client. After successful Portal authentication, the RADIUS server saves the client's MAC address. When the client attempts to connect to the wireless network after unexpected logout due to unstable wireless signals or switching between different signal coverage areas, the access device sends the client's MAC address to the RADIUS server for identity authentication.
- If the client's MAC address is stored on the RADIUS server, the RADIUS server verifies the user name and password (both are the client's MAC address) and authorizes the client. Then the client can access the network without entering the user name and password.
- If the client's MAC address has expired on the RADIUS server and the RADIUS server has deleted the client's MAC address, MAC address authentication fails. The access device then pushes the Portal authentication page to the client. The client user needs to enter the user name and password to pass identity authentication.
MAC Address Authentication in the Scenario Where a Portal Server Is Deployed
Only MAC address authentication needs to be configured on an access device when it is connected to a Cisco ISE server in Central Web Authentication (CWA) mode or an Aruba ClearPass server in Server-Initiated mode and this third-party server acts as the Portal server. The RADIUS server and Portal server work together to display the Portal authentication page. When the Portal server receives an authentication request from a client, the Portal server does not initiate Portal authentication. Instead, the Portal server notifies the RADIUS server of authenticating the client's MAC address again.
Authentication Process
Figure 25-115 shows packet exchange in the MAC address authentication process in the scenario where a Portal server is deployed.
- After a client connects to a wireless network, the access device sends an Access-Request packet to the RADIUS server for MAC address authentication.
- The RADIUS server checks for the client's MAC address in its cache. If the client's MAC address is not found (in the case of initial authentication or cache timeout), the RADIUS server sends a reply indicating authentication success and delivers common ACL for initial authorization, redirect ACL, and redirect URL to the access device. The initial authorization allows access only to the Portal server, DNS server, and DHCP server. The redirect URL allows the access device to redirect HTTP requests from the client to the Portal server login page. If the client's MAC address is found in the cache, the RADIUS server grants complete access permissions to the client.
The following is an example of the common ACL configuration:
acl number 3000 rule 1 permit ip destination 10.100.1.1 0 // Permit access to the Portal server. rule 2 permit ip destination 10.100.1.2 0 // Permit access to the DNS server. rule 3 permit tcp destination-port eq www // Configure the device to perform Portal redirection when users access HTTP pages. rule 4 permit tcp destination-port eq 443 // Configure the device to perform Portal redirection when users access HTTPS pages. rule 5 deny ip // Deny network access before successful Portal authentication.
The following is an example of the redirect ACL configuration:
acl number 3001 rule 1 deny udp destination-port eq dns // Configure the device not to perform redirection for DNS packets. rule 2 deny udp destination-port eq bootps // Configure the device not to perform redirection for DHCP packets. rule 3 deny udp destination-port eq bootpc // Configure the device not to perform redirection for DHCP packets. rule 4 deny ip destination 10.100.1.1 0 // Configure the device not to perform redirection when users access the Portal server. rule 5 permit tcp destination-port eq www // Configure the device to perform Portal redirection when users access HTTP pages. rule 6 permit tcp destination-port eq 443 // Configure the device to perform Portal redirection when users access HTTPS pages.
For wireless users, a common ACL takes precedence over a redirect ACL:- If a user packet matches a deny rule of a common ACL, the packet is discarded. Otherwise, the packet is forwarded and the system matches the packet against a redirect ACL.
- If the packet matches a deny rule of the redirect ACL or does not match any rule of the redirect ACL, the packet is forwarded. If the packet matches a permit rule of the redirect ACL, Portal redirection is performed.
- The client obtains an IP address. If the user attempts to access an unauthorized web page through a browser, the access device redirects the HTTP request of the client to the Portal server login page (that is, the redirect URL).
- The user enters the user name and password on the Portal authentication page to initiate an authentication request to the Portal server.
- The Portal server checks the user name and password. If they are correct, the Portal server instructs the RADIUS server to perform MAC address reauthentication for the client. If the user name or password is incorrect, MAC address reauthentication is not performed.
- The RADIUS server sends a DM or CoA message to the access device so that the access device performs MAC address reauthentication for the client.
- The access device sends the MAC address authentication request to the RADIUS server.
- The RADIUS server checks whether the client has been authenticated. If so, the RADIUS server reauthorizes a common ACL to grant the client complete network access permissions in the Access-Accept packet. The client then can access the Internet. If authentication fails, the client is redirected to the authentication failure page.
The following is an example of the common ACL configuration:
acl number 3002 rule 1 permit ip destination 10.100.1.1 0 // Permit access to the Portal server. rule 2 permit ip destination 10.100.1.2 0 // Permit access to the DNS server. rule 3 deny ip destination 10.0.0.0 0.255.255.255 // Deny access to other intranet resources. rule 4 permit ip // Permit access to the public network.
MAC Address + 802.1X Hybrid Authentication
Introduction
For security purposes, enterprises allow only specified terminals to access the enterprise network. After MAC address + 802.1X hybrid authentication is configured, the device performs MAC address authentication and 802.1X authentication on terminals in sequence. Terminals can access the network only after passing both authentications.
In this authentication mode, the device performs 802.1X authentication on user terminals only after they pass MAC address authentication, significantly reducing the workload on the RADIUS server.
Authentication Process
The MAC address + 802.1X hybrid authentication process is a combination of MAC address authentication and 802.1X authentication. For details, see 802.1X Authentication Process and MAC Address Authentication Process.
NAC Escape Mechanism
The NAC escape mechanism grants specified network access permissions to users when the authentication server is Down or to users who fail the authentication or are in pre-connection state. The escape solutions vary according to the authentication modes. Some escape solutions are shared by all authentication modes, while some are supported only in specific authentication modes.
Authentication Mode |
Triggered Event |
Escape Solution |
---|---|---|
Portal |
The Portal server is Down. |
authentication event portal-server-down action authorize For details, see (Optional) Configuring the Portal Escape Function. |
The authentication server is Down. |
authentication event authen-server-down action authorize For details, see Configuring Authentication Event Authorization Information. |
|
Authentication fails. |
authentication event authen-fail action authorize For details, see Configuring Authentication Event Authorization Information. |
|
Users are in pre-connection state. |
authentication event pre-authen action authorize For details, see Configuring Authentication Event Authorization Information. |
|
MAC |
The authentication server is Down. |
authentication event authen-server-down action authorize For details, see Configuring Authentication Event Authorization Information. |
Authentication fails. |
authentication event authen-fail action authorize For details, see Configuring Authentication Event Authorization Information. |
|
Users are in pre-connection state. |
authentication event pre-authen action authorize For details, see Configuring Authentication Event Authorization Information. |
- If the authentication server is Down: network access rights upon an authentication server Down event > network access rights for users who fail authentication > network access rights for users in the pre-connection state > user authorization based on whether the function of keeping users who fail to be authenticated and do not have any network access rights in the pre-connection state is enabled
- If users fail authentication: network access rights for users who fail authentication > network access rights for users in the pre-connection state > user authorization based on whether the function of keeping users who fail to be authenticated and do not have any network access rights in the pre-connection state is enabled
- If users are in the pre-connection state: network access rights for users in the pre-connection state > user authorization based on whether the function of keeping users who fail to be authenticated and do not have any network access rights in the pre-connection state is enabled
- If a Portal server is Down: network access rights if a Portal server is Down > network access rights before the Portal server is Down
Terminal Type Identification
Bring Your Own Device (BYOD) has become a trend as the Internet develops fast. Many enterprises now allow employees to connect to enterprise networks wirelessly using their own mobile terminals, such as mobile phones, tablets, and laptops. This work style enables employees to use up-to-date technologies, gives them more flexibility in work, and improves their working efficiency. However, employees' own terminals may bring security risks to enterprise networks, and traditional security technology that authenticates and authorizes users based on user roles cannot secure enterprise networks in this scenario. Terminal type identification technology can solve this problem. This technology identifies types of mobile terminals that employees use to connect to an enterprise network to control access from the mobile terminals. Enterprises can use this technology to implement user authentication and authorization based on user information, device type, access time, access location, and device operating environment.
Terminal type identification requires the cooperation between the device and RADIUS server.
- If the RADIUS server does not support the terminal type identification function, you need to configure this function on the device. The device then sends identified terminal types to the RADIUS server, and the RADIUS server can deliver corresponding rights based on the terminal types.
For details, see Implementation of Terminal Type Identification.
- If the RADIUS server supports the terminal type identification function, you need to configure this function on the RADIUS server and configure the terminal type awareness function on the device. The device then sends identified terminal types to the RADIUS server, and the RADIUS server can deliver corresponding rights based on the terminal types.
For details, see Implementation of Terminal Type Awareness.
Implementation of Terminal Type Identification
A terminal's organizationally unique identifier (OUI), the first 24 bits in its MAC address, identifies the manufacturer of the terminal.
The UA field in an HTTP packet sent from a terminal identifies the terminal's operating system, operating system version, CPU type, browser, and browser version.
The Option 12, Option 55, and Option 60 field in DHCP packets sent from a terminal identifies the host name of the terminal, list of requested parameters, and manufacturer type, respectively.
- As shown in Figure 25-116, DHCP Option 12 is the Host Name Option. In this option field, 12 indicates the information type, N indicates the length of the following information, and h1 to hN indicate the information content (containing the host name of the STA).
- In Figure 25-117, DHCP Option 55 is the Parameter Request List. In this option field, 55 indicates the information type, N indicates the length of the following information, and c1 to cN indicate the information content (containing the list of parameters requested by a STA. Different STAs may request different parameters.)
- As shown in Figure 25-118, DHCP Option 60 is the Vendor Class Identifier. In this option field, 60 indicates the information type, N indicates the length of the following information, and i1 to iN indicate the information content (containing the manufacturer identifier).
The device can obtain the MAC address, DHCP option information, and UA information of a terminal during Portal authentication, MAC address authentication, and 802.1X authentication.
- After a user accesses the network, the device obtains the user MAC address.
- When a user sends a DHCP Request packet to apply for an IP address to an AP, the AP uses the DHCP snooping function to obtain the option information from the DHCP Request packet and sends the option information to the device.
- When the user sends an HTTP Get packet to obtain the authentication page, the device analyzes the HTTP Get packet and obtains the UA information from the packet.
- The device identifies the terminal type by analyzing the MAC address, UA information, and DHCP option information of the user.
- The device encapsulates the terminal type in an authentication request packet and sends the packet to the RADIUS server. The RADIUS server authenticates the user based on the user account and terminal type, and delivers corresponding access rights to the user.
- After a user accesses the network, the device obtains the user MAC address.
- The device identifies the terminal type according to the OUI in the MAC address. If the OUI is an identifiable one, the device encapsulates the terminal type in an authentication request packet and sends the packet to the RADIUS server.
- When a user sends a DHCP Request packet to apply for an IP address to an AP, the AP uses the DHCP snooping function to obtain the option information from the DHCP Request packet and sends the option information to the device.
- The device identifies the terminal type according to the MAC address and DHCP option information, encapsulates the terminal type in an accounting packet, and sends the accounting packet to the AAA server.
- When the user sends an HTTP Get packet to obtain the authentication page in the forcible web page push process, the device analyzes the HTTP Get packet and obtains UA information from the packet.
- The device identifies the terminal type according to the MAC address, UA information, and DHCP option information, encapsulates the terminal type in an accounting packet, and sends the accounting packet to the RADIUS server.
The terminal type identified by the device is carried by Huawei proprietary attribute 157 HW-Terminal-Type and sent to the RADIUS server. The RADIUS server configures this attribute so that it can deliver authorization information based on the user terminal type.
Implementation of Terminal Type Awareness
- UA mode: The device parses the UA field that carries terminal type information from the HTTP Get packets sent from terminals. The device then encapsulates RADIUS accounting packets with the UA information in the proprietary attribute 159 HW-HTTP-UA, and sends the packets to the RADIUS server.
- DHCP option field mode: The device parses the required option field containing terminal type information from the received DHCP Request packets. The device encapsulates RADIUS accounting packets with the option field information in the proprietary attribute 158 HW-DHCP-Option, and sends the packets to the RADIUS server.
The device can obtain the DHCP option and UA information of a terminal during Portal authentication, MAC address authentication, and 802.1X authentication.
- When a user sends a DHCP Request packet to apply for an IP address to an AP, the AP uses the DHCP snooping function to obtain the option information from the DHCP Request packet and sends the option information to the device.
- When a user sends an HTTP Get packet to access the authentication page, the device obtains UA information from the packet.
- The device encapsulates an accounting request with the obtained DHCP option or UA information and sends the accounting request to the RADIUS server. The RADIUS server then identifies the terminal type based on the account information and the DHCP option or UA information, and delivers corresponding rights to the user.
- When a user sends a DHCP Request packet to apply for an IP address to an AP, the AP uses the DHCP snooping function to obtain the option information from the DHCP Request packet and sends the option information to the device.
- When a user sends an HTTP Get packet to obtain the authentication page in the forcible web page push process, the device obtains UA information from the packet.
- The device encapsulates an accounting request with the obtained DHCP option or UA information and sends the accounting request to the RADIUS server. The RADIUS server then identifies the terminal type based on the account information and the DHCP option or UA information, and delivers corresponding rights to the user.
iConnect Terminal Authentication
iConnect terminals refer to Internet of Things (IoT) terminals running an iConnect ecosystem. This ecosystem resides at the network layer in the Huawei CloudCampus Solution to implement plug-and-play and access security of IoT terminals.
- After IoT terminals access a campus network, they are faced with security risks, for example, spoofing attacks on access control systems, turnstiles, and cameras. Therefore, these terminals need to apply for digital certificates. However, operations for loading digital certificates are complex.
- Some IoT terminals, such as access control devices and connected thermostats, have no available GUI, posing high requirements on installation personnel.
iConnect terminals have built-in iConnect electronic identity information, which can be used as authentication credentials. After an iConnect terminal connects to a network, it automatically applies for and loads a digital certificate. This simplifies installation, improves deployment efficiency, and implements plug-and-play of iConnect terminals.
iConnect Electronic Identity Information
An iConnect URL is an extension of a Manufacturer Usage Description (MUD) URL.
MUD is defined in RFC 8520 and provides a means for terminals to clarify their identities and network functionality they require to function properly. MUD was initially designed for network access control and is being gradually applied to other fields. RFC 8520 also defines an MUD URL, from which an MUD file is available. This file contains the terminal identity and required network functionality, based on which network access rights are granted to terminals.
Figure 25-119 shows the format of an iConnect URL derived from the MUD URL.
Figure 25-120 shows the format of electronic identity information.
Field |
Length |
Description |
---|---|---|
IC |
2 characters |
The value is fixed at IC. |
Version number |
1 character |
The value can contain only digits 1 to 9 and uppercase letters A to F. |
Vendor name |
4-8 characters |
The value is case-sensitive and can contain only letters, for example, Huawei. |
Product name |
4-8 characters |
The value is case-sensitive and can contain only digits and letters, for example, AR502H. |
Terminal type |
0-16 characters |
The value is case-sensitive and can contain only digits and letters, for example, GW. |
SN |
0-32 characters |
This field indicates the serial number of a terminal. The value is case-sensitive and can contain only digits and letters. |
Local Authentication for iConnect Terminals
NAC is required for most terminals, but not iConnect terminals. Therefore, you can configure the function of allowing iConnect terminals to go online without authentication.
In a WLAN scenario, before configuring the device to allow iConnect terminals to go online without authentication, configure an iConnect SSID for iConnect terminals. For details about how to configure iConnect, see "iConnect Configuration" in the User Access and Authentication Configuration Guide.
The function of allowing iConnect terminals to go online without authentication takes effect only for MAC address authentication and Portal authentication users in wireless scenarios, but not MAC+802.1X authentication.
The function of allowing iConnect terminals to go online without authentication does not take effect for open users.
Figure 25-121 shows the local authentication process for an iConnect terminal.
- An iConnect terminal associates with an iConnect SSID to connect to the WLAN.
- The AP sends a CAPWAP packet carrying the terminal's identity information (iConnect URL) to the device.
- The device identifies the terminal as an iConnect terminal based on its identity information. If the device has been configured to allow iConnect terminals to go online without authentication, the device keeps the terminal online. If the received packet does not carry any iConnect URL or the device is not configured to allow iConnect terminals to go online without authentication, the terminal needs to complete the non-iConnect terminal authentication process.
RADIUS Authentication for iConnect Terminals
If the function of allowing iConnect terminals to go online without authentication is disabled on the device, RADIUS authentication can be performed on iConnect terminals.
The device sends a RADIUS packet carrying the electronic identity information of an iConnect terminal in Huawei proprietary RADIUS attribute 26-202 (HW-MUD-URL) to the RADIUS server.
The RADIUS server determines whether a terminal is an iConnect terminal based on the HW-MUD-URL attribute. If the terminal is an iConnect terminal, the RADIUS server queries the corresponding authorization policy based on the user account and encapsulates the authorization policy into an authentication response packet. For an iConnect terminal, you are advised to configure a redirection-related RADIUS attribute (such as HW-Redirect-ACL or HW-Portal-URL). In this way, the iConnect terminal will be redirected to a URL to download an EAP-TLS certificate after being authenticated successfully. After the certificate is downloaded, EAP-TLS authentication is triggered for the terminal.
The HW-MUD-URL attribute can be used only in wireless scenarios.
The RADIUS server must be iMaster NCE-Campus.
If a client sends an EAPoL-Start packet to trigger authentication, iConnect-URL is not carried during RADIUS authentication of an iConnect terminal.
- An iConnect terminal associates with an iConnect SSID to connect to the WLAN.
- The AP sends a CAPWAP packet carrying the terminal's identity information (iConnect URL) to the device.
- The device sends a RADIUS authentication request packet carrying the iConnect terminal's identity information to the RADIUS server.
- When receiving the authentication request packet, the RADIUS server identifies the terminal as an iConnect terminal based on the terminal identity information carried in the HW-MUD-URL attribute. The device then searches for the authorization policy (for example, RADIUS attribute HW-Redirect-ACL) corresponding to the user account, encapsulates an authentication response packet with the policy, and sends the packet to the device.
- The device executes the authorization policy carried in the authentication response packet. In this example, the device delivers a redirection policy after the terminal is successfully authenticated.
- The terminal is redirected to the specified URL (typically the Portal page URL provided by the RADIUS server) to download the digital certificate. After the digital certificate is downloaded, EAP-TLS authentication is performed on the iConnect terminal.
Logical Process of NAC Authentication
Logical Process of 802.1X Authentication
Figure 25-123 shows the processing logic of the access device during 802.1X authentication. RADIUS authentication is used as an example.
- When the device sends a request to the client for the user name and the client does not respond, the user obtains the corresponding network access rights if authorization upon no 802.1X client response is configured. If authorization upon no 802.1X client response is not configured, the device checks whether authorization for pre-connection users is configured and authorizes the user accordingly.
- When the client initiates authentication or responds to the authentication request sent from the access device, the user is authenticated successfully and obtains complete access rights if the RADIUS server is in Up state. If the user fails the authentication, the access device checks the authorization configuration upon authentication failures and the authorization configuration for pre-connection users in sequence, and authorizes the user accordingly.
- If the RADIUS server is in Down state, the access device checks the authorization configuration when the authentication server is Down, authorization configuration upon authentication failures, and authorization configuration for pre-connection users in sequence, and authorizes the user accordingly.
- If re-authentication is configured, re-authentication is performed for the user in the corresponding state according to the re-authentication trigger mechanism.
Wireless 802.1X users do not support authentication event authorization, including authorization if an 802.1X client does not respond, the authentication server goes Down, authentication fails, or an 802.1X user is in pre-connection state.
Logical Process of MAC Address Authentication
Figure 25-124 shows the processing logic of the access device during MAC address authentication. RADIUS authentication is used as an example.
- After detecting a new MAC address, the access device triggers MAC address authentication for the user.
- The access device sends a RADIUS Access-Request packet to the RADIUS server, requesting the RADIUS server to perform MAC address authentication for the user (for details, see RADIUS Server Selection Mechanism and MAC Address Authentication Process).
- If the MAC address authentication succeeds, the user goes online.
- If the MAC address authentication fails and the RADIUS server is in Down state (for details, see RADIUS Server Status Detection), the access device checks whether it is configured to authorize users when the RADIUS server is in Down state, to authorize users who fail to be authenticated, and to authorize pre-connection users (for details, see NAC Escape Mechanism). If so, the user obtains the corresponding network access rights; if not, the user does not have any network access rights.
- If the MAC address authentication fails and the RADIUS server is in Up state, the access device checks whether it is configured to authorize users who fail to be authenticated and to authorize pre-connection users. If yes, the user obtains the corresponding network access rights; if not, the user does not have any network access rights.
- For users in abnormal authentication state, the access device can be configured to re-authenticate the users so that they can obtain network access rights as soon as possible. For users who have passed MAC address authentication, re-authentication can ensure the validity of user identities (for details, see MAC Address Re-authentication).
Processing Logic of Portal Authentication
Figure 25-125 shows the processing logic of the access device during Portal authentication. RADIUS authentication is used as an example.
- When a user accesses a network, if pre-connection authorization is configured, the client obtains the corresponding permission. When the user accesses resources beyond the permissions, the user is redirected to the Portal authentication website. If pre-connection authorization is not configured, the user is redirected to the Portal authentication website.
- If a user needs to access the Portal authentication website and the Portal server is working properly, the access device and RADIUS server perform Portal authentication. If the Portal server is Down, the access device checks network access permissions of the user. When the Portal server changes from Down to Up, the user is reauthenticated in accordance with the reauthentication triggering mechanism.
- During Portal authentication, if the RADIUS server works properly, the user is authenticated successfully and granted complete permissions. If the user fails to be authenticated, the access device checks authentication failure and pre-connection authorization. The user obtains corresponding permissions. If the RADIUS server is Down, the access device checks network access permissions when the authentication server is Down, authentication fails, and the user is in the pre-connection phase.
- Overview of NAC
- Understanding 802.1X Authentication
- Understanding MAC Address Authentication
- Understanding Portal Authentication
- Multi-mode Authentication
- NAC Escape Mechanism
- Terminal Type Identification
- iConnect Terminal Authentication
- Logical Process of NAC Authentication