OSPF : OSPF Routing Protocols and Concepts – Chapter 11
Objectives : Objectives Describe the background and basic features of OSPF
Identify and apply the basic OSPF configuration commands
Describe, modify and calculate the metric used by OSPF
Describe the Designated Router/Backup Designated Router (DR/BDR) election process in multi-access networks
Describe the uses of additional configuration commands in OSPF
Issues Addressed by OSPF : 3 Issues Addressed by OSPF Speed of convergence.
Link state converges faster
Support for VLSM
Network size
virtually no reachability limitations
Path Selection
Uses cost metric (based on bandwidth)
Grouping of members in “Areas”
segments network into smaller clusters of routers
Admin Distance of OSPF : Admin Distance of OSPF Default Administrative Distance for OSPF is 110
OSPF Terminology : 5 OSPF Terminology Link - physical and electrical connection between two network devices.
Link-state - status of a link between two routers
information about router's interface and its relationship to neighboring routers
Cost - value assigned to a link (based on speed of the network connection)
Area - collection of networks and routers (has same area identification)
Each router in an area, called an internal router, has the same link-state information
OSPF Terminology (2) : 6 OSPF Terminology (2) Designated Router (DR) - a router elected to represent all the routers in that network
Backup Designated Router (BDR) - becomes the DR, if original DR fails
Adjacencies database - listing of all neighbors to which a router has established communication
Link-state database (topological database) - information about all other routers in the network
Shows the network topology
All routers in an area have identical link-state databases
OSPF Terminology (3) : 7 OSPF Terminology (3)
OSPF Router ID : OSPF Router ID Identifies router in OSPF updates
Three criteria for setting the router ID:
A) Command Router-ID used in OSPF config
-Takes precedence over loopback and physical interface addresses
B) If router-id command not used then router chooses highest IP address of any loopback interfaces
C) If no loopback interfaces are configured then the highest IP address on any active interface is used
OSPF Router ID : OSPF Router ID Commands used to verify current router ID
Show ip protocols
Show ip ospf
Show ip ospf interface
OSPF Operation : 10 OSPF Operation
OSPF Packet Format : 11 OSPF Packet Format Common 24-byte protocol header.
Type: 5 types of OSPF packets.
1 - Hello
2 - DBD – database description packets
3 - Link-state requests
4 - Link-state updates (LSA’s)
5 - Link-state acknowledgements
Establishing Adjacencies : 12 Establishing Adjacencies Done using the Hello protocol.
establish virtual point-to-point links, adjacencies.
ensure bi-directional communication between neighbors before exchanging link-state information.
Hello packets are usually multi-cast.
Hello Packets – What do they contain? : 13 Hello Packets – What do they contain? Router ID - identifies router (loopback or highest IP address on an active interface).
Hello interval – how often Hellos are sent (10 sec by default).
Dead interval - time (without hellos) before neighboring router is considered down (4x Hello interval by default – 40sec).
Neighbors - to which adjacencies have been created.
Area-ID - identification number of common area.
Hello Packets (more) : 14 Hello Packets (more) Router Priority - priority value of this router.
DR and BDR - IP addresses of DR and BDR for specific network, if known.
Authentication password - if enabled (optional)
Stub area flag - indicates presence of stub area.
DR and BDR : 15 DR and BDR Help reduce routing update traffic
Act as a central point of contact
Each router establishes adjacency with DR/BDR
sends LSAs only to DR/BDR
DR forwards LSAs to all other routers in network
Manage link-state synchronization
Ensure all routers have same link-state information about the internetwork
BDR becomes DR, only if the DR fails
Electing DR and BDR : 16 Electing DR and BDR DR - router with highest priority.
BDR - second highest priority.
Priority 0 cannot become DR or BDR.
If priorities are same, the higher Router ID is elected (IP address)
No new election if another router is added.
If DR fails, BDR becomes DR, and new BDR is elected.
Examples of OSPF Election : Examples of OSPF Election 17
Neighbor Connections : 18 Neighbor Connections Broadcast multiaccess – (Ethernet or Token Ring)
All communication use multicast address:
224.0.0.6 – DR
224.0.0.5 - all OSPF Routers
Point-to-point – only two neighbor routers, (no DR or BDR is needed or used)
NBMA – (Frame Relay or ATM network)
no broadcast capability, message sent as unicast, DR and BDR are elected
Route Discovery : 19 Route Discovery After DR/BDR election, routers transition through states
Calculating the Metric to a Route : 20 Calculating the Metric to a Route Cost metric used to determine best path.
Based on media bandwidth.
Cost = 108/bandwidth
OSPF keeps up to six equal-cost route entries in the routing table for load balancing.
When LSU is received, SPF or Dijkstra’s algorithm is run to build shortest-path first tree.
Gives best path(s). Cost metric may need to be adjusted to favor newer technologies (Gig and 10 Gig)
Cisco Pre-set OSPF Metric : Cisco Pre-set OSPF Metric
COST of an OSPF route : COST of an OSPF route Accumulated value from one router to the next
Modifying the Cost of the link : Modifying the Cost of the link Difference between bandwidth command & the ip ospf cost command
Ip ospf cost command
Sets cost to a specific value
Use in a multi-vendor installation
Bandwidth command
Link cost is calculated
Note: entered at the interfaceconfig prompt
OSPF Configuration : 24 OSPF Configuration router(config)# router ospf [process-id]
router(config-router)# network [address] [wildcard-mask] area [area-id] Wildcard mask is always an INVERSE mask (255.255.255.255 minus subnet mask)
OSPF IOS Commands : 25 OSPF IOS Commands To determine Router ID, DR & BDR:
show ip ospf interface
Modifying router priority (on interface):
ip ospf priority [number] (from 0 to 255).
Modifying the link cost:
Default cost = 108/bandwidth
Default cost can be changed with:
ip ospf cost [cost] (from 1 to 65535). Optional Command:
(config-if)#bandwidth (in kilobits)
Configuring OSPF Authentication : 26 Configuring OSPF Authentication Authentication can be encrypted or clear text:
Router(config-router)#area 0 authentication
Router(config-if)#ip ospf authentication-key {password}
Configuring OSPF Timers : 27 Configuring OSPF Timers Important: Hello and Dead timers must match or routers will not form adjacency
OSPF - Propagating a Default Route : 28 OSPF - Propagating a Default Route (config-router)#default-information originate
OSPF Commands : 29 OSPF Commands show ip ospf interface
Verifies interface is configured – Router ID, DR & BDR, timer intervals, neighbors.
show ip ospf
# times SPF algorithm executed, link state update interval.
show ip ospf neighbors
List of neighbors, their priorities and states.
show ip ospf database
Displays contents of topological database.
Clear and debug commands : 30 Clear and debug commands To reset the IP routing table:
clear ip route * - delete all routes
clear ip route {A.B.C.D} – delete a network route
To reset the OSPF:
clear ip ospf processes
Note: may have to reload router in some cases
Debug commands:
debug ip ospf adj – used to monitor DR/BDR election.
debug ip ospf events
debug ip ospf packet
debug ip ospf spf
Chapter 11 Labs : Chapter 11 Labs Lab 11.6.1 – Basic OSPF Configuration
Lab 11.6.2 – Challenge OSPF Configuration
Lab 11.6.3 – Troubleshooting OSPF Configuration
Slide 32 :