This section describes how to configure a RADIUS authorization server using the rpc method.
Operation |
XPATH |
|---|---|
edit-config:create |
/huawei-aaa-radius:radius/dynamic-authorization-server |
Item |
Data |
Description |
|---|---|---|
| IP address of the RADIUS authorization server | 10.1.1.1 | Set the IP address of the RADIUS authorization server to 10.1.1.1. |
| Shared key of the RADIUS authorization server | huawei@123 | Set the shared key of the RADIUS authorization server to huawei@123. |
| Duration for retaining a RADIUS authorization response packet | 10 | Set the duration for retaining a RADIUS authorization response packet to 10s. |
| Name of the RADIUS server template corresponding to the RADIUS authorization server | rds | Configure the RADIUS server template rds for the RADIUS authorization server. |
<rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="cf1228d1-c9bc-4e95-9578-4e7d0cd90e25">
<edit-config>
<target>
<running/>
</target>
<config>
<radius xmlns="urn:huawei:params:xml:ns:yang:huawei-aaa-radius">
<radius-server xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
<name>rds</name>
<vsys>public</vsys>
</radius-server>
<dynamic-authorization-server xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
<server-ip-address>10.1.1.1</server-ip-address>
<vsys>public</vsys>
<shared-key>huawei@123</shared-key>
<ack-reserved-interval>10</ack-reserved-interval>
<server-group>rds</server-group>
</dynamic-authorization-server>
</radius>
</config>
</edit-config>
</rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="cf1228d1-c9bc-4e95-9578-4e7d0cd90e25"> <ok/> </rpc-reply>
Sample of failed response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="cf1228d1-c9bc-4e95-9578-4e7d0cd90e25"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message> The server template does not exist.</error-message> <error-info>Error on node /huawei-aaa-radius:radius/dynamic-authorization-server[server-ip-address="10.1.1.1",vsys="public"]</error-info> </rpc-error> </rpc-reply>