01-27-2022 07:03 AM
Hi guys,
I have a Cisco switch configured with two vlans :
VLAN 10 : Voice
VLAN 20 : DATA
My switch ports are configured as shown below :
interface GigabitEthernet1/0/X
switchport mode access
switchport access vlan 20
switchport voice vlan 10.
When I connect : Switchport-----IpPhone -----PC : it's working fine.
My Questions :
Can I directly connect the PC to that switchports ?
Will the PC fall in the DATA VLAN ?
How does the switch detect if it's a PC or Phone to provide the right vlan ?
Thanks very much
01-27-2022 07:20 AM - edited 01-27-2022 07:28 AM
I don't remember the exact mechanism of how the phone goes into the voice VLAN (possibly CDP from the phone), but the computer will only be in the data VLAN if plugged directly to the switchport. I think the tagged voice VLAN traffic is available to the computer's NIC (so a promiscuous mode NIC and Wireshark can likely see voice VLAN broadcast traffic).
01-27-2022 07:20 AM
Hi,
Can I directly connect the PC to that switchports ?
Yes
Will the PC fall in the DATA VLAN ?
Yes
How does the switch detect if it's a PC or Phone to provide the right vlan ?
The switch uses CDP to instruct the phone to send voice traffic:
see link page-page-14-2
HTH
01-27-2022 07:21 AM
an I directly connect the PC to that switchports ?
BB - yes you can as per the config.
Will the PC fall in the DATA VLAN ?
BB - yes PC get Data vlan IP address ( from DHCP)
How does the switch detect if it's a PC or Phone to provide the right vlan ?
Cisco has good document which explains :
01-27-2022 07:53 AM - edited 01-27-2022 07:55 AM
"Can I directly connect the PC to that switchports ? "
As already noted by other posters, yes you can.
"Will the PC fall in the DATA VLAN ?"
Normally, yes. The DATA VLAN is untagged and PCs, almost always, don't tag their frames. However, if PC tags its frames, which again is possible, its traffic might end up on Voice VLAN, or not work at all.
"How does the switch detect if it's a PC or Phone to provide the right vlan ?"
I recall, the switch, itself, doesn't (nor care). It's up to the connecting device to use untagged or (correctly) tagged frames.
As the other posters have noted, a device, especially Cisco VoIP phones, can determine (i.e. using CDP) there's a voice VLAN and the VLAN being used for it. The device can then, dynamically, tag its frames to access that VLAN.
Non-Cisco VoIP phone, if they don't use CDP, might need to be "hard coded" for what VLAN to use for their voice traffic. Some non-Cisco phones, might first get a DHCP packet on the DATA VLAN, which contains a DHCP option for what VLAN to be used for voice traffic, upon which, the VoIP phone will dynamically start using frames tagged for that VLAN.
BTW, you can have "Switchport-----IpPhone -----PC " also working fine w/o using a voice VLAN. A voice VLAN, shared with a DATA VLAN, on the same port, allows "logical" control of traffic on their respective VLANs, but remember, the physical port, and its capacity, is still shared between the VLANs.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide