Traditionally with Switching, there are two types of ports:

* **[Access Ports][1]** -- ports which carry traffic for only *one* VLAN
* **[Trunk Ports][2]** -- ports which carry traffic for *multiple* VLANs

In a scenario where a user has their PC plugged into the wall.  You would typically configure the switchport that user is connected to as an **Access Port**:

[![Practical Networking - Voice VLAN][3]][3]

    Switch(config)# vlan 22	
    Switch(config-vlan)# name DATA
    
    Switch(config)# interface ethernet0/0
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 22

The issue you run into is what if this user also adds a VOIP phone:

[![Practical Networking - Voice VLAN - Two Ports][4]][4]

In a perfect world, each device has their own wall jack, and you can configure the two switch ports they are connected to as **Access Ports**, one in the Data VLAN (for the PC) and the other in the Voice VLAN (for the phone):

    Switch(config)# vlan 22
    Switch(config-vlan)# name DATA
    Switch(config)# vlan 33
    Switch(config-vlan)# name VOICE
    
    Switch(config)# interface ethernet0/0
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 22
    Switch(config)# interface ethernet0/1
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 33

Using two VLANs allows you to [keep the Voice traffic on your network separate from the Data traffic][5].

However, a second LAN port is not always available. 

In those cases, [most VOIP phones have two ports][6], one that can accept the incoming traffic from the PC, and the other that can be connected to the wall jack.

This allows *both* the Phone and the PC to speak through a single switch port:

[![Practical Networking - Voice VLAN - one port][7]][7]

The question then, is, how do you configure the *single* Switchport both of these are connected to, even though the traffic needs to be in two different VLANs. *That is where the concept of the **Voice VLAN** comes into play*.

**The Voice VLAN allows an access port — which normally only accepts *untagged* traffic for a *single VLAN* — to also accept *[tagged][8]* traffic for *a second VLAN*.**

The configuration would look like this:

    Switch(config)# vlan 22
    Switch(config-vlan)# name DATA
    Switch(config)# vlan 33
    Switch(config-vlan)# name VOICE
    
    Switch(config)# interface ethernet0/0
    Switch(config-if)# switchport mode access
    Switch(config-if)# switchport access vlan 22
    Switch(config-if)# switchport voice vlan 33

*Note, there is another way to configure a single port to accept traffic from both VLANs, it involves using a [Trunk port and the Native VLAN][9], but that strategy is not without it's set own [set][10] of [downsides][11].*

----

As for your question:

    interface FastEthernet0/1
     description PHONES
     switchport mode access
     **switchport voice vlan 51**
    
    interface FastEthernet0/1   
     description PHONES 
     **switchport access vlan 51**  
     switchport mode access 

The first configuration is an Access Port, but since there is no `switchport access vlan #` command, [that port belongs to VLAN 1][12] -- any untagged traffic arriving on this port will be placed on VLAN 1. Any Tagged traffic will be dropped (generally -- possibly different behaviors for different vendors). Except for traffic tagged with VLAN 51, that traffic will be accepted and placed in VLAN 51.

The second configuration is also an Access Port, and all untagged traffic will be placed on VLAN 51. Any tagged traffic will be dropped.


----

*Disclaimer: The images and links above come from my blog. There are no ads on the blog. It is not monetized. I offer the links and content freely solely to help the readers. Hope they help you too.*


  [1]: https://www.practicalnetworking.net/stand-alone/vlans/#access_port
  [2]: https://www.practicalnetworking.net/stand-alone/vlans/#trunk_port
  [3]: https://i.sstatic.net/xlvei.png
  [4]: https://i.sstatic.net/9kxZB.png
  [5]: https://www.practicalnetworking.net/stand-alone/converged-network/
  [6]: https://www.practicalnetworking.net/stand-alone/voice-vlan-auxiliary-vlan/#one-port
  [7]: https://i.sstatic.net/fbML4.png
  [8]: https://www.practicalnetworking.net/stand-alone/vlans/#tagged-untagged
  [9]: https://www.practicalnetworking.net/stand-alone/voice-vlan-auxiliary-vlan/#trunk-native-vlan
  [10]: https://www.practicalnetworking.net/stand-alone/voice-vlan-auxiliary-vlan/#trunk-native-problem1
  [11]: https://www.practicalnetworking.net/stand-alone/voice-vlan-auxiliary-vlan/#trunk-native-problem2
  [12]: https://networkengineering.stackexchange.com/a/19379/3675