How to configure the voice vlan for the interface to the IP phone?

2023-09-30 23:07:41 Published
  • 0 Followed
  • 0Collected ,3272Browsed

Network Topology

Switch ----- IP phone ------ PC

Configuration Steps

The IP phone should use the voice vlan as vlan 3 and the PC should use the vlan 4 as the business vlan.

How to configure on the interface to the IP phone and PC?

Scenario 1. 

The IP phone support to learn the voice vlan via LLDP or CDP (CISCO IP phone). At the first place, the IP phone would have no configuration about the working vlan. After the IP phone connect to the switch, the switch can transfer the voice vlan information to the IP phone via LLDP or CDP, then the IP phone would configure the vlan as it"s working vlan automatically. And all traffic send by the IP phone would be encapsulated with vlan tag.

The configuration on the switch should be as following:

#
lldp global enable
voice-vlan track lldp
lldp compliance cdp
#
interface GigabitEthernet1/0/2
 port link-mode bridge
 port link-type hybrid
 undo port hybrid vlan 1
 port hybrid vlan 4 untagged
 port hybrid pvid vlan 4
 voice-vlan 3 enable
 stp edged-port
 lldp compliance admin-status cdp txrx
 cdp voice-vlan 3  

#

Scenario 2. 

The IP phone have the initial vlan configuration itself. So it would send the packet with specific vlan at the first place, in this case the configuration on the switch can be flexible. The key principle is let the switch know which host is IP phone and which vlan is the voice vlan.

Automatic voice VLAN assignment mode configuration example

Network requirements 

As shown in Figure, Device A transmits traffic from IP phones and hosts. 

For correct voice traffic transmission, perform the following tasks on Device A: 

 · Configure voice VLANs 2 and 3 to transmit voice packets from IP phone A and IP phone B, respectively. 

 · Configure GigabitEthernet 1/0/1 and GigabitEthernet 1/0/2 to operate in automatic voice VLAN assignment mode. 

 · Add MAC addresses of IP phones A and B to the device for voice packet identification. The mask of the two MAC addresses is FFFF-FF00-0000. 

 · Set an aging timer for voice VLANs.


Configuration procedure

1.     Configure voice VLANs:

# Create VLANs 2 and 3.

<DeviceA> system-view

[DeviceA] vlan 2 to 3

# Set the voice VLAN aging timer to 30 minutes.

[DeviceA] voice-vlan aging 30

# Enable security mode for voice VLANs.

[DeviceA] voice-vlan security enable

# Add MAC addresses of IP phones A and B to the device with mask FFFF-FF00-0000.

[DeviceA] voice-vlan mac-address 0011-1100-0001 mask ffff-ff00-0000 description IP phone A

[DeviceA] voice-vlan mac-address 0011-2200-0001 mask ffff-ff00-0000 description IP phone B

2.     Configure GigabitEthernet 1/0/1:

# Configure GigabitEthernet 1/0/1 as a hybrid port.

[DeviceA] interface gigabitethernet 1/0/1

[DeviceA-GigabitEthernet1/0/1] port link-type hybrid

# Configure GigabitEthernet 1/0/1 to operate in automatic voice VLAN assignment mode.

[DeviceA-GigabitEthernet1/0/1] voice-vlan mode auto

# Enable voice VLAN on GigabitEthernet 1/0/1 and configure VLAN 2 as the voice VLAN for it.

[DeviceA-GigabitEthernet1/0/1] voice-vlan 2 enable

[DeviceA-GigabitEthernet1/0/1] quit

3.     Configure GigabitEthernet 1/0/2:

# Configure GigabitEthernet 1/0/2 as a hybrid port.

[DeviceA] interface gigabitethernet 1/0/2

[DeviceA-GigabitEthernet1/0/2] port link-type hybrid

# Configure GigabitEthernet 1/0/2 to operate in automatic voice VLAN assignment mode.

[DeviceA-GigabitEthernet1/0/2] voice-vlan mode auto

# Enable voice VLAN on GigabitEthernet 1/0/2 and configure VLAN 3 as the voice VLAN for it.

[DeviceA-GigabitEthernet1/0/2] voice-vlan 3 enable

[DeviceA-GigabitEthernet1/0/2] quit

Verifying the configuration

# Display the OUI addresses supported on Device A.

[DeviceA] display voice-vlan mac-address

OUI Address     Mask            Description

0001-e300-0000  ffff-ff00-0000  Siemens phone

0003-6b00-0000  ffff-ff00-0000  Cisco phone

0004-0d00-0000  ffff-ff00-0000  Avaya phone

