< Home

Configuring the Source IP Address and Source MAC Address of Offline Detection Packets in a VLAN

This section provides a sample of configuring the source IP address and source MAC address of offline detection packets in a VLAN using the merge method.

Table 1 Configuring the source IP address and source MAC address of offline detection packets in a VLAN

Operation

XPATH

edit-config:merge

/huawei-nac:nac-access/configure-mode/unified-mode/arp-detect/detect-source/detect-source-item/vlan

/huawei-nac:nac-access/configure-mode/unified-mode/arp-detect/detect-source/detect-source-item/ip

/huawei-nac:nac-access/configure-mode/unified-mode/arp-detect/detect-source/detect-source-item/mac

Data Requirements

Table 2 Configuring the source IP address and source MAC address of offline detection packets in a VLAN

Item

Data

Description

vlan

1

Set the VLAN ID to VLAN 1.

ip

192.168.1.1

Set the IP address to 192.168.1.1.

mac

2222-1111-1234

Set the MAC address to 2222-1111-1234.

Request Example

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="0" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <hw-nac:nac-access xmlns:hw-nac="urn:huawei:params:xml:ns:yang:huawei-nac">
        <hw-nac:arp-detect>
          <hw-nac:detect-source>
            <hw-nac:detect-source-item xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
              <hw-nac:vlan>1</hw-nac:vlan>
              <hw-nac:ip>192.168.1.1</hw-nac:ip>
              <hw-nac:mac>2222-1111-1234</hw-nac:mac>
            </hw-nac:detect-source-item>
          </hw-nac:detect-source>
        </hw-nac:arp-detect>
      </hw-nac:nac-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

<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="5">
  <rpc-error>
    <error-type>application</error-type>
    <error-tag>operation-failed</error-tag>
    <error-severity>error</error-severity>
    <error-path/>
    <error-message>Target datastore cannot be configured.</error-message>
  </rpc-error>
</rpc-reply> 
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >