Labb 7: Redundant nätverk

I dagens nätverksmiljöer är det vanligt att hantera komplexa nätverk med flera VLAN, redundanta länkar och dynamisk routing för att säkerställa både effektivitet och tillförlitlighet. Denna laboration syftar till att ge praktisk erfarenhet av att konfigurera och integrera olika nätverksprotokoll och teknologier för att skapa en robust och skalbar nätverksinfrastruktur.

Huvudmålet med denna laboration är:

  • Implementera VLAN för att separera nätverkstrafik baserat på organisatoriska behov, vilket förbättrar säkerhet och effektivitet.
  • Konfigurera Router-on-a-Stick på två routrar (R1 och R2) för att möjliggöra trafikhantering mellan flera VLAN via en enda fysisk länk.
  • Konfigurera VTP (VLAN Trunking Protocol) för att automatisera spridningen av VLAN-konfigurationer över flera switchar inom samma domän.
  • Säkra nätverkets loopfrihet med PVST+ (Per VLAN Spanning Tree) genom att konfigurera specifika switchar som root bridges för olika VLAN, vilket förhindrar oönskade L2-loopar.
  • Implementera DHCP-servrar på routrarna för att dynamiskt tilldela IP-adresser till enheter inom respektive VLAN.
  • Konfigurera dynamisk routing med RIP (Routing Information Protocol) för att möjliggöra effektiv routing mellan de olika subnäten och VLAN

Topologi

Instruktioner

  1. Nätverksplanering och IP-adressering
  2. Konfigurera ISP-routern
  3. Konfigurera R1 som DCE och Router-on-a-Stick
  4. Konfigurera R2 som DCE och Router-on-a-Stick
  5. Konfigurera switcharna (VLAN, VTP och STP) i ng domän
  6. Konfigurera switcharna (VLAN, VTP och STP) i diginto domän
  7. Konfigurera RIP på alla routrar

Genomförande

1. IP-adressering

  • VLAN 10 (Executives): 192.168.1.0/26
  • VLAN 20 (Economy): 192.168.1.64/27
  • VLAN 30 (Marketing): 192.168.1.96/28
  • VLAN 40 (Sales): 192.168.1.112/29
  • WAN 1 (R1 - ISP): 192.168.1.120/30
    • ISP: 192.168.1.121 och R1: 192.168.1.122
  • WAN 2 (R2 - ISP): 192.168.1.124/30
    • ISP: 192.168.1.125 och R2: 192.168.1.126

ISP-routern konfigureras för seriella anslutningar till R1 och R2.

  • ISP(config)# interface Serial2/0
  • ISP(config-if)# description Connected to R1
  • ISP(config-if)# ip address 192.168.1.121 255.255.255.252
  • ISP(config-if)# no shutdown
  • ISP(config-if)# exit
  • ISP(config)# interface Serial3/0
  • ISP(config-if)# description Connected to R2
  • ISP(config-if)# ip address 192.168.1.125 255.255.255.252
  • ISP(config-if)# no shutdown
  • ISP(config-if)# exit
  • ISP(config)#

ISP-routern konfigureras för routing med RIP

  • ISP(config)# router rip
  • ISP(config-router)# version 2
  • ISP(config-router)# no auto-summary
  • ISP(config-router)# network 192.168.1.120
  • ISP(config-router)# network 192.168.1.124
  • ISP(config-router)# end
  • ISP# Copy running-config startup-config

R1 interface konfiguration och subinterface för VLAN 10 och 20

  • R1(config)# interface Serial2/0
  • R1(config-if)# description DCE Connected to ISP
  • R1(config-if)# clock rate 128000
  • R1(config-if)# ip address 192.168.1.122 255.255.255.252
  • R1(config-if)# no shutdown
  • R1(config-if)# exit
  • ! Konifguration av subinterfaces
  • R1(config)# interface fa0/0
  • R1(config-if)# no ip address
  • R1(config-if)# shutdown
  • R1(config-if)# exit
  • R1(config)# interface 0/0.10
  • R1(config-subif)# description Connected to VLAN 10
  • R1(config-subif)# encapsulation dot1Q 10
  • R1(config-subif)# ip address 192.168.1.1 255.255.255.192
  • R1(config-subif)# no shutdown
  • R1(config-subif)# exit
  • R1(config)# interface FastEthernet0/0.20
  • R1(config-subif)# description Connected to VLAN 20
  • R1(config-subif)# encapsulation dot1Q 20
  • R1(config-subif)# ip address 192.168.1.65 255.255.255.224
  • R1(config-subif)# no shutdown
  • R1(config-subif)# exit
  • R1(config)#

Konfigurera R1 som DHCP server för VLAN 10 och 20

  • R1(config)# ip dhcp excluded-address 192.168.1.1 192.168.1.2
  • R1(config)# ip dhcp excluded-address 192.168.1.65 192.168.1.66
  • R1(config)# ip dhcp pool EXECUTIVES
  • R1(dhcp-config)# network 192.168.1.0 255.255.255.192
  • R1(dhcp-config)# default-router 192.168.1.1
  • R1(dhcp-config)# dns-server 8.8.8.8
  • R1(dhcp-config)# domain-name ng.se
  • R1(dhcp-config)# exit
  • R1(config)# ip dhcp pool ECONOMY
  • R1(dhcp-config)# network 192.168.1.64 255.255.255.224
  • R1(dhcp-config)# default-router 192.168.1.65
  • R1(dhcp-config)# dns-server 8.8.8.8
  • R1(dhcp-config)# domain-name ng.se
  • R1(dhcp-config)# exit
  • R1(config)#

R2 interface konfiguration och subinterface för VLAN 30 och 40

  • R2(config)# interface Serial3/0
  • R2(config-if)# description DCE Connected to ISP
  • R2(config-if)# clock rate 128000
  • R2(config-if)# ip address 192.168.1.126 255.255.255.252
  • R2(config-if)# no shutdown
  • R2(config-if)# exit
  • ! Konifguration av subinterfaces
  • R2(config)# interface fa0/0
  • R2(config-if)# no ip address
  • R2(config-if)# shutdown
  • R2(config-if)# exit
  • R2(config)# interface 0/0.30
  • R2(config-subif)# description Connected to VLAN 30
  • R2(config-subif)# encapsulation dot1Q 30
  • R2(config-subif)# ip address 192.168.1.97 255.255.255.240
  • R2(config-subif)# no shutdown
  • R2(config-subif)# exit
  • R2(config)# interface FastEthernet0/0.20
  • R2(config-subif)# description Connected to VLAN 20
  • R2(config-subif)# encapsulation dot1Q 20
  • R2(config-subif)# ip address 192.168.1.65 255.255.255.224
  • R2(config-subif)# no shutdown
  • R2(config-subif)# exit
  • R2(config)#

Konfigurera R2 som DHCP server för VLAN 30 och 40

  • R2(config)# ip dhcp excluded-address 192.168.1.97 192.168.1.98
  • R2(config)# ip dhcp excluded-address 192.168.1.113 192.168.1.114
  • R2(config)# ip dhcp pool MARKETING
  • R2(dhcp-config)# network 192.168.1.96 255.255.255.240
  • R2(dhcp-config)# default-router 192.168.1.97
  • R2(dhcp-config)# dns-server 8.8.8.8
  • R2(dhcp-config)# domain-name diginto.se
  • R2(dhcp-config)# exit
  • R2(config)# ip dhcp pool SALES
  • R2(dhcp-config)# network 192.168.1.112 255.255.255.248
  • R2(dhcp-config)# default-router 192.168.1.113
  • R2(dhcp-config)# dns-server 8.8.8.8
  • R2(dhcp-config)# domain-name diginto.se
  • R2(dhcp-config)# exit
  • R2(config)#

SWD1 (VTP-server):

  • SWD1(config)# vlan 10
  • SWD1(config-vlan)# name EXECUTIVES
  • SWD1(config-vlan)# vlan 20
  • SWD1(config-vlan)# name ECONOMY
  • SWD1(config-vlan)# exit
  • SWD1(config)# vtp mode server
  • SWD1(config)# vtp domain ng
  • SWD1(config)# vtp password ngP@55
  • SWD1(config)#

SWD1 trunk konfigurering:

  • SWD1(config)# interface range fa0/1 - 3
  • SWD1(config-if-range)# switchport mode trunk
  • SWD1(config-if-range)# exit
  • SWD1(config)#

SWC1 (VTP-client):

  • SWC1(config)# vtp mode client
  • SWC1(config)# vtp domain ng
  • SWC1(config)# vtp password ngP@55
  • SWC1(config)# do show vlan brief
  • !
  • SWC1(config)# interface range FastEthernet0/3 - 5
  • SWC1(config-if-range)# switchport mode access
  • SWC1(config-if-range)# switchport access vlan 10
  • SWC1(config-if-range)# exit
  • SWC1(config)# interface range FastEthernet0/6 - 8
  • SWC1(config-if-range)# switchport mode access
  • SWC1(config-if-range)# switchport access vlan 20
  • SWC1(config-if-range)# exit
  • SWC1(config)#

SWC1 trunk och STP konfigurering:

  • SWC1(config)# interface range Fa0/1 - 2
  • SWC1(config-if-range)# switchport mode trunk
  • SWC1(config-if-range)# exit
  • SWC1(config)# spanning-tree vlan 10 root primary
  • SWC1(config)# end
  • SWC1# copy running-config startup-config

SWC2 (VTP-client):

  • SWC2(config)# vtp mode client
  • SWC2(config)# vtp domain ng
  • SWC2(config)# vtp password ngP@55
  • SWC2(config)# do show vlan brief
  • !
  • SWC2config)# interface range FastEthernet0/3 - 5
  • SWC2(config-if-range)# switchport mode access
  • SWC2(config-if-range)# switchport access vlan 10
  • SWC2(config-if-range)# exit
  • SWC2(config)# interface range FastEthernet0/6 - 8
  • SWC2(config-if-range)# switchport mode access
  • SWC2(config-if-range)# switchport access vlan 20
  • SWC2(config-if-range)# exit
  • SWC2(config)#

SWC2 trunk och STP konfigurering:

  • SWC2(config)# interface range Fa0/1 - 2
  • SWC2(config-if-range)# switchport mode trunk
  • SWC2(config-if-range)# exit
  • SWC2(config)# spanning-tree vlan 20 root primary
  • SWC2(config)# end
  • SWC2# copy running-config startup-config

SWD2 (VTP-server):

  • SWD2(config)# vlan 30
  • SWD2(config-vlan)# name MARKETING
  • SWD2(config-vlan)# vlan 40
  • SWD2(config-vlan)# name SALES
  • SWD2(config-vlan)# exit
  • SWD2(config)# vtp mode server
  • SWD2(config)# vtp domain diginto
  • SWD2(config)# password digintoP@55
  • SWD2(config)#

SWD2 trunk konfigurering:

  • SWD2(config)# interface range fa0/1 - 3
  • SWD2(config-if-range)# switchport mode trunk
  • SWD2(config-if-range)# exit
  • SWD2(config)#

SWC3 (VTP-client):

  • SWC3(config)# vtp mode client
  • SWC3(config)# vtp domain diginto
  • SWC3(config)# vtp password diginto@55
  • SWC3(config)# do show vlan brief
  • !
  • SWC3(config)# interface range FastEthernet0/3 - 5
  • SWC3(config-if-range)# switchport mode access
  • SWC3(config-if-range)# switchport access vlan 30
  • SWC3(config-if-range)# exit
  • SWC3(config)# interface range FastEthernet0/6 - 8
  • SWC3(config-if-range)# switchport mode access
  • SWC3(config-if-range)# switchport access vlan 40
  • SWC3(config-if-range)# exit
  • SWC3(config)#

SWC3 trunk och STP konfigurering:

  • SWC3(config)# interface range Fa0/1 - 2
  • SWC3(config-if-range)# switchport mode trunk
  • SWC3(config-if-range)# exit
  • SWC3(config)# spanning-tree vlan 30 root primary
  • SWC3(config)# end
  • SWC3# copy running-config startup-config

SWC4 (VTP-client):

  • SWC4(config)# vtp mode client
  • SWC4(config)# vtp domain diginto
  • SWC4(config)# vtp password digintoP@55
  • SWC4(config)# do show vlan brief
  • !
  • SWC4config)# interface range FastEthernet0/3 - 5
  • SWC4(config-if-range)# switchport mode access
  • SWC4(config-if-range)# switchport access vlan 30
  • SWC4(config-if-range)# exit
  • SWC4(config)# interface range FastEthernet0/6 - 8
  • SWC4(config-if-range)# switchport mode access
  • SWC4(config-if-range)# switchport access vlan 40
  • SWC4(config-if-range)# exit
  • SWC4(config)#

SWC4 trunk och STP konfigurering:

  • SWC4(config)# interface range Fa0/1 - 2
  • SWC4(config-if-range)# switchport mode trunk
  • SWC4(config-if-range)# exit
  • SWC4(config)# spanning-tree vlan 40 root primary
  • SWC4(config)# end
  • SWC4# copy running-config startup-config
  • ISP(config)# router rip
  • ISP(config-router)# version 2
  • ISP(config-router)# no auto-summary
  • ISP(config-router)# network 192.168.1.120
  • ISP(config-router)# network 192.168.1.124
  • ISP(config-router)# end
  • ISP# copy running-config startup-config
  • R1(config)# router rip
  • R1(config-router)# version 2
  • R1(config-router)# no auto-summary
  • R1(config-router)# network 192.168.1.0
  • R1(config-router)# network 192.168.1.112
  • R1(config-router)# network 192.168.1.120
  • R1(config-router)# end
  • R1# copy running-config startup-config
  • R2(config)# router rip
  • R2(config-router)# version 2
  • R2(config-router)# no auto-summary
  • R2(config-router)# network 192.168.1.64
  • R2(config-router)# network 192.168.1.96
  • R2(config-router)# network 192.168.1.124
  • R2(config-router)# end
  • R2# copy running-config startup-config