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.
Configuration
port settings SW1
SW1#sh run int fa0/1
Building configuration…
Current configuration : 110 bytes
!
interface FastEthernet0/1
switchport access vlan 30
switchport mode access
spanning-tree portfast
end
.
.
.
SW1#sh run int fa0/2
Building configuration…
Current configuration : 110 bytes
!
interface FastEthernet0/2
switchport access vlan 30
switchport mode access
spanning-tree portfast
end
port settings SW2
SW2#sh run int fa0/3
Building configuration…
Current configuration : 110 bytes
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
spanning-tree portfast
end
.
.
.
SW1#sh run int fa0/1
Building configuration…
Current configuration : 110 bytes
!
interface FastEthernet0/1
switchport access vlan 20
switchport mode access
spanning-tree portfast
end
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.
port settings SW1 with switchport voice
SW1#sh run int fa0/1
Building configuration…
Current configuration : 110 bytes
!
interface FastEthernet0/1
switchport access vlan 30
switchport mode access
switchport voice vlan 55
spanning-tree portfast
end
.
.
.
SW1#sh run int fa0/2
Building configuration…
Current configuration : 110 bytes
!
interface FastEthernet0/2
switchport access vlan 30
switchport mode access
switchport voice vlan 55
spanning-tree portfast
end
port settings SW2 with switchport voice
SW2#sh run int fa0/3
Building configuration…
Current configuration : 110 bytes
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
switchport voice vlan 55
spanning-tree portfast
end
.
.
.
SW1#sh run int fa0/1
Building configuration…
Current configuration : 110 bytes
!
interface FastEthernet0/1
switchport access vlan 20
switchport mode access
switchport voice vlan 55
spanning-tree portfast
end
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
post describes how to cuofignre vlan in cisco switch. The example network diagram shows two Layer 2 switches connected with a trunk port and three Vlans
Hi Sigisfredo,
with this post i will show how a cisco switch handle vlans.
The two switches are connected with an access port and 2 vlans.
And this works – but is absolutely nonsense for a business environment.