0% found this document useful (0 votes)
2 views

Unit 4 OSPF Concepts and Configuration

This document covers OSPF (Open Shortest Path First) concepts and configuration for network administration. It explains OSPF as a link-state routing protocol, its key characteristics, and the configuration of single-area OSPFv2, including default route propagation and verification. The document also includes instructions for configuring routers and ensuring network connectivity.

Uploaded by

kirori1028
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Unit 4 OSPF Concepts and Configuration

This document covers OSPF (Open Shortest Path First) concepts and configuration for network administration. It explains OSPF as a link-state routing protocol, its key characteristics, and the configuration of single-area OSPFv2, including default route propagation and verification. The document also includes instructions for configuring routers and ensuring network connectivity.

Uploaded by

kirori1028
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 35

Unit 4: OSPF Concepts and

Configuration
CIT22 - Mastery in Network
Administration
Course Content
● Introduction to OSPF
● Point-to-Point OSPF Networks
● Configuration of Single-Area OSPFv2
● Default Route Propagation
● Verify Single-Area OSPFv2
Introduction to OSPF
Review: Types of Routing Protocols
RIP - Routing Information
Protocol
Distance Vector
EIGRP - Enhanced Interior
Gateway Protocol
IGP
OSPF - Open Shortest Path
First
Link-State
IS-IS - Intermediate System
to Intermediate System

BGP - Border Gateway


EGP Path Vector
Protocol
What is OSPF?
● OSPF stands for Open Shortest Path First

● A link-state routing protocol

● Uses the SPF Shortest Path First Algorithm (Dijkstra’s Algorithm)

● Commonly used in medium to large-sized networks


Key Characteristics
● Uses “cost” as a metric to determine the best path

● Support fast convergence

● Uses “areas” to organize networks


OSPF Cost Metric
Interface Type Cost

Gigabit Ethernet (1 Gbps) 1

Fast Ethernet (100 Mbps) 1

Ethernet (10 Mbps) 10

Serial (1.544 Mbps) 64

Formula: Cost = reference bandwidth / interface bandwidth

Cost = 100 Mbps / 10 Mbps (Ethernet)

Ethernet Cost = 10
Review: LSA & LSDB Concepts
● LSAs - Link-state Advertisements
○ Are packets used by OSPF to share routing information
○ They describe the state of network links (e.g., which routers are connected)
○ Are exchanged between routers to keep the network updated

● LSDB - Link State Database


○ Is a collection of all received LSAs.
○ It builds a complete map of the network topology.
○ Each router maintains its own LSDB.
Review: LSA & LSDB Concepts
192.168.10.0/ 192.168.20.0/ ● R4 sends an LSA to its neighbors
24 24 about the network on G0/1. (30 min
G0/2 .1 G0/2 .1 by default)
G0/0 G0/0
R R ● All routers will receive the LSA
generated from R4.
1 G0/1 G0/1 2
● All routers maintain the same LSDB.

● Each router SPF algorithm calculate


the best route to the R4 G0/1
G0/0 G0/0
network.
LS
R E0/1 E0/1
R A LSDB
3 G0/1 .1 G0/ .1 4 LS LS LS LS
1 A A A A
192.168.30.0/ 192.168.40.0/ LS LS LS LS
24 24 A A A A
OSPF Areas
● Areas are used to divide a network into smaller and more

manageable sections.

● Each area is a logical grouping of routers that helps reduce the

complexity of routing calculations.

● Area 0 is the backbone area, which connects all other areas.


OSPF Areas Concepts
Baguio City
Area 0

Vice
Mayor
Baranga
Mayor
y Baranga
Captain y
Captain
Baranga Baranga
y y
Members Members

Baranga
y Baranga
Members y
Members

Bakakeng (Area 1) Camp 7 (Area 2)


OSPF Areas
● Area 0/ Backbone Area - All other areas must connect to this area.
● Area Border Router (ABR) - Routers with interfaces in multiple areas.
● Internal Routers - Routers with all interfaces are in the same area.

Area Area
1 2
Area 0 (backbone area)
Point-to-Point OSPF Networks
OSPF Network Types
● Broadcast
○ A multi-access network where multiple OSPF routers can communicate over the
same physical medium, such as Ethernet.

● Point-to-Point
○ Represents a direct connection between two routers, such as a leased line or a
dedicated serial link.
OSPF Network: Broadcast vs Point-to-Point

Feature Point-to-Point Broadcast

Description Direct connection between Shared network with


two routers multiple routers

DR/BDR Election No Yes

Adjacencies Forms one adjacency Forms adjacencies with


DR/BDR

Default Interface Serial links Ethernet

Use Case WAN connections LAN environments


Review: DR & BDR (WhiteBoard)
Multi-Access Network
Configuration of Single Area OSPFv2
OSPF Point-to-Point Single Area Configuration
Instructions
1. Configure the routers R1, R2, and R3 IP Addresses.

R1(config) interface gigabitEthernet 0/0


R1(config-if) ip address 203.122.45.1 255.255.255.0
IS R1(config-if) no shutdown
G0/0 | IP:.2
cisco.com P
203.122.45.0/ R1(config-if) interface serial 0/0/0
30
G0/0 | IP:.1 R1(config-if) ip address 10.0.2.1 255.255.255.252
R1(config-if) no shutdown

R *S0/0/0 | IP:.1 R1(config-if) interface serial 0/0/1


S0/0/1 |
IP:.2 1 R1(config-if) ip address 10.0.1.2 255.255.255.252
10.0.1.0/3 10.0.2.0/3 R1(config-if) no shutdown
0 0
S0/0/0 | IP:.2
*S0/0/1 |
IP:.1
Configure R2 and R3.
R R
2 G0/0 | 3 G0/0 |
IP:.254 IP:.254

172.16.10.0/2 172.16.20.0/2
4 4
OSPF Point-to-Point Single Area Configuration
Instructions
2. Configure the routers R1, R2, and R3 serial interfaces.
○ Configure the clock rate of serial interfaces with asterisks.
○ Configure the routers serial interfaces network type to point-to-point.
○ Configure the routers serial interfaces encapsulation to PPP.
IS
G0/0 | IP:.2
cisco.com P R1(config)# interface serial 0/0/0
203.122.45.0/ R1(config-if)# clock rate 64000
30
G0/0 | IP:.1 R1(config-if)# ip ospf network point-to-point
R1(config-if)# encapsulation ppp

R *S0/0/0 | IP:.1 R1(config)# interface serial 0/0/1


S0/0/1 |
IP:.2 1 R1(config-if) ip ospf network point-to-point
10.0.1.0/3 10.0.2.0/3 R1(config-if) encapsulation ppp
0 0
S0/0/0 | IP:.2
*S0/0/1 |
IP:.1 Note: The DCE device provides the clocking needed to synchronize data transmission between the two devices.
R R DCE - Data Communications Equipment | Set clock rate to 64000
2 G0/0 | 3 G0/0 | DTE - Data Terminal Equipment
IP:.254 IP:.254
Configure R2 and R3.
172.16.10.0/2 172.16.20.0/2
4 4
OSPF Point-to-Point Single Area Configuration
Instructions
3. Enable OSPF in all routers. (Except Internet)
○ Use OSPF Process ID of 1 in all the routers.
○ Configure router IDs for R1 (1.1.1.1), R2 (2.2.2.2), R3 (3.3.3.3).
○ Enable OSPF on the correct IP networks in area 0.
IS
G0/0 | IP:.2
cisco.com P R1(config)# router ospf 1
203.122.45.0/ R1(config-router)# router-id 1.1.1.1
30
G0/0 | IP:.1 R1(config-router)# network 10.0.1.0 0.0.0.3 area 0
R1(config-router)# network 10.0.2.0 0.0.0.3 area 0

