< Home

Example for Configuring a MAC Address-based Voice VLAN (IP Phones Send Untagged Voice Packets)

Networking Requirements

As shown in Figure 1, the switch connects to IP phones and a PC. The switch uses VLAN 2 to transmit voice packets and VLAN 3 to transmit data packets. PC A connects to IP phone A and they connect to the switch, and IP phone B separately connects to the switch. IP phones send untagged voice packets. Users require high quality of the VoIP service; therefore, voice data flows must be transmitted with a high priority to ensure the call quality.

Figure 1 Networking for configuring a MAC address-based voice VLAN

Configuration Roadmap

Because voice and data packets received by the switch are untagged, you need to configure OUIs to differentiate voice and data traffic. The configuration roadmap is as follows:
  1. Create VLANs on the switch and add interfaces to VLANs to implement Layer 2 connectivity.
  2. Configure an OUI so that the switch adds a VLAN tag to voice packets in which the source MAC address matches the OUI.
  3. Configure VLAN 2 as the voice VLAN and configure the interface to allow voice packets to pass through.

Procedure

  1. Configure VLANs and interfaces on the Switch.

    # Create VLANs.

    <HUAWEI> system-view
    [HUAWEI] sysname Switch
    [Switch] vlan batch 2 3
    

    # Configure VLANs allowed by GE0/0/1.

    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] port link-type hybrid
    [Switch-GigabitEthernet0/0/1] port hybrid pvid vlan 3
    [Switch-GigabitEthernet0/0/1] port hybrid untagged vlan 2 to 3
    [Switch-GigabitEthernet0/0/1] quit
    [Switch] interface gigabitethernet 0/0/2
    [Switch-GigabitEthernet0/0/2] port link-type hybrid
    [Switch-GigabitEthernet0/0/2] port hybrid untagged vlan 2
    [Switch-GigabitEthernet0/0/2] quit
    

  2. Configure an OUI.

    [Switch] voice-vlan mac-address 0003-6B00-0000 mask ffff-ff00-0000

  3. # Enable the voice VLAN function on GE0/0/1. The configuration of GE0/0/2 is similar to the configuration of GE0/0/1, and is not mentioned here.

    [Switch] interface gigabitethernet 0/0/1
    [Switch-GigabitEthernet0/0/1] voice-vlan 2 enable include-untagged
    [Switch-GigabitEthernet0/0/1] voice-vlan remark-mode mac-address
    [Switch-GigabitEthernet0/0/1] quit

  4. Verify the configuration.

    Run the display voice-vlan 2 status command to check the voice VLAN configuration.

    [Switch] display voice-vlan 2 status
    Voice VLAN Configurations: 
    -----------------------------------------------------------
    Voice VLAN ID            : 2
    Voice VLAN status        : Enable
    Voice VLAN 8021p remark  : 6
    Voice VLAN dscp remark   : 46
    -----------------------------------------------------------
    Port Information: 
    -------------------------------------------------------------------------------
    Port                       Add-Mode  Security-Mode  Legacy  PribyVLAN  Untag
    -------------------------------------------------------------------------------
    GigabitEthernet0/0/2       Manual    Normal         Disable Disable    Enable
    GigabitEthernet0/0/1       Manual    Normal         Disable Disable    Enable
    

Configuration Files

Switch configuration file

#
sysname Switch
#
voice-vlan mac-address 0003-6b00-0000 mask ffff-ff00-0000
#
vlan batch 2 to 3
#
interface GigabitEthernet0/0/1
 port link-type hybrid
 voice-vlan 2 enable include-untagged
 voice-vlan remark-mode mac-address    
 port hybrid pvid vlan 3
 port hybrid untagged vlan 2 to 3
#
interface GigabitEthernet0/0/2
 port link-type hybrid
 voice-vlan 2 enable include-untagged
 voice-vlan remark-mode mac-address    
 port hybrid untagged vlan 2
#
return
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >