< Home

Configuring MAC Address Migration

This section provides a sample of configuring MAC address migration using the merge method.

Table 1 Configuring MAC address migration

Operation

XPATH

edit-config:merge

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/enable-vlan/all-vlan/all

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/enable-vlan/vlan-params/vlan/range/begin

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/enable-vlan/vlan-params/vlan/range/end

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/detect-function/enable

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/detect-function/interval

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/detect-function/times

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/quiet-function/quiet-period

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/quiet-function/quiet-times

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/quiet-log-function/enable

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/quiet-alarm-function/enable

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/quiet-alarm-function/lower-threshold-percentage

/huawei-nac:nac-access/configure-mode/unified-mode/mac-move/quiet-alarm-function/upper-threshold-percentage

Data Requirements

Table 2 Configuring MAC address migration

Item

Data

Description

all

all

Configure all the VLANs.

begin

2

Set the start VLAN ID to VLAN 2.

end

3

Set the end VLAN ID to VLAN 3.

enable

true

Enable MAC address migration.

interval

5

Set the interval at which a device detects users' online status before user MAC address migration to 5 seconds.

times

3

Set the maximum number of detections before user MAC address migration to 3.

quiet-period

100

Set the period that MAC address migration users stay in the quiet state to 100 seconds.

quiet-times

10

Set the number of times that MAC address migration users are allowed to migrate their MAC addresses within 60 seconds before the device quiets the users to 10.

lower-threshold-percentage

10

Set the lower alarm threshold for the percentage of MAC address migration users in quiet state to 10.

upper-threshold-percentage

20

Set the upper alarm threshold for the percentage of MAC address migration users in quiet state to 20.

Request Example

# Enable MAC address migration in all VLANs.

<?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:mac-move>
          <hw-nac:all>all</hw-nac:all>
        </hw-nac:mac-move>
      </hw-nac:nac-access>
    </config>
  </edit-config>
</rpc>

# Enable MAC address migration in a specified VLAN.

<?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:mac-move>
          <hw-nac:vlan>
            <hw-nac:range>
              <hw-nac:begin>2</hw-nac:begin>
              <hw-nac:end>3</hw-nac:end>
            </hw-nac:range>
          </hw-nac:vlan>
        </hw-nac:mac-move>
      </hw-nac:nac-access>
    </config>
  </edit-config>
</rpc>

# Configure a device to detect users' online status before user MAC address migration.

<?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:mac-move>
          <hw-nac:detect-function xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
            <hw-nac:enable>true</hw-nac:enable>
            <hw-nac:interval>5</hw-nac:interval>
            <hw-nac:times>3</hw-nac:times>
          </hw-nac:detect-function>
        </hw-nac:mac-move>
      </hw-nac:nac-access>
    </config>
  </edit-config>
</rpc>

# Enable the MAC address migration quiet function.

<?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:mac-move>
          <hw-nac:quiet-function xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
            <hw-nac:quiet-period>100</hw-nac:quiet-period>
            <hw-nac:quiet-times>10</hw-nac:quiet-times>
          </hw-nac:quiet-function>
        </hw-nac:mac-move>
      </hw-nac:nac-access>
    </config>
  </edit-config>
</rpc>

# Enable the device to record logs about MAC address migration quiet.

<?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:mac-move>
          <hw-nac:quiet-log-function xmlns:xc="urn:ietf:params:xml:ns:netconf:base:1.0" xc:operation="merge">
            <hw-nac:enable>true</hw-nac:enable>
          </hw-nac:quiet-log-function>
        </hw-nac:mac-move>
      </hw-nac:nac-access>
    </config>
  </edit-config>
</rpc>

# Enable the device to send alarms about MAC address migration quiet.

<?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>
    <default-operation>merge</default-operation>
    <config>
      <hw-nac:nac-access xmlns:hw-nac="urn:huawei:params:xml:ns:yang:huawei-nac">
        <hw-nac:mac-move>
          <hw-nac:quiet-alarm-function>
            <hw-nac:enable>true</hw-nac:enable>
          </hw-nac:quiet-alarm-function>
        </hw-nac:mac-move>
      </hw-nac:nac-access>
    </config>
  </edit-config>
</rpc>

# Configure the upper and lower alarm thresholds for the percentage of MAC address migration users in quiet state.

<?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>
    <default-operation>merge</default-operation>
    <config>
      <hw-nac:nac-access xmlns:hw-nac="urn:huawei:params:xml:ns:yang:huawei-nac">
        <hw-nac:mac-move>
          <hw-nac:quiet-alarm-function>
            <hw-nac:lower-threshold-percentage>10</hw-nac:lower-threshold-percentage>
            <hw-nac:upper-threshold-percentage>20</hw-nac:upper-threshold-percentage>
          </hw-nac:quiet-alarm-function>
        </hw-nac:mac-move>
      </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="0">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message> The VLAN list is invalid.</error-message>
    <error-info>Error on node /huawei-nac:nac-access/mac-move/vlan/range[begin="100"]</error-info>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >