This section provides a sample of configuring fixed user names for MAC address authentication using the merge method. You can also use the create method to configure fixed user names for MAC address authentication.
Operation |
XPATH |
---|---|
edit-config:merge |
/huawei-nac-mac:mac-access/configure-mode/unified-mode/mac-access-profile/user-name-format/fixed-format/user-name |
Item |
Data |
Description |
---|---|---|
name |
test |
Configure fixed user names for MAC address authentication. The MAC access profile must exist on the switch. |
user-name |
huawei |
<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> <mac-access xmlns="urn:huawei:params:xml:ns:yang:huawei-nac-mac"> <mac-access-profile> <name>test</name> <user-name>huawei</user-name> </mac-access-profile> </mac-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="12"> <rpc-error> <error-app-tag>-1</error-app-tag> <error-message>CMD is incomplete, para fixed or macaddress must have one.</error-message> <error-info>Error on node /huawei-nac-mac:mac-access/mac-access-profile[name="mactest"]/user-name</error-info> </rpc-error> </rpc-reply>