R *S0/0/0 | IP:.1
S0/0/1 |
IP:.2 1
10.0.1.0/3
Configure R2 and R3.
10.0.2.0/3
0 0
S0/0/0 | IP:.2
*S0/0/1 |
IP:.1

R R
2 G0/0 | 3 G0/0 |
IP:.254 IP:.254

172.16.10.0/2 172.16.20.0/2
4 4
OSPF Point-to-Point Single Area Configuration
Instructions
4. Suppress routing updates on the interfaces connected to the LAN.

R1(config)# router ospf 1


R1(config-router)# passive-interface gigabitEthernet 0/0
IS
G0/0 | IP:.2
cisco.com P
203.122.45.0/
30
G0/0 | IP:.1 Note:
● When you configure an interface as passive, the router stops sending routing updates through that
R interface. However, it still listens for incoming updates (depending on the routing protocol).
*S0/0/0 | IP:.1 ●
S0/0/1 |
1 This is useful for preventing unnecessary routing traffic on interfaces that connect to end-user devices or
IP:.2
networks where you don't want to establish neighbor relationships.
10.0.1.0/3 10.0.2.0/3
0 0
S0/0/0 | IP:.2
*S0/0/1 |
IP:.1 Configure R2 and R3.
R R
2 G0/0 | 3 G0/0 |
IP:.254 IP:.254

172.16.10.0/2 172.16.20.0/2
4 4
OSPF Point-to-Point Single Area Configuration
Instructions
5. Ensure all workstations are able to access each other.

Comment:
IS ● LAN networks connected to R2 and R3 should be able to communicate to each other.
P
G0/0 | IP:.2 ● Ping should be successful between R2 LAN and R3 LAN.
cisco.com

203.122.45.0/
30
G0/0 | IP:.1

R *S0/0/0 | IP:.1
S0/0/1 |
IP:.2 1
10.0.1.0/3 10.0.2.0/3
0 0
S0/0/0 | IP:.2
*S0/0/1 |
IP:.1

R R
2 G0/0 | 3 G0/0 |
IP:.254 IP:.254

172.16.10.0/2 172.16.20.0/2
4 4
Default Route Propagation
OSPF Point-to-Point Single Area Configuration
Instructions
6. Configure default route on R1 and distribute it to the OSPF neighbors.

R1(config)# ip route 0.0.0.0 0.0.0.0 203.122.45.2

IS R1(config)# router ospf 1


G0/0 | IP:.2
cisco.com P R1(config-router)# default-information originate
203.122.45.0/
30
G0/0 | IP:.1 Note:
● A default route is used to send traffic for destinations not explicitly listed in the routing table. It's essentially a
R "catch-all" route.
*S0/0/0 | IP:.1 ●
S0/0/1 |
1 It is commonly used in scenarios where a router connects to an internet gateway, allowing all traffic destined
IP:.2
for external networks to be forwarded to that gateway.
10.0.1.0/3 10.0.2.0/3
0 0
S0/0/0 | IP:.2 ● The default-information originate command is used in routing protocols (such as OSPF) to advertise a
*S0/0/1 |
IP:.1
default route to other routers within the network.

R R
2 G0/0 | 3 G0/0 |
IP:.254 IP:.254

172.16.10.0/2 172.16.20.0/2
4 4
OSPF Point-to-Point Single Area Configuration
Instructions
7. Ensure all workstations can access the cisco.com website.

Comment:
IS ● LAN networks connected to R2 and R3 should be able to reach the cisco.com website.
G0/0 | IP:.2
cisco.com P
203.122.45.0/
30
G0/0 | IP:.1

R *S0/0/0 | IP:.1
S0/0/1 |
IP:.2 1
10.0.1.0/3 10.0.2.0/3
0 0
S0/0/0 | IP:.2
*S0/0/1 |
IP:.1

