Sunday, November 25, 2007

    Lectures on LAN Switching – Part 05

    [ ]

    VLAN Tagging

    You may be wondering how a Switch can track packets that belong to a certain VLAN to stay within that same VLAN. Let’s say you have switch ports 1 and 2 that belong to VLAN 10 and the rest of the ports on a Switch belong to VLAN 1. How can a packet received by switch port 1 (and destined for switch port 2) stays within the same VLAN segment and doesn’t stray into the other switch ports in VLAN 1?

    Well, this is possible thru the use of VLAN Tagging that is present in Switches that utilizes VLANs. VLAN Tagging is used to identify packets inside a Switch. So in our scenario above, packets entering switch port 1 will be tagged with VLAN 10 ID and the Switch can then identify to which ports these packets can go out. In this case, the packets can only exit thru switch port 2.

    The following will give detail to the whole process:

    • When a packet enters a Switch thru one of the ports, the packet FCS will be checked first to detect any corruption in the whole packet.
    • Once the FCS is confirmed to be good, the VLAN ID tag will be attached to the packet before it will be ‘switched’ to the destination switch port (where it will exit out).
    • On the destination switch port (also known as the ‘egress port’), the VLAN ID tag will be removed before it will be transmitted out of the switch port.

    The whole VLAN Tagging process is only known to the Switch, and any PCs (or any end devices) connected to the Switch is unaware of the VLAN tags. When a PC transmits a packet from its NIC, the packet is in its original format before being received (and before being tagged) by the switch port. And before a switch port transmits a packet out, the packet is returned to its original format (being untagged) and the receiving NIC of a PC won’t notice any difference or alteration before accepting the packet.

    Lastly, in Cisco Catalyst Switches, VLAN Tagging is handled by a separate ASIC to off-load the whole process from the switch CPU.

    0 comments:

    Post a Comment