For all following examples you may assume this information:
PVID Switch 1 Switch 2
2 Port 1 and 2 Port 1
3 Port 3 Port 2 and 3
Example 1 For Fig.5.13you may assume that: • The PVIDs of all Trunk ports are 1.
• All Trunk ports allow the frames from VLAN 2 and VLAN 3 to pass through. PC 1 sends an untagged broadcast frame X:
1. When Port 1 receives frame X, Switch 1 inserts VID 2 into the frame as a tag and floods the frame to Port 2 and Port 4.
2. When Port 2 receives frame X, it removes the tag and forwards the untagged frame to PC 2. When Port 4 receives frame X, it forwards the tagged frame to Port 1 of Switch 3.
Switch 1 Switch 2
Switch 3
VLAN 2 VLAN 3
VLAN 2 & VLAN 3
Trunk port Trunk port
Trunk port Trunk port
Access port Access port Access port Access port Access port Access port
Trunk link Access link Untagged frame X PC 1 PC 2 PC 3 PC 4 PC 5 PC 6
Tagged frame from VLAN 2 Untagged frame X Untagged frame X Tagged frame from
VLAN 2 Tagged frame from VLAN 2
Tagged frame from VLAN 2
Tagged frame from VLAN 2
Tagged frame from VLAN 2
Port 1 Port 2 Port 3 Port 1 Port 2 Port 3 Port 4
Port 4
Port 1 Port 2
Untagged frame X: Destination MAC: ff-ff-ff-ff-ff-ff Source MAC: PC 1’s MAC
Fig. 5.13 VLAN forwarding example 1
3. Switch 3 floods the tagged frame to Port 2, which then forwards the tagged frame to Port 4 of Switch 2.
4. Switch 2floods the tagged frame to Port 1. When Port 1 of Switch 2 receives frame X, it removes the tag from the frame and forwards the untagged frame to PC 4.
PC 2 and PC 4 have now received the untagged frame X. Example 2 For Fig.5.14you may assume that:
• The PVIDs of all Trunk ports are 1 and all Trunk ports allow the packets from VLAN 2 and VLAN 3 to pass through.
• The MAC address table corresponding to VLAN 2 on each switch contains PC 4’s MAC address entry.
PC 1 sends an untagged unicast frame Y to PC 4.
1. When Port 1 receives frame Y of Switch 1, Switch 1 inserts VID 2 into the frame as a tag.
2. After querying the MAC address table corresponding to VLAN 2, Switch 1 forwards the frame to Port 4.
3. When Port 4 receives frame Y, it forwards the tagged frame to Port 1 of Switch 3.
Switch 1 Switch 2
Switch 3
VLAN 2 VLAN 3 VLAN 2 & VLAN 3
Trunk port Trunk port
Trunk port Trunk port
Access port Access port Access port Access port Access port Access port
Trunk link
Access link
Untagged frame Y
PC 1 PC 2 PC 3 PC 4 PC 5 PC 6
Tagged frame from VLAN 2
Untagged frame Y Tagged frame
from VLAN 2
Tagged frame from VLAN 2
Tagged frame from VLAN 2
Tagged frame from VLAN 2
Port 1 Port 2 Port 3 Port 1 Port 2 Port 3 Port 4
Port 4
Port 1 Port 2
Untagged frame Y:
Destination MAC: PC 4’s MAC Source MAC: PC 1’s MAC
Fig. 5.14 VLAN forwarding example 2
4. Switch 3 queries the MAC address table corresponding to VLAN 2 and for- wards the frame to Port 2, which then forwards the tagged frame to Port 4 of Switch 2.
5. Switch 2 queries the MAC address table corresponding to VLAN 2 and for- wards the frame to Port 1. When Port 1 of Switch 2 receives the tagged frame Y, it removes the tag from the frame and forwards the untagged frame to PC 4. PC 4 has now received untagged frame Y.
Example 3 For Fig.5.15, you may assume that: • The PVIDs of all Trunk ports are 1.
• All Trunk ports allow the frames from VLAN 2 and VLAN 3 to pass through. (By default, the MAC address table corresponding to VLAN 2 on each switch does not contain PC 6’s MAC address entry.)
PC 1 attempts to send an untagged unicast frame Z to PC 6.
1. Port 1 of Switch 1 receives frame Z. Switch 1 inserts VID 2 into the frame as a tag.
2. Switch 1 cannot find PC 6’s MAC address entry in the MAC address table corresponding to VLAN 2, so Switch 1 floods tagged frame Z to Port 2 and Port 4.
Switch 1 Switch 2
Switch 3
VLAN 2 VLAN 3
VLAN 2 & VLAN 3
Trunk port Trunk port
Trunk port Trunk port
Access port Access port Access port Access port Access port Access port
Trunk link
Access link
Untagged Frame Z
PC 1 PC 2 PC 3 PC 4 PC 5 PC 6
Tagged frame from VLAN 2
Untagged Frame Z
Untagged Frame Z Tagged frame from
VLAN 2 Tagged frame from VLAN 2
Tagged frame from VLAN 2
Tagged frame from VLAN 2
Tagged frame from VLAN 2
Port 1 Port 2 Port 3 Port 1 Port 2 Port 3 Port 4
Port 4
Port 1 Port 2
Untagged frame Z:
Destination MAC: PC 6’s MAC Source MAC: PC 1’s MAC
Fig. 5.15 VLAN forwarding example 3
3. When Port 2 receives frame Z, it removes the tag from the frame and forwards the untagged frame to PC 2. When Port 4 receives frame Z, it forwards the tagged frame to Port 1 of Switch 3.
4. Switch 3 cannot find PC 6’s MAC address entry in the MAC address table corresponding to VLAN 2, so Switch 3 floods frame Z to Port 2, which then forwards the tagged frame to Port 4 of Switch 2.
5. Switch 2 cannot find PC 6’s MAC address entry in the MAC address table corresponding to VLAN 2, sofloods frame Z to Port 1. When Port 1 receives frame Z, it removes the tag from the frame and forwards the untagged frame to PC 4.
PC 6 cannot receive the frame as the switches have blocked Layer 2 commu- nication between PC 1 and PC 6.