R R
2 G0/0 | 3 G0/0 |
IP:.254 IP:.254

172.16.10.0/2 172.16.20.0/2
4 4
Verify Single-Area OSPFv2
OSPF Point-to-Point Single Area Demo-Lab
Instructions
1. Configure the routers R1, R2, and R3 IP Addresses.
2. Configure the routers R1, R2, and R3 serial interfaces.
○ Configure the clock rate of serial interfaces with asterisks.
○ Configure the routers serial interfaces network type to point-to-point.
○ Configure the routers serial interfaces encapsulation to PPP.
IS
G0/0 | IP:.2 3. Enable OSPF in all routers. (Except Internet)
cisco.com P ○ Use OSPF Process ID of 1 in all the routers.
203.122.45.0/ ○ Configure router IDs for R1 (1.1.1.1), R2 (2.2.2.2), R3 (3.3.3.3).
30 ○
G0/0 | IP:.1 Enable OSPF on the correct IP networks in area 0.
4. Suppress routing updates on the interfaces connected to the LAN.
5. Ensure all workstations are able to access each other.
R
S0/0/1 | *S0/0/0 | IP:.1 6. Configure default route on R1 and distribute it to the OSPF neighbors.
1
IP:.2 7. Ensure all workstations can access the cisco.com website.
10.0.1.0/3 10.0.2.0/3
0 0
S0/0/0 | IP:.2
*S0/0/1 |
IP:.1

R R Verification Commands:
2 G0/0 | 3 G0/0 | -show ip ospf - Display OSPF Information.
IP:.254 IP:.254
-show ip protocols - Display IP routing protocol process parameters and statistics.
172.16.10.0/2 172.16.20.0/2 -show ip ospf neighbor - Display OSPF neighbor list/s.
4 4 -show ip ospf interface [Type_PortNumber] - Display OSPF interface information.
-show interface [Type_PortNumber] - Display detailed information about the interface status and
configuration.
-show ip route - Display routing table.
OSPF Point-to-Point Single Area Configuration

Verification Commands:
R1#show ip protocols

Routing Protocol is "ospf 1"


IS Outgoing update filter list for all interfaces is not set
G0/0 | IP:.2
cisco.com P Incoming update filter list for all interfaces is not set
203.122.45.0/ Router ID 1.1.1.1
30 It is an autonomous system boundary router
G0/0 | IP:.1
Redistributing External Routes from,
Number of areas in this router is 1. 1 normal 0 stub 0 nssa
Maximum path: 4
R *S0/0/0 | IP:.1
S0/0/1 | Routing for Networks:
IP:.2 1 10.0.1.0 0.0.0.3 area 0
10.0.1.0/3 10.0.2.0/3 10.0.2.0 0.0.0.3 area 0
0 0 Passive Interface(s):
S0/0/0 | IP:.2 GigabitEthernet0/0
*S0/0/1 |
IP:.1 Routing Information Sources:
Gateway Distance Last Update
R R 1.1.1.1 110 00:05:27
2 G0/0 | 3 G0/0 | 2.2.2.2 110 00:08:47
IP:.254 IP:.254 3.3.3.3 110 00:08:56
Distance: (default is 110)
172.16.10.0/2 172.16.20.0/2
4 4
OSPF Point-to-Point Single Area Configuration

Verification Commands:
R1#show ip ospf

Routing Process "ospf 1" with ID 1.1.1.1


