90 likes | 101 Views
This outline provides an introduction to routing, distance vector algorithm, and the issues faced in routing protocols. It covers topics such as forwarding vs routing, network as a graph, calculating lowest cost paths, and the distance vector algorithm (Bellman-Ford, RIP). It also discusses routing loops, loop-breaking heuristics, and the link state algorithm (Dijkstra's algorithm, OSPF).
E N D
Intradomain Routing Outline Introduction to Routing Distance Vector Algorithm CS 640
Overview • Forwarding vs Routing • forwarding: to select an output port based on destination address and routing table • routing: process by which routing table is built • Network as a Graph • Assume single admin. authority • Assume nodes are routers • Assume links have cost • Problem: Find lowest cost path (sum of links) between two nodes CS 640
Routing Protocol Issues • It may be simple to calculate least cost path if graph is static but… • Links and routers go down • Links and routers are added • Traffic can cause links to overload • How are costs calculated? • Algorithm must be distributed in order to scale • Rich area for research due to distributed, dynamic nature of the problem • Different routers can have different routes at same time CS 640
Distance Vector (Bellman-Ford,RIP) • Find SP for node such that paths contain at most 1 hop, then 2… • Each node maintains a set of triples • (Destination, Cost, NextHop) • Assume each node knows cost of directly connected neighbors • Exchange updates directly connected neighbors • periodically ( on the order of several seconds) – even if there are no changes • whenever its table changes (called triggered update) • Each update is a list of pairs: • (Destination, Cost) • Update local table if receive a “better” route • smaller cost • came from next-hop • Refresh existing routes; delete if they time out CS 640
Example Destination Cost NextHop B 1 B C 3 D D 1 D E 2 D F 4 D G 1 G 5 3 B C 1 5 2 1 F A 1 2 1 1 E D G CS 640
Routing Loops • Example 1 • E detects that link to C has failed • E sets distance to C to infinity and sends update to D • D sets distance to C to infinity since it uses D to reach E • D receives periodic update from B with 2-hop path to C • D sets distance to C to 5 and sends update to E • E decides it can reach C in 3 hops via B • Example 2 • link from A to G fails • A advertises distance of infinity to G • B and D advertise a distance of 2 to G • B decides it can reach G in 3 hops; advertises this to A • A decides it can read G in 4 hops; advertises this to D • D decides that it can reach G in 5 hops… CS 640
Loop-Breaking Heuristics • Set infinity to 16 • Assume this is maximum number of hops in network • Split horizon • Don’t send routes learned from a neighbor back to a neighbor • Split horizon with poison reverse • Send route back to neighbor with negative information ie. Infinite • What are the problems? CS 640
Link State (Dijkstra’s algorithm,OSPF) • Find SP from a given node by sending path data to all nodes and developing paths in order of increasing length • Strategy • send to all nodes (not just neighbors) information about directly connected links (not entire routing table) • Link State Packet (LSP) • id of the node that created the LSP • cost of the link to each directly connected neighbor • sequence number (SEQNO) • time-to-live (TTL) for this packet CS 640
Link State (cont) • Reliable flooding • store most recent LSP from each node • forward LSP to all nodes but one that sent it • generate new LSP periodically • increment SEQNO • start SEQNO at 0 when reboot • decrement TTL of each stored LSP • discard when TTL=0 • This is not easy! CS 640