VLAN konfiguration 2

I denna laboration ansluts flera virtuella LAN på tre switchar som sätts samman via trunk-kopplingar. Som bekant fungerar switcharnas portar antingen i access eller i trunk arbetsläge. Via access-portar skickas eller tas emot datatrafik från olika VLAN. Via trunk-portar transporteras Ethernet-ramar mellan de olika VLAN, inklusive VLAN 1.  Detta virtuella nätverket finns alltid som default i Cisco switchar och på varje switch inkluderas alla portar i VLAN 1. Eftersom alla portar tillhör samma VLAN finns det ingen behov att markera Ethernet-ramar därmed namnet native VLAN.

När på en switch skapas VLAN markeras Ethernet-ram med en ID så att ramarna kan skiljas åt varandra, sådana ramar kallas TAGGED FRAMES och ramar från VLAN 1 kallas UNTAGGED FRAMES.

Allt ovan kommer att utforskas med 2960 switchar i topologi nedan:

Bild 1: Trunk konfigurationer

Konfigurationer

Portar Fa0/21, 22, och 23 ska tilldelas till VLAN 88 Management.

  • S2(config)# vlan 10
  • S2(config-vlan)# name Faculty/Staff
  • S2(config-vlan)# vlan 20
  • S2(config-vlan)# name Students
  • S2(config-vlan)# vlan 30
  • S2(config-vlan)# name Guest(Default)
  • S2(config-vlan)# vlan 88
  • S2(config-vlan)# name Management
  • S2(config-vlan)# vlan 99
  • S2(config-vlan)# name Native
  • S2(config-vlan)# exit
  • S2(config)# do show vlan brief
  • S2(config)# int fa0/11
  • S2(config-if)# switchport mode access
  • S2(config-if)# switchport access vlan 10
  • S2(config-if)# int fa0/18
  • S2(config-if)# switchport mode access
  • S2(config-if)# switchport access vlan 20
  • S2(config-if)# int fa0/6
  • S2(config-if)# switchport mode access
  • S2(config-if)# switchport access vlan 30
  • S2(config-if)# int range fa0/21 - 23
  • S2(config-if)# switchport mode access
  • S2(config-if)# switchport access vlan 88
  • S2(config-if)# end
  • S2# show vlan brief
  • S1(config)# vlan 10
  • S1(config-vlan)# name Faculty/Staff
  • S1(config-vlan)# vlan 20
  • S1(config-vlan)# name Students
  • S1(config-vlan)# vlan 30
  • S1(config-vlan)# name Guest(Default)
  • S1(config-vlan)# vlan 88
  • S1(config-vlan)# name Management
  • S1(config-vlan)# vlan 99
  • S1(config-vlan)# name Native
  • S1(config-vlan)# exit
  • S1(config)# do show vlan brief
  • S1(config-if)# int range g0/1 - 2
  • S1(config-if)# switchport mode trunk
  • S1(config-if)# switchport trunk native vlan 99
  • S1(config-if)# switchport trunk allowed vlan 10,20,30,88
  • S1(config-if)# end
  • S3(config)# vlan 10
  • S3(config-vlan)# name Faculty/Staff
  • S3(config-vlan)# vlan 20
  • S3(config-vlan)# name Students
  • S3(config-vlan)# vlan 30
  • S3(config-vlan)# name Guest(Default)
  • S3(config-vlan)# vlan 88
  • S3(config-vlan)# name Management
  • S3(config-vlan)# vlan 99
  • S3(config-vlan)# name Native
  • S3(config-vlan)# exit
  • S3(config)# do show vlan brief
  • S3(config)# int fa0/11
  • S3(config-if)# switchport mode access
  • S3(config-if)# switchport access vlan 10
  • S3(config-if)# int fa0/18
  • S3(config-if)# switchport mode access
  • S3(config-if)# switchport access vlan 20
  • S3(config-if)# int fa0/6
  • S3(config-if)# switchport mode access
  • S3(config-if)# switchport access vlan 30
  • S3(config-if)# int range fa0/21 - 23
  • S3(config-if)# switchport mode access
  • S3(config-if)# switchport access vlan 88
  • S3(config-if)# end
  • S3# show vlan brief
  • S2(config-if)# int G0/1
  • S2(config-if)# switchport mode trunk
  • S2(config-if)# switchport trunk native vlan 99
  • S2(config-if)# switchport trunk allowed vlan 10,20,30,88
  • S1(config-if)# end
  • S2# show int trunk
  • S2# show int G0/1 switchport
  • S1(config-if)# int range G0/1 - 2
  • S1(config-if)# switchport mode trunk
  • S1(config-if)# switchport trunk native vlan 99
  • S1(config-if)# switchport trunk allowed vlan 10,20,30,88
  • S1(config-if)# end
  • S1# show int trunk
  • S1# show int G0/1 switchport
  • S1# show int G0/2 switchport
  • S3(config-if)# int G0/2
  • S3(config-if)# switchport mode trunk
  • S3(config-if)# switchport trunk native vlan 99
  • S3(config-if)# switchport trunk allowed vlan 10,20,30,88
  • S3(config-if)# end
  • S3# show int trunk
  • S3# show int G0/1 switchport