Labb 6: Feltolerant nätverk


Denna laboration behandlar design, konfigurering och verifiering av ett skalbart, redundant och feltolerant företagsnätverk i enlighet med Ciscos flerskiktsarkitektur (hierarchical network design).

Målet med nätverksdesignen är att eliminera enskilda felkällor (Single Points of Failure) och garantera hög tillgänglighet (High Availability) för både klienter och kritiska serverresurser.

Topologi

Nätverket är uppbyggt i tre logiska lager:

  • Accesslagret (S1 och S2): Hanterar slutanvändare uppdelade i virtuella nätverk (VLAN 10 för ELEVER och VLAN 20 för PERSONAL),
  • Distributionslagret (DS1 och DS2): Sköter routing mellan VLAN (inter-VLAN routing) samt agerar default gateway för klienterna.
  • Core-/Routinglagret (R3 och R4): Sammankopplar infrastrukturen med serversegmentet och sköter den externa routingen.

För att uppnå maximal tillgänglighet och optimal lastdelning implementeras flera avancerade nätverkstekniker parallellt:

  • Länkredundans via EtherChannel (LACP): Bundlar multipla fysiska länkar mellan DS1 och DS2 till en logisk länk för högre bandbredd och omedelbar failover.
  • Lager 2-redundans via Rapid-PVST+: Snabbar upp Spanning-Tree och möjliggör lastdelning genom att ha olika Root Bridges för olika VLAN.
  • Gateway-redundans via HSRP (First Hop Redundancy Protocol): Ger klienter och servrar en virtuell IP-adress som gateway, delad mellan två fysiska enheter.
  • HSRP Object Tracking: Övervakar fysiska upplänkar och sänker HSRP-prioriteten om en länk dör, vilket tvingar fram en failover.
  • Dynamisk routing med OSPF (Open Shortest Path First): Sköter routing i Area 0 mellan distributionsswitchar och routrar så att nätverket snabbt anpassar sig vid länkfel.

