OSPF
- OSPFv3 is used for IPv6 networks.
- OSPF is a link state routing protocol
- A link is an interface on a router
- Link-state information includes the network prefix, prefix length and cost
Components of OSPF
- Routing Protocol Messages
- Hello packet
- Database description packet
- Link-state request packet
- Link-state update packet
- Link-state acknowledgment packet
- Data structures
- Adjacency Database (This creates the neighbor table)
show ip ospf neighbor
- Link-state Database(LSDB)(This creates the topology table)
- All routers within an area have identical LSDB.
- List information about all other routers in the network.
show ip ospf database
- Forwarding Database(This creates the routing table)
- The routing table is unique.
show ip route
- Adjacency Database (This creates the neighbor table)
- Algorithm
- Dijkstra shortest-path first (SPF) algorithm
Link-state operation
- Establish neighbor adjacency (Hello Packet)
- Exchange Link-state advertisement (LSAs)
- LSAs contain the state and cost of each directly connected link
- Flood the LSAs to adjacent neighbors until all the routers in the area have all the LSAs
- Build the link state database
- Based on the received the LSAs
- Execute the SPF algorithm
- Choose the best route
Single-area and Multi-area OSPF
- Single-area OSPF
- All routers are in one area.
- Best practice is to use area 0
- Multi-area OSPF
- In a hierarchical way
- All areas must connect to the backbone area (area 0)
- Routers interconnecting the areas are referred to as Area Border Routers(ABR)
-
Advantage of Multi-area OSPF
- Smaller routing tables
- Fewer routing table entries
- Network addresses can be summarized between areas. (Route summarization is not enabled by default)
- Reduced link-state update overhead
- Reduced frequency of SPF calculations
Link-state Packets
- Link-state packets are the tools used by OSPF to help determine the fastest available route for a packet.
- Type 1: Hello Packet
- This is used to establish and maintain adjacency with other OSPF routers.
- Type 2: Database Description (DBD) Packet
- This contains an abbreviated list of the LSDB of the sending router
- It is used by the receiving routers to check again the local LSDB
- The LSDB must be identical on all link-state routers within an area
- Type 3: Link-State Request (LSR) Packet
- The receiving router can request more information about any entry in the DBD by sending an LSR
- Type 4: Link-state Update (LSU) packet
- This is used to reply to LSRs
- LSUs contain several different types of LSAs
- Type 5: Link-State Acknowledgment (LSAck) Packet
- When an LSU is received, the router sends an LSAAck to confirm receipt of the LSU.
- Type 1: Hello Packet
LSU (link-state update)
- LSU contains one or more LSAs
- LSA Type
- Router LSAs
- Network LSAs
- Summary LSAs
- Summary LSAs
- Autonomous System External LSAs
- Multicast OSPF LSAs
- Defined for Not-SO-Stubby Areas
- External Attributes LSA for Border Gateway Patrol (BGPs)