Cisco Vlan Configuration Commands
Posted on 2010-11-26
I have the following configuration on my Cisco 3560 switch.
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 801
switchport mode trunk
srr-queue bandwidth share 1 20 40 40
mls qos vlan-based
no snmp trap link-status
no mdix auto
spanning-tree bpduguard enable
I connected a PC on that port with a static IP from vlan 801. When I try to get a mac address from that port, nothing shows up even though the port shows up/up. It’s only when I add the command ‘switchport trunk native vlan 801” that it works.
When I configure the switchport as just trunk without any other additional configuration, the PC does not work until I configure the native vlan as 801. It seems strange; shouldn’t it work with just trunk? The only other way it works is if I configure the port as access port and to access a specific vlan.
Can someone explain to me why it doesn’t work without that command; the port is a trunk.
I also read an article that recommends not using the default vlan as native vlan for security. The article recommends to use a native vlan not used anywhere on the LAN to prevent vlan hopping. Anytime I try using a native vlan not used, nothing works on the port. What am I missing?