Konfigurationer och teknisk beskrivning

  1. Grundkonfiguration av enheter
  2. VLAN och Accessport-konfiguration
  3. Trunking och EtherChannel (LACP)
  4. HSRP – Gateway redundans
  5. Object Tracking (Feltolerans)
  6. Routing med OSPF
  • ! Steg 1 - Grundkonfiguration
  • S1>enable
  • S1#configure terminal
  • S1(config)#hostname S1
  • S1(config)#no ip domain-lookup
  • S1(config)#line console 0
  • S1(config-line)#logging synchronous
  • S1(config-line)#exit
  • ! Steg 2 - VLAN och Accessport-konfiguration
  • S1(config)#vlan 10
  • S1(config-vlan)#name ELEVER
  • S1(config-vlan)#exit
  • S1(config)#vlan 20
  • S1(config-vlan)#name PERSONAL
  • S1(config-vlan)#exit
  • S1(config)#interface fastEthernet 0/1
  • S1(config-if)#switchport mode access
  • S1(config-if)#switchport access vlan 10
  • S1(config-if)#spanning-tree portfast
  • S1(config-if)#spanning-tree bpduguard enable
  • S1(config-if)#exit
  • S1(config)#interface fastEthernet 0/2
  • S1(config-if)#switchport mode access
  • S1(config-if)#switchport access vlan 20
  • S1(config-if)#spanning-tree portfast
  • S1(config-if)#spanning-tree bpduguard enable
  • S1(config-if)#exit
  • ! Steg 3 - Trunk-konfiguration
  • S1(config)#spanning-tree mode rapid-pvst
  • S1(config)#interface range gigabitEthernet 0/1-2
  • S1(config-if-range)#switchport mode trunk
  • S1(config-if-range)#switchport trunk allowed vlan 10,20
  • S1(config-if-range)#no shutdown
  • S1(config-if-range)#exit
  • S1(config)#end
  • S1#write memory
  • ! Steg 1 - Grundkonfiguration
  • S2>enable
  • S2#configure terminal
  • S2(config)#hostname S2
  • S2(config)#no ip domain-lookup
  • S2(config)#line console 0
  • S2(config-line)#logging synchronous
  • S2(config-line)#exit
  • ! Steg 2 - VLAN och Accessport-konfiguration
  • S2(config)#vlan 10
  • S2(config-vlan)#name ELEVER
  • S2(config-vlan)#exit
  • S2(config)#vlan 20
  • S2(config-vlan)#name PERSONAL
  • S2(config-vlan)#exit
  • S2(config)#interface fastEthernet 0/1
  • S2(config-if)#switchport mode access
  • S2(config-if)#switchport access vlan 10
  • S2(config-if)#spanning-tree portfast
  • S2(config-if)#spanning-tree bpduguard enable
  • S2(config-if)#exit
  • S2(config)#interface fastEthernet 0/2
  • S2(config-if)#switchport mode access
  • S2(config-if)#switchport access vlan 20
  • S2(config-if)#spanning-tree portfast
  • S2(config-if)#spanning-tree bpduguard enable
  • S2(config-if)#exit
  • ! Steg 3 - Trunk-konfiguration
  • S2(config)#spanning-tree mode rapid-pvst
  • S2(config)#interface range gigabitEthernet 0/1-2
  • S2(config-if-range)#switchport mode trunk
  • S2(config-if-range)#switchport trunk allowed vlan 10,20
  • S2(config-if-range)#no shutdown
  • S2(config-if-range)#exit
  • S2(config)#end
  • S2#write memory
  • ! Steg 1 - Grundkonfiguration
  • DS1>enable
  • DS1#configure terminal
  • DS1(config)#hostname DS1
  • DS1(config)#no ip domain-lookup
  • DS1(config)#line console 0
  • DS1(config-line)#logging synchronous
  • DS1(config-line)#exit
  • ! Steg 2 - VLAN-konfiguration
  • DS1(config)#ip routing
  • DS1(config)#vlan 10
  • DS1(config-vlan)#name ELEVER
  • DS1(config-vlan)#exit
  • DS1(config)#vlan 20
  • DS1(config-vlan)#name PERSONAL
  • DS1(config-vlan)#exit
  • DS1(config)#spanning-tree mode rapid-pvst
  • DS1(config)#spanning-tree vlan 10 root primary
  • DS1(config)#spanning-tree vlan 20 root secondary
  • ! Steg 3 - Trunking och EtherChannel (LACP)
  • DS1(config)#interface gigabitEthernet 1/0/1
  • DS1(config-if)#description Trunk-link to S1
  • DS1(config-if)#switchport mode trunk
  • DS1(config-if)#switchport trunk allowed vlan 10,20
  • DS1(config-if)#no shutdown
  • DS1(config-if)#exit
  • DS1(config)#interface gigabitEthernet 1/0/2
  • DS1(config-if)#description Trunk-link to S2
  • DS1(config-if)#switchport mode trunk
  • DS1(config-if)#switchport trunk allowed vlan 10,20
  • DS1(config-if)#no shutdown
  • DS1(config-if)#exit
  • DS1(config)#interface range gigabitEthernet 1/0/3-4
  • DS1(config-if-range)#description Trunk-link to DS2 LACP
  • DS1(config-if-range)#shutdown
  • DS1(config-if-range)#channel-group 1 mode active
  • DS1(config-if-range)#exit
  • DS1(config)#interface port-channel 1
  • DS1(config-if)#switchport mode trunk
  • DS1(config-if)#switchport trunk allowed vlan 10,20
  • DS1(config-if)#no shutdown
  • DS1(config-if)#exit
  • DS1(config)#interface range gigabitEthernet 1/0/3-4
  • DS1(config-if-range)#no shutdown
  • DS1(config-if-range)#exit
  • ! Steg 4 - Object Tracking (Feltolerans)
  • DS1(config)#track 1 interface gigabitEthernet 1/0/5 line-protocol
  • ! Steg 5 - HSRP Gateway redundans
  • DS1(config)#interface Vlan 10
  • DS1(config-if)#ip address 10.10.1.2 255.255.255.0
  • DS1(config-if)#standby 10 ip 10.10.1.1
  • DS1(config-if)#standby 10 priority 110
  • DS1(config-if)#standby 10 preempt
  • DS1(config-if)#standby 10 track 1 decrement 20
  • DS1(config-if)#no shutdown
  • DS1(config-if)#exit
  • DS1(config)#interface Vlan 20
  • DS1(config-if)#ip address 10.20.1.2 255.255.255.0
  • DS1(config-if)#standby 20 ip 10.20.1.1
  • DS1(config-if)#standby 20 priority 100
  • DS1(config-if)#standby 20 preempt
  • DS1(config-if)#no shutdown
  • DS1(config-if)#exit
  • DS1(config)#interface gigabitEthernet 1/0/5
  • DS1(config-if)#description Routad uplink till R3
  • DS1(config-if)#no switchport
  • DS1(config-if)#ip address 10.1.3.1 255.255.255.252
  • DS1(config-if)#no shutdown
  • DS1(config-if)#exit
  • ! Steg 6 - Routing med OSPF
  • DS1(config)#router ospf 1
  • DS1(config-router)#router-id 1.1.1.1
  • DS1(config-router)#passive-interface Vlan10
  • DS1(config-router)#passive-interface Vlan20
  • DS1(config-router)#network 10.1.3.0 0.0.0.3 area 0
  • DS1(config-router)#network 10.10.1.0 0.0.0.255 area 0
  • DS1(config-router)#network 10.20.1.0 0.0.0.255 area 0
  • DS1(config-router)#exit
  • DS1(config)#end
  • DS1#write memory
  • ! Steg 1 - Grundkonfiguration
  • DS2>enable
  • DS2#configure terminal
  • DS2(config)#hostname DS2
  • DS2(config)#no ip domain-lookup
  • DS2(config)#line console 0
  • DS2(config-line)#logging synchronous
  • DS2(config-line)#exit
  • ! Steg 2 - VLAN-konfiguration
  • DS2(config)#ip routing
  • DS2(config)#vlan 10
  • DS2(config-vlan)#name ELEVER
  • DS2(config-vlan)#exit
  • DS2(config)#vlan 20
  • DS2(config-vlan)#name PERSONAL
  • DS2(config-vlan)#exit
  • DS2(config)#spanning-tree mode rapid-pvst
  • DS2(config)#spanning-tree vlan 10 root secondary
  • DS2(config)#spanning-tree vlan 20 root primary
  • ! Steg 3 - Trunking och EtherChannel (LACP)
  • DS2(config)#interface gigabitEthernet 1/0/1
  • DS2(config-if)#description Trunk-link to S2
  • DS2(config-if)#switchport mode trunk
  • DS2(config-if)#switchport trunk allowed vlan 10,20
  • DS2(config-if)#no shutdown
  • DS2(config-if)#exit
  • DS2(config)#interface gigabitEthernet 1/0/2
  • DS2(config-if)#description Trunk-link to S1
  • DS2(config-if)#switchport mode trunk
  • DS2(config-if)#switchport trunk allowed vlan 10,20
  • DS2(config-if)#no shutdown
  • DS2(config-if)#exit
  • DS2(config)#interface range gigabitEthernet 1/0/3-4
  • DS2(config-if-range)#description Trunk-link to DS1 LACP
  • DS2(config-if-range)#shutdown
  • DS2(config-if-range)#channel-group 1 mode active
  • DS2(config-if-range)#exit
  • DS2(config)#interface port-channel 1
  • DS2(config-if)#switchport mode trunk
  • DS2(config-if)#switchport trunk allowed vlan 10,20
  • DS2(config-if)#no shutdown
  • DS2(config-if)#exit
  • DS2(config)#interface range gigabitEthernet 1/0/3-4
  • DS2(config-if-range)#no shutdown
  • DS2(config-if-range)#exit
  • ! Steg 4 - Object Tracking (Feltolerans)
  • DS2(config)#track 1 interface gigabitEthernet 1/0/5 line-protocol
  • ! Steg 5 - HSRP Gateway redundans
  • DS2(config)#interface Vlan 10
  • DS2(config-if)#ip address 10.10.1.3 255.255.255.0
  • DS2(config-if)#standby 10 ip 10.10.1.1
  • DS2(config-if)#standby 10 priority 100
  • DS2(config-if)#standby 10 preempt
  • DS2(config-if)#no shutdown
  • DS2(config-if)#exit
  • DS2(config)#interface Vlan 20
  • DS2(config-if)#ip address 10.20.1.3 255.255.255.0
  • DS2(config-if)#standby 20 ip 10.20.1.1
  • DS2(config-if)#standby 20 priority 110
  • DS2(config-if)#standby 20 preempt
  • DS2(config-if)#standby 20 track 1 decrement 20
  • DS2(config-if)#no shutdown
  • DS2(config-if)#exit
  • DS2(config)#interface gigabitEthernet 1/0/5
  • DS2(config-if)#description Routad uplink till R4
  • DS2(config-if)#no switchport
  • DS2(config-if)#ip address 10.1.4.1 255.255.255.252
  • DS2(config-if)#no shutdown
  • DS2(config-if)#exit
  • ! Steg 6 - Routing med OSPF
  • DS2(config)#router ospf 1
  • DS2(config-router)#router-id 2.2.2.2
  • DS2(config-router)#passive-interface Vlan10
  • DS2(config-router)#passive-interface Vlan20
  • DS2(config-router)#network 10.1.4.0 0.0.0.3 area 0
  • DS2(config-router)#network 10.10.1.0 0.0.0.255 area 0
  • DS2(config-router)#network 10.20.1.0 0.0.0.255 area 0
  • DS2(config-router)#exit
  • DS2(config)#end
  • DS2#write memory
  • ! Steg 1 - Grundkonfiguration
  • R3>enable
  • R3#configure terminal
  • R3(config)#hostname R3
  • R3(config)#no ip domain-lookup
  • R3(config)#line console 0
  • R3(config-line)#logging synchronous
  • R3(config-line)#exit
  • ! Steg 2 - Object Tracking (Feltolerans)
  • R3(config)#track 1 interface gigabitEthernet 0/0 line-protocol
  • R3(config)#interface gigabitEthernet 0/0
  • R3(config-if)#description Routed-link to DS1
  • R3(config-if)#ip address 10.1.3.2 255.255.255.252
  • R3(config-if)#no shutdown
  • R3(config-if)#exit
  • ! Steg 3 - HSRP Gateway redundans
  • R3(config)#interface gigabitEthernet 0/1
  • R3(config-if)#description HSRP-link
  • R3(config-if)#ip address 10.32.1.2 255.255.255.0
  • R3(config-if)#standby 10 ip 10.32.1.1
  • R3(config-if)#standby 10 priority 110
  • R3(config-if)#standby 10 preempt
  • R3(config-if)#standby 10 track 1 decrement 20
  • R3(config-if)#no shutdown
  • R3(config-if)#exit
  • ! Steg 4 - Routing med OSPF
  • R3(config)#router ospf 1
  • R3(config-router)#router-id 3.3.3.3
  • R3(config-router)#network 10.1.3.0 0.0.0.3 area 0
  • R3(config-router)#network 10.32.1.0 0.0.0.255 area 0
  • R3(config-router)#exit
  • R3(config)#end
  • R3#write memory
  • ! Steg 1 - Grundkonfiguration
  • R4>enable
  • R4#configure terminal
  • R4(config)#hostname R4
  • R4(config)#no ip domain-lookup
  • R4(config)#line console 0
  • R4(config-line)#logging synchronous
  • R4(config-line)#exit
  • ! Steg 2 - Object Tracking (Feltolerans)
  • R4(config)#track 1 interface gigabitEthernet 0/0 line-protocol
  • R4(config)#interface gigabitEthernet 0/0
  • R4(config-if)#description Routed-link to DS2
  • R4(config-if)#ip address 10.1.4.2 255.255.255.252
  • R4(config-if)#no shutdown
  • R4(config-if)#exit
  • ! Steg 3 - HSRP Gateway redundans
  • R4(config)#interface gigabitEthernet 0/1
  • R4(config-if)#description HSRP-link
  • R4(config-if)#ip address 10.32.1.3 255.255.255.0
  • R4(config-if)#standby 10 ip 10.32.1.1
  • R4(config-if)#standby 10 priority 100
  • R4(config-if)#standby 10 preempt
  • R4(config-if)#standby 10 track 1 decrement 20
  • R4(config-if)#no shutdown
  • R4(config-if)#exit
  • ! Steg 4 - Routing med OSPF
  • R4(config)#router ospf 1
  • R4(config-router)#router-id 4.4.4.4
  • R4(config-router)#network 10.1.4.0 0.0.0.3 area 0
  • R4(config-router)#network 10.32.1.0 0.0.0.255 area 0
  • R4(config-router)#exit
  • R4(config)#end
  • R4#write memory