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 usable 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.

Jeremy’s IT Lab előadásvideó:

17. Nap - VLAN-ok (2)


Parancsok


Trunk Portok

Emlékeztető

  • A trunk port több VLAN forgalmát is továbbítja. A forgalom fel van címkézve (tagged) ezen az interfészen, kivéve, ha az adat a native VLAN-on keresztül halad át.
Eredeti hivatkozása

VLAN Felcímkézés (Tagging)

Két fő trunking protokoll létezik:

  1. ISL (Inter-Switch Link):
    • Az ISL egy régi, Cisco saját fejlesztésű (proprietary) protokoll, amelyet az IEEE 802.1Q előtt hoztak létre.
  2. IEEE 802.1Q (dot1q):
    • A 802.1Q (dot1q) egy iparági szabvány protokoll.

802.1Q Címke (Tag)

Dot1Q Címke Tulajdonságai

  • A 802.1Q címke az Ethernet frame Source (forrás) és Type/Length (típus/hossz) mezői közé kerül beillesztésre.
  • Hossza 4 bájt (32 bit).

Két Fő Mezőből Áll

  1. Tag Protocol Identifier (TPID) - (16 bit)
    • Mindig 0x8100 hexadecimális értékű, ez jelzi, hogy a frame Dot1Q címkével van ellátva.
  2. Tag Control Information (TCI) - (összesen 16 bit)
    • Priority Code Point (PCP) - (3 bit)
      • A CoS (Class of Service) forgalom-prioritizáláshoz használatos.
    • Drop Eligible Indicator (DEI) - (1 bit)
      • Azon frame-ek megjelölésére szolgál, amelyek hálózati torlódás esetén eldobhatók.
    • VLAN Identifier (VID) - (12 bit)
      • Azonosítja a VLAN-t, amelyhez a frame tartozik.
      • 212 = 4096 lehetséges VLAN, a tartomány 0 - 4095
      • A 0 és 4095 VLAN-ok fenntartottak és nem használhatók, így a ténylegesen használható tartomány 1 - 4094


VLAN Tartományok

A VLAN-ok tartománya (1 - 4094) két részre oszlik:

  1. Normál VLAN-ok: (1 - 1005)
  2. Bővített (Extended) VLAN-ok: (1006 - 4094)

Native VLAN

A 802.1Q rendelkezik egy Native VLAN funkcióval (amely ISL esetén nem érhető el)
Ahol a switch:

  • Nem ad hozzá Dot1Q címkét a native VLAN-ban lévő frame-ekhez.
  • A trunk porton érkező címkézetlen (untagged) forgalmat úgy tekinti, mintha a native VLAN-hoz tartozna.

A Native VLAN alapértelmezetten a VLAN 1.
A switchek elvetik azokat a felcímkézett (tagged) frame-eket, amelyek megfelelnek a native VLAN-nak.

Példa: Native VLAN eldobás (discarding)

  • Ha a SW1-en a native VLAN a VLAN 30, és a switch egy olyan frame-et kap, amely szintén a VLAN 30-cal van felcímkézve, akkor azt hibának tekinti és elveti, mivel a VLAN 30 forgalmának címkézetlennek (untagged) kellene lennie azon a VLAN-on küldve.

Figyelem: Native VLAN konfiguráció

Fontos, hogy a native VLAN egyezzen a kapcsolódó switchek között.

Show parancs tipp:

A show vlan brief parancs az egyes VLAN-okhoz rendelt access portokat jeleníti meg, nem pedig azokat a trunk portokat, amelyek engedélyezik az adott VLAN-t.
A trunk portok ellenőrzéséhez használja inkább a show interfaces trunk parancsot.


Router on a Stick (ROAS)

Ahelyett, hogy a router és a switch között több interfészt kötnénk össze a VLAN-ok közötti routinghoz, a routert és a switchet összeköthetjük 1 kapcsolattal, és a router fizikai portját logikai sub-interface-ekre oszthatjuk fel.

A ROAS tehát arra szolgál, hogy több VLAN között végezzen routingot a router és a switch egyetlen fizikai interfészének használatával.

A switch interfésze normál trunkként van konfigurálva, míg a router interfésze sub-interface-ekre van bontva, amelyek mindegyike saját VLAN címkével és IP-címmel rendelkezik.

  • A router úgy viselkedik, mintha az adott VLAN címkével érkező frame-ek arra a sub-interface-re érkeztek volna, amely az említett VLAN címkével van konfigurálva.
  • A router az adott sub-interface-ről kilépő frame-eket is ellátja az arra konfigurált VLAN címkével.