Configuring RADIUS schemes

A RADIUS scheme specifies the RADIUS servers that the device can work with and defines a set of parameters. The device uses the parameters to exchange information with the RADIUS servers, including the server IP addresses, UDP port numbers, shared keys, and server types.

Configuration task list

Configuring a test profile for RADIUS server status detection

Use a test profile to detect whether a RADIUS authentication server is reachable at a detection interval. To detect the RADIUS server status, you must configure the RADIUS server to use this test profile in a RADIUS scheme.

With the test profile specified, the device sends a detection packet to the RADIUS server within each detection interval. The detection packet is a simulated authentication request that includes the specified user name in the test profile.

The device refreshes the RADIUS server status at each detection interval according to the detection result.

The device stops detecting the status of the RADIUS server when one of the following operations is performed:

To configure a test profile for RADIUS server status detection:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Configure a test profile for detecting the status of RADIUS authentication servers.

radius-server test-profile profile-name username name [ interval interval ]

By default, no test profiles exist.

You can configure multiple test profiles in the system.

Creating a RADIUS scheme

Create a RADIUS scheme before performing any other RADIUS configurations. You can configure a maximum of 16 RADIUS schemes. A RADIUS scheme can be used by multiple ISP domains.

To create a RADIUS scheme:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Create a RADIUS scheme and enter RADIUS scheme view.

radius scheme radius-scheme-name

By default, no RADIUS schemes exist.

Specifying the RADIUS authentication servers

A RADIUS authentication server completes authentication and authorization together, because authorization information is piggybacked in authentication responses sent to RADIUS clients.

You can specify one primary authentication server and a maximum of 16 secondary authentication servers for a RADIUS scheme. When the primary server is not available, the device searches for the secondary servers in the order they are configured. The first secondary server in active state is used for communication.

If redundancy is not required, specify only the primary server. A RADIUS authentication server can function as the primary authentication server for one scheme and a secondary authentication server for another scheme at the same time.

To specify RADIUS authentication servers for a RADIUS scheme:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Specify RADIUS authentication servers.

  • Specify the primary RADIUS authentication server:primary authentication { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | test-profile profile-name | vpn-instance vpn-instance-name ] *

  • Specify a secondary RADIUS authentication server:secondary authentication { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | test-profile profile-name | vpn-instance vpn-instance-name ] *

By default, no authentication servers are specified.

To support server status detection, specify an existing test profile for the RADIUS authentication server. If the test profile does not exist, the device cannot detect the server status.

Two authentication servers in a scheme, primary or secondary, cannot have the same combination of IP address, port number, and VPN instance.

Specifying the RADIUS accounting servers and the relevant parameters

You can specify one primary accounting server and a maximum of 16 secondary accounting servers for a RADIUS scheme. When the primary server is not available, the device searches for the secondary servers in the order they are configured. The first secondary server in active state is used for communication.

If redundancy is not required, specify only the primary server. A RADIUS accounting server can function as the primary accounting server for one scheme and a secondary accounting server for another scheme at the same time.

The device sends a stop-accounting request to the accounting server in the following situations:

When the maximum number of real-time accounting attempts is reached, the device disconnects users who have no accounting responses.

RADIUS does not support accounting for FTP, SFTP, and SCP users.

To specify RADIUS accounting servers and the relevant parameters for a RADIUS scheme:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Specify RADIUS accounting servers.

  • Specify the primary RADIUS accounting server:primary accounting { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | vpn-instance vpn-instance-name ] *

  • Specify a secondary RADIUS accounting server:secondary accounting { ipv4-address | ipv6 ipv6-address } [ port-number | key { cipher | simple } string | vpn-instance vpn-instance-name ] *

By default, no accounting servers are specified.

Two accounting servers in a scheme, primary or secondary, cannot have the same combination of IP address, port number, and VPN instance.

4. (Optional.) Set the maximum number of real-time accounting attempts.

retry realtime-accounting retries

The default setting is 5.

Specifying the shared keys for secure RADIUS communication

The RADIUS client and server use the MD5 algorithm and shared keys to generate the Authenticator value for packet authentication and user password encryption. The client and server must use the same key for each type of communication.

A key configured in this task is for all servers of the same type (accounting or authentication) in the scheme. The key has a lower priority than a key configured individually for a RADIUS server.

To specify a shared key for secure RADIUS communication:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Specify a shared key for secure RADIUS communication.

key { accounting | authentication } { cipher | simple } string

By default, no shared key is specified for secure RADIUS communication.

The shared key configured on the device must be the same as the shared key configured on the RADIUS server.

Specifying an MPLS L3VPN instance for the scheme

The VPN instance specified for a RADIUS scheme applies to all authentication and accounting servers in that scheme. If a VPN instance is also configured for an individual RADIUS server, the VPN instance specified for the RADIUS scheme does not take effect on that server.

