Why Link State?
- Drawbacks of Distance Vector Protocols:
- Slow convergence
- Send full routing table, at a regularly scheduled interval
- Not typically used on WAN’s due to this.
- Does not exchange routes and metrics
- Exchange the state of their links
- OSPF refers metric as cost
- LSA- Link State Advertisements arrive from OSPF neighbors
- Gives the router a picture of the network
- Uses the Shortest Path First (SPF) algorithm (or Dijkstra)
- OSPF is a Link State Protocol
- OSPF routers do no need to form adjacencies with every other router; instead, OSPF networks elect a designated router and a backup designated router.
- If the DR fails, the BDR takes over as the DR and a new election is held.
- The value to elect the DR and BDR is the OSPF interface priority. (By default this is 1)
- Setting his value to 0 will prevent it from becoming a DR or BDR
- OSPF network statements use wildcard masks (REQUIRED in OSPF)
- Hello timer – defines how often Hello packets are sent
- Dead timer – how long OSPF will wait for Hello packets (40s Ethernet, 120s Non-broadcast links) (The dead time is 4x the Hello time, and OSPF will adjust this dynamically)
Neighbor adjacencies must be formed
- OSPF Hello packets are sent to allow neighbors to dynamically discover each other
- OSPF Hello packets allow the neighbors to remind each other that they are still there (keep alive)
- Default Hello packet broadcast is 10 seconds on a broadcast segment such as Ethernet, and 30 seconds on non-broadcast links such as serial connections
- Hellos have a destination IP of 184.108.40.206 (reserved class D “multicast” range)
- Getting Hellos does no guarantee a neighbor relationship
- Link State Update (LSU) contains multiple Link State Advertisements
- Designated router (DR) and backup designated router (BDR) are elected
- The designated router is the router that will receive the LSAs from other routers in the area, and flood the LSA indicating he network change to all non-DR and non-BDR
Debug ip ospf adjacency
- Show ip ospf neighbor
- Router ospf <area #>
- Network <network #> <wildcard mask>
- Show ip ospf interface <cr or int name>
- Ip ospf hello-interval (allows you to change the hello interval timer, in seconds).
DOWN– No Hellos from neighbors
- ATTEMPT – Unicast hello packets are sent to the neighbor (you will only see these in NBMA networks)
- INIT – First Hello packet has been received from neighbor
- 2-WAY Communication – each router has received a Hello packet containing its own Router ID Number
- EXSTART – Following DR/BRD election, the exchange of link state database information can begin. Router with the highest OSPF RID # will begin the exchange and increment the initial sequence number
- EXCHANGE – Database descriptor packets (DBD) are exchanged; these packets contain a description of the link state database
- LOADING – Routers now send Link State Request (LSR) packets to their potential neighbor
- FULL – Router databases are synchronized and the adjacency has been formed.
OSPF does not rely on distance vector loop prevention methods such as split horizon or poison reverse. Those would not work with link-state because they are not exchanging routes.
- The OSPF Algorithm recalculates so quick that routing looks literally have no time to form.