Jeremy’s IT Lab lecture video:

Day 17 - VLANs (2)


Commands


Trunk Ports

Reminder

  • A trunk port carries traffic from multiple VLANs. Traffic is tagged on this interface except if the data is being sent on the native VLAN.
Link to original

VLAN Tagging

There are two main trunking protocols:

  1. ISL (Inter-Switch Link):
    • ISL is an old Cisco proprietary protocol, created before IEEE 802.1Q
  2. IEEE 802.1Q (dot1q):
    • 802.1Q (dot1q) is an industry standard protocol.

802.1Q Tag

Dot1Q Tag Properties

  • The 802.1Q tag is inserted between the Source and the Type/Length fields of the Ethernet frame.
  • 4 bytes (32 bits) in length.

Consists of Two Main Fields

  1. Tag Protocol Identifier (TPID) - (16 bits)
    • Always has a hex value of 0x8100, This indicates the frame is Dot1Q tagged.
  2. Tag Control Information (TCI) - (16 bits total)
    • Priority Code Point (PCP) - (3 bits)
      • Used for CoS (Class of Service) to prioritize traffic.
    • Drop Eligible Indicator (DEI) - (1 bit)
      • Used to indicate frames that can be dropped during network congestion.
    • VLAN Identifier (VID) - (12 bits)
      • Identifies the VLAN the frame belongs to.
      • 212 = 4096 possible VLANs, with a range of 0 - 4095
      • VLANs 0 and 4095 are reserved and cannot be used, therefore, the actual range is 1 - 4094


VLAN Ranges

The range of VLANs (1 - 4094) is divided into two sections:

  1. Normal VLANs: (1 - 1005)
  2. Extended VLANs: (1006 - 4094)

Native VLAN

802.1Q has a feature called Native VLAN (Not available on ISL)
Where the switch:

  • Doesn’t add a Dot1Q tag to frames in the native VLAN.
  • Assumes untagged traffic on a trunk port belongs to the native VLAN.
    The Native VLAN by default is VLAN 1.

Switches will discard tagged frames that match the native VLAN.

Example: Native VLAN discarding

  • If the native VLAN on SW1 is VLAN 30, and the switch receives a frame tagged with VLAN 30 as well, it’ll discard it and assume it to be an error, as VLAN 30 traffic is supposed to be untagged when sent on that VLAN.

Watch out: Native VLAN configuration

It is important that the native VLAN matches between switches.

Show command tip:

The show vlan brief command shows the access ports assigned to each VLAN, not the trunk ports that allow each VLAN.
Use the show interfaces trunk command instead to confirm trunk ports.


Router on a Stick (ROAS)

Instead of connecting multiple interfaces between a router and a switch in order to route between VLANs, we can connect the router and the switch with 1 connection and split the router’s physical port into logical sub-interfaces.

So, ROAS is used to route between multiple VLANs using a single interface on the router and switch.

The switch interface is configured as a regular trunk, while the router interface is split into sub-interfaces each with their own VLAN tag and IP address.

  • The router will behave as if frames arriving with a certain VLAN tag have arrived on the sub-interface configured with the aforementioned VLAN tag.
  • The router will also tag frames leaving that sub-interface with the VLAN tag configured on it.