This section provides a sample of configuring an authentication mode for 802.1X users using the merge method. You can also use the create method to configure an authentication mode for 802.1X users.
Operation |
XPATH |
---|---|
edit-config:merge |
/huawei-nac-dot1x:dot1x-access/configure-mode/unified-mode/dot1x-access-profile/authentication-method |
Item |
Data |
Description |
---|---|---|
name |
test |
Set the authentication mode for 802.1X users to CHAP. The 802.1X access profile must exist on the switch. |
authentication-method |
chap |
<?xml version='1.0' encoding='UTF-8'?> <rpc xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="43a8e485-35d2-499e-895c-e2d2d5f555a8"> <edit-config> <target> <running/> </target> <error-option>rollback-on-error</error-option> <config> <dot1x-access xmlns="urn:huawei:params:xml:ns:yang:huawei-nac-dot1x"> <dot1x-access-profile> <name>test</name> <authentication-method>chap</authentication-method> </dot1x-access-profile> </dot1x-access> </config> </edit-config> </rpc>
Sample of successful response
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="43a8e485-35d2-499e-895c-e2d2d5f555a8"> <ok/> </rpc-reply>
Sample of failed response
<?xml version='1.0' encoding='UTF-8'?> <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="43a8e485-35d2-499e-895c-e2d2d5f555a8"> <rpc-error> <error-type>application</error-type> <error-tag>operation-failed</error-tag> <error-severity>error</error-severity> <error-message>parse rpc config error.</error-message> </rpc-error> </rpc-reply>