We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 40
Dynamic Routing Protocols
• A dynamic routing protocol is a combination of
rules and procedures that lets routers in the internet inform each other of changes in the internet • When a router receives a packet, the decision about which network to send the packet to is based on optimization • One way of achieving optimization is by assigning a cost for passing through a network a.k.a. metric • The metric could be hop count, delay, throughput, policy, etc. AS • An autonomous system (AS) is a group of networks and routers under the authority of a single administration • Routing inside an AS is referred to as intradomain routing • Routing between AS is referred to as interdomain routing Routing Protocols Distance Vector Routing • In distance vector routing, the least-cost route between any two nodes is the route with minimum distance • Each node maintains a vector (table) of the minimum distances to every node • The table at each node guides the packet to the desired node by showing the next stop in the route (next-hop routing) Distance Vector Routing Tables Distance Vector Routing • At its initial stage, each node can only know the distance between itself and its immediate neighbors those directly connected to it • The distance for any entry that is not a neighbor is marked as infinite ∞ (unreachable) • The nodes then shares its routing table information with each other • When a neighbor receives a table, the next-hop column is replaced with the sender’s name In distance vector routing, each node shares its routing table with its immediate neighbors periodically and when there is a change. Initialization of Vector Updating in Distance Vector Routing • When a node receives routing table information from a neighbor, it needs to update its routing table • The receiving node needs to add the cost between itself and the sending node to each value in the second column. • The receiving node needs to add the name of the sending node to each row as the third column if the receiving node uses the information from any row. The sending node is the next node in the route • The receiving node needs to compare each row of its old table with the corresponding row of the modified version of the received table Updating in Distance Vector Routing When to share? • The routing table information is sent both periodically and when there is a change in the table • Periodic update • A node sends its routing table, normally every 30s in a periodic update (depends on the protocol that is using distance vector routing) • Triggered update • A node sends its routing table to its neighbors anytime there is a change in its routing table (triggered update) Two-node Instability Two-node Instability • A problem with distance vector routing is instability • A few solutions have been proposed for instability of this kind • Defining infinity – redefine infinity to a smaller number, e.g. 100. However, this means that the distance vector routing cannot be used in large systems • Split horizon – route advertisement is sent out an interface only if they were not learned from updates entering that interface • Split horizon and Poison Reverse – the split horizon strategy can be combined with the poison reverse strategy. Node B advertises the value for X, but if the source of information is A, it can replace the distance with infinity as a warning Three-node Instability RIP • RIP is an intradomain routing protocol used inside an AS • It is a very simple protocol based on distance vector routing • RIP implements distance vector routing directly with some considerations: • In an AS, we are dealing with routers and networks (links). The routers have routing tables; networks do not • The destination in a routing table is a network, which means the first column defines network addresses • The metric used by RIP is hop count the number of links (networks) to reach the destination • Infinity is defined as 16 any route in an AS using RIP cannot have more than 15 hops • The next-node column defines the address of the router to which the packet is to be sent to reach its destination RIP Link State Routing • In link state routing, if each node in the domain has the entire topology of the domain, the node can use Dijkstra’s algorithm to build a routing table • The topology must be dynamic, representing the latest state of each node and each link • If there are changes in any point in the network the topology must be updated for each node • Based on the assumption that: although the global knowledge about the topology is unclear, each node has partial knowledge of its links Link State Routing Link State Knowledge Link State Routing • In link state routing, 4 sets of actions are required to ensure that each node has the routing table showing the least-cost node to every other node • Creation of the states of the links by each node, called the link state packets (LSP) • Dissemination of LSPs to every other router, called flooding, in an efficient and reliable way • Formation of the shortest path tree for each node • Calculation of a routing table based on the shortest path tree Creation of LSPs • LSPs are generated on two occasions: • When there is a change in the topology of the domain • On a periodic basis Flooding of LSPs • Flooding is done based on the following • The creating node sends a copy of the LSP out of each interface • A node that receives an LSP compares it with the copy it may already have. If the newly arrived LSP is older than the one it has (based on its sequence no), it discards the LSP. If it is newer the node does the following: • It discards the old LSP and keeps the new one • It sends a copy of it out of each interface except the one from which the packet arrived. This guarantees that flooding stops somewhere in the domain Dijkstra Algorithm • The Dijkstra algorithm creates a shortest path tree from a graph • It divides the nodes into two sets: tentative and permanent • It finds the neighbors of a current node, makes them tentative, examines them, and if they pass the criteria, makes them permanent Dijkstra Algorithm Dijkstra Algorithm Find shortest paths from given source node to all other nodes, by developing paths in order of increasing path length N = set of nodes in the network s = source node T = set of nodes so far incorporated by the algorithm w(i, j) = link cost from node i to node j w(i, i) = 0 w(i, j) = if the two nodes are not directly connected w(i, j) 0 if the two nodes are directly connected L(n) = cost of least-cost path from node s to node n currently known At termination, L(n) is cost of least-cost path from s to n Dijkstra Algorithm Step 1 [Initialization] T = {s} Set of nodes so far incorporated consists of only source node L(n) = w(s, n) for n ≠ s Initial path costs to neighboring nodes are simply link costs Step 2 [Get Next Node] Find neighboring node not in T with least-cost path from s Incorporate node into T Also incorporate the edge that is incident on that node and a node in T that contributes to the path Step 3 [Update Least-Cost Paths] L(n) = min[L(n), L(x) + w(x, n)] for all n T If latter term is minimum, path from s to n is path from s to x concatenated with edge from x to n Algorithm terminates when all nodes have been added to T Shortest Path Tree Routing table for node A Dijkstra Algorithm Example Dijkstra Algorithm Example Iteration T L(2) Path L(3) Path L(4) Path L(5) Path L(6) Path 1 {1} 2 1–2 5 1-3 1 1–4 - - 2 {1,4} 2 1–2 4 1-4-3 1 1–4 2 1-4– - 5 3 {1, 2, 2 1–2 4 1-4-3 1 1–4 2 1-4– - 4} 5 4 {1, 2, 2 1–2 3 1-4- 1 1–4 2 1-4– 4 1-4- 4, 5} 5–3 5 5–6
5 {1, 2, 2 1–2 3 1-4- 1 1–4 2 1-4– 4 1-4-
3, 4, 5–3 5 5–6 5} 6 {1, 2, 2 1-2 3 1-4- 1 1-4 2 1-4– 4 1-4- 3, 4, 5-3 5 5-6 5, 6} Open Shortest Path First (OSPF) • OSPF is an intradomain routing protocol based on link state routing • To handle routing efficiently and in a timely manner, OSPF divides an AS into areas a collection of networks, hosts and routers all contained within an AS. All networks inside an area must be connected • Routers inside an area flood the area with routing information • At the border of an area, special routers called area border routers summarize the information about the area and send it to other areas Open Shortest Path First (OSPF) • Among the areas inside an AS is a special area called the backbone all the areas inside and AS must be connected to the backbone • The routers inside the backbone are called the backbone routers. A backbone router can also be an area border router • If the connectivity between a backbone and an area is broken, a virtual link between routers must be created • Each area has an area identification. The area identification of the backbone is zero. Open Shortest Path First (OSPF) • OSPF allows the administrator to assign a cost, called the metric, to each route • The metric can be based on a type of service (minimum delay, maximum throughput, etc). • A router can have multiple routing tables, each based on a different type of service • A connection in OSPF is called a link Areas in an Autonomous System Types of Links Point-to-Point Link A point-to-point link connects two routers without any other host or router in between There is no need to assign a network address to this type of link Transient Link A transient link is a network with several routers attached to it Data can enter through any of the routers and leave through any router Stub Link A stub link is a network that is connected to only one router Data enter the network though this single router and leave through the same router This is a special case of the transient network Autonomous Systems & OSPF FIN