This section describes how to configure a RADIUS accounting server using the rpc method.
Operation |
XPATH |
---|---|
edit-config:create |
/huawei-aaa-radius:radius/radius-server |
Item |
Data |
Description |
---|---|---|
IPv4 address of the RADIUS accounting server | 10.1.1.1 | Set the IPv4 address of the RADIUS accounting server to 10.1.1.1. |
Port number of the RADIUS accounting server | 1817 | Set the port number of the RADIUS accounting server to 1817. |
Weight value of the RADIUS accounting server | 100 | Set the weight value of the RADIUS accounting server to 100. |
Shared key of the RADIUS accounting server | huawei@123 | Set the shared key of the RADIUS accounting server to huawei@123. |
<rpc message-id="1" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"> <edit-config> <target> <running/> </target> <config> <hw-aaa-radius:radius xmlns:hw-aaa-radius="urn:huawei:params:xml:ns:yang:huawei-aaa-radius"> <hw-aaa-radius:radius-server> <hw-aaa-radius:name>rds</hw-aaa-radius:name> <hw-aaa-radius:vsys>public</hw-aaa-radius:vsys> <hw-aaa-radius:accounting-server> <hw-aaa-radius:server-ip-address>10.1.1.1</hw-aaa-radius:server-ip-address> <hw-aaa-radius:port>1817</hw-aaa-radius:port> <hw-aaa-radius:shared-key>huawei@123</hw-aaa-radius:shared-key> <hw-aaa-radius:weight>100</hw-aaa-radius:weight> </hw-aaa-radius:accounting-server> </hw-aaa-radius:radius-server> </hw-aaa-radius:radius> </config> </edit-config> </rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <ok/> </rpc-reply>
Sample of failed response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="1"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message> The vpn-instance does not exist or is invalid.</error-message> <error-info>Error on node /huawei-aaa-radius:radius/radius-server[name="rds",vsys="public"]/accounting-server[server-ip-address="10.1.1.1"]</error-info> </rpc-error> </rpc-reply>