The radius-server accounting command configures the RADIUS accounting server.
The undo radius-server accounting command deletes the configuration.
By default, no RADIUS accounting server is configured.
radius-server accounting ipv4-address port [ vpn-instance vpn-instance-name | source { loopback interface-number | ip-address ipv4-address | vlanif interface-number } | weight weight-value ] *
radius-server accounting ipv6-address port [ source { loopback interface-number | ip-address ipv6-address | vlanif interface-number } | weight weight-value ] *
undo radius-server accounting [ ipv4-address [ port [ vpn-instance vpn-instance-name | source { loopback interface-number | ip-address ipv4-address | vlanif interface-number } | weight ] * ] ]
undo radius-server accounting [ ipv6-address [ port [ source { loopback interface-number | ip-address ipv6-address | vlanif interface-number } | weight ] ] ]
Parameter |
Description |
Value |
---|---|---|
ipv4-address |
Specifies the IPv4 address of a RADIUS accounting server. |
The value is a valid unicast address in dotted decimal notation. |
ipv6-address |
Specifies the IPv6 address of a RADIUS accounting server. |
The value is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X. |
port |
Specifies the port number of a RADIUS accounting server. |
The value is an integer that ranges from 1 to 65535. |
vpn-instance vpn-instance-name |
Specifies the name of a VPN instance that the RADIUS accounting server is bound to. |
The value must be an existing VPN instance name. |
source loopback interface-number |
Specifies the number of a loopback interface. |
The loopback interface must already exist. |
source ip-address ipv4-address |
Specifies the source IPv4 address in RADIUS packets sent from the device to a RADIUS accounting server. If this parameter is specified, ensure that the value of this parameter is the same as the client's IPv4 address specified on the RADIUS accounting server. If this parameter is not specified, the IPv4 address of the outbound interface is used as the source IPv4 address in RADIUS packets sent from the device to a RADIUS accounting server. |
The value is a valid unicast address in dotted decimal notation. |
source ip-address ipv6-address |
Specifies the source IPv6 address in RADIUS packets sent from the device to a RADIUS accounting server. If this parameter is not specified, the IPv6 address of the outbound interface is used as the source IPv6 address in RADIUS packets sent from the device to a RADIUS accounting server. This address cannot be a virtual IPv6 address of a VRRP6 group. |
The value is a 32-digit hexadecimal number, in the format X:X:X:X:X:X:X:X. |
source vlanif interface-number |
Specifies the IP address of a VLANIF interface as the source IP address. interface-number specifies the number of a VLANIF interface. |
The VLANIF interface must exist. |
weight weight-value |
Specifies the weight of a RADIUS accounting server. When multiple servers are available, the device uses the server with the highest weight to perform accounting. If the servers have the same weights, the device uses the server configured first to perform accounting. |
The value is an integer that ranges from 0 to 100. |
Usage Scenario
To perform accounting for users, configure a RADIUS accounting server. The device communicates with a RADIUS accounting server to obtain accounting information, and performs accounting for users based on the accounting information. The device sends accounting packets to the RADIUS accounting server only after the IP address and port number of the RADIUS accounting server are specified in the RADIUS server template.
Precautions
# Configure the primary RADIUS accounting server.
<HUAWEI> system-view [HUAWEI] radius-server template group1 [HUAWEI-radius-group1] radius-server accounting 10.163.155.12 1813
# Configure the secondary RADIUS accounting server.
<HUAWEI> system-view [HUAWEI] radius-server template group1 [HUAWEI-radius-group1] radius-server accounting 10.163.155.15 1813 weight 50