View
253
Download
2
Category
Preview:
Citation preview
CCNA Course
OSPF
OSPF Features
OSPF is an open standards routing protocol
This works by using the Dijkstra algorithm
OSPF provides the following features:
Minimizes routing update traffic
Allows scalability (e.g. RIP is limited to 15 hops)
Has unlimited hop count
Supports VLSM/CIDR
Allows multi-vendor deployment (open standard)
OSPF PACKETS
There are different types of OSPF Packets:
Hello
Data Base Description (DBD)
Link State Request (LSR)
Link State Update (LSU)
Link State Ack
Neighbor Discovery
When router starts, it (R1) send Hello packet – uses 224.0.0.5
Hello packets are received by all neighbors
R2 receive hello and check all parameters in hello
R2 write RID (1.1.1.1) in its neighbor table
Neighbor Discovery
R2 send hello to R1 with RID (1.1.1.1) in its neighbor list
OSPF neighbor state 2-way means that the router is available to
exchange its LSDB
Hello packets and Link State Advertisements (LSAs) build and maintain the topological database
Hello Packet Information
• Router ID: 32-bit
• Hello and dead intervals: must be the same on neighboring routers (must match)
• Neighbors: list of adjacent routers
• Area ID: Contains the full LSA entries. Multiple LSA entries can fit in one OSPF update packet (must match)
• Router Priority: 8-bit
• DR and BDR IP Addresses
• Authentication Password: (must match)
• Stub Area Flag: (must match)
Exchange LSA
Each router tell the other a list of LSAs in their databases using LSDB —not all the details of the LSAs, just a list (Exstart)
Each router check which LSAs it already has, and then ask other router for only the LSAs that are not known yet using LSR
LSU sent to reply the request from adjacent router (loading)
LSAs are used to update and maintain the topology database.
OSPF Tables
There are three type of tables
Neighbor
Topology
Routing
Neighbor Table
Contain information about the neighbors
Neighbor is a router which shares a link on
same network
Another relationship is adjacency
Not necessarily all neighbors
LSA updates are only when adjacency is
established
Topology Table
Contain information about all network and path to
reach any network
All LSA’s are entered in to topology table
When topology changes LSA’s are generated and
send new LSA’s
On topology table an algorithm is run to create a
shortest path, this algorithm is known as SPF or
dijkstra algorithm
Routing Table
Also knows as forwarding database
Generated when an algorithm is run on
the topology database
Routing table for each router is unique
OSPF Terms: Link State
Advantages and disadvantages Note that OSPF is a more sophisticated routing protocol
Converges rapidly and accurately
Can use a metric calculation that effectively selects the "best" route(s) primarily based on bandwidth, although an OSPF cost can be administratively assigned
Use of OSPF requires
More powerful routing hardware
More detailed knowledge by the administrator, especially when large multi-area networks are used
Neighbors Neighbours are two or more routers that
have an interface on a common network
• E.g. two routers connected on a serial link
• E.g. several routers connected on a
common Ethernet or Frame relay network
Communication takes place between
among neighbours
Not all neighbors will form adjacencies
Database and Neighbors Maintenance
Routers perform three tasks to main its LSDB and
neighbor relationship:
1. Maintain neighbor state by sending Hello messages
based on the Hello Interval, and listening for Hellos
before the Dead Interval expires
2. Flood any changed LSAs to each neighbor
3. Reflood unchanged LSAs as their lifetime expires
(default 30 minutes )
OSPF Area
Autonomous System Border Router (ASBR)
Areas Reasons and Features A larger topology database requires more memory on
each router.
Processing the larger topology database with the SPF
algorithm requires more processing power
A single interface status change, anywhere in the
internetwork forces every router to run SPF again.
A router can be a member of more than one area (ABR)
All routers in the same area have same topology
database
When multiple areas exist, there must always be an area
0 (the backbone) to which other areas connect
Path Calculation Changes to the topological database of a router trigger a recalculation to re-establish the best route(s) to known networks
Uses the SPF (shortest path first) algorithm developed by a computer scientist named Dijkstra
This is done by each individual router using its detailed "knowledge" of the whole network
Leads to rapid and accurate convergence
Based on detailed knowledge of every link in the area and the OSPF "cost" of each
builds an OSPF tree with itself at the route
Network Types
OSPF Election
DR and BDR selection required
All neighbor routers form full adjacencies with the DR
and BDR only
Packets to the DR use 224.0.0.6
Packets from DR to all other routers use 224.0.0.5
Router ID The Router ID (RID) is 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.
You can manually assign the router ID.
The RID interface MUST always be up, therefore
loopbacks are preferred
LSA Types
LSA type 1 (Router LSA):
Describe RID, interfaces, IP address/mask, current interface state (status)
LSA type 2 (Network LSA):
Describe DR and BDR IP addresses, subnet ID, mask
LSA type 3 (Summary LSA): Describe subnet ID, mask, RID of ABR that advertises the LSA
Example of LSA Types 1 and 2
Multi-Area OSPF
LSDB for each area
LSA type 3 floods summary for subnets in other
areas and RID of ABR
Recommended