primary accounting (RADIUS scheme view)
Syntax
primary accounting { ipv4-address | ipv6 ipv6-address } [ port-number | key [ cipher | simple ] key ] *
undo primary accounting
View
RADIUS scheme view
Default level
2: System level
Parameters
ipv4-address: Specifies the IPv4 address of the primary accounting server.
ipv6 ipv6-address: Specifies the IPv6 address of the primary accounting server.
port-number: Specifies the service port number of the primary RADIUS accounting server, which is a UDP port number in the range of 1 to 65535 and defaults to 1813.
key [ cipher | simple ] key: Sets the shared key for secure communication with the primary RADIUS accounting server.
cipher key: Sets a ciphertext shared key. The key argument is case sensitive.
In non-FIPS mode, the key is a string of 1 to 117 characters.
In FIPS mode, the key is a string of 8 to 117 characters.
simple key: Sets a plaintext shared key. The key argument is case sensitive.
In non-FIPS mode, the key is a string of 1 to 64 characters.
In FIPS mode, the key is a string of 8 to 64 characters. The string must contain digits, uppercase letters, lowercase letters, and special characters.
If neither cipher nor simple is specified, you set a plaintext shared key string.
Description
Use primary accounting to specify the primary RADIUS accounting server.
Use undo primary accounting to remove the configuration.
By default, no primary RADIUS accounting server is specified.
Make sure the port number and shared key settings of the primary RADIUS accounting server are the same as those configured on the server.
The IP addresses of the accounting servers and those of the authentication/authorization servers must be of the same IP version.
The IP addresses of the primary and secondary accounting servers must be different from each other and use the same IP version. Otherwise, the configuration fails.
The shared key configured by this command takes precedence over that configured by using the key accounting [ cipher | simple ] key command.
If you change the primary accounting server when the switch has already sent a start-accounting request to the server, the communication with the primary server times out, and the switch looks for a server in active state from the new primary server on.
If you remove an accounting server being used by users, the switch no longer sends real-time accounting or stop-accounting requests for the users, and does not buffer the stop-accounting requests.
For secrecy, all shared keys, including shared keys configured in plain text, are saved in cipher text to the configuration file.
Related commands: key.
Examples
# For RADIUS scheme radius1, set the IP address of the primary accounting server to 10.110.1.2, the UDP port to 1813, and the shared key to hello in plain text.
<Sysname> system-view [Sysname] radius scheme radius1 [Sysname-radius-radius1] primary accounting 10.110.1.2 1813 key simple hello