IS Supports only single TOS(TOS0) routes
G0/0 | IP:.2
cisco.com P Supports opaque LSA
203.122.45.0/ SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
30 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
G0/0 | IP:.1
Number of external LSA 1. Checksum Sum 0x00fecf
Number of opaque AS LSA 0. Checksum Sum 0x000000
Number of DCbitless external and opaque AS LSA 0
R *S0/0/0 | IP:.1
S0/0/1 | Number of DoNotAge external and opaque AS LSA 0
IP:.2 1 Number of areas in this router is 1. 1 normal 0 stub 0 nssa
10.0.1.0/3 10.0.2.0/3 External flood list length 0
0 0 Area BACKBONE(0)
S0/0/0 | IP:.2 Number of interfaces in this area is 2
*S0/0/1 |
IP:.1 Area has no authentication
SPF algorithm executed 18 times
R R Area ranges are
2 G0/0 | 3 G0/0 | Number of LSA 3. Checksum Sum 0x01de5b
IP:.254 IP:.254 Number of opaque link LSA 0. Checksum Sum 0x000000
Number of DCbitless LSA 0
172.16.10.0/2 172.16.20.0/2 Number of indication LSA 0
4 4 Number of DoNotAge LSA 0
Flood list length 0
OSPF Point-to-Point Single Area Configuration

Verification Commands:
R1#show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface


IS 3.3.3.3 0 FULL/ - 00:00:37 10.0.2.2 Serial0/0/0
G0/0 | IP:.2
cisco.com P 2.2.2.2 0 FULL/ - 00:00:31 10.0.1.1 Serial0/0/1
203.122.45.0/
30
G0/0 | IP:.1

R *S0/0/0 | IP:.1
S0/0/1 |
IP:.2 1
10.0.1.0/3 10.0.2.0/3
0 0
S0/0/0 | IP:.2
*S0/0/1 |
IP:.1

R R
2 G0/0 | 3 G0/0 |
IP:.254 IP:.254

172.16.10.0/2 172.16.20.0/2
4 4
OSPF Point-to-Point Single Area Configuration

Verification Commands:
R1#show ip ospf interface serial 0/0/0

Serial0/0/0 is up, line protocol is up


IS Internet address is 10.0.2.1/30, Area 0
G0/0 | IP:.2
cisco.com P Process ID 1, Router ID 1.1.1.1, Network Type POINT-TO-POINT, Cost: 64
203.122.45.0/ Transmit Delay is 1 sec, State POINT-TO-POINT,
30 Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
G0/0 | IP:.1
Hello due in 00:00:06
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
R *S0/0/0 | IP:.1
S0/0/1 | Last flood scan length is 1, maximum is 1
IP:.2 1 Last flood scan time is 0 msec, maximum is 0 msec
10.0.1.0/3 10.0.2.0/3 Neighbor Count is 1 , Adjacent neighbor count is 1
0 0 Adjacent with neighbor 3.3.3.3
S0/0/0 | IP:.2 Suppress hello for 0 neighbor(s)
*S0/0/1 |
IP:.1

R R
2 G0/0 | 3 G0/0 |
IP:.254 IP:.254

172.16.10.0/2 172.16.20.0/2
4 4
OSPF Point-to-Point Single Area Configuration

Verification Commands:
R1#show interfaces serial 0/0/0

Serial0/0/0 is up, line protocol is up (connected)


IS Hardware is HD64570
G0/0 | IP:.2
cisco.com P Internet address is 10.0.2.1/30
203.122.45.0/ MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
30 reliability 255/255, txload 1/255, rxload 1/255
G0/0 | IP:.1
Encapsulation PPP, loopback not set, keepalive set (10 sec)
LCP Open
Open: IPCP, CDPCP
R *S0/0/0 | IP:.1
S0/0/1 | Last input never, output never, output hang never
IP:.2 1 Last clearing of "show interface" counters never
10.0.1.0/3 10.0.2.0/3 Input queue: 0/75/0 (size/max/drops); Total output drops: 0
0 0 Queueing strategy: weighted fair
S0/0/0 | IP:.2 Output queue: 0/1000/64/0 (size/max total/threshold/drops)
*S0/0/1 |
IP:.1 Conversations 0/0/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
R R Available Bandwidth 1158 kilobits/sec
2 G0/0 | 3 G0/0 | 5 minute input rate 54 bits/sec, 0 packets/sec
IP:.254 IP:.254 5 minute output rate 54 bits/sec, 0 packets/sec
308 packets input, 22204 bytes, 0 no buffer
172.16.10.0/2 172.16.20.0/2 Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
4 4 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
323 packets output, 23412 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 output buffer failures, 0 output buffers swapped out
0 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
OSPF Point-to-Point Single Area Configuration

