I will show a little tricky thing about Layer 3 communication between different vlans.
Given the following figure.
So it is a very silly thing. On SW1 you have configured vlan30 for port fa0/1 and fa0/2.
On Switch SW2 you have configured Vlan20 for port fa0/3 and fa0/1.
With this configuration PC1 can ping PC2 vice versa. The only logging entry you get is as follows.
3w3d: %CDP-4-NATIVE_VLAN_MISMATCH: Native VLAN mismatch discovered on FastEthernet0/2 (30), with SW2 FastEthernet0/1 (20).
3w3d: %SPANTREE-2-RECV_PVID_ERR: Received BPDU with inconsistent peer vlan id 20 on FastEthernet0/2 VLAN30.
After that we add the switchport voice vlan command to the appropriate interfaces.
Now PC1 and PC2 can’t communicate.
- Configuration is absolutely nonsense
- Never use this in an enterprise environment
- vlans on cisco devices are logical in itself, but must be conform with other devices