This section provides a sample of configuring MAC addresses in the uppercase format as user names for MAC address authentication using the merge method. You can also use the create method to configure MAC addresses in the uppercase format as 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/mac-address/letter |
Item |
Data |
Description |
---|---|---|
name |
test |
Configure MAC addresses in the uppercase format as user names for MAC address authentication. The MAC access profile must exist on the switch. |
mac-address-format |
with-hyphen-normal |
<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> <mac-address-format>with-hyphen-normal</mac-address-format> <letter>uppercase</letter> </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
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11"> <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"]/letter</error-info> </rpc-error> </rpc-reply>