Labb 29: Redundant nätverk

I den här laborationen bygger du ett redundant företagsnätverk bestående av tre multilayer-switchar (DS1, DS2 och DS3) samt fyra Layer 2-switchar (S1, S2, S3 och S4) som utgör nätverkets accesslager. Varje access-switch är ansluten med redundanta trunklänkar till både DS1 och DS2, vilket skapar flera alternativa kommunikationsvägar mellan klienterna och distributionslagret.

Topologi

På Layer 2 används Rapid PVST+ (Rapid Per-VLAN Spanning Tree Plus) för att förhindra loopar mellan access- och distributionsswitcharna. Eftersom varje access-switch är ansluten till både DS1 och DS2 finns det flera möjliga vägar för trafiken. STP väljer automatiskt den bästa vägen för varje VLAN och blockerar övriga redundanta länkar. Om en aktiv länk går ner aktiveras en tidigare blockerad länk, vilket gör att trafiken snabbt kan fortsätta en annan väg.

På Layer 3 används HSRP (Hot Standby Router Protocol) för att skapa redundanta standardgateways för klienterna. För varje VLAN bildar DS1 och DS2 en gemensam HSRP-grupp som delar en virtuell IP-adress och en virtuell MAC-adress. Klienterna använder alltid den virtuella IP-adressen som standardgateway och känner därför inte till vilken av switcharna som för tillfället är aktiv.

  • DS1 är aktiv HSRP-router för VLAN 2–5
  • DS2 är aktiv HSRP-router för VLAN 6–9.

Om den aktiva switchen skulle sluta fungera tar den andra switchen automatiskt över den virtuella gatewayn, vilket gör att kommunikationen kan fortsätta utan att klienterna behöver ändra sina nätverksinställningar.

DS3 har en enklare konfiguration än DS1 och DS2 eftersom den inte används som gateway för klienternas VLAN. Den deltar inte heller i HSRP eller DHCP-utdelning. I denna laboration fungerar DS3 som en överordnad Layer 3-switch som simulerar anslutningen mot internet. Detta görs med hjälp av loopback-interface och en statisk default route som sedan annonseras till övriga nätverket via OSPF.

Mellan distributionsswitcharna används OSPF (Open Shortest Path First) över flera routade punkt-till-punkt-länkar. OSPF bygger dynamiskt upp routingtabeller och väljer den bästa vägen mellan nätverken. Om en länk eller en distributionsswitch blir otillgänglig beräknar OSPF automatiskt en ny väg, vilket säkerställer fortsatt kommunikation i nätverket.

För att även fördela nätverkstjänster används DHCP (Dynamic Host Configuration Protocol) på distributionslagret. DS1 fungerar som DHCP-server för VLAN 2–5, medan DS2 ansvarar för DHCP-utdelningen i VLAN 6–9. Denna uppdelning ger en naturlig lastfördelning och gör att varje distributionsswitch ansvarar för både gateway- och DHCP-funktionerna för sina respektive VLAN.

Under laborationen kommer du att konfigurera och verifiera hur Rapid PVST+, HSRP, OSPF och DHCP samverkar för att skapa ett redundant och feltolerant nätverk.

Tabeller att använda:

IP-adressering för VLAN

VLAN Nätverk Subnet mask HSRP virtuell gateway Aktiv HSRP-router DHCP-server
VLAN 2 172.16.0.0/22 255.255.252.0 172.16.0.1 DS1 DS1
VLAN 3 172.16.4.0/22 255.255.252.0 172.16.4.1 DS1 DS1
VLAN 4 172.16.8.0/22 255.255.252.0 172.16.8.1 DS1 DS1
VLAN 5 172.16.12.0/22 255.255.252.0 172.16.12.1 DS1 DS1
VLAN 6 172.16.16.0/22 255.255.252.0 172.16.16.1 DS2 DS2
VLAN 7 172.16.20.0/22 255.255.252.0 172.16.20.1 DS2 DS2
VLAN 8 172.16.24.0/22 255.255.252.0 172.16.24.1 DS2 DS2
VLAN 9 172.16.28.0/22 255.255.252.0 172.16.28.1 DS2 DS2

 

