cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
951
Views
0
Helpful
11
Replies

Query on Vocie and Data VLan on same Swithc port

srprasaad_nj
Level 1
Level 1

Hi All,

This is query regarding allowing both Vocie and data Vlans on a single switch port. I knew tehre are different ways to configure and acheive this, but not sure how techncially they are different from each other>

             

Way 1:

interface FastEthernet1/5

description *** IP Phone/Data Port ***

switchport trunk native vlan 10

switchport mode trunk

switchport voice vlan 16

no logging event link-status

no snmp trap link-status

mls qos trust cos

spanning-tree portfast

sh int trunk

Port      Mode         Encapsulation  Status        Native vlan
Fa1/5     on           802.1q         trunking      10

Fa1/7     on           802.1q         trunking      10
Fa1/12    on           802.1q         trunking      10
Fa1/13    on           802.1q         trunking      10
Fa1/14    on           802.1q         trunking      10

Port      Vlans allowed on trunk
Fa1/5     1-1005
Fa1/7     1-1005
Fa1/12    1-1005
Fa1/13    1-1005
Fa1/14    1-1005

Port      Vlans allowed and active in management domain
Fa1/5     1,10,16
Fa1/7     1,10,16
Fa1/12    1,10,16
Fa1/13    1,10,16
Fa1/14    1,10,16

Port      Vlans in spanning tree forwarding state and not pruned

Port      Vlans in spanning tree forwarding state and not pruned
Fa1/5     1,10,16
Fa1/7     1,10,16
Fa1/12    1,10,16
Fa1/13    1,10,16
Fa1/14    1,10,16

sh vlan-switch

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/0, Fa1/1, Fa1/2, Fa1/3
                                                Fa1/4, Fa1/6, Fa1/8, Fa1/9
                                                Fa1/10, Fa1/11, Fa1/15


10  DVLAN                            active


16  VVLAN                            active    Fa1/0, Fa1/1, Fa1/2, Fa1/3
                                                Fa1/4, Fa1/6, Fa1/8, Fa1/9
                                                Fa1/10, Fa1/11, Fa1/15

In the above config, the port Fa 1/5 which is currnetly up and running( this port is ocnencted with IP phoen and a PC)  is not shown in sh vlan-switch output as assigned to vlan 10 or vlan 16. Not sure it is becuase the output was taken from ISR rotuer with NM 16-ESW module .

sh int fa 1/5 switchp

Name: Fa1/5

Switchport: Enabled

Administrative Mode: trunk

Operational Mode: trunk

Administrative Trunking Encapsulation: dot1q

Operational Trunking Encapsulation: dot1q

Negotiation of Trunking: Disabled

Access Mode VLAN: 0 ((Inactive))

Trunking Native Mode VLAN: 10 (DVLAN)

Trunking VLANs Enabled: ALL

Trunking VLANs Active: 1,10,16

Priority for untagged frames: 0

Override vlan tag priority: FALSE

Voice VLAN: 16

Appliance trust: none

In above ocnfig, the port is configured as trunk and hence it can carry multiple vlan traffic on swithcport. As IP phones will have inbuilt switch which runs DTP by default and CDP to reciognize the conencted devcies.  I am not sure how this config works as even it's configured as trunk the DTP negotiation is disabled and how phone switch can differentiate the voice frames and data frames. Please explain in loigcal as it's known that as we have confgiured vlan 10 as native and vocie vlan 16 as trunk it carries the voice traffic.

Way 2:

interface FastEthernet1/2

description *** IP Phone/Data Port ***

switchport access vlan 10

switchport mode access

switchport voice vlan 16

no logging event link-status

no snmp trap link-status

mls qos trust cos

spanning-tree portfast

In the above config, even the port is access it's carrying multiple vlan traffic despite of being trunk port. Not sure how the trunk will be formed even DTP neogotiation is off. Isi t because of voice vlan command and if so what it deos exactly.  Please can anyone elaborate in detail. Sorry, if my post is big and confusing

sh int fa 1/2 switchport

Name: Fa1/2

Switchport: Enabled

Administrative Mode: static access

Operational Mode: static access

Administrative Trunking Encapsulation: negotiate

Operational Trunking Encapsulation: native

Negotiation of Trunking: Off

11 Replies 11

Hello.

If you want to connect IP-phone and computer (via phone), then the correct configuration will be:

int Fx/x

swi mode access

swi acc vlan 10

swi voice vlan 16

span portfast

span bpduguard enable

mls qos trust cos

PS: if you configure "swi mode trunk", then the other commands like "swi acc vl ..." and "swi voic vl ..." are not took into account

Hi Mikhailovsky,

My question might be confusing. Please can you tell me difference between confgiuring the access port with IP phone as mentioend in above blog as Way 1 and Way 2.

And what is the default switch prot mode of switch in the IP Phone.

Any one please help on original post

Way 2 - works in conjuction with Cisco CDP protocol which IP phones runs

