06-28-2017 02:31 PM - edited 03-08-2019 11:08 AM
We recently implemented some SG300s in our environment and with that introduced vlans to to segregate our voice and data traffic.
vlan 169 for data. vlan 179 for voice
The technician changed the default vlan from 1 to 1000 and made the pvid on all ports 169. That alone confused me and didnt make much sense. But what really confuses me is he put all of the ports in general mode, added 169 untagged, and made the pvid 169.
My questions:
If he was going to make the pvid 169 on all ports why did he code 1000 as the default vlan?
Why explicitly add 169 untagged to the port? If 169 is the default vlan on that port will frames not be placed in 169 untagged as it is?
switchport mode general
switchport general allowed vlan add 169 untagged
switchport general pvid 169
voice vlan enable
Everything works so it's fine and I understand there's more than one way to skin a cat. I'm just curious. We ended up adding a few switches after the project was over and I placed my ports in trunk mode with native vlan as 169 and they work just the same. 2 commands vs 4.
switchport trunk native vlan 169
voice vlan enable
07-04-2017 12:19 PM
!The following command configures the VLAN membership mode (access, trunk, general or customer) of a port. Default is trunk mode which specifies a trunking layer 2 VLAN port. General mode specifies a full 802.1Q supported VLAN port
switchport mode general
!Adds VLAN id (PVID) 169 to the port and specifies that the port transmits untagged packets for this VLAN
switchport general allowed vlan add 169 untagged
!The PVID is the VLAN to which incoming untagged and priority-tagged frames are classified on a general port
switchport general pvid 169
!The following command enables OUI Voice VLAN on an interface
voice vlan enable
!A L2 trunk interface allows all VLANs by default, and the native VLAN is the only VLAN which is not tagged in a trunk.
switchport trunk native vlan 169
voice vlan enable
So, basically the previous are two different approaches to achieve the same goal in a different way for each option. The difference is that with the 'switchport mode general' option, the port is not member in any VLAN (restrictive approach) and that you've to explicitly specify if the VLANs added to the port will be tagged in egress, while 'switchport mode trunk' is a more permissive approach requiring additional configuration commands to set restrictions if required.
For additional details, please consult the command reference guides in the link below.
Reference link:
http://www.cisco.com/c/en/us/support/switches/small-business-300-series-managed-switches/products-command-reference-list.html
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