From wikistone
Jump to: navigation, search
Line 4: Line 4:
 
Uses Dijkstra's SPF (Shortest Path First) algorithm.<br>
 
Uses Dijkstra's SPF (Shortest Path First) algorithm.<br>
  
−
'''Tables:'''
+
===Tables===
 
* Neighbor
 
* Neighbor
 
* Topology
 
* Topology
Line 10: Line 10:
  
  
−
'''Notes:'''
+
===Notes===
 
* All areas connect to area 0.
 
* All areas connect to area 0.
 
* All routers in an area know about all other routers in that area.
 
* All routers in an area know about all other routers in that area.
Line 22: Line 22:
  
  
−
'''Router Types:'''
+
===Router Types===
 
* ABR: Area Border Router. Must have 1 int in area 0. Can summarize here only.
 
* ABR: Area Border Router. Must have 1 int in area 0. Can summarize here only.
 
* ASBR: Autonomous System Boundary Router. Links the OSPF AS to external network(s).
 
* ASBR: Autonomous System Boundary Router. Links the OSPF AS to external network(s).
Line 28: Line 28:
  
  
−
'''LSA Types:''' (Link State Adverts)
+
==Technical==
 +
===LSA Types===
 +
(Link State Adverts)
 
* ...
 
* ...
  
  
−
'''Packets:'''
+
===Packet Types===
 
* Hello
 
* Hello
 
** RID, Router Priority, Neighbors, BR & BDR addresses
 
** RID, Router Priority, Neighbors, BR & BDR addresses
 
** (Must match for neighborship formation.) Area #, Hello & Dead timers, NetMask, Auth
 
** (Must match for neighborship formation.) Area #, Hello & Dead timers, NetMask, Auth
 +
* Link-State packets:
 +
** LSU (Link-Stake Update). Encapsulating packet for updates. Contain LSAs.
 +
** LSA (Link-State Advert). Individual updates about routes to networks.
 +
** LSAck (Link-State Ack). Acks for reliability. (RTP)
  
  
−
'''Neighborship:'''
+
===Neighborship===
 
* RID (Router ID) is determined.
 
* RID (Router ID) is determined.
 
** Staticly declared or determined by: highest active IP when OSPF starts (loopback > physical).  
 
** Staticly declared or determined by: highest active IP when OSPF starts (loopback > physical).  
Line 44: Line 50:
 
** If dynamic RID, RID will only change if OSPF is manually restarted or at router reload.
 
** If dynamic RID, RID will only change if OSPF is manually restarted or at router reload.
 
* If Hello contains This router, This knows neighborship is formed. If Hello doesn't contain This, This attempts to form neighborship.
 
* If Hello contains This router, This knows neighborship is formed. If Hello doesn't contain This, This attempts to form neighborship.
−
* States:
 
−
** Init State: received Hello (if no Hello matches, Init -> Down).
 
−
** 2-Way State: This router listed in Other's Hello & Other router listed in This' Hello. (DROthers stay here)
 
−
** ExStart State: Master-Slave determined by Priority > RID. Master sends DB Desc (DBD) packet (summary of Link-State db). Slave sends DBD.
 
−
** Loading State: Ack DBDs.
 
−
*** Slave Req details (Link-State Requests [LSR])
 
−
*** Master Tx updates (Link-State Updates [LSU])
 
−
*** Master Req details (LSR)
 
−
*** Slave Tx updates (LSU)
 
−
** Full State: Neighborship formed.
 
−
* Roles:
 
−
** DR (Designated Router)
 
−
*** updates are sent to DR on 224.0.0.6
 
−
*** DR calculates changes, then sends update on 224.0.0.5
 
−
*** determined by Rtr Priority > RID
 
−
** BDR (Backup Designated Router)
 
−
*** takes over as DR if DR fails.
 
−
** DROther (all other routers on network segment or routers on P2P)
 
−
* Link-State packets:
 
−
** LSU (Link-Stake Update). Encapsulating packet for updates. Contain LSAs.
 
−
** LSA (Link-State Advert). Individual updates about routes to networks.
 
−
** LSAck (Link-State Ack). Acks for reliability. (RTP)
 
  
  
−
'''Routes:'''
+
===Router States===
−
* Standard: AD: xxx
+
* Init State: received Hello (if no Hello matches, Init -> Down).
 +
* 2-Way State: This router listed in Other's Hello & Other router listed in This' Hello. (DROthers stay here)
 +
* ExStart State: Master-Slave determined by Priority > RID. Master sends DB Desc (DBD) packet (summary of Link-State db). Slave sends DBD.
 +
* Loading State: Ack DBDs.
 +
** Slave Req details (Link-State Requests [LSR])
 +
** Master Tx updates (Link-State Updates [LSU])
 +
** Master Req details (LSR)
 +
** Slave Tx updates (LSU)
 +
* Full State: Neighborship formed.
 +
 
 +
 
 +
===Router Roles===
 +
* DR (Designated Router)
 +
** updates are sent to DR (from all rtrs) on 224.0.0.6
 +
** DR calculates changes, then sends update on 224.0.0.5
 +
** determined by Rtr Priority > RID
 +
* BDR (Backup Designated Router)
 +
** takes over as DR if DR fails.
 +
* DROther (all other routers on network segment or routers on P2P)
 +
** listen on 224.0.0.5
 +
** P2P links have DROthers only (stuck in 2-Way) and only use 224.0.0.5
 +
Roles are per network. A router connected to multiple networks can have multiple roles.<br>
 +
Router Role Election: Router Priority > RID
 +
 
 +
 
 +
==OSPF Over NBMA==
 +
for Frame Relay, ATM, MPLS
 +
 
 +
 
 +
 
 +
==Routes==
 +
* Standard: AD: 110
 
* InterArea:  
 
* InterArea:  
−
* E1: AD: xxx. Cost: xxx. Metric increments as the route traverses the AS.
+
* E1: AD: 110. Cost: [det+cost]. Cost metric increments as the route traverses the AS.
−
* E2: AD: xxx. Cost: 200. Metric does not increment across AS.
+
* E2: AD: 110. Cost: [det]. Cost metric does not increment across AS.  
  
  
Line 78: Line 93:
  
  
−
'''Commands:'''
+
==Commands==
−
<pre>
+
 
 
Clear OSPF:  
 
Clear OSPF:  
−
# clear ip ospf process
+
<pre># clear ip ospf process</pre>
 
Show OSPF db:
 
Show OSPF db:
−
# sh ip ospf database
+
<pre># sh ip ospf database</pre>
 +
 
 +
 
 +
 
  
−
</pre>
 
  
  
 
<br>
 
<br>
 
.
 
.

Revision as of 11:21, 12 April 2013

OSPF: Open Shortest Path First

Link State routing protocol.
Uses Dijkstra's SPF (Shortest Path First) algorithm.

Tables

  • Neighbor
  • Topology
  • Route


Notes

  • All areas connect to area 0.
  • All routers in an area know about all other routers in that area.
  • Area 0 is aka Backbone area.
  • Neighborships form in same area only.
  • Hellos:
    • 10 sec on broadcast & P2P networks
    • 30 sec on NBMA networks
    • Timeout 4x Hello
  • Reliability: Uses RTP (Reliable Transport Protocol) for reliability. This is built into OSPF.


Router Types

  • ABR: Area Border Router. Must have 1 int in area 0. Can summarize here only.
  • ASBR: Autonomous System Boundary Router. Links the OSPF AS to external network(s).


Technical

LSA Types

(Link State Adverts)

  • ...


Packet Types

  • Hello
    • RID, Router Priority, Neighbors, BR & BDR addresses
    • (Must match for neighborship formation.) Area #, Hello & Dead timers, NetMask, Auth
  • Link-State packets:
    • LSU (Link-Stake Update). Encapsulating packet for updates. Contain LSAs.
    • LSA (Link-State Advert). Individual updates about routes to networks.
    • LSAck (Link-State Ack). Acks for reliability. (RTP)


Neighborship

  • RID (Router ID) is determined.
    • Staticly declared or determined by: highest active IP when OSPF starts (loopback > physical).
    • RID is 32 bit in IPv4 format.
    • If dynamic RID, RID will only change if OSPF is manually restarted or at router reload.
  • If Hello contains This router, This knows neighborship is formed. If Hello doesn't contain This, This attempts to form neighborship.


Router States

  • Init State: received Hello (if no Hello matches, Init -> Down).
  • 2-Way State: This router listed in Other's Hello & Other router listed in This' Hello. (DROthers stay here)
  • ExStart State: Master-Slave determined by Priority > RID. Master sends DB Desc (DBD) packet (summary of Link-State db). Slave sends DBD.
  • Loading State: Ack DBDs.
    • Slave Req details (Link-State Requests [LSR])
    • Master Tx updates (Link-State Updates [LSU])
    • Master Req details (LSR)
    • Slave Tx updates (LSU)
  • Full State: Neighborship formed.


Router Roles

  • DR (Designated Router)
    • updates are sent to DR (from all rtrs) on 224.0.0.6
    • DR calculates changes, then sends update on 224.0.0.5
    • determined by Rtr Priority > RID
  • BDR (Backup Designated Router)
    • takes over as DR if DR fails.
  • DROther (all other routers on network segment or routers on P2P)
    • listen on 224.0.0.5
    • P2P links have DROthers only (stuck in 2-Way) and only use 224.0.0.5

Roles are per network. A router connected to multiple networks can have multiple roles.
Router Role Election: Router Priority > RID


OSPF Over NBMA

for Frame Relay, ATM, MPLS


Routes

  • Standard: AD: 110
  • InterArea:
  • E1: AD: 110. Cost: [det+cost]. Cost metric increments as the route traverses the AS.
  • E2: AD: 110. Cost: [det]. Cost metric does not increment across AS.


Cost: 100 / (BW-inMBps). All speeds above 100 MBps are 1... Unless you adjust the factor.


Commands

Clear OSPF:

# clear ip ospf process

Show OSPF db:

# sh ip ospf database





.