(http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst2960/software/release/15-2_1_e/configuration/guide/2960_scg/swvoip.html)

Way 1 - we can say that port behind IP phone & switch is actually working in trunk mode because of 2 VLANs (voice and data) but that approach is much more related to other vendors beside Cisco.

Default port mode - depends on switch platform...can be dynamic auto or dynamic desirable. See more on google about cisco DTP - Dynamic Trunking protocol.

So conclusion - if you are on Cisco all the way use "Way 2" or what Mikhailovsky already said

HTH,
Dragan

HTH,
Dragan

I agree that way 2 is the more appropriate way if you are dealing with Cisco phones. I worked with a customer who was using non Cisco phones and we used way 1 for them. Each switch interface was defined as a trunk. The phone would boot up and use DHCP to receive an address. DHCP was configured to provide some vendor specific information that the phone would recognize. The phone would recognize that it should use the original/native vlan for data and should use a second vlan for voice. It worked pretty well that way.

So for Cisco phones the second way is best but for some non Cisco phones the first way does work.

HTH

Rick

HTH

Rick

Switch - Phone - PC

 

1. First question:

     # int f0/1

     # switchport mode access

     # spanning-tree portfast

     # switchport access vlan 50

     # switchport voice vlan 10

 

This is the ideal way to configure and in all latest IOS Switches and in latest ISR routers, we do this as the command "switch port voice vlan" command  says to switch port that it carries the voice traffic as tagged and PC as untagged.

As we all know the default switch port of a switch will be either Dynamic auto or Dynamic Desirable which means DTP is on and in turn it means negotiation of trunking is ON. This is as per my understanding.

The Sub-Questions for 1st Question are below:

1  Does the trunk negotiation happen between Access Switch switch port and Mini 3 Port Switch within the IP Phone. If mini switch in IP PHone negotiates to form  trunk based on DTP then what’s the default switch port mode of mini switch in the IP Phone.

 

2. As in above config we are no where mentioning the port to be trunk. But it’s still allowing multiple vlan’s traffic to carry on access port. The switchport mode is access when you do “ sh int fa 0/1 swithcport.”.  Is it the swithcport voice vlan command does the magic?

------------------------------------------------------

2. Second Question:

     # int f0/1

     # switchport trunk encapsulation dot1q

     # switchport trunk native vlan 10     (data VLAN)

     # switchport mode trunk

     # swichport voice vlan 15

The Sub-Questions for 2nd Question are below:

  1. When do we use this configuration.? In my set-up the above config is seen on 2811 ISR routers with NM-16ESW modules.  Can’t we configure the data vlan a switch port access vlan 10 , instead of trunk native vlan.

 

Thanks Dragan/Richrad,

I have these confgiurations Way 1 and Way 2 implemented both on CISCO Phones itself.

Dragan, The default switch port is dynamic auto or desirable based on switch platform and can be seen on switch. I am asking about the mini swtich port default mode which is inside the IP Phone.

I agree, the Way 2 is the best as this type of ports are called multi-access vlan  ports and due to mini switch in the IP phone which will negotiate a trunk with swithc port , it carry tagged voice vlan traffic and untagged data traffic.

In Way1, we are specifyng trunk port for Vocie and native for Data which means we are doing the same as Way 2. But which one is ideal and if you say Way 1 to be used with different vendor phones, then is there any reason the same config been used for CIsco IP Phones as well.

Moreoevr, In Way 1,  I can't see port assigned in neither Data VLAN nor in Vocie VLAN whn both Phoen and PC are up ann running. I am not sure why this is not dsipaled udner any vlan when done sh vlan-switch command. Please can any one help on this.

Just one more question - in way 1 on your IP phone - have you configured something in "settings" mode on phone - pc vlan or something like that? I think you have to do that and defina PC VLAN = 10...

Why asking this - I'm pretty sure that your phone settings configs are not the same for option 1 and option 2...which further defines why you should always go with option 2 - it's going to work automatically for you everything

HTH,
Dragan

HTH,
Dragan

Waiy 1:

interface FastEthernet1/5

switchport trunk native vlan 10

switchport mode trunk

switchport voice vlan 16

no logging event link-status

no snmp trap link-status

mls qos trust cos

spanning-tree portfast

Way 2:

int fa1/2

description *** IP Phone/Data Port ***

switchport access vlan 10

switchport mode access

switchport voice vlan 16

no logging event link-status

no snmp trap link-status

mls qos trust cos

spanning-tree portfast

I checked and there are no special settings in phones. Acrsoos our network all phones are having similar config

So, if you don't have any vlan setting on your phone in way 1, could you explain to me how your phone knows for vlan 10 and that it should send packets for that vlan untagged?

HTH,
Dragan

HTH,
Dragan

I agree with Dragan. As the way 1 will carry all the vlans as tagged and there must be a way to differentiate the appropriate vlan. The specific feature can be in auto mode on the phone itself.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card