I den här Packet Tracer laboration kommer vi att utforska hur man konfigurerar OSPF i en singel area i ett simulerat OSPF-nätverk enligt följande:
Nätverkstopologi
Adresserinstabell
Device | Interface | IP Address |
---|---|---|
P2P-1 | S0/1/0 | 10.0.0.1/30 |
S0/1/1 | 10.0.0.9/30 | |
S0/2/0 | 10.0.0.13/30 | |
P2P-2 | S0/1/0 | 10.0.0.2/30 |
S0/1/1 | 10.0.0.5/30 | |
G0/0/0 | 192.168.1.1/24 | |
G0/0/1 | 192.168.2.1/24 | |
P2P-3 | S0/1/0 | 10.0.0.6/30 |
S0/1/1 | 10.0.0.10/30 | |
G0/0/0 | 192.168.3.1/28 | |
BC-1 | S0/1/0 | 10.0.0.14/30 |
S0/1/1 | 64.0.100.2/30 | |
G0/0/0 | 10.0.1.1/29 | |
BC-2 | G0/0/0 | 192.168.4.1/30 |
G0/0/1 | 10.0.1.2/29 | |
BC-3 | G0/0/0 | 192.168.5.1/24 |
G0/0/1 | 10.0.1.3/29 | |
Internet Server | NIC | 203.0.113.100/24 |
PC 1 | NIC | 192.168.1.10/24 |
Laptop 1 | NIC | 192.168.2.20/24 |
Workgroup Server | NIC | 192.168.3.14/28 |
PC 2 | NIC | 192.168.4.40/24 |
PC 3 | NIC | 192.168.5.50/24 |
Mål
Implementera OSPFv2 i singel area både i punkt-till-punkt och broadcast multiaccess-nätverk.
Bakgrund
Du hjälper en nätverksingenjör att testa en OSPF-implementation genom att bygga upp nätverket i labbet där du arbetar. Du har anslutit nätverksenheterna och konfigurerat interfacen och har anslutning inom de lokala LAN. Ditt jobb är att slutföra OSPF-konfigurationen enligt de krav som ingenjören har ställt.
Instruktioner
Använd informationen och kravlistan för att konfigurera test-nätverket. När uppgiften har slutförts framgångsrikt ska alla nätverksenheter kunna pinga internet-servern.
Specifikationskrav
- Använd process-ID 10 för OSPF-aktivering på alla routrar.
- Aktivera OSPF genom att använda network kommando och dess parametrar samt inversa nätmasker på routrarna i Headquarters-nätverket.
- Aktivera OSPF genom att konfigurera interfacen för nätverksenheterna i Data Service-nätverket, där det är nödvändigt.
- Konfigurera router-ID på routrar i multiaccess-nätverket enligt följande::
- BC-1: 6.6.6.6
- BC-2: 5.5.5.5
- BC-3: 4.4.4.4
- Konfigurera OSPF så att routing-uppdateringar inte skickas till nätverk där de inte behövs.
- Konfigurera router BC-1 med högsta OSPF interface-prioritet så att den alltid kommer att vara den utsedda (designated) routern för multiaccess-nätverket.
- Konfigurera en default route till ISP-molnet med hjälp av kommando argumentet exit interface.
- Distribuera automatiskt default route till alla routrar i nätverket.
- Konfigurera OSPF-routrarna så att kostnaden för Gigabit Ethernet interface är 10 och för Fast Ethernet är 100.
- Konfigurera på routern P2P-1 OSPF-kostnads värdet för interfacet Serial0/1/1 till 50.
- Konfigurera hello- och dead-timer värdena på interfacen som ansluter P2P-1 och BC-1 till att vara dubbelt så stora som standard värdena.
Konfigureringar
- Router> enable
- Router# configure terminal
- Router(config)# hostname P2P-1
- P2P-1(config)# interface GigabitEthernet0/0/0
- P2P-1(config-if)# no ip address
- P2P-1(config-if)# duplex auto
- P2P-1(config-if)# speed auto
- P2P-1(config-if)# shutdown
- P2P-1(config-if)#exit
- P2P-1(config)#interface GigabitEthernet0/0/1
- P2P-1(config-if)# no ip address
- P2P-1(config-if)# duplex auto
- P2P-1(config-if)# speed auto
- P2P-1(config-if)# shutdown
- P2P-1(config-if)# exit
- P2P-1(config)# interface Serial0/1/0
- P2P-1(config-if)# description DCE Connected to P2P-2
- P2P-1(config-if)# ip address 10.0.0.1 255.255.255.252
- P2P-1(config-if)# clock rate 2000000
- P2P-1(config-if)# no shutdown
- P2P-1(config-if)# exit
- P2P-1(config)# interface Serial0/1/1
- P2P-1(config-if)# description DCE Connected to P2P-3
- P2P-1(config-if)# ip address 10.0.0.9 255.255.255.252
- P2P-1(config-if)# clock rate 2000000
- P2P-1(config-if)# no shutdown
- P2P-1(config-if)# exit
- P2P-1(config)#interface Serial0/2/0
- P2P-1(config-if)# description Connected to BC-1
- P2P-1(config-if)# ip address 10.0.0.13 255.255.255.252
- P2P-1(config-if)# no shutdown
- P2P-1(config-if)# exit
- P2P-1(config)# interface Serial0/2/1
- P2P-1(config-if)# no ip address
- P2P-1(config-if)# clock rate 2000000
- P2P-1(config-if)# shutdown
- P2P-1(config-if)# exit
- P2P-1(config)# interface Vlan1
- P2P-1(config-if)# no ip address
- P2P-1(config-if)# shutdown
- P2P-1(config-if)# exit
- P2P-1(config)# router ospf 10
- P2P-1(config-router)# log-adjacency-changes
- P2P-1(config-router)# end
- P2P-1
- Router> enable
- Router# configure terminal
- Router(config)# hostname P2P-2
- P2P-2(config)# interface GigabitEthernet0/0/0
- P2P-2(config-if)# description Connected to PC 1
- P2P-2(config-if)# ip address 192.168.1.1 255.255.255.0
- P2P-2(config-if)# duplex auto
- P2P-2(config-if)# speed auto
- P2P-2(config-if)# no shutdown
- P2P-2(config-if)# exit
- P2P-2(config)# interface GigabitEthernet0/0/1
- P2P-2(config-if)# description Connected to Laptop 1
- P2P-2(config-if)# ip address 192.168.2.1 255.255.255.0
- P2P-2(config-if)# duplex auto
- P2P-2(config-if)# speed auto
- P2P-2(config-if)# no shutdown
- P2P-2(config-if)# exit
- P2P-2(config)# interface Serial0/1/0
- P2P-2(config-if)# description Connected to P2P-1
- P2P-2(config-if)# ip address 10.0.0.2 255.255.255.252
- P2P-2(config-if)# no shutdown
- P2P-2(config-if)# exit
- P2P-2(config)# interface Serial0/1/1
- P2P-2(config-if)# description Connected to P2P-3
- P2P-2(config-if)# ip address 10.0.0.5 255.255.255.252
- P2P-2(config-if)# no shutdown
- P2P-2(config-if)# exit
- P2P-2(config)# interface Vlan1
- P2P-2(config-if)# no ip address
- P2P-2(config-if)# shutdown
- P2P-2(config-if)# end
- P2P-2#
- Router> enable
- Router# configure terminal
- Router(config)# hostname P2P-3
- P2P-3(config)# interface GigabitEthernet0/0/0
- P2P-3(config-if)# description Connected to Workgroup Server
- P2P-3(config-if)# ip address 192.168.3.1 255.255.255.240
- P2P-3(config-if)# duplex auto
- P2P-3(config-if)# speed auto
- P2P-3(config-if)# no shutdown
- P2P-3(config-if)# exit
- P2P-3(config)# interface GigabitEthernet0/0/1
- P2P-3(config-if)# no ip address
- P2P-3(config-if)# duplex auto
- P2P-3(config-if)# speed auto
- P2P-3(config-if)# shutdown
- P2P-3(config-if)# exit
- P2P-3(config)# interface Serial0/1/0
- P2P-3(config-if)# description DCE Connected to P2P-2
- P2P-3(config-if)# ip address 10.0.0.6 255.255.255.252
- P2P-3(config-if)# clock rate 2000000
- P2P-3(config-if)# no shutdown
- P2P-3(config-if)# exit
- P2P-3(config)# interface Serial0/1/1
- P2P-3(config-if)# description Connected to P2P-1
- P2P-3(config-if)# ip address 10.0.0.10 255.255.255.252
- P2P-3(config-if)# no shutdown
- P2P-3(config-if)# exit
- P2P-3(config)# interface Vlan1
- P2P-3(config-if)# no ip address
- P2P-3(config-if)# shutdown
- P2P-3(config-if)# end
- P2P-3#
- Router> enable
- Router# configure terminal
- Router(config)# hostname BC-1
- BC-1(config)# interface GigabitEthernet0/0/0
- BC-1(config-if)# description Connected to Multiaccess network
- BC-1(config-if)# ip address 10.0.1.1 255.255.255.248
- BC-1(config-if)# duplex auto
- BC-1(config-if)# speed auto
- BC-1(config-if)# no shutdown
- BC-1(config-if)# exit
- BC-1(config)# interface GigabitEthernet0/0/1
- BC-1(config-if)# no ip address
- BC-1(config-if)# duplex auto
- BC-1(config-if)# speed auto
- BC-1(config-if)# shutdown
- BC-1(config-if)# exit
- BC-1(config)# interface Serial0/1/0
- BC-1(config-if)# description DCE Connected to P2P-1
- BC-1(config-if)# ip address 10.0.0.14 255.255.255.252
- BC-1(config-if)# clock rate 2000000
- BC-1(config-if)# no shutdown
- BC-1(config-if)# exit
- BC-1(config)# interface Serial0/1/1
- BC-1(config-if)# description Connected to ISP
- BC-1(config-if)# ip address 64.0.100.2 255.255.255.252
- BC-1(config-if)# no shutdown
- BC-1(config-if)# exit
- BC-1(config)# interface Vlan1
- BC-1(config-if)# no ip address
- BC-1(config-if)# shutdown
- BC-1(config-if)# end
- BC-1#
- Router> enable
- Router# configure terminal
- Router(config)# hostname BC-2
- BC-2(config)# interface GigabitEthernet0/0/0
- BC-2(config-if)# description Connected to PC 2
- BC-2(config-if)# ip address 192.168.4.1 255.255.255.0
- BC-2(config-if)# duplex auto
- BC-2(config-if)# speed auto
- BC-2(config-if)# no shutdown
- BC-2(config-if)# exit
- BC-2(config)# interface GigabitEthernet0/0/1
- BC-2(config-if)# description Connected to Multiaccess network
- BC-2(config-if)# ip address 10.0.1.2 255.255.255.248
- BC-2(config-if)# duplex auto
- BC-2(config-if)# speed auto
- BC-2(config-if)# no shutdown
- BC-2(config-if)# exit
- BC-2(config)# interface Serial0/1/0
- BC-2(config-if)# no ip address
- BC-2(config-if)# clock rate 2000000
- BC-2(config-if)# shutdown
- BC-2(config-if)# exit
- BC-2(config)# interface Serial0/1/1
- BC-2(config-if)# no ip address
- BC-2(config-if)# clock rate 2000000
- BC-2(config-if)# shutdown
- BC-2(config-if)# exit
- BC-2(config)# interface Vlan1
- BC-2(config-if)# no ip address
- BC-2(config-if)# shutdown
- BC-2(config-if)# end
- BC-2#
- Router> enable
- Router# configure terminal
- Router(config)# hostname BC-3
- BC-3(config)# interface GigabitEthernet0/0/0
- BC-3(config-if)# Description Connected to PC 3
- BC-3(config-if)# ip address 192.168.5.1 255.255.255.0
- BC-3(config-if)# duplex auto
- BC-3(config-if)# speed auto
- BC-3(config-if)# no shutdown
- BC-3(config-if)# exit
- BC-3(config)# interface GigabitEthernet0/0/1
- BC-3(config-if)# description Connected to Multiaccess network
- BC-3(config-if)# ip address 10.0.1.3 255.255.255.248
- BC-3(config-if)# duplex auto
- BC-3(config-if)# speed auto
- BC-3(config-if)# no shutdown
- BC-3(config-if)# exit
- BC-3(config)# interface Serial0/1/0
- BC-3(config-if)# no ip address
- BC-3(config-if)# clock rate 2000000
- BC-3(config-if)# shutdown
- BC-3(config-if)# exit
- BC-3(config)# interface Serial0/1/1
- BC-3(config-if)# no ip address
- BC-3(config-if)# clock rate 2000000
- BC-3(config-if)# shutdown
- BC-3(config-if)# exit
- BC-3(config)# interface Vlan1
- BC-3(config-if)# no ip address
- BC-3(config-if)# shutdown
- BC-3(config-if)# end
- BC-3#
- Router> enable
- Router# configure terminal
- Router(config)# hostname ISP
- ISP(config)# interface GigabitEthernet0/0/0
- ISP(config-if)# description Connected to Internet Server
- ISP(config-if)# ip address 203.0.113.1 255.255.255.0
- ISP(config-if)# duplex auto
- ISP(config-if)# speed auto
- ISP(config-if)# no shutdown
- ISP(config-if)# exit
- ISP(config)# interface GigabitEthernet0/0/1
- ISP(config-if)# no ip address
- ISP(config-if)# duplex auto
- ISP(config-if)# speed auto
- ISP(config-if)# shutdown
- ISP(config-if)# exit
- ISP(config)# interface Serial0/1/0
- ISP(config-if)# description DCE Connected to BC-1
- ISP(config-if)# ip address 64.0.100.1 255.255.255.252
- ISP(config-if)# clock rate 2000000
- ISP(config-if)# no shutdown
- ISP(config-if)# exit
- ISP(config)# interface Serial0/1/1
- ISP(config-if)# no ip address
- ISP(config-if)# clock rate 2000000
- ISP(config-if)# shutdown
- ISP(config-if)# exit
- ISP(config)# interface Vlan1
- ISP(config-if)# no ip address
- ISP(config-if)# shutdown
- ISP(config-if)# exit
- ISP(config)# ip route 192.168.1.0 255.255.255.0 Serial0/1/0
- ISP(config)# ip route 192.168.2.0 255.255.255.0 Serial0/1/0
- ISP(config)# ip route 192.168.3.0 255.255.255.240 Serial0/1/0
- ISP(config)# ip route 192.168.4.0 255.255.255.0 Serial0/1/0
- ISP(config)# ip route 192.168.5.0 255.255.255.0 Serial0/1/0
- ISP(config)# ip route 10.0.1.0 255.255.255.248 Serial0/1/0
- ISP(config)# ip route 10.0.0.0 255.255.255.0 Serial0/1/0
- ISP(config)# end
- ISP#
Använd process-ID 10 för OSPF-aktivering på alla routrar.
- Aktivera OSPF genom att använda network kommando och dess parametrar samt inversa nätmasker på routrarna i Headquarters-nätverket.
- P2P-1(config)# router ospf 10
- P2P-1(config-router)# network 10.0.0.12 0.0.0.3 area 0
- P2P-1(config-router)# network 10.0.0.0 0.0.0.3 area 0
- P2P-1(config-router)# network 10.0.0.8 0.0.0.3 area 0
- P2P-2(config)# router ospf 10
- P2P-2(config-router)# network 10.0.0.0 0.0.0.3 area 0
- P2P-2(config-router)# network 10.0.0.4 0.0.0.3 area 0
- P2P-2(config-router)# network 192.168.1.0 0.0.0.255 area 0
- P2P-2(config-router)# network 192.168.2.0 0.0.0.255 area 0
- P2P-3(config)# router ospf 10
- P2P-3(config-router)# network 10.0.0.4 0.0.0.3 area 0
- P2P-3(config-router)# network 10.0.0.8 0.0.0.3 area 0
- P2P-3(config-router)# network 192.168.3.0 0.0.0.255 area 0
- Aktivera OSPF genom att konfigurera interfacen för nätverksenheterna i Data Service-nätverket, där det är nödvändigt.
- BC-1# show ip interface brief
- GigabitEthernet0/0/0 10.0.1.1
- GigabitEthernet0/0/1 unassigned
- Serial0/1/0 10.0.0.14
- Serial0/1/1 64.0.100.2
- BC-1# configure terminal
- BC-1(config)# interface Gig0/0/0
- BC-1(config-if)# ip ospf 10 area 0
- BC-1(config-if)# interface s0/1/0
- BC-1(config-if)# ip ospf 10 area 0
- BC-1(config-if)# interface s0/1/1
- BC-1(config-if)# ip ospf 10 area 0
- BC-1(config-if)#
- BC-2# show ip interface brief
- GigabitEthernet0/0/0 192.168.4.1
- GigabitEthernet0/0/1 10.0.1.2
- BC-2# configure terminal
- BC-2(config)# interface Gig0/0/0
- BC-2(config-if)# ip ospf 10 area 0
- BC-2(config-if)# interface Gig0/0/1
- BC-2(config-if)# ip ospf 10 area 0
- BC-2(config-if)#
- BC-3# show ip interface brief
- GigabitEthernet0/0/0 192.168.5.1
- GigabitEthernet0/0/1 10.0.1.3
- BC-3# configure terminal
- BC-3(config)# interface Gig0/0/0
- BC-3(config-if)# ip ospf 10 area 0
- BC-3(config-if)# interface Gig0/0/1
- BC-3(config-if)# ip ospf 10 area 0
- BC-3(config-if)#
- Konfigurera router-ID på routrar i multiaccess-nätverket enligt följande:
- BC-1: 6.6.6.6
- BC-2: 5.5.5.5
- BC-3: 4.4.4.4
- BC-1(config)# router ospf 10 area 0
- BC-1(config-router)# router-id 6.6.6.6
- BC-1(config-router)#
- BC-2(config)# router ospf 10 area 0
- BC-2(config-router)# router-id 5.5.5.5
- BC-2(config-router)#
- BC-3(config)# router ospf 10 area 0
- BC-3(config-router)# router-id 4.4.4.4
- BC-3(config-router)#
- Konfigurera OSPF så att routing-uppdateringar inte skickas till nätverk där de inte behövs.
- P2P-2(config-router)# passive-interface Gig0/0/0
- P2P-2(config-router)# passive-interface Gig0/0/1
- P2P-3(config-router)# passive-interface Gig0/0/0
- BC-2(config-router)# passive-interface Gig0/0/0
- BC-3(config-router)# passive-interface Gig0/0/0
- BC-1(config-router)# passive-interface s0/1/1
- Konfigurera router BC-1 med högsta OSPF interface-prioritet så att den alltid kommer att vara den utsedda (designated) routern för multiaccess-nätverket.
- BC-1(config)# interface Gig0/0/0
- BC-1(config-if)# ip ospf priority 255
- BC-1(config-if)# end
- BC-1# clear ip ospf process
- Reset ALL OSPF processess? [no]: yes
- BC-2# clear ip ospf process
- Reset ALL OSPF processess? [no]: yes
- BC-3# clear ip ospf process
- Reset ALL OSPF processess? [no]: yes
- Verifiera att BC-1 är nu DR
- BC-1# show ip ospf interface Gig0/0/0
- Konfigurera en default route till ISP-molnet med hjälp av kommando argumentet exit interface.
- BC-1# configure terminal
- BC-1(config)# ip route 0.0.0.0 0.0.0.0 s0/1/1
- Distribuera automatiskt default route till alla routrar i nätverket.
- BC-1(config)# router ospf 10
- BC-1(config-router)# default-information originate
- Verifiera distributionen
- P2P-2# show ip route ospf
- Konfigurera OSPF-routrarna så att kostnaden för Gigabit Ethernet interface är 10 och för Fast Ethernet är 100.
- P2P-2# show ip ospf interface
- Serial 0/1/0 is up, line protocol is up
- Internet address is 10.0.0.2/30, Area 0
- Process ID 10, Router ID 192.168.2.1, Network type POINT_TO_POINT, Cost: 64
- GigabitEthernet 0/0/1 is up, protocol is up
- Internet address is 192.168.2.1/24, Area 0
- Process ID 10, Router ID 192.168.2.1 Network Type Broadcast, Cost 1
- P2P-2# configure terminal
- P2P-2(config)# router ospf 10
- P2P-2(config-router)# auto-cost reference-bandwidth 10000
- P2P-2(config-router)# end
- P2P-2# show ip ospf interface
- Serial 0/1/0 is up, line protocol is up
- Internet address is 10.0.0.2/30, Area 0
- Process ID 10, Router ID 192.168.2.1, Network type POINT_TO_POINT, Cost: 6476
- GigabitEthernet 0/0/1 is up, protocol is up
- Internet address is 192.168.2.1/24, Area 0
- Process ID 10, Router ID 192.168.2.1 Network Type Broadcast, Cost 10
- Obs: Kostnaden borde vara 100 (fel i PT?)
- P2P-2# configure terminal
- P2P-2(config)# router ospf 10
- P2P-2(config-router)# auto-cost reference-bandwidth 1000
- P2P-2(config-router)# end
- P2P-2# show ip ospf interface
- Serial 0/1/0 is up, line protocol is up
- Internet address is 10.0.0.2/30, Area 0
- Process ID 10, Router ID 192.168.2.1, Network type POINT_TO_POINT, Cost: 1
- GigabitEthernet 0/0/1 is up, protocol is up
- Internet address is 192.168.2.1/24, Area 0
- Process ID 10, Router ID 192.168.2.1 Network Type Broadcast, Cost 1
- Obs: Kostnaden borde vara 100 (fel i PT? nu går resultat i procent från 68 till 70)
- P2P-2#
- P2P-3> enable
- P2P-3# configure terminal
- P2P-3(config)# router ospf 10
- P2P-3(config-router)# auto-cost reference-bandwidth 1000
- P2P-3(config-router)# end
- P2P-3#
- P2P-1> enable
- P2P-1# configure terminal
- P2P-1(config)# router ospf 10
- P2P-1(config-router)# auto-cost reference-bandwidth 1000
- P2P-1(config-router)# end
- P2P-1#
- BC-2> enable
- BC-2> configure terminal
- BC-2>(config)# router ospf 10
- BC-2>(config-router)# auto-cost reference-bandwidth 1000
- BC-2>(config-router)# end
- BC-2>#
- BC-3> enable
- BC-3> configure terminal
- BC-3>(config)# router ospf 10
- BC-3>(config-router)# auto-cost reference-bandwidth 1000
- BC-3>(config-router)# end
- BC-3>#
- BC-1> enable
- BC-1> configure terminal
- BC-1>(config)# router ospf 10
- BC-1>(config-router)# auto-cost reference-bandwidth 1000
- BC-1>(config-router)# end
- BC-1>#
- Konfigurera på routern P2P-1 OSPF-kostnads värdet för interfacet Serial0/1/1 till 50.
- P2P-2# configure terminal
- P2P-2(config)# interface s0/1/1
- P2P-2(config-if)# ip ospf cost 50
- P2P-2(config-if)# end
- P2P-2#
- Konfigurera hello- och dead-timer värdena på interfacen som ansluter P2P-1 och BC-1 till att vara dubbelt så stora som standard värdena.
- P2P-2# show ip ospf interface s0/2/0
- Serial 0/2/0 is up, line protocol is up
- Internet address is 10.0.0.13/30, Area 0
- Process ID 10, Router ID 10.0.0.13, Network type POINT_TO_POINT, Cost: 647
- Transmit Delay is 1 sec, State POINT-TO-POINT,
- Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
- P2P-2# configure terminal
- P2P-2(config)# interface s0/2/0
- P2P-2(config-if)# ip ospf hello-intervall 20
- P2P-2(config-if)# ip ospf hello-intervall 80
- P2P-2(config-if)# end
- P2P-2#
- BC-1# configure terminal
- BC-1(config)# interface s0/2/0
- BC-1(config-if)# ip ospf hello-intervall 20
- BC-1(config-if)# ip ospf hello-intervall 80
- BC-1(config-if)# end
- BC-1#