Verification Commands:
R1#show ip route R2#show ip route

Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B
IS - BGP - BGP
G0/0 | IP:.2
cisco.com P D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
203.122.45.0/ N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external
30 type 2 type 2
G0/0 | IP:.1
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
* - candidate default, U - per-user static route, o - ODR * - candidate default, U - per-user static route, o - ODR
R *S0/0/0 | IP:.1
S0/0/1 | P - periodic downloaded static route P - periodic downloaded static route
IP:.2 1
10.0.1.0/3 10.0.2.0/3 Gateway of last resort is 203.122.45.2 to network 0.0.0.0 Gateway of last resort is 10.0.1.2 to network 0.0.0.0
0 0 10.0.0.0/8 is variably subnetted, 6 subnets, 2 masks 10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
S0/0/0 | IP:.2 C 10.0.1.0/30 is directly connected, Serial0/0/1 C 10.0.1.0/30 is directly connected, Serial0/0/1
*S0/0/1 |
IP:.1 C 10.0.1.1/32 is directly connected, Serial0/0/1 L 10.0.1.1/32 is directly connected, Serial0/0/1
L 10.0.1.2/32 is directly connected, Serial0/0/1 C 10.0.1.2/32 is directly connected, Serial0/0/1
R R C 10.0.2.0/30 is directly connected, Serial0/0/0 O 10.0.2.0/30 [110/128] via 10.0.1.2, 00:46:59, Serial0/0/1
2 G0/0 | 3 G0/0 | L 10.0.2.1/32 is directly connected, Serial0/0/0 172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks
IP:.254 IP:.254 C 10.0.2.2/32 is directly connected, Serial0/0/0 C 172.16.10.0/24 is directly connected, GigabitEthernet0/0
172.16.0.0/24 is subnetted, 2 subnets L 172.16.10.254/32 is directly connected, GigabitEthernet0/0
172.16.10.0/2 172.16.20.0/2 O 172.16.10.0/24 [110/65] via 10.0.1.1, 00:20:10, Serial0/0/1 O 172.16.20.0/24 [110/129] via 10.0.1.2, 00:27:39, Serial0/0/1
4 4 O 172.16.20.0/24 [110/65] via 10.0.2.2, 00:22:39, Serial0/0/0 O*E2 0.0.0.0/0 [110/1] via 10.0.1.2, 00:17:33, Serial0/0/1
203.122.45.0/24 is variably subnetted, 2 subnets, 2 masks
C 203.122.45.0/30 is directly connected, GigabitEthernet0/0
L 203.122.45.1/32 is directly connected, GigabitEthernet0/0
S* 0.0.0.0/0 [1/0] via 203.122.45.2
OSPF Point-to-Point Single Area Configuration

Verification Commands:
R1#show controllers serial 0/0/0 R3#show controllers serial 0/0/0

Interface Serial0/0/0 Interface Serial0/0/0


IS Hardware is PowerQUICC MPC860 Hardware is PowerQUICC MPC860
G0/0 | IP:.2
cisco.com P DCE V.35, clock rate 64000 DTE V.35 TX and RX clocks detected
203.122.45.0/
30
G0/0 | IP:.1

R *S0/0/0 | IP:.1
S0/0/1 |
IP:.2 1
10.0.1.0/3 10.0.2.0/3
0 0
S0/0/0 | IP:.2
*S0/0/1 |
IP:.1

R R
2 G0/0 | 3 G0/0 |
IP:.254 IP:.254

172.16.10.0/2 172.16.20.0/2
4 4
End of Unit 4

You might also like