In the VLAN Part 1 video, Don puts FA 0/1/21 into both the data and voice VLAN in the case of having both an VoIP phone and a workstation. How does the switch know what goes to the data VLAN and what goes to the voice VLAN? How does the switch know that VoIP traffic goes to the voice VLAN?
Solved CCENT VLAN Question
The switch reads the vlan tags, both data vlans and voice vlan tags and uses CDP. So if you're using a Cisco IP Phone, the switch will use CDP to identify the IP phone as the IP phone and associate that phone to the voice vlan and voice data to the voice vlan. While regular vlan traffic will not get tagged with the voice vlan tag.
If you use a non Cisco phone, you must manually tag (change) the phone to put it's data on voice vlan.
So the short answer is the switch uses CDP to do what you asking about.
*if the post above has answered the question, please mark the topic as solved.
**All "answers" and responses are offered "as is" and my opinion. There is no implied support or guarantee by the ITProTV team.