We encountered a situation where after a firmware upgrade on Cisco Catalyst 3750 switches, a company lost connectivity between departments for 4 hours. The cause—a native VLAN mismatch on a trunk port. Management traffic went into the wrong segment, DHCP stopped working, and the production floor lost control. A typical story: native VLAN mismatch is one of the most common errors when configuring VLAN trunking. According to IEEE Std 802.1Q-2014, the default native VLAN is VLAN 1. A mismatch occurs when two ends of a trunk have different native VLANs, causing switches to interpret untagged frames in different VLANs. The result—loss of connectivity, unstable control protocols, and potential vulnerability to VLAN hopping attacks. In 30% of cases, the issue is native VLAN mismatch.
Our experience shows that proper VLAN trunking configuration is the foundation for a secure and resilient network. We will cover not only basic configurations on Cisco, MikroTik, and Linux but also common mistakes even experienced engineers make. With over 10 years of configuring VLAN networks for industrial and office enterprises, and 50+ projects completed, we guarantee correct operation and provide licensed documentation.
Problems We Solve
The most frequent issues we address:
-
Native VLAN mismatch—both trunk ends must use the same native VLAN. On Cisco, this is indicated by the message
CDP-4-NATIVE_VLAN_MISMATCH. If mismatched, control frames (CDP, STP) end up in the wrong VLAN, disrupting topology. - Trunk allowed vlan incorrectly set—if you omit the
addkeyword, the list is overwritten, losing some VLANs. For example,switchport trunk allowed vlan 10removes all others. This causes devices in other VLANs to lose connectivity through the trunk. - Incorrect pvid on an access port—the device does not get an IP because the DHCP server is in a different VLAN. This often happens during migration or when adding new ports.
We also resolve issues with VTP, asymmetric routing, and incorrect STP configuration in mixed-vendor environments.
Why Native VLAN Mismatch Is the Most Critical Error?
Frames of the native VLAN are transmitted untagged. If one trunk end uses native VLAN 1 and the other uses 999, a switch sending a control frame in its native VLAN will have it interpreted as belonging to VLAN 999 on the other end. This can cause STP loops, loss of CDP neighbors, and even open access to management VLANs for attacks. In our practice, a mismatch allowed an attacker to gain access to the management VLAN through VLAN hopping.
How to Diagnose Native VLAN Mismatch?
On Cisco, execute show interfaces trunk—the output shows the native VLAN for each trunk. If it differs on the neighboring switch, it's a mismatch. Additionally, check show vlan brief and show spanning-tree vlan 1 (or your native VLAN). For comprehensive VLAN problem diagnostics, use these commands:
show interfaces trunk show vlan brief show spanning-tree vlan 999 Also enable debugging: debug condition interface Gi1/0/48, debug sw-vlan trunk.
Step-by-Step Trunk Configuration on Cisco
Let's examine a real case. Client: a medium-sized manufacturing enterprise, ~200 workstations, 5 VLANs, core on Cisco Catalyst 3850. After a firmware upgrade from 16.3 to 16.9, connectivity between VLAN 10 (accounting) and VLAN 20 (warehouse) was lost. Diagnosis revealed a native VLAN mismatch on the uplink between core and access switches. The core had native 1, the access had native 999.
- On the access switch, enter global configuration mode. Select the interface Gi1/0/24.
- Execute
switchport trunk native vlan 1. - Verify with
show interfaces trunk—native VLAN matched. - Test connectivity—issue resolved.
We recommend using an unused VLAN for the native (e.g., 999) to avoid mixing with work VLANs. But the key is consistency on both ends.
interface GigabitEthernet1/0/24
switchport mode trunk
switchport trunk encapsulation dot1q
switchport trunk native vlan 999
switchport trunk allowed vlan add 10,20,30
no shutdown Comparison of VLAN Solutions: MikroTik vs Cisco
MikroTik since version 7.x uses bridge vlan-filtering, which is more intuitive and 2x faster to configure than Cisco for simple networks. You add ports to a bridge, set pvid for access, then specify which VLANs are tagged on which ports in /interface bridge vlan. Cisco requires more commands (about 50% more) but offers flexibility; MikroTik provides transparency. In our practice, configuring a simple network of 5 VLANs on MikroTik takes half the time compared to Cisco.
/interface bridge add name=br0 vlan-filtering=yes
/interface bridge port
add bridge=br0 interface=ether2 pvid=10
add bridge=br0 interface=ether3 pvid=20
add bridge=br0 interface=ether8 pvid=1
/interface bridge vlan
add bridge=br0 vlan-ids=10 untagged=ether2 tagged=ether8
add bridge=br0 vlan-ids=20 untagged=ether3 tagged=ether8
add bridge=br0 vlan-ids=30 tagged=ether8
/interface vlan add interface=br0 name=vlan10 vlan-id=10
/ip address add address=192.168.10.1/24 interface=vlan10
Configuring Trunk on a Linux Server
On Linux, use the 8021q module and iproute2. Follow these steps:
- Verify module loading:
modprobe 8021q. - Create a VLAN interface:
ip link add link eth0 name eth0.10 type vlan id 10. - Bring it up:
ip link set eth0.10 up. - Assign an IP:
ip addr add 192.168.10.5/24 dev eth0.10.
Or via Netplan (on Ubuntu):
network: version: 2 ethernets: eth0: mtu: 9000 vlans: eth0.10: id: 10 link: eth0 addresses: [192.168.10.5/24] A Linux server can terminate VLANs or route between them. For layer 2 switching, a bridge is required.
Comparison Table of Approaches
| Vendor | Trunk Function | Command / Config | Key Point |
|---|---|---|---|
| Cisco IOS | switchport mode trunk | switchport trunk allowed vlan X |
Native VLAN mismatch is common |
| MikroTik 7.x | bridge vlan-filtering | /interface bridge vlan |
Simpler, 2x faster config |
| Linux | 802.1q module, iproute2 | ip link add link eth0 name eth0.X |
Flexible, but not L2 switching |
Symptom and Solution Table
| Symptom | Cause | Check | Solution |
|---|---|---|---|
| Device does not get IP | Incorrect pvid on access port | show vlan brief, check port pvid |
Assign pvid matching DHCP server's VLAN |
| Two devices in same VLAN cannot see each other via trunk | VLAN not allowed on trunk | show interfaces trunk on both ends |
Add VLAN with switchport trunk allowed vlan add |
| Packet loss, unstable protocols | Native VLAN mismatch | show interfaces trunk, compare native VLAN |
Align native VLAN on both switches |
Example of a native VLAN mismatch log on Cisco:
%CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on GigabitEthernet1/0/24 (999), with FastEthernet2/0/1 (1). This indicates a mismatch: port native 999, neighbor native 1.
What's Included in Turnkey VLAN Trunking Setup
- Audit of the current network and VLAN scheme.
- Designing segmentation and trunk connections.
- Configuring access and trunk ports on switches.
- VLAN configuration on routers and servers.
- Connectivity testing and error resolution.
- Documentation (diagram, configs, instructions).
Timelines: from 1 day for a simple network to 3 days for a hierarchical network with redundancy.
Common Mistakes and Checklist
- Always use the
addkeyword in Cisco: writeswitchport trunk allowed vlan add 10. - Don't forget native VLAN—use an unused ID (e.g., 999, 4000).
- On MikroTik, remember to enable
vlan-filtering=yes. - On Linux, ensure the 8021q module is loaded (
modprobe 8021q). - To protect against VLAN hopping, disable native VLAN on access ports and use
switchport nonegotiateon Cisco.
Our certified engineers (CCNP, MikroTik MTCNA) have over 10 years of experience configuring VLAN networks. Contact us for a consultation on your network. Order a full audit and turnkey VLAN trunking setup—we guarantee correct operation and provide documentation.