Punkt-till-punkt-länkar mellan distributionsswitcharna

Förbindelse Nätverk DS1-port DS1 IP DS2-port DS2 IP DS3-port DS3 IP
DS1 ↔ DS2 172.16.254.0/30 G1/0/5 172.16.254.1 G1/0/5 172.16.254.2
DS1 ↔ DS2 172.16.254.4/30 G1/0/6 172.16.254.5 G1/0/6 172.16.254.6
DS1 ↔ DS3 172.16.254.8/30 G1/0/7 172.16.254.9 G1/0/7 172.16.254.10
DS1 ↔ DS3 172.16.254.12/30 G1/0/8 172.16.254.13 G1/0/8 172.16.254.14
DS2 ↔ DS3 172.16.254.16/30 G1/0/9 172.16.254.17 G1/0/9 172.16.254.18
DS2 ↔ DS3 172.16.254.20/30 G1/0/10 172.16.254.21 G1/0/10 172.16.254.22

Konfigurationer

  • VLAN konfigurationer
  • DS1(config)# vlan 2
  • DS1(config-vlan)# name VLAN2
  • DS1(config-vlan)# exit
  • DS1(config)# vlan 3
  • DS1(config-vlan)# name VLAN3
  • DS1(config-vlan)# exit
  • DS1(config)# vlan 4
  • DS1(config-vlan)# name VLAN4
  • DS1(config-vlan)# exit
  • DS1(config)# vlan 5
  • DS1(config-vlan)# name VLAN5
  • DS1(config-vlan)# exit
  • DS1(config)# vlan 6
  • DS1(config-vlan)# name VLAN6
  • DS1(config-vlan)# exit
  • DS1(config)# vlan 7
  • DS1(config-vlan)# name VLAN7
  • DS1(config-vlan)# exit
  • DS1(config)# vlan 8
  • DS1(config-vlan)# name VLAN8
  • DS1(config-vlan)# exit
  • DS1(config)# vlan 9
  • DS1(config-vlan)# name VLAN9
  • DS1(config-vlan)# exit
  • Spanning-tree konfiguration
  • DS1(config)# spanning-tree mode rapid-pvst
  • DS1(config)# spanning-tree vlan 2-5 root primary
  • DS1(config)# spanning-tree vlan 6-9 root secondary
  • Trunk-länkar konfiguration
  • DS1(config)# interface range g1/0/1 - 4
  • DS1(config-if-range)# switchport mode trunk
  • DS1(config-if-range)# switchport trunk allowed vlan 2-9
  • DS1(config-if-range)# switchport nonegotiate
  • DS1(config-if-range)# no shutdown
  • DS1(config-if-range)# exit
  • Aktiverar L3-routing
  • DS1(config)# ip routing
  • HSRP konfiguration
  • DS1(config)# interface vlan 2
  • DS1(config-if)# ip address 172.16.0.2 255.255.252.0
  • DS1(config-if)# standby 2 ip 172.16.0.1
  • DS1(config-if)# standby 2 priority 105
  • DS1(config-if)# standby 2 preempt
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface vlan 3
  • DS1(config-if)# ip address 172.16.4.2 255.255.252.0
  • DS1(config-if)# standby 3 ip 172.16.4.1
  • DS1(config-if)# standby 3 priority 105
  • DS1(config-if)# standby 3 preempt
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface vlan 4
  • DS1(config-if)# ip address 172.16.8.2 255.255.252.0
  • DS1(config-if)# standby 4 ip 172.16.8.1
  • DS1(config-if)# standby 4 priority 105
  • DS1(config-if)# standby 4 preempt
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface vlan 5
  • DS1(config-if)# ip address 172.16.12.2 255.255.252.0
  • DS1(config-if)# standby 5 ip 172.16.12.1
  • DS1(config-if)# standby 5 priority 105
  • DS1(config-if)# standby 5 preempt
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface vlan 6
  • DS1(config-if)# ip address 172.16.16.2 255.255.252.0
  • DS1(config-if)# standby 6 ip 172.16.16.1
  • DS1(config-if)# standby 6 preempt
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface vlan 7
  • DS1(config-if)# ip address 172.16.20.2 255.255.252.0
  • DS1(config-if)# standby 7 ip 172.16.20.1
  • DS1(config-if)# standby 7 preempt
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface vlan 8
  • DS1(config-if)# ip address 172.16.24.2 255.255.252.0
  • DS1(config-if)# standby 8 ip 172.16.24.1
  • DS1(config-if)# standby 8 preempt
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface vlan 9
  • DS1(config-if)# ip address 172.16.28.2 255.255.252.0
  • DS1(config-if)# standby 9 ip 172.16.28.1
  • DS1(config-if)# standby 9 preempt
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • IP-adressering för interfacen
  • DS1(config)# interface g1/0/5
  • DS1(config-if)# no switchport
  • DS1(config-if)# ip address 172.16.254.1 255.255.255.252
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface g1/0/6
  • DS1(config-if)# no switchport
  • DS1(config-if)# ip address 172.16.254.5 255.255.255.252
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface g1/0/7
  • DS1(config-if)# no switchport
  • DS1(config-if)# ip address 172.16.254.9 255.255.255.252
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)# interface g1/0/8
  • DS1(config-if)# no switchport
  • DS1(config-if)# ip address 172.16.254.13 255.255.255.252
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • DS1(config)#
  • Exkludera IP-adresser
  • DS1(config)# ip dhcp excluded-address 172.16.0.1 172.16.0.50
  • DS1(config)# ip dhcp excluded-address 172.16.4.1 172.16.4.50
  • DS1(config)# ip dhcp excluded-address 172.16.8.1 172.16.8.50
  • DS1(config)# ip dhcp excluded-address 172.16.12.1 172.16.12.50
  • Konfigurera DHCP-pool
  • DS1(config)# ip dhcp pool VLAN2
  • DS1(dhcp-config)# network 172.16.0.0 255.255.252.0
  • DS1(dhcp-config)# default-router 172.16.0.1
  • DS1(dhcp-config)# dns-server 8.8.8.8
  • DS1(dhcp-config)# domain-name diginto.se
  • DS1(dhcp-config)# exit
  • DS1(config)# ip dhcp pool VLAN3
  • DS1(dhcp-config)# network 172.16.4.0 255.255.252.0
  • DS1(dhcp-config)# default-router 172.16.4.1
  • DS1(dhcp-config)# dns-server 8.8.8.8
  • DS1(dhcp-config)# domain-name diginto.se
  • DS1(dhcp-config)# exit
  • DS1(config)# ip dhcp pool VLAN4
  • DS1(dhcp-config)# network 172.16.8.0 255.255.252.0
  • DS1(dhcp-config)# default-router 172.16.8.1
  • DS1(dhcp-config)# dns-server 8.8.8.8
  • DS1(dhcp-config)# domain-name diginto.se
  • DS1(dhcp-config)# exit
  • DS1(config)# ip dhcp pool VLAN5
  • DS1(dhcp-config)# network 172.16.12.0 255.255.252.0
  • DS1(dhcp-config)# default-router 172.16.12.1
  • DS1(dhcp-config)# dns-server 8.8.8.8
  • DS1(dhcp-config)# domain-name diginto.se
  • DS1(dhcp-config)# exit
  • Aktivera OSPF routing
  • DS1(config)# router ospf 110
  • DS1(config-router)# router-id 1.1.1.1
  • DS1(config-router)# auto-cost reference-bandwidth 1000
  • DS1(config-router)# passive-interface default
  • DS1(config-router)# no passive-interface g1/0/5
  • DS1(config-router)# no passive-interface g1/0/6
  • DS1(config-router)# no passive-interface g1/0/7
  • DS1(config-router)# no passive-interface g1/0/8
  • DS1(config-router)# network 172.16.0.0 0.0.255.255 area 0
  • DS1(config-router)# exit
  • DS1(config)#
  • VLAN konfigurationer
  • DS2(config)# vlan 2
  • DS2(config-vlan)# name VLAN2
  • DS2(config-vlan)# exit
  • DS2(config)# vlan 3
  • DS2(config-vlan)# name VLAN3
  • DS2(config-vlan)# exit
  • DS2(config)# vlan 4
  • DS2(config-vlan)# name VLAN4
  • DS2(config-vlan)# exit
  • DS2(config)# vlan 5
  • DS2(config-vlan)# name VLAN5
  • DS2(config-vlan)# exit
  • DS2(config)# vlan 6
  • DS2(config-vlan)# name VLAN6
  • DS2(config-vlan)# exit
  • DS2(config)# vlan 7
  • DS2(config-vlan)# name VLAN7
  • DS2(config-vlan)# exit
  • DS2(config)# vlan 8
  • DS2(config-vlan)# name VLAN8
  • DS2(config-vlan)# exit
  • DS2(config)# vlan 9
  • DS2(config-vlan)# name VLAN9
  • DS2(config-vlan)# exit
  • Spanning-tree konfiguration
  • DS2(config)# spanning-tree mode rapid-pvst
  • DS2(config)# spanning-tree vlan 6-9 root primary
  • DS2(config)# spanning-tree vlan 2-5 root secondary
  • Trunk-länkar konfiguration
  • DS2(config)# interface range g1/0/1 - 4
  • DS2(config-if-range)# switchport mode trunk
  • DS2(config-if-range)# switchport trunk allowed vlan 2-9
  • DS2(config-if-range)# switchport nonegotiate
  • DS2(config-if-range)# no shutdown
  • DS2(config-if-range)# exit
  • Aktivera IP-routing
  • DS2(config)# ip routing
  • HSRP konfiguration
  • DS2(config)# interface vlan 2
  • DS2(config-if)# ip address 172.16.0.3 255.255.252.0
  • DS2(config-if)# standby 2 ip 172.16.0.1
  • DS2(config-if)# standby 2 preempt
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface vlan 3
  • DS2(config-if)# ip address 172.16.4.3 255.255.252.0
  • DS2(config-if)# standby 3 ip 172.16.4.1
  • DS2(config-if)# standby 3 preempt
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface vlan 4
  • DS2(config-if)# ip address 172.16.8.3 255.255.252.0
  • DS2(config-if)# standby 4 ip 172.16.8.1
  • DS2(config-if)# standby 4 preempt
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface vlan 5
  • DS2(config-if)# ip address 172.16.12.3 255.255.252.0
  • DS2(config-if)# standby 5 ip 172.16.12.1
  • DS2(config-if)# standby 5 preempt
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface vlan 6
  • DS2(config-if)# ip address 172.16.16.3 255.255.252.0
  • DS2(config-if)# standby 6 ip 172.16.16.1
  • DS2(config-if)# standby 6 priority 105
  • DS2(config-if)# standby 6 preempt
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface vlan 7
  • DS2(config-if)# ip address 172.16.20.3 255.255.252.0
  • DS2(config-if)# standby 7 ip 172.16.20.1
  • DS2(config-if)# standby 7 priority 105
  • DS2(config-if)# standby 7 preempt
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface vlan 8
  • DS2(config-if)# ip address 172.16.24.3 255.255.252.0
  • DS2(config-if)# standby 8 ip 172.16.24.1
  • DS2(config-if)# standby 8 priority 105
  • DS2(config-if)# standby 8 preempt
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface vlan 9
  • DS2(config-if)# ip address 172.16.28.3 255.255.252.0
  • DS2(config-if)# standby 9 ip 172.16.28.1
  • DS2(config-if)# standby 9 priority 105
  • DS2(config-if)# standby 9 preempt
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • IP-adressering för interfacen
  • DS2(config)# interface g1/0/5
  • DS2(config-if)# no switchport
  • DS2(config-if)# ip address 172.16.254.2 255.255.255.252
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface g1/0/6
  • DS2(config-if)# no switchport
  • DS2(config-if)# ip address 172.16.254.6 255.255.255.252
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface g1/0/9
  • DS2(config-if)# no switchport
  • DS2(config-if)# ip address 172.16.254.17 255.255.255.252
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • DS2(config)# interface g1/0/10
  • DS2(config-if)# no switchport
  • DS2(config-if)# ip address 172.16.254.21 255.255.255.252
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • Exkludera IP-adresser
  • DS2(config)# ip dhcp excluded-address 172.16.16.1 172.16.16.50
  • DS2(config)# ip dhcp excluded-address 172.16.20.1 172.16.20.50
  • DS2(config)# ip dhcp excluded-address 172.16.24.1 172.16.24.50
  • DS2(config)# ip dhcp excluded-address 172.16.28.1 172.16.28.50
  • Konfigurera DHCP-pool
  • DS2(config)# ip dhcp pool VLAN6
  • DS2(dhcp-config)# network 172.16.16.0 255.255.252.0
  • DS2(dhcp-config)# default-router 172.16.16.1
  • DS2(dhcp-config)# dns-server 8.8.8.8
  • DS2(dhcp-config)# domain-name diginto.se
  • DS2(dhcp-config)# exit
  • DS2(config)# ip dhcp pool VLAN7
  • DS2(dhcp-config)# network 172.16.20.0 255.255.252.0
  • DS2(dhcp-config)# default-router 172.16.20.1
  • DS2(dhcp-config)# dns-server 8.8.8.8
  • DS2(dhcp-config)# domain-name diginto.se
  • DS2(dhcp-config)# exit
  • DS2(config)# ip dhcp pool VLAN8
  • DS2(dhcp-config)# network 172.16.24.0 255.255.252.0
  • DS2(dhcp-config)# default-router 172.16.24.1
  • DS2(dhcp-config)# dns-server 8.8.8.8
  • DS2(dhcp-config)# domain-name diginto.se
  • DS2(dhcp-config)# exit
  • DS2(config)# ip dhcp pool VLAN9
  • DS2(dhcp-config)# network 172.16.28.0 255.255.252.0
  • DS2(dhcp-config)# default-router 172.16.28.1
  • DS2(dhcp-config)# dns-server 8.8.8.8
  • DS2(dhcp-config)# domain-name diginto.se
  • DS2(dhcp-config)# exit
  • Aktivera OSPF routing
  • DS2(config)# router ospf 110
  • DS2(config-router)# router-id 2.2.2.2
  • DS2(config-router)# auto-cost reference-bandwidth 1000
  • DS2(config-router)# passive-interface default
  • DS2(config-router)# no passive-interface g1/0/5
  • DS2(config-router)# no passive-interface g1/0/6
  • DS2(config-router)# no passive-interface g1/0/9
  • DS2(config-router)# no passive-interface g1/0/10
  • DS2(config-router)# network 172.16.0.0 0.0.255.255 area 0
  • DS2(config-router)# exit
  • DS2(config)#
  • Grundkonfiguration
  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname DS3
  • DS3(config)# no ip domain-lookup
  • Aktivera IP-routing
  • DS3(config)# ip routing
  • Konfigurera routed interfaces
  • DS3(config)# interface g1/0/7
  • DS3(config-if)# no switchport
  • DS3(config-if)# ip address 172.16.254.10 255.255.255.252
  • DS3(config-if)# no shutdown
  • DS3(config-if)# exit
  • DS3(config)# interface g1/0/8
  • DS3(config-if)# no switchport
  • DS3(config-if)# ip address 172.16.254.14 255.255.255.252
  • DS3(config-if)# no shutdown
  • DS3(config-if)# exit
  • DS3(config)# interface g1/0/9
  • DS3(config-if)# no switchport
  • DS3(config-if)# ip address 172.16.254.18 255.255.255.252
  • DS3(config-if)# no shutdown
  • DS3(config-if)# exit
  • DS3(config)# interface g1/0/10
  • DS3(config-if)# no switchport
  • DS3(config-if)# ip address 172.16.254.22 255.255.255.252
  • DS3(config-if)# no shutdown
  • DS3(config-if)# exit
  • Konfigurera loopback-interface
  • DS3(config)# interface loopback0
  • DS3(config-if)# ip address 173.32.100.100 255.255.255.255
  • DS3(config-if)# exit
  • DS3(config)# interface loopback8
  • DS3(config-if)# ip address 8.8.8.8 255.255.255.255
  • DS3(config-if)# exit
  • Konfigurera statisk default route
  • DS3(config)# ip route 0.0.0.0 0.0.0.0 loopback1
  • Aktivera OSPF-routing
  • DS3(config)# router ospf 1
  • DS3(config-router)# router-id 3.3.3.3
  • DS3(config-router)# auto-cost reference-bandwidth 1000
  • DS3(config-router)# passive-interface default
  • DS3(config-router)# no passive-interface g1/0/7
  • DS3(config-router)# no passive-interface g1/0/8
  • DS3(config-router)# no passive-interface g1/0/9
  • DS3(config-router)# no passive-interface g1/0/10
  • DS3(config-router)# network 172.16.0.0 0.0.255.255 area 0
  • DS3(config-router)# network 8.8.8.8 0.0.0.0 area 0
  • DS3(config-router)# default-information originate
  • DS3(config-router)# exit
  • DS3(config)#
  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname S1
  • S1(config)# no ip domain-lookup
  • S1(config)# vlan 2
  • S1(config-vlan)# name VLAN2
  • S1(config-vlan)# exit
  • S1(config)# vlan 3
  • S1(config-vlan)# name VLAN3
  • S1(config-vlan)# exit
  • S1(config)# spanning-tree mode rapid-pvst
  • S1(config)# interface range fa0/1 - 5
  • S1(config-if-range)# switchport mode access
  • S1(config-if-range)# switchport access vlan 2
  • S1(config-if-range)# no shutdown
  • S1(config-if-range)# exit
  • S1(config)# interface range fa0/6 - 10
  • S1(config-if-range)# switchport mode access
  • S1(config-if-range)# switchport access vlan 3
  • S1(config-if-range)# no shutdown
  • S1(config-if-range)# exit
  • S1(config)# interface g0/1
  • S1(config-if)# description Trunk to DS1
  • S1(config-if)# switchport mode trunk
  • S1(config-if)# switchport trunk allowed vlan 2,3
  • S1(config-if)# switchport nonegotiate
  • S1(config-if)# no shutdown
  • S1(config-if)# exit
  • S1(config)# interface g0/2
  • S1(config-if)# description Trunk to DS2
  • S1(config-if)# switchport mode trunk
  • S1(config-if)# switchport trunk allowed vlan 2,3
  • S1(config-if)# switchport nonegotiate
  • S1(config-if)# no shutdown
  • S1(config-if)# exit
  • S1(config)# interface range fa0/1 - 10
  • S1(config-if-range)# spanning-tree portfast
  • S1(config-if-range)# spanning-tree bpduguard enable
  • S1(config-if-range)# exit
  • S1(config)# end
  • S1# copy running-config startup-config
  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname S2
  • S2(config)# no ip domain-lookup
  • S2(config)# vlan 4
  • S2(config-vlan)# name VLAN4
  • S2(config-vlan)# exit
  • S2(config)# vlan 5
  • S2(config-vlan)# name VLAN5
  • S2(config-vlan)# exit
  • S2(config)# spanning-tree mode rapid-pvst
  • S2(config)# interface range fa0/1 - 5
  • S2(config-if-range)# switchport mode access
  • S2(config-if-range)# switchport access vlan 4
  • S2(config-if-range)# no shutdown
  • S2(config-if-range)# exit
  • S2(config)# interface range fa0/6 - 10
  • S2(config-if-range)# switchport mode access
  • S2(config-if-range)# switchport access vlan 5
  • S2(config-if-range)# no shutdown
  • S2(config-if-range)# exit
  • S2(config)# interface g0/1
  • S2(config-if)# description Trunk to DS1
  • S2(config-if)# switchport mode trunk
  • S2(config-if)# switchport trunk allowed vlan 4,5
  • S2(config-if)# switchport nonegotiate
  • S2(config-if)# no shutdown
  • S2(config-if)# exit
  • S2(config)# interface g0/2
  • S2(config-if)# description Trunk to DS2
  • S2(config-if)# switchport mode trunk
  • S2(config-if)# switchport trunk allowed vlan 4,5
  • S2(config-if)# switchport nonegotiate
  • S2(config-if)# no shutdown
  • S2(config-if)# exit
  • S2(config)# interface range fa0/1 - 10
  • S2(config-if-range)# spanning-tree portfast
  • S2(config-if-range)# spanning-tree bpduguard enable
  • S2(config-if-range)# exit
  • S2(config)# end
  • S2# copy running-config startup-config
  •  
  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname S3
  • S3(config)# no ip domain-lookup
  • S3(config)# vlan 6
  • S3(config-vlan)# name VLAN6
  • S3(config-vlan)# exit
  • S3(config)# vlan 7
  • S3(config-vlan)# name VLAN7
  • S3(config-vlan)# exit
  • S3(config)# spanning-tree mode rapid-pvst
  • S3(config)# interface range fa0/1 - 5
  • S3(config-if-range)# switchport mode access
  • S3(config-if-range)# switchport access vlan 6
  • S3(config-if-range)# no shutdown
  • S3(config-if-range)# exit
  • S3(config)# interface range fa0/6 - 10
  • S3(config-if-range)# switchport mode access
  • S3(config-if-range)# switchport access vlan 7
  • S3(config-if-range)# no shutdown
  • S3(config-if-range)# exit
  • S3(config)# interface g0/1
  • S3(config-if)# description Trunk to DS1
  • S3(config-if)# switchport mode trunk
  • S3(config-if)# switchport trunk allowed vlan 6,7
  • S3(config-if)# switchport nonegotiate
  • S3(config-if)# no shutdown
  • S3(config-if)# exit
  • S3(config)# interface g0/2
  • S3(config-if)# description Trunk to DS2
  • S3(config-if)# switchport mode trunk
  • S3(config-if)# switchport trunk allowed vlan 6,7
  • S3(config-if)# switchport nonegotiate
  • S3(config-if)# no shutdown
  • S3(config-if)# exit
  • S3(config)# interface range fa0/1 - 10
  • S3(config-if-range)# spanning-tree portfast
  • S3(config-if-range)# spanning-tree bpduguard enable
  • S3(config-if-range)# exit
  • S3(config)# end
  • S3# copy running-config startup-config
  •  
  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname S4
  • S4(config)# no ip domain-lookup
  • S4(config)# vlan 8
  • S4(config-vlan)# name VLAN8
  • S4(config-vlan)# exit
  • S4(config)# vlan 9
  • S4(config-vlan)# name VLAN9
  • S4(config-vlan)# exit
  • S4(config)# spanning-tree mode rapid-pvst
  • S4(config)# interface range fa0/1 - 5
  • S4(config-if-range)# switchport mode access
  • S4(config-if-range)# switchport access vlan 8
  • S4(config-if-range)# no shutdown
  • S4(config-if-range)# exit
  • S4(config)# interface range fa0/6 - 10
  • S4(config-if-range)# switchport mode access
  • S4(config-if-range)# switchport access vlan 9
  • S4(config-if-range)# no shutdown
  • S4(config-if-range)# exit
  • S4(config)# interface g0/1
  • S4(config-if)# description Trunk to DS1
  • S4(config-if)# switchport mode trunk
  • S4(config-if)# switchport trunk allowed vlan 8,9
  • S4(config-if)# switchport nonegotiate
  • S4(config-if)# no shutdown
  • S4(config-if)# exit
  • S4(config)# interface g0/2
  • S4(config-if)# description Trunk to DS2
  • S4(config-if)# switchport mode trunk
  • S4(config-if)# switchport trunk allowed vlan 8,9
  • S4(config-if)# switchport nonegotiate
  • S4(config-if)# no shutdown
  • S4(config-if)# exit
  • S4(config)# interface range fa0/1 - 10
  • S4(config-if-range)# spanning-tree portfast
  • S4(config-if-range)# spanning-tree bpduguard enable
  • S4(config-if-range)# exit
  • S4(config)# end
  • S4# copy running-config startup-config
  •