< Home

Sample of Configuring a MAC Address-based Voice VLAN

This section provides a sample of configuring a MAC address-based voice VLAN using the edit-config method.

Table 1 Configuring a MAC address-based voice VLAN

Operation

XPATH

edit-config

/huawei-vlan:voice-vlan/remark-8021p

/huawei-vlan:voice-vlan/remark-dscp

/huawei-vlan:voice-vlan/address

/ietf-interfaces:interfaces/interface/huawei-vlan:voice-vlan

Data Requirements

Item

Data

Description

802.1p priority of the voice VLAN

7

Set the 802.1p priority of the voice VLAN to 7.

DSCP priority of the voice VLAN

50

Set the DSCP priority of the voice VLAN to 50.

OUI addresses of voice packets

12:34:12:34:12:34

Allow the voice packets coming from an IP phone whose MAC address is 1234-1234-1234 to be identified by the voice VLAN.

Mask length of the OUI address

24

The OUI mask address is ffff-ff00-0000.

Description of the OUI address

PhoneA

The description of the OUI address is PhoneA.

Interface name

XGigabitEthernet0/0/1

Enable the voice VLAN function on the XGigabitEthernet0/0/1 interface and specify VLAN 103 as a voice VLAN. Add voice VLAN IDs to untagged packets and change VLAN 0 in packets to the voice VLAN ID.

Interface type

iana-if-type:ethernetCsmacd

Voice VLAN ID

103

Adding voice VLAN IDs to untagged packets

true

Changing VLAN 0 in packets to the voice VLAN ID

true

Mode of increasing the priority of voice packets

mac-address

Specify that the priority of voice packets is increased based on MAC addresses.

Working mode of the voice VLAN

enable

Configure the voice VLAN to work in secure mode.

Mode of adding an interface to a voice VLAN

manual

Configure an interface to be added to a voice VLAN in manual mode.

To create a VLAN and add an interface to the VLAN, refer to VLAN Management. The related configuration is not provided here.

Request Example

# Sample of configuring the 802.1p priority and DSCP priority for a voice VLAN and setting the OUI address

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="11" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <huawei-vlan:voice-vlan xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
        <huawei-vlan:remark-8021p>7</huawei-vlan:remark-8021p>
        <huawei-vlan:remark-dscp>50</huawei-vlan:remark-dscp>
        <huawei-vlan:address>
          <huawei-vlan:mac>12:34:12:34:12:34</huawei-vlan:mac>
          <huawei-vlan:mask>24</huawei-vlan:mask>
          <huawei-vlan:description>PhoneA</huawei-vlan:description>
        </huawei-vlan:address>
      </huawei-vlan:voice-vlan>
    </config>
  </edit-config>
</rpc>

# Sample of configuring a MAC address-based voice VLAN on the XGigabitEthernet0/0/1 interface

<?xml version='1.0' encoding='UTF-8'?>
<rpc message-id="12" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <config>
      <if:interfaces xmlns:if="urn:ietf:params:xml:ns:yang:ietf-interfaces">
        <if:interface>
          <if:name>XGigabitEthernet0/0/1</if:name>
          <if:type xmlns:iana-if-type="urn:ietf:params:xml:ns:yang:iana-if-type">iana-if-type:ethernetCsmacd</if:type>
          <huawei-vlan:voice-vlan xmlns:huawei-vlan="urn:huawei:params:xml:ns:yang:huawei-vlan">
            <huawei-vlan:voice-vlan-id>103</huawei-vlan:voice-vlan-id>
            <huawei-vlan:include-untagged>true</huawei-vlan:include-untagged>
            <huawei-vlan:include-tag0>true</huawei-vlan:include-tag0>
            <huawei-vlan:remark-mode>mac-address</huawei-vlan:remark-mode>
            <huawei-vlan:security>enable</huawei-vlan:security>
            <huawei-vlan:mode>manual</huawei-vlan:mode>
          </huawei-vlan:voice-vlan>
        </if:interface>
      </if:interfaces>
    </config>
  </edit-config>
</rpc>

Response Example

Sample of successful response

<?xml version='1.0' encoding='UTF-8'?>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="11">
  <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="4">
  <rpc-error>
    <error-app-tag>-1</error-app-tag>
    <error-message> Auto-mode voice VLAN cannot be configured on a negotiation port.</error-message>
    <error-info>Error on node /ietf-interfaces:interfaces/interface[name="XGigabitEthernet0/0/1"]/huawei-vlan:voice-vlan</error-info>
  </rpc-error>
</rpc-reply>
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >