Exempel 4 VLAN och RIP

Virtual LAN (VLAN) används för att segmentera ett fysiskt nätverk i logiska delar. Det gör att datorer som tillhör olika avdelningar kan separeras, även om de är anslutna till samma fysiska switch.
Det finns flera typer av VLAN, men i denna laboration kommer vi endast att använda följande:

  • Data VLAN – Används för att bära användardata (t.ex. VLAN 10, 20, 30)
  • Management VLAN – Används för administration av switchar (t.ex. VLAN 66 och 99)
  • Native VLAN – VLAN utan taggning i trunklänkar (standard: VLAN 1, men kan ändras)

VTP och roller i nätverket

I det här campus-nätverket används VTP (VLAN Trunking Protocol) för att förenkla hanteringen av VLAN.

  • I denna laboration fungerar DS1 och NS1 som VTP server. Det betyder att VLAN konfigurerade på dessa switchar automatiskt distribueras till övriga switchar i samma VTP-domän.
  • DS2, DS3, NS2 och NS3 fungerar som VTP-klienter. De kan inte själva skapa eller ta bort VLAN, men de mottar VLAN-information från sin VTP-server och skapar automatiskt motsvarande VLAN internt.

Viktigt: Även om VLAN-informationen (nummer och namn) skickas automatiskt via VTP, så måste man manuellt konfigurera vilka portar som tillhör vilket VLAN samt skapa trunklänkar mellan switcharna.

DHCP-servrar

Både DR1 (för domänen diginto.se) och NR1 (för ng.se) fungerar som DHCP server. Det innebär att de automatiskt delar ut IP-adresser till datorer i varje VLAN. i laborationen:

  • Varje VLAN tilldelas ett eget IP-nät (t.ex. VLAN 10 = 192.168.10.0/24).
  • Routern agerar default gateway för klienterna i respektive VLAN
  • Vissa IP-adresser (t.ex. 192.168.10.1–192.168.10.9) reserveras (exkluderas) så att de inte delas ut av DHCP, t.ex. för routerns egna gränssnitt.

Konfigurationer

Switch DS1 konfigurationer

  • Switch> enable
  • Switch# configure terminal
  • Sätt hostname till DS1
  • Switch(config)# hostname DS1
  • DS1(config)# no ip domain-lookup
  • Sätt VTP-läge till server
  • DS1(config)# vtp mode server
  • Ange VTP-domännamn till ng.se
  • DS1(config)# vtp domain ng.se
  • Sätt VTP-lösenord
  • DS1(config)# vtp password ngP@55
  • Aktivera VTP version 2
  • DS1(config)# vtp version 2
  • Skapa VLAN
  • DS1(config)# vlan 10
  • DS1(config-vlan)# name Technology
  • DS1(config)# vlan 20
  • DS1(config-vlan)# name Social
  • DS1(config)# vlan 30
  • DS1(config-vlan)# name Science
  • DS1(config)# vlan 66
  • DS1(config-vlan)# name Management
  • DS1(config-vlan)# exit
  • Aktivera SVI för hantering genom att tilldela IP
  • DS1(config)# interface vlan 66
  • DS1(config-if)# ip address 192.168.66.2 255.255.255.248
  • DS1(config-if)# no shutdown
  • DS1(config-if)# exit
  • Sätt default gateway för switchen
  • DS1(config)# ip default-gateway 192.168.66.1
  • Konfigurera interface i access-läge
  • DS1(config)# interface G3/1
  • DS1(config-if)# switchport mode access
  • DS1(config-if)# switchport access vlan 66
  • DS1(config-if)# exit
  • Tilldela porten till VLAN 66
  • DS1(config)# interface G4/1
  • DS1(config-if)# switchport mode access
  • DS1(config-if)# switchport access vlan 66
  • Konfigurera trunk-länk till DS2
  • DS1(config)# interface G1/1
  • DS1(config-if)# switchport mode trunk
  • DS1(config-if)# exit
  • Registrera tillåtna VLAN genom trunk-länken
  • DS1(config-if)# switchport trunk allowed vlan 10,20,30,66
  • Konfigurera trunk-länk till DS2
  • DS1(config)# interface G2/1
  • DS1(config-if)# switchport mode trunk
  • Registrera tillåtna VLAN genom trunk-länken
  • DS1(config-if)# switchport trunk allowed vlan 10,20,30,66
  • DS1(config-if)# exit
  • Konfigurera trunk-länk till DR1
  • DS1(config)# interface G0/1
  • DS1(config-if)# switchport mode trunk
  • DS1(config-if)# switchport trunk allowed vlan 10,20,30,66
  • DS1(config)# end

Switch DS2 konfigurationer

  • Switch> enable
  • Switch# configure terminal
  • Sätt hostname till DS2
  • Switch(config)# hostname DS2
  • Undvik DNS-fördröjning vid felskrivna kommandon
  • DS2(config)# no ip domain-lookup
  • Sätt VTP-läge till client
  • DS2(config)# vtp mode client
  • Ange VTP-domännamn till ng.se
  • DS2(config)# vtp domain ng.se
  • Sätt VTP-lösenord till ngP@55
  • DS2(config)# vtp password ngP@55
  • Sätt VTP version till 2
  • DS2(config)# vtp version 2
  • Konfigurera accessportar för VLAN 10 (Technology)
  • DS2(config)# interface range fa0/1 - 7
  • DS2(config-if-range)# description Connected to VLAN 10
  • DS2(config-if-range)# switchport mode access
  • DS2(config-if-range)# switchport access vlan 10
  • DS2(config-if-range)# exit
  • Konfigurera accessportar för VLAN 20 (Social)
  • DS2(config)# interface range fa0/8 - 14
  • DS2(config-if-range)# description Connected to VLAN 20
  • DS2(config-if-range)# switchport mode access
  • DS2(config-if-range)# switchport access vlan 20
  • DS2(config-if-range)# exit
  • Konfigurera accessportar för VLAN 30 (Science)
  • DS2(config)# interface range fa0/15 - 21
  • DS2(config-if-range)# description Connected to VLAN 30
  • DS2(config-if-range)# switchport mode access
  • DS2(config-if-range)# switchport access vlan 30
  • DS2(config-if-range)# exit
  • Konfigurera accessportar för VLAN 66 (Management)
  • DS2(config)# interface range fa0/22 - 24
  • DS2(config-if-range)# switchport mode access
  • DS2(config-if-range)# switchport access vlan 66
  • DS2(config-if-range)# exit
  • Aktivera VLAN 66 och tilldela IP-adress för hantering
  • DS2(config)# interface vlan 66
  • DS2(config-if)# ip address 192.168.66.3 255.255.255.248
  • DS2(config-if)# no shutdown
  • DS2(config-if)# exit
  • Sätt default gateway till VLAN 66 gateway
  • DS2(config)# ip default-gateway 192.168.66.1
  • Konfigurera trunkport G0/1 till DS1
  • DS2(config)# interface G0/1
  • DS2(config-if)# switchport mode trunk
  • DS2(config-if)# switchport trunk allowed vlan 10,20,30,66
  • DS2(config-if)# exit
  • Avsluta konfigurationen
  • DS2(config)# end

Switch DS3 konfigurationer

  • Switch> enable
  • Switch# configure terminal
  • Sätt hostname till DS3
  • Switch(config)# hostname DS3
  • Undvik DNS-fördröjning vid felskrivna kommandon
  • DS3(config)# no ip domain-lookup
  • Sätt VTP-läge till client
  • DS3(config)# vtp mode client
  • Ange VTP-domännamn till ng.se
  • DS3(config)# vtp domain ng.se
  • Sätt VTP-lösenord till ngP@55
  • DS3(config)# vtp password ngP@55
  • Sätt VTP version till 2
  • DS3(config)# vtp version 2
  • Konfigurera accessportar för VLAN 10 (Technology)
  • DS3(config)# interface range fa0/1 - 7
  • DS3(config-if-range)# description Connected to VLAN 10
  • DS3(config-if-range)# switchport mode access
  • DS3(config-if-range)# switchport access vlan 10
  • DS3(config-if-range)# exit
  • Konfigurera accessportar för VLAN 20 (Social)
  • DS3(config)# interface range fa0/8 - 14
  • DS3(config-if-range)# description Connected to VLAN 20
  • DS3(config-if-range)# switchport mode access
  • DS3(config-if-range)# switchport access vlan 20
  • DS3(config-if-range)# exit
  • Konfigurera accessportar för VLAN 30 (Science)
  • DS3(config)# interface range fa0/15 - 21
  • DS3(config-if-range)# description Connected to VLAN 30
  • DS3(config-if-range)# switchport mode access
  • DS3(config-if-range)# switchport access vlan 30
  • DS3(config-if-range)# exit
  • Konfigurera accessportar för VLAN 66 (Management)
  • DS3(config)# interface range fa0/22 - 24
  • DS3(config-if-range)# switchport mode access
  • DS3(config-if-range)# switchport access vlan 66
  • DS3(config-if-range)# exit
  • Aktivera VLAN 66 och tilldela IP-adress för hantering
  • DS3(config)# interface vlan 66
  • DS3(config-if)# ip address 192.168.66.4 255.255.255.248
  • DS3(config-if)# no shutdown
  • DS3(config-if)# exit
  • Sätt default gateway till VLAN 66 gateway
  • DS3(config)# ip default-gateway 192.168.66.1
  • Konfigurera trunkport G0/1 till DS1
  • DS3(config)# interface G0/1
  • DS3(config-if)# switchport mode trunk
  • DS3(config-if)# switchport trunk allowed vlan 10,20,30,66
  • DS3(config-if)# exit
  • Avsluta konfigurationen
  • DS3(config)# end

Router DR1 konfigurationer

  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname DR1
  • DR1(config)# no ip domain-lookup
  • Konfigurera interface mot ISP
  • DR1(config)# interface G0/1
  • DR1(config-if)# description Connected to ISP
  • DR1(config-if)# ip address 123.1.0.2 255.255.255.252
  • DR1(config-if)# no shutdown
  • DR1(config-if)# exit
  • Stäng av oanvänt fysiskt gränssnitt (G0/0)
  • DR1(config)# interface g0/0
  • DR1(config-if)# no ip address
  • DR1(config-if)# shutdown
  • DR1(config-if)# exit
  • Subinterface för VLAN 10 – Technology
  • DR1(config)# interface g0/0.10
  • DR1(config-subif)# description Connected to VLAN 10
  • DR1(config-subif)# encapsulation dot1q 10
  • DR1(config-subif)# ip address 192.168.10.1 255.255.255.0
  • DR1(config-subif)# no shutdown
  • DR1(config-subif)# exit
  • Subinterface för VLAN 20 – Social
  • DR1(config)# interface g0/0.20
  • DR1(config-subif)# description Connected to VLAN 20
  • DR1(config-subif)# encapsulation dot1q 20
  • DR1(config-subif)# ip address 192.168.20.1 255.255.255.0
  • DR1(config-subif)# no shutdown
  • DR1(config-subif)# exit
  • Subinterface för VLAN 30 – Science
  • DR1(config)# interface g0/0.30
  • DR1(config-subif)# description Connected to VLAN 30
  • DR1(config-subif)# encapsulation dot1q 30
  • DR1(config-subif)# ip address 192.168.30.1 255.255.255.0
  • DR1(config-subif)# no shutdown
  • DR1(config-subif)# exit
  • Subinterface för VLAN 66 – Management
  • DR1(config)# interface g0/0.66
  • DR1(config-subif)# description Connected to VLAN 66
  • DR1(config-subif)# encapsulation dot1q 66
  • DR1(config-subif)# ip address 192.168.66.1 255.255.255.0
  • DR1(config-subif)# no shutdown
  • DR1(config-subif)# exit
  • Aktivera huvudinterface g0/0
  • DR1(config)# interface g0/0
  • DR1(config-if)# no shutdown
  • DR1(config-if)# exit
  • DHCP – Exkludera reserverade adresser
  • DR1(config)# ip dhcp excluded-address 192.168.10.1 192.168.10.9
  • DR1(config)# ip dhcp excluded-address 192.168.20.1 192.168.20.9
  • DR1(config)# ip dhcp excluded-address 192.168.30.1 192.168.30.9
  • DHCP-pool för VLAN 10
  • DR1(config)# ip dhcp pool VLAN10
  • DR1(dhcp-config)# network 192.168.10.0 255.255.255.0
  • DR1(dhcp-config)# default-router 192.168.10.1
  • DR1(dhcp-config)# dns-server 4.4.4.4
  • DR1(dhcp-config)# domain-name ng.se
  • DR1(dhcp-config)# exit
  • DHCP-pool för VLAN 20
  • DR1(config)# ip dhcp pool VLAN20
  • DR1(dhcp-config)# network 192.168.20.0 255.255.255.0
  • DR1(dhcp-config)# default-router 192.168.20.1
  • DR1(dhcp-config)# dns-server 4.4.4.4
  • DR1(dhcp-config)# domain-name ng.se
  • DR1(dhcp-config)# exit
  • DHCP-pool för VLAN 30
  • DR1(config)# ip dhcp pool VLAN30
  • DR1(dhcp-config)# network 192.168.30.0 255.255.255.0
  • DR1(dhcp-config)# default-router 192.168.30.1
  • DR1(dhcp-config)# dns-server 4.4.4.4
  • DR1(dhcp-config)# domain-name ng.se
  • DR1(dhcp-config)# exit
  • Routing – Aktivera RIP v2
  • DR1(config)# router rip
  • DR1(config-router)# no auto-summary
  • DR1(config-router)# version 2
  • DR1(config-router)# network 192.168.10.0
  • DR1(config-router)# network 192.168.20.0
  • DR1(config-router)# network 192.168.30.0
  • DR1(config-router)# network 192.168.66.0
  • DR1(config-router)# network 123.1.0.0
  • DR1(config-router)# end

Switch NS1 konfigurationer

  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname NS1
  • NS1(config)# no ip domain-lookup
  • VTP-konfiguration som server
  • NS1(config)# vtp mode server
  • NS1(config)# vtp domain ng.se
  • NS1(config)# vtp password ngP@55
  • NS1(config)# vtp version 2
  • Skapa VLAN för datatrafik och hantering
  • NS1(config)# vlan 50
  • NS1(config-vlan)# name Staff
  • NS1(config)# vlan 60
  • NS1(config-vlan)# name Teachers
  • NS1(config)# vlan 70
  • NS1(config-vlan)# name Students
  • NS1(config)# vlan 99
  • NS1(config-vlan)# name Management
  • NS1(config-vlan)# exit
  • Ställ in IP-adress på VLAN 99 för hantering
  • NS1(config)# interface vlan 99
  • NS1(config-if)# ip address 172.30.99.2 255.255.255.248
  • NS1(config-if)# no shutdown
  • NS1(config-if)# exit
  • Sätt standardgateway för switchhantering
  • NS1(config)# ip default-gateway 172.30.99.1
  • Accessport för administration (G3/1)
  • NS1(config)# interface G3/1
  • NS1(config-if)# switchport mode access
  • NS1(config-if)# switchport access vlan 99
  • NS1(config-if)# exit
  • Accessport för administration (G4/1)
  • NS1(config)# interface G4/1
  • NS1(config-if)# switchport mode access
  • NS1(config-if)# switchport access vlan 99
  • NS1(config-if)# exit
  • Trunkport till NS2 (G1/1)
  • NS1(config)# interface G1/1
  • NS1(config-if)# switchport mode trunk
  • NS1(config-if)# switchport trunk allowed vlan 50,60,70,99
  • NS1(config-if)# exit
  • Trunkport till NS3 (G2/1)
  • NS1(config)# interface G2/1
  • NS1(config-if)# switchport mode trunk
  • NS1(config-if)# switchport trunk allowed vlan 50,60,70,99
  • NS1(config-if)# exit
  • Trunkport till NR1-router (G0/1)
  • NS1(config)# interface G0/1
  • NS1(config-if)# switchport mode trunk
  • NS1(config-if)# switchport trunk allowed vlan 50,60,70,99
  • NS1(config-if)# exit
  • Avsluta konfiguration
  • NS1(config)# end

Switch NS2 konfigurationer

  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname NS2
  • NS2(config)# no ip domain-lookup
  • Ställ in VTP som klient
  • NS2(config)# vtp mode client
  • NS2(config)# vtp domain ng.se
  • NS2(config)# vtp password ngP@55
  • NS2(config)# vtp version 2
  • Accessportar för VLAN 50 – Staff
  • NS2(config)# interface range fa0/1 - 7
  • NS2(config-if-range)# description Connected to VLAN 50
  • NS2(config-if-range)# switchport mode access
  • NS2(config-if-range)# switchport access vlan 50
  • NS2(config-if-range)# exit
  • Accessportar för VLAN 60 – Teachers
  • NS2(config)# interface range fa0/8 - 14
  • NS2(config-if-range)# description Connected to VLAN 60
  • NS2(config-if-range)# switchport mode access
  • NS2(config-if-range)# switchport access vlan 60
  • NS2(config-if-range)# exit
  • Accessportar för VLAN 70 – Students
  • NS2(config)# interface range fa0/15 - 21
  • NS2(config-if-range)# description Connected to VLAN 70
  • NS2(config-if-range)# switchport mode access
  • NS2(config-if-range)# switchport access vlan 70
  • NS2(config-if-range)# exit
  • Accessportar för VLAN 99 – Management
  • NS2(config)# interface range fa0/22 - 24
  • NS2(config-if-range)# description Connected to VLAN 99
  • NS2(config-if-range)# switchport mode access
  • NS2(config-if-range)# switchport access vlan 99
  • NS2(config-if-range)# exit
  • Ställ in hanteringsadress på VLAN 99
  • NS2(config)# interface vlan 99
  • NS2(config-if)# ip address 172.30.99.3 255.255.255.248
  • NS2(config-if)# no shutdown
  • NS2(config-if)# exit
  • Ställ in standardgateway för hantering
  • NS2(config)# ip default-gateway 172.30.99.1
  • Konfigurera trunkport till NS1 (G0/1)
  • NS2(config)# interface G0/1
  • NS2(config-if)# switchport mode trunk
  • NS2(config-if)# switchport trunk allowed vlan 50,60,70,99
  • NS2(config-if)# exit
  • Avsluta konfiguration
  • NS2(config)# end

Switch NS3 konfigurationer

  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname NS3
  • NS3(config)# no ip domain-lookup
  • Ställ in VTP som klient
  • NS3(config)# vtp mode client
  • NS3(config)# vtp domain ng.se
  • NS3(config)# vtp password ngP@55
  • NS3(config)# vtp version 2
  • Accessportar för VLAN 50 – Staff
  • NS3(config)# interface range fa0/1 - 7
  • NS3(config-if-range)# description Connected to VLAN 50
  • NS3(config-if-range)# switchport mode access
  • NS3(config-if-range)# switchport access vlan 50
  • NS3(config-if-range)# exit
  • Accessportar för VLAN 60 – Teachers
  • NS3(config)# interface range fa0/8 - 14
  • NS3(config-if-range)# description Connected to VLAN 60
  • NS3(config-if-range)# switchport mode access
  • NS3(config-if-range)# switchport access vlan 60
  • NS3(config-if-range)# exit
  • Accessportar för VLAN 70 – Students
  • NS3(config)# interface range fa0/15 - 21
  • NS3(config-if-range)# description Connected to VLAN 70
  • NS3(config-if-range)# switchport mode access
  • NS3(config-if-range)# switchport access vlan 70
  • NS3(config-if-range)# exit
  • Accessportar för VLAN 99 – Management
  • NS3(config)# interface range fa0/22 - 24
  • NS3(config-if-range)# description Connected to VLAN 99
  • NS3(config-if-range)# switchport mode access
  • NS3(config-if-range)# switchport access vlan 99
  • NS3(config-if-range)# exit
  • Ställ in hanteringsadress på VLAN 99
  • NS3(config)# interface vlan 99
  • NS3(config-if)# ip address 172.30.99.4 255.255.255.248
  • NS3(config-if)# no shutdown
  • NS3(config-if)# exit
  • Ställ in standardgateway för hantering
  • NS3(config)# ip default-gateway 172.30.99.1
  • Konfigurera trunkport till NS1 (G0/1)
  • NS3(config)# interface G0/1
  • NS3(config-if)# switchport mode trunk
  • NS3(config-if)# switchport trunk allowed vlan 50,60,70,99
  • NS3(config-if)# exit
  • Avsluta konfiguration
  • NS3(config)# end

Router NR1 konfigurationer

  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname NR1
  • NR1(config)# no ip domain-lookup
  • Gränssnitt mot ISP
  • NR1(config)# interface G0/1
  • NR1(config-if)# description Connected to ISP
  • NR1(config-if)# ip address 125.2.0.2 255.255.255.252
  • NR1(config-if)# no shutdown
  • NR1(config-if)# exit
  • Stäng av huvudinterface G0/0 tills subinterfaces konfigurerats
  • NR1(config)# interface g0/0
  • NR1(config-if)# no ip address
  • NR1(config-if)# shutdown
  • NR1(config-if)# exit
  • Subinterface för VLAN 50 – Staff
  • NR1(config)# interface g0/0.50
  • NR1(config-subif)# description Connected to VLAN 50
  • NR1(config-subif)# encapsulation dot1q 50
  • NR1(config-subif)# ip address 172.30.50.1 255.255.255.0
  • NR1(config-subif)# no shutdown
  • NR1(config-subif)# exit
  • Subinterface för VLAN 60 – Teachers
  • NR1(config)# interface g0/0.60
  • NR1(config-subif)# description Connected to VLAN 60
  • NR1(config-subif)# encapsulation dot1q 60
  • NR1(config-subif)# ip address 172.30.60.1 255.255.255.0
  • NR1(config-subif)# no shutdown
  • NR1(config-subif)# exit
  • Subinterface för VLAN 70 – Students
  • NR1(config)# interface g0/0.70
  • NR1(config-subif)# description Connected to VLAN 70
  • NR1(config-subif)# encapsulation dot1q 70
  • NR1(config-subif)# ip address 172.30.70.1 255.255.255.0
  • NR1(config-subif)# no shutdown
  • NR1(config-subif)# exit
  • Subinterface för VLAN 99 – Management
  • NR1(config)# interface g0/0.99
  • NR1(config-subif)# description Connected to VLAN 99
  • NR1(config-subif)# encapsulation dot1q 99
  • NR1(config-subif)# ip address 172.30.99.1 255.255.255.0
  • NR1(config-subif)# no shutdown
  • NR1(config-subif)# exit
  • Aktivera huvudinterface G0/0
  • NR1(config)# interface g0/0
  • NR1(config-if)# no shutdown
  • NR1(config-if)# exit
  • Exkludera statiska adresser för varje VLAN
  • NR1(config)# ip dhcp excluded-address 172.30.50.1 172.30.50.9
  • NR1(config)# ip dhcp excluded-address 172.30.60.1 172.30.60.9
  • NR1(config)# ip dhcp excluded-address 172.30.70.1 172.30.70.9
  • DHCP-pool för VLAN 50
  • NR1(config)# ip dhcp pool VLAN50
  • NR1(dhcp-config)# network 172.30.50.0 255.255.255.0
  • NR1(dhcp-config)# default-router 172.30.50.1
  • NR1(dhcp-config)# dns-server 5.5.5.5
  • NR1(dhcp-config)# domain-name ng.se
  • NR1(dhcp-config)# exit
  • DHCP-pool för VLAN 60
  • NR1(config)# ip dhcp pool VLAN60
  • NR1(dhcp-config)# network 172.30.60.0 255.255.255.0
  • NR1(dhcp-config)# default-router 172.30.60.1
  • NR1(dhcp-config)# dns-server 5.5.5.5
  • NR1(dhcp-config)# domain-name ng.se
  • NR1(dhcp-config)# exit
  • DHCP-pool för VLAN 70
  • NR1(config)# ip dhcp pool VLAN70
  • NR1(dhcp-config)# network 172.30.70.0 255.255.255.0
  • NR1(dhcp-config)# default-router 172.30.70.1
  • NR1(dhcp-config)# dns-server 5.5.5.5
  • NR1(dhcp-config)# domain-name ng.se
  • NR1(dhcp-config)# exit
  • Aktivera dynamisk routing med RIP v2
  • NR1(config)# router rip
  • NR1(config-router)# no auto-summary
  • NR1(config-router)# version 2
  • NR1(config-router)# network 172.30.50.0
  • NR1(config-router)# network 172.30.60.0
  • NR1(config-router)# network 172.30.70.0
  • NR1(config-router)# network 172.30.99.0
  • NR1(config-router)# network 125.2.0.0
  • NR1(config-router)# end

Switch IS1 konfigurationer

  • Starta konfiguration
  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname IS1
  • IS1(config)# no ip domain-lookup
  • Skapa VLAN för webbservrar och hantering
  • IS1(config)# vlan 4
  • IS1(config-vlan)# name Digweb
  • IS1(config)# vlan 5
  • IS1(config-vlan)# name Ngweb
  • IS1(config)# vlan 9
  • IS1(config-vlan)# name Management
  • IS1(config-vlan)# exit
  • Tilldela VLAN 4 (Digweb) till fa0/10
  • IS1(config)# interface fa0/10
  • IS1(config-if)# switchport mode access
  • IS1(config-if)# switchport access vlan 4
  • IS1(config-if)# exit
  • Tilldela VLAN 5 (Ngweb) till fa0/20
  • IS1(config)# interface fa0/20
  • IS1(config-if)# switchport mode access
  • IS1(config-if)# switchport access vlan 5
  • IS1(config-if)# exit
  • Tilldela VLAN 9 (Management) till fa0/21–24
  • IS1(config)# interface range fa0/21 - 24
  • IS1(config-if-range)# switchport mode access
  • IS1(config-if-range)# switchport access vlan 9
  • IS1(config-if-range)# exit
  • Stäng av oanvända portar (säkerhetsåtgärd)
  • IS1(config)# interface range fa0/1 - 9, fa0/11 - 19, g0/2
  • IS1(config-if-range)# switchport mode access
  • IS1(config-if-range)# switchport access vlan 9
  • IS1(config-if-range)# shutdown
  • IS1(config-if-range)# exit
  • Ställ in hanteringsadress på VLAN 9
  • IS1(config)# interface vlan 9
  • IS1(config-if)# ip address 9.9.9.2 255.255.255.248
  • IS1(config-if)# no shutdown
  • IS1(config-if)# exit
  • Ange standardgateway för switchhantering
  • IS1(config)# ip default-gateway 9.9.9.1
  • Konfigurera trunk-länk till NR1
  • IS1(config-if)# IS1(config)#interface G0/1
  • IS1(config-if)# description Link to ISP
  • IS1(config-if)# switchport mode trunk
  • IS1(config-if)# switchport trunk allowed vlan 4,5,9
  • IS1(config-if)# exit
  • Avsluta konfiguration
  • IS1(config)# end

Router ISP konfigurationer

  • Starta konfiguration
  • Switch> enable
  • Switch# configure terminal
  • Switch(config)# hostname ISP
  • ISP(config)# no ip domain-lookup
  • Stäng av huvudinterface G0/0 tills subinterfaces konfigureras
  • ISP(config)# interface G0/0
  • ISP(config-if)# description Connected to IS1 Servers LAN
  • ISP(config-if)# no ip address
  • ISP(config-if)# shutdown
  • ISP(config-if)# exit
  • Subinterface för VLAN 4 – diginto.se (DNS/webb)
  • ISP(config)# interface G0/0.4
  • ISP(config-subif)# encapsulation dot1q 4
  • ISP(config-subif)# ip address 4.4.4.1 255.255.255.248
  • ISP(config-subif)# no shutdown
  • ISP(config-subif)# exit
  • Subinterface för VLAN 5 – ng.se (DNS/webb)
  • ISP(config)# interface G0/0.5
  • ISP(config-subif)# encapsulation dot1q 5
  • ISP(config-subif)# ip address 5.5.5.1 255.255.255.248
  • ISP(config-subif)# no shutdown
  • ISP(config-subif)# exit
  • Subinterface för VLAN 9 – Management
  • ISP(config)# interface G0/0.9
  • ISP(config-subif)# encapsulation dot1q 9
  • ISP(config-subif)# ip address 9.9.9.1 255.255.255.248
  • ISP(config-subif)# exit
  • Interface mot DR1 (diginto.se)
  • ISP(config)# interface G0/1
  • ISP(config-if)# description Connected to DR1
  • ISP(config-if)# ip address 123.1.0.1 255.255.255.252
  • ISP(config-if)# no shutdown
  • ISP(config-if)# exit
  • Interface mot NR1 (ng.se)
  • ISP(config)# interface G0/2
  • ISP(config-if)# description Connected to NR1
  • ISP(config-if)# ip address 125.2.0.1 255.255.255.252
  • ISP(config-if)# no shutdown
  • ISP(config-if)# exit
  • Aktivera huvudinterface G0/0
  • ISP(config)# interface G0/0
  • ISP(config-if)# no shutdown
  • ISP(config-if)# exit
  • Aktivera RIP v2 för routing mellan alla anslutna nät
  • ISP(config)# router rip
  • ISP(config-router)# no auto-summary
  • ISP(config-router)# version 2
  • ISP(config-router)# network 123.1.0.0
  • ISP(config-router)# network 125.2.0.0
  • ISP(config-router)# network 4.4.4.0
  • ISP(config-router)# network 5.5.5.0
  • ISP(config-router)# network 9.9.9.0
  • ISP(config-router)# end
  • ISP#

sdsd