Chapter 7 OSPF
Chapter 7 OSPF
OSPF
CISCO CERTIFIED NETWORK ASSOCIATE (CCNA)
TRAINING
Agenda
OSPF Concepts
OSPF Implementation
Troubleshooting OSPF
OSPF DR and BDR Elections
2
OSPF Concepts
3
OSPF Concepts
The Open Shortest Path First (OSPF) protocol, defined in RFC 2328
An Interior Gateway Protocol used to distribute routing information within a single
Autonomous System
Consists of areas and autonomous systems
Supports VLSM/CIDR
A high functionality non-proprietary Internal Gateway Protocol (IGP) for the TCP/IP protocol
family
Allows multi-vendor deployment (open standard)
4
OSPF Header
5
OSPF Hierarchical Routing
6
Types of OSPF Routers
Internal
Routers
ASBR and ABR and
Backbone Backbone
Router •External Router
ABR: Area Border Router
AS
ASBR: Autonomous System Border Router
7
OSPF Terminology
Link
◦ A network or router interface assigned to any given network
◦ When an interface is added to the OSPF process, it’s considered by OSPF to be a link
Router ID
◦ An IP address used to identify the router
◦ Cisco chooses the Router ID by using the highest IP address of all configured loopback interfaces
◦ If no loopback interfaces are configured with addresses, OSPF will choose the highest IP address of all
active physical interfaces
8
OSPF Terminology
Neighbor
◦ two or more routers that have an interface on a common network, such as two routers connected on
a point-to-point serial link
Adjacency
◦ a relationship between two OSPF routers that permits the direct exchange of route updates
Hello Protocol
◦ Provides dynamic neighbor discovery and maintains neighbor relationships
◦ Hello packets and Link State Advertisements (LSAs) build and maintain the topological database
◦ Hello packets are addressed to 224.0.0.5
9
OSPF Terminology
Neighborship Database
◦ A list of all OSPF routers for which Hello packets have been seen
◦ A variety of details, including the Router ID and state, are maintained on each router in the
neighborship database
Topological Database
◦ Contains information from all of the Link State Advertisement packets that have been received for an
area
◦ The router uses the information from the topology database as input into the Dijkstra algorithm that
computes the shortest path to every network
10
OSPF Terminology
11
OSPF Terminology
OSPF areas
◦ A grouping of contiguous networks and routers
◦ All routers in the same area share a common Area ID
◦ The Area ID is associated with specific interfaces on the router
◦ All of the routers within the same area have the same topology table
12
OSPF Terminology
Point-to-point
◦ Refers to a type of network topology consisting of a direct connection between two routers that
provides a single communication path
Point-to-multipoint
◦ Type of network topology consisting of a series of connections between a single interface on one
router and multiple destination routers
13
SPF Tree Calculation
Within an area, each router calculates the best/shortest path to every network in that same area
Using Shortest Path First Algorithm
Places each router at the root of a tree and calculates the shortest path to each destination based on
the cumulative cost
Cost = 108/bandwidth (bps)
14
OSPF Implementation
15
OSPF Configuration
16
Configuring Wildcards
If you want to advertise a partial octet (subnet), you need to use wildcards.
◦ 0.0.0.0 means all octets match exactly
◦ 0.0.0.255 means that the first three match exactly, but the last octet can be any value
17
Wildcard Example
192.168.10.8/30 = 0.0.0.3
192.168.10.48/28 = 0.0.0.15
192.168.10.96/27 = 0.0.0.31
192.168.10.128/26 = 0.0.0.63
18
OSPF Router ID
Router ID:
Number by which the router is known to OSPF
Default: The highest IP address on an active interface at the moment of OSPF process startup
Can be overridden by a loopback interface: Highest IP address of any active loopback interface
19
OSPF Router ID
20
OSPF Load Balancing
21
OSPF Load Balancing
22
Configuring Multi-Area OSPF Example
23
Alternate Multi-Area OSPF
Configuration
24
Verifying OSPF: show ip route ospf
25
Troubleshooting OSPF
26
Troubleshooting OSPF
Router#show ip protocols
Router#show ip route
27
Troubleshooting OSPF
OSPF debug commands
28
OSPF DR and BDR Elections
29
OSPF DR and BDR Elections
OSPF elects one router to be a designated router (DR) and one router to be a backup
designated router (BDR) on each multi-access segment
◦ The BDR is elected as a backup router in case the DR goes down
30
OSPF DR and BDR Elections
On a broadcast or non-broadcast multi-access network, the router with the highest OSPF
priority on a segment will become the DR for that segment
◦ This priority is shown with the show ip ospf interface command, which is set to 1 by
default
If all routers have the default priority set, the router with the highest Router ID (RID) will win
◦ RID is determined by the highest IP address on any interface at the moment of OSPF startup
◦ This can be overridden with a loopback (logical) interface
◦ If you set a router’s interface to a priority value of zero, that router won’t participate in the DR or BDR
election on that interface
31
OSPF DR and BDR Elections
The reason you want to configure a loopback interface on a router is because if you don’t, the
highest IP address on a router will become that router’s RID
◦ The RID is used to advertise the routes as well as elect the DR and BDR
Router#config t
Router (config)#interface Fast Ethernet 0/0
Router (config-if)#ip ospf priority 100
32
OSPF DR and BDR Elections
Quiz 1#
◦ What options can you configure that will ensure that R2 will be the DR of the LAN segment?
33
OSPF DR and BDR Elections
Answer Quiz 1#
◦ Configure the priority value of the Fa0/0 interface of the R2 router to a higher value than any other
interface on the Ethernet network
◦ Configure a loopback interface on the R2 with an IP address higher than any IP address on the other
routers
◦ Change the priority value of the Fa0/0 interface of R1 and R3 to zero
34