To specify a VPN instance for a scheme:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Specify a VPN instance for the RADIUS scheme.

vpn-instance vpn-instance-name

By default, a RADIUS scheme belongs to the public network.

Setting the username format and traffic statistics units

A username is in the userid@isp-name format, where the isp-name argument represents the user's ISP domain name. By default, the ISP domain name is included in a username. However, older RADIUS servers might not recognize usernames that contain the ISP domain names. In this case, you can configure the device to remove the domain name of each username to be sent.

If two or more ISP domains use the same RADIUS scheme, configure the RADIUS scheme to keep the ISP domain name in usernames for domain identification.

The device reports online user traffic statistics in accounting packets. The traffic measurement units are configurable, but they must be the same as the traffic measurement units configured on the RADIUS accounting servers.

To set the username format and the traffic statistics units for a RADIUS scheme:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Set the format for usernames sent to the RADIUS servers.

user-name-format { keep-original | with-domain | without-domain }

By default, the ISP domain name is included in a username.

4. (Optional.) Set the data flow and packet measurement units for traffic statistics.

data-flow-format { data { byte | giga-byte | kilo-byte | mega-byte } | packet { giga-packet | kilo-packet | mega-packet | one-packet } }*

By default, traffic is counted in bytes and packets.

Setting the maximum number of RADIUS request transmission attempts

RADIUS uses UDP packets to transfer data. Because UDP communication is not reliable, RADIUS uses a retransmission mechanism to improve reliability. A RADIUS request is retransmitted if the NAS does not receive a server response for the request within the response timeout timer. For more information about the RADIUS server response timeout timer, see "Setting RADIUS timers."

You can set the maximum number for the NAS to retransmit a RADIUS request to the same server. When the maximum number is reached, the NAS tries to communicate with other RADIUS servers in active state. If no other servers are in active state at the time, the NAS considers the authentication or accounting attempt a failure.

To set the maximum number of RADIUS request transmission attempts:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Set the maximum number of RADIUS request transmission attempts.

retry retries

The default setting is 3.

Setting the status of RADIUS servers

To control the RADIUS servers with which the device communicates when the current servers are no longer available, set the status of RADIUS servers to blocked or active. You can specify one primary RADIUS server and multiple secondary RADIUS servers. The secondary servers function as the backup of the primary server. The device chooses servers based on the following rules:

By default, the device sets the status of all RADIUS servers to active. However, in some situations, you must change the status of a server. For example, if a server fails, you can change the status of the server to blocked to avoid communication attempts to the server.

To set the status of RADIUS servers:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Set the RADIUS server status.

  • Set the status of the primary RADIUS authentication server:state primary authentication { active | block }

  • Set the status of the primary RADIUS accounting server:state primary accounting { active | block }

  • Set the status of a secondary RADIUS authentication server:state secondary authentication [ { ipv4-address | ipv6 ipv6-address } [ port-number | vpn-instance vpn-instance-name ] * ] { active | block }

  • Set the status of a secondary RADIUS accounting server:state secondary accounting [ { ipv4-address | ipv6 ipv6-address } [ port-number | vpn-instance vpn-instance-name ] * ] { active | block }

By default, a RADIUS server is in active state.

The configured server status cannot be saved to any configuration file, and can only be viewed by using the display radius scheme command. After the device restarts, all servers are restored to the active state.

Specifying the source IP address for outgoing RADIUS packets

The source IP address of RADIUS packets that a NAS sends must match the IP address of the NAS configured on the RADIUS server. A RADIUS server identifies a NAS by its IP address. Upon receiving a RADIUS packet, a RADIUS server checks whether the source IP address of the packet is the IP address of a managed NAS.

The source address of outgoing RADIUS packets is typically the IP address of an egress interface on the NAS to communicate with the RADIUS server. However, in some situations, you must change the source IP address. For example, when VRRP is configured for stateful failover, configure the virtual IP of the uplink VRRP group as the source address.

You can specify a source IP address for outgoing RADIUS packets in RADIUS scheme view or in system view.

Before sending a RADIUS packet, the NAS selects a source IP address in the following order:

  1. The source IP address specified for the RADIUS scheme.

  2. The source IP address specified in system view for the VPN or public network, depending on where the RADIUS server resides.

  3. The IP address of the outbound interface specified by the route.

To specify a source IP address for all RADIUS schemes in a VPN or the public network:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Specify a source IP address for outgoing RADIUS packets.

radius nas-ip { ipv4-address | ipv6 ipv6-address } [ vpn-instance vpn-instance-name ]

By default, the IP address of the RADIUS packet outbound interface is used as the source IP address.

To specify a source IP address for a RADIUS scheme:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Specify a source IP address for outgoing RADIUS packets.

nas-ip { ipv4-address | ipv6 ipv6-address }

By default, the source IP address specified by the radius nas-ip command in system view is used. If the source IP address is not specified, the IP address of the outbound interface is used.

Setting RADIUS timers

The device uses the following types of timers to control communication with a RADIUS server:

When you set RADIUS timers, follow these guidelines:

To set RADIUS timers:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Set the RADIUS server response timeout timer.

timer response-timeout seconds

The default setting is 3 seconds.

4. Set the quiet timer for the servers.

timer quiet minutes

The default setting is 5 minutes.

5. Set the real-time accounting timer.

timer realtime-accounting interval [ second ]

The default setting is 12 minutes.

Configuring the accounting-on feature

When the accounting-on feature is enabled, the device automatically sends an accounting-on packet to the RADIUS server after a reboot. Upon receiving the accounting-on packet, the RADIUS server logs out all online users so they can log in again through the device. Without this feature, users cannot log in again after the reboot, because the RADIUS server considers them to come online.

You can configure the interval for which the device waits to resend the accounting-on packet and the maximum number of retries.

The RADIUS server must run on IMC to correctly log out users when a card reboots on the distributed device to which the users connect.

The extended accounting-on feature enhances the accounting-on feature by applying to the scenario that an SPU reboots but the device does not reboot. For the extended accounting-on feature to take effect, you must enable the accounting-on feature.

When the extended accounting-on feature is enabled, the device automatically sends an accounting-on packet to the RADIUS server after an SPU reboot. The packet contains both the device and SPU identifiers. Upon receiving the accounting-on packet, the RADIUS server logs out all online users who access the device through the SPU.

The extended accounting-on feature is applicable to IPoE, LAN, and PPP (L2TP LAC-side) users. Data of these users is saved to the SPUs through which the users access the device.

To configure the accounting-on feature for a RADIUS scheme:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Enable accounting-on.

accounting-on enable [ interval interval | send send-times ] *

By default, the accounting-on feature is disabled.

4. (Optional.) Enable extended accounting-on.

accounting-on extended

By default, extended accounting-on is disabled.

Interpreting the RADIUS class attribute as CAR parameters

A RADIUS server may deliver CAR parameters for user-based traffic monitoring and control by using the RADIUS class attribute (attribute 25) in RADIUS packets. You can configure the device to interpret the class attribute to CAR parameters.

To configure the device to interpret the RADIUS class attribute as CAR parameters:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Interpret the RADIUS class attribute as CAR parameters.

attribute 25 car

By default, the RADIUS class attribute is not interpreted as CAR parameters.

Configuring the Login-Service attribute check method for SSH, FTP, and terminal users

The device supports the following check methods for the Login-Service attribute (RADIUS attribute 15) of SSH, FTP, and terminal users:

An Access-Accept packet received for a user must contain the matching attribute value. Otherwise, the user cannot log in to the device.

Use the loose check method only when the server does not issue Login-Service attribute values 50, 51, and 52 for SSH, FTP, and terminal users.

To configure the Login-Service attribute check method for SSH, FTP, and terminal users:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Configure the Login-Service attribute check method for SSH, FTP, and terminal users.

attribute 15 check-mode { loose | strict }

The default check method is strict.

Setting the data measurement unit for the Remanent_Volume attribute

The RADIUS server uses Remanent_Volume attribute in authentication or real-time accounting responses to notify the device of the current amount of data available for online users.

Perform this task to set the data measurement unit for the Remanent_Volume attribute. Make sure the configured measurement unit is the same as the user data measurement unit on the RADIUS server.

To set the data measurement unit for the Remanent_Volume attribute:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enter RADIUS scheme view.

radius scheme radius-scheme-name

N/A

3. Set the data measurement unit for the Remanent_Volume attribute.

attribute remanent-volume unit { byte | giga-byte | kilo-byte | mega-byte }

By default, the data measurement unit is kilobyte.

Enabling SNMP notifications for RADIUS

When SNMP notifications are enabled for RADIUS, the SNMP agent supports the following notifications generated by RADIUS:

For RADIUS SNMP notifications to be sent correctly, you must also configure SNMP on the device. For more information about SNMP configuration, see the network management and monitoring configuration guide for the device.

To enable SNMP notifications for RADIUS:

Step

Command

Remarks

1. Enter system view.

system-view

N/A

2. Enable SNMP notifications for RADIUS.

snmp-agent trap enable radius [ accounting-server-down | accounting-server-up | authentication-error-threshold | authentication-server-down | authentication-server-up ] *

By default, all SNMP notifications are disabled for RADIUS.

Displaying and maintaining RADIUS

Execute display commands in any view and reset commands in user view.

Task

Command

Display the RADIUS scheme configuration.

display radius scheme [ radius-scheme-name ]

Display RADIUS packet statistics.

display radius statistics

Clear RADIUS statistics.

reset radius statistics