210 likes | 388 Views
Dijkstra. Agenda. Algorithm Review Example Concepts. Dijkstra. Shortest Path First (SPF) Algorithm. Link state database Created with Link State Packets (LSPs) from each router TENT database Tentative triples (ID, path cost, direction). Dijkstra (SPF Cont.). PATH database
E N D
Dijkstra Agenda • Algorithm Review • Example • Concepts
Dijkstra Shortest Path First (SPF) Algorithm • Link state database • Created with Link State Packets (LSPs) from each router • TENT database • Tentative triples (ID, path cost, direction)
Dijkstra (SPF Cont.) • PATH database • Best path triples (ID, path cost, direction) • Forwarding database • AKA the routing table
Dijkstra (SPF Cont.) • All routers exchange Link State Packets (LSPs) • Each starts with itself as root • Tent is built from LSPs • Path is created by examining and comparing Tent triples • Once Path is final, the forwarding table is populated
4 • 1 • 4 • C • B • A • 2 • 2 • D • 1 • E • F • 2 • 2 • G Dijkstra Example: • Router IDs are alphabetic • Costs are numeric • Lowest cost best
4 • 1 • 4 • C • B • A • 2 • 2 • D • 1 • E • F • 2 • 2 • G LSP Data G A B C D E F B/4 G/2 A/4 C/1 B/1 D/4 E/2 C/4 E/1 C/2 D/1 F/2 E/2 G/2 A/2 F/2
B • (0) • A • C • (4) • (1) Dijkstra Example (Cont.) • As an example, start with B • A and C costs are Tent
B • G • A • C Dijkstra Example (Cont.) • Now fill in A • G is Tent • BA is now in Path • (0) • (4) • (1) • (6)
B • D • C • E • G • A • C Dijkstra Example (Cont.) • Now fill in C • D and E are Tent • BC is now in Path • (0) • (4) • (1) • (5) • (3) • (6)
B • D • C • E • G • A • C Dijkstra Example (Cont.) • Now fill in D • D and E are still Tent • DC does not provide better path • (0) • X • (4) • (1) • (5) • (3) • (6)
B • C • D • E • F • G • A • C Dijkstra Example (Cont.) • Now fill in E • F is Tent • CD is removed • ED and CE are in path • (0) • (4) • (1) • (4) • (3) • (6) • (5)
B • C • D • E • F • G • A • C Dijkstra Example (Cont.) • Now fill in F • G is Tent • EF is in path • (0) • (4) • (1) • (4) • (3) • X • (6) • (5)
B • C • D • E • F • G • A • C Dijkstra Example (Cont.) • Now fill in G • FG is removed • AG is in path • (0) • (4) • (1) • (4) • (3) • (6) • (5)
Dijkstra Concepts • SPF is simple :-) • However: • How did each router receive the LSPs? • What happens if a change occurs? • How do we handle other kinds of routers?
Dijkstra Concepts (Cont.) • How? • We create a protocol • What does it do? • Creates and maintains the Path Database • Populates the forwarding table
Dijkstra Protocols • CLNS/DECnet Phase 5 • IS-IS • OSPF • NLSP