000f-e200-0000  ffff-ff00-0000  H3C Aolynk phone

0011-1100-0000  ffff-ff00-0000  IP phone A

0011-2200-0000  ffff-ff00-0000  IP phone B

0060-b900-0000  ffff-ff00-0000  Philips/NEC phone

00d0-1e00-0000  ffff-ff00-0000  Pingtel phone

00e0-7500-0000  ffff-ff00-0000  Polycom phone

00e0-bb00-0000  ffff-ff00-0000  3Com phone

# Display the voice VLAN state.

[DeviceA] display voice-vlan state

 Current voice VLANs: 2

 Voice VLAN security mode: Security

 Voice VLAN aging time: 30 minutes

 Voice VLAN enabled ports and their modes:

 Port                        VLAN        Mode        CoS        DSCP

 GE1/0/1                     2           Auto        6          46

 GE1/0/2                     3           Auto        6          46


Scenario 3. 

The IP phone don"t support vlan configuration at all. In this case, the switch can"t work at auto-mode in terms of voice vlan. And the traffic of IP phone and PC are both without any tag, the switch can"t distinguish them. It"s not recommend to connect the PC behind the IP phone in this case.

Manual voice VLAN assignment mode configuration example

Network requirements

As shown in Figure 18, IP phone A send untagged voice traffic.

To enable GigabitEthernet 1/0/1 to transmit only voice packets, perform the following tasks on Device A:

·     Create VLAN 2. This VLAN will be used as a voice VLAN.

·     Configure GigabitEthernet 1/0/1 to operate in manual voice VLAN assignment mode and add it to VLAN 2.

·     Add the OUI address of IP phone A to the OUI list of Device A.


Configuration procedure

# Enable security mode for voice VLANs.

<DeviceA> system-view

[DeviceA] voice-vlan security enable

# Add MAC address 0011-2200-0001 with mask FFFF-FF00-0000.

[DeviceA] voice-vlan mac-address 0011-2200-0001 mask ffff-ff00-0000 description test

# Create VLAN 2.

[DeviceA] vlan 2

[DeviceA-vlan2] quit

# Configure GigabitEthernet 1/0/1 to operate in manual voice VLAN assignment mode.

[DeviceA] interface gigabitethernet 1/0/1

[DeviceA-GigabitEthernet1/0/1] undo voice-vlan mode auto

# Configure GigabitEthernet 1/0/1 as a hybrid port.

[DeviceA-GigabitEthernet1/0/1] port link-type hybrid

# Set the PVID of GigabitEthernet 1/0/1 to VLAN 2.

[DeviceA-GigabitEthernet1/0/1] port hybrid pvid vlan 2

# Assign GigabitEthernet 1/0/1 to VLAN 2 as an untagged VLAN member.

[DeviceA-GigabitEthernet1/0/1] port hybrid vlan 2 untagged

# Enable voice VLAN and configure VLAN 2 as the voice VLAN on GigabitEthernet 1/0/1.

[DeviceA-GigabitEthernet1/0/1] voice-vlan 2 enable

[DeviceA-GigabitEthernet1/0/1] quit

Verifying the configuration

# Display the OUI addresses supported on Device A.

[DeviceA] display voice-vlan mac-address

OUI Address     Mask            Description

0001-e300-0000  ffff-ff00-0000  Siemens phone

0003-6b00-0000  ffff-ff00-0000  Cisco phone

0004-0d00-0000  ffff-ff00-0000  Avaya phone

000f-e200-0000  ffff-ff00-0000  H3C Aolynk phone

0011-2200-0000  ffff-ff00-0000  test

0060-b900-0000  ffff-ff00-0000  Philips/NEC phone

00d0-1e00-0000  ffff-ff00-0000  Pingtel phone

00e0-7500-0000  ffff-ff00-0000  Polycom phone

00e0-bb00-0000  ffff-ff00-0000  3Com phone

# Display the voice VLAN state.

[DeviceA] display voice-vlan state

 Current voice VLANs: 1

 Voice VLAN security mode: Security

 Voice VLAN aging time: 1440 minutes

 Voice VLAN enabled ports and their modes:

 Port                        VLAN        Mode        CoS        DSCP

 GE1/0/1                     2           Manual      6          46

Key Configuration

For Scenario 1.

#

voice-vlan track lldp

voice-vlan enable

#

For Scenario 2.

#

voice-vlan mode auto

#

For Scenario 3.

#

undo voice-vlan mode auto

#

Please rate this case:   
0 Comments

No Comments

Add Comments: