< Home

Configuring the Device to Send DHCP Option Information to the Authentication Server When Triggering MAC Address Authentication Through DHCP Packets

This section provides a sample of configuring the device to send DHCP option information to the authentication server when triggering MAC address authentication through DHCP packets using the merge method.

Table 1 Configuring the device to send DHCP option information to the authentication server when triggering MAC address authentication through DHCP packets

Operation

XPATH

edit-config:merge

/huawei-nac-mac:mac-access/configure-mode/unified-mode/mac-access-profile/get-dhcp-option

Data Requirements

Table 2 Configuring the device to send DHCP option information to the authentication server when triggering MAC address authentication through DHCP packets

Item

Data

Description

name

test

Configure the MAC access profile named test.

dhcp-option-format

option82-circuit-id

Set the user name for MAC address authentication to a specified DHCP option.

separate

#

Set the delimiter in the user name of MAC address authentication to #.

code-format

format-hex

Set the user name for MAC address authentication in hexadecimal format.

password

huawei@123

Set the password for MAC address authentication to huawei@123.

get-dhcp-option

option-82

Send DHCP option information to the authentication server.

Request Example

<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <hw-nac-mac:mac-access xmlns:hw-nac-mac="urn:huawei:params:xml:ns:yang:huawei-nac-mac">
        <hw-nac-mac:mac-access-profile>
          <hw-nac-mac:name>test</hw-nac-mac:name>
          <hw-nac-mac:dhcp-option-format>option82-circuit-id</hw-nac-mac:dhcp-option-format>
          <hw-nac-mac:separate>#</hw-nac-mac:separate>
          <hw-nac-mac:code-format>format-hex</hw-nac-mac:code-format>
          <hw-nac-mac:password>huawei@123</hw-nac-mac:password>
          <hw-nac-mac:get-dhcp-option>option-82</hw-nac-mac:get-dhcp-option>
        </hw-nac-mac:mac-access-profile>
      </hw-nac-mac:mac-access>
    </config>
  </edit-config>
</rpc>

Response Example

Sample of successful response

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="0">
 <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="1">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-path>/huawei-nac-mac:mac-access/mac-access-profile[name='laoyu']/get-dhcp-option[.='option-16']</error-path>
    <error-message>parse rpc config error.(Invalid value "option-16" in "get-dhcp-option" element.).</error-message>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >