Routing: Link State Algorithm

Slides:



Advertisements
Similar presentations
Routing - I Important concepts: link state based routing, distance vector based routing.
Advertisements

Routing So how does the network layer do its business?
Routing & IP Routing Protocols
Announcement r Project 2 extended to 2/20 midnight r Project 3 available this weekend r Homework 3 available today, will put it online.
Spring Routing & Switching Umar Kalim Dept. of Communication Systems Engineering 06/04/2007.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
Announcement r Project 2 Extension ? m Previous grade allocation: Projects 40% –Web client/server7% –TCP stack21% –IP routing12% Midterm 20% Final 20%
EE 122: Intra-domain routing Ion Stoica September 30, 2002 (* this presentation is based on the on-line slides of J. Kurose & K. Rose)
1 ECE453 – Introduction to Computer Networks Lecture 10 – Network Layer (Routing II)
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Delivery, Forwarding and
Network Layer Goals: understand principles behind network layer services: –routing (path selection) –dealing with scale –how a router works –advanced topics:
1 CS 4396 Computer Networks Lab Dynamic Routing Protocols - II OSPF.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
M.Menelaou CCNA2 ROUTING. M.Menelaou ROUTING Routing is the process that a router uses to forward packets toward the destination network. A router makes.
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
Network Layer4-1 Chapter 4: Network Layer r 4. 1 Introduction r 4.2 Virtual circuit and datagram networks r 4.3 What’s inside a router r 4.4 IP: Internet.
The Network Layer & Routing
1 Week 5 Lecture 2 IP Layer. 2 Network layer functions transport packet from sending to receiving hosts transport packet from sending to receiving hosts.
Routing and Routing Protocols
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
4: Network Layer4-1 Chapter 4: Network Layer Last time: r Chapter Goals m Understand network layer principles and Internet implementation r Started routing.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
IP tutorial - #2 Routing KAIST Dept. of CS NC Lab.
1 Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol. Dynamic Routing Protocols II OSPF.
Network Layer Routing Networks: Routing.
Network Layer.
Chapter 4: Network Layer
CS 5565 Network Architecture and Protocols
Dynamic Routing Protocols II OSPF
Routing Jennifer Rexford.
Routing: Link State Algorithm
Routing BY, P.B.SHANMATHI.
CSE390 – Advanced Computer Networks
Chapter 4: Network Layer
Routing Protocols and Concepts
Link-State Routing Protocols
Net 323 D: Networks Protocols
CS 457 – Lecture 12 Routing Spring 2012.
Introduction to Internet Routing
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Routing.
Network layer functions
Dynamic Routing Protocols II OSPF
Road Map I. Introduction II. IP Protocols III. Transport Layer
CS 4700 / CS 5700 Network Fundamentals
Routers Routing algorithms
CS 3700 Networks and Distributed Systems
Link-State Routing Protocols
Intradomain Routing Outline Introduction to Routing
Dynamic Routing and OSPF
ECE453 – Introduction to Computer Networks
Chapter 4: Network Layer
CS 3700 Networks and Distributed Systems
Chapter 4: Network Layer
Network Layer Routing Networks: Routing.
COMP/ELEC 429 Introduction to Computer Networks
Chapter 4: Network Layer
Chapter 4: Network Layer
Link-State Routing Protocols
EE 122: Intra-domain routing: Distance Vector
Network Layer.
Routing.
EE 122: Intra-domain routing: Link State
Network Layer Routing.
Presentation transcript:

Routing: Link State Algorithm Networking CS 3470, Section 1

The University of Adelaide, School of Computer Science 28 April 2019 Routing Forwarding versus Routing Forwarding: To select an output port based on destination address and routing table Routing: Process by which routing table is built Chapter 2 — Instructions: Language of the Computer

Forwarding Table vs Routing Table The University of Adelaide, School of Computer Science 28 April 2019 Forwarding Table vs Routing Table Forwarding table Used when a packet is being forwarded Must contain enough information to forward A row in the forwarding table contains Mapping from a network number to outgoing interface MAC or Ethernet address of the next hop Chapter 2 — Instructions: Language of the Computer

Forwarding Table vs Routing Table Built by the routing algorithm as a precursor to build the forwarding table Generally contains mapping from network numbers to next hops

Routing An autonomous system (AS) is a network that is administrated independently of other ASs Backbone service providers and regional providers form their own ASs Can run their own (different) routing algorithms Also called routing domains

NAPs, NSPs, ISPs NSP: National Service Provider (Tier 1 Providers/Backbones) Example: CenturyLink, Telia Carrier, NTT, Cogent, Level 3, GTT, and Tata Communications. NAP: Network Access Point NAP National Provider Regional Provider customers Here is an illustration of the structure of internet in USA. At the top level, there are national service providers (NSPs) which are essentially the tier 1 backbones. For example, Internet MCI, Sprint Link, UUNET have such national backbone network. These NSP’s connect to each other thru network access points (NAPs). At the second level we have regional internet service providers (ISPs). These ISPs are customers of NSPs. They have contractual agreement between them. They may also connect to NAPs for reliability. There may be some local ISPs that are customers of these regional ISPs and these local ISPs provide connectivity to end customers.

NAP and Private Peering The NAPs are meant for interconnecting the NSPs. But instead of always going thru NAPs, the NSPs may decide to have mutual agreement between them to exchange traffic that is originated from and destined to these NSPs. This is known is private peering. There is a distinction between a customer-provider relationship and peer-peer relationship. Here the regional ISP is customer of NSP A and a provider of local ISP. NSP A charges regional ISP for its service and similarly regional ISP charges local ISP. But ISP A and ISP B do not charge each other for carrying others traffic. Its expected that roughly equal amount of traffic flows between them.

Ameritech Exchange Point Internet Network Example of a National Service Provider (Sprint) Private Peering MAE-West Exchange Point Pacific Bell Ameritech Exchange Point Sprint Exchange Point MAE-East Here is an example backbone network of a national service provider Sprint. Here MAE refers to metropolitan area exchanges which are essentially NAPs. You can see why this is called NSP. It provides connectivity across the whole nation.

Intra-AS and Inter-AS Routing C.b Gateways: perform inter-AS routing amongst themselves perform intra-AS routers with other routers in their AS B.a A.a b A.c c a a C b a B d c A b

Intra-AS and Inter-AS Routing C.b Gateways: perform inter-AS routing amongst themselves perform intra-AS routers with other routers in their AS B.a A.a b A.c c a a C b a B d c A b network layer inter-AS, intra-AS routing in gateway A.c link layer physical layer

Intra-AS and Inter-AS Routing between A and B a b C A B d c A.a A.c C.b B.a Host h2 Host h1 Intra-AS routing within AS B Intra-AS routing within AS A We’ll now examine both inter-AS and intra-AS Internet routing protocols

Intra-AS Routing a.k.a., “routing in the small” These routing algorithms only scale for smaller networks (few hundred nodes), but set the stage for the hierarchical Inter-AS routing protocols used in the Internet today

The University of Adelaide, School of Computer Science 28 April 2019 Routing Network as a Graph The basic problem of routing is to find the lowest-cost path between any two nodes Where the cost of a path equals the sum of the costs of all the edges that make up the path 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1 Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 28 April 2019 Routing For a simple network, we can calculate all shortest paths and load them into some nonvolatile storage on each node. Such a static approach has several shortcomings It does not deal with node or link failures It does not consider the addition of new nodes or links It implies that edge costs cannot change Chapter 2 — Instructions: Language of the Computer

Routing Instead of a static approach, we need a dynamic way to find the lowest-cost path Node and link failures, changing link costs We would like these algorithms to be distributed so that they can be somewhat scalable

Distributed Routing Algorithms Routers cooperate using a distributed protocol To create mutually consistent routing tables Two standard distributed routing algorithms Link state routing Distance vector routing Now let us how routing algorithms are implemented. We study the typical distributed routing algorithms where routers cooperate using some a distributed protocol to create mutually consistent routing tables at each router. There are two standard distributed routing algorithms. The link state routing algorithm and the distance vector routing algorithm.

Link State vs Distance Vector Both assume that The address of each neighbor is known The cost of reaching each neighbor is known Both find global information By exchanging routing info among neighbors Differ in info exchanged and route computation LS: tells every other node its distance to neighbors DV: tells neighbors its distance to every other node In both algorithms, we assume that the address of each neighbor is known, and cost of reaching each neighbor is also known. Both algorithms exchange routing information among neighbors to find global routing information. They differ in the information exchanged and how routes are computed. Link state: tell every other nodes its distance to its own neighbors. Distance vector: tells neighbors its distance to all the other nodes.

Link State Algorithm Basic idea: Distribute to all routers Cost of each link in the network Each router independently computes optimal paths From itself to every destination Routes are guaranteed to be loop free if Each router sees the same cost for each link Uses the same algorithm to compute the best path Under link state routing, each router gathers state of all the links in the network and then independently computes paths. Cost can be any generic metric capturing the link characteristics such bandwidth or delay.

Topology Dissemination Each router creates a set of link state packets (LSPs) Describing its links to neighbors LSP contains Router id, neighbor’s id, and cost to its neighbor Copies of LSPs are distributed to all routers Using controlled flooding Each router maintains a topology database Database containing all LSPs What is the cost of controlled flooding? A router would not forward an LSP more than once. Since each LSP carries a sequence number, a router can discard the duplicates by matching the originator and the sequence numbers with its LSP database.

Dijkstra’s Algorithm Given the network topology Some notation How to compute shortest path to each destination? Some notation X: source node N: set of nodes to which shortest paths are known so far N is initially empty D(V): cost of known shortest path from source X from V C(U,V): cost of link U to V C(U,V) =  if not neighbors

Algorithm (at Node X) Initialization Loop N = {X} For all nodes V If V adjacent to X, D(V) = C(X,V) else D(V) =  Loop Find U not in N such that D(U) is smallest Add U into set N Update D(V) for all V not in N D(V) = min{D(V), D(U) + C(U,V)} Until all nodes in N

Let’s take a look at an example Sample network 5 3 B C 5 2 A 2 1 F 3 1 2 D E 1

Link State Database Starting global database Each router has it’s own starting link state database 5 3 B C 5 2 A 2 1 F 3 1 2 D E 1

Dijkstra’s Algorithm: Initialization for Node A Step 1 2 3 4 start N A D(B),p(B) 2,A D(C),p(C) 5,A D(D),p(D) 1,A D(E),p(E) infinity D(F),p(F) infinity Suppose A wants to compute shortest paths to all other nodes. Initialization is like step 0. We add A itself to N and set the distance to all the neighbors as the cost of direct links and all others as infinity. Here D(B) is set 2 and D(E) set to infinity because B is a neighbor and E is not. D(x) is distance/cost to x p(x) is path to x 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Dijkstra’s algorithm: example Step 1 2 3 4 start N A AD D(B),p(B) 2,A D(C),p(C) 5,A 4,D D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity Now in step 1, among all those nodes that are not in N, we select a node with the shortest distance. In this case D is that node with distance of 1. First, we add D to the set N. Then we update the distances of other nodes if they can be made shorter by going thru D. In this case we can improve the distance to C from 5 to 4 by going thru D instead of using the direct link. Similarly E can now be reached with distance 2. Now we select the node with the shortest distance to add to set N. Then we update distances of other nodes if they can be made shorter going through D. 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Dijkstra’s algorithm: example Step 1 2 3 4 start N A AD ADB D(B),p(B) 2,A D(C),p(C) 5,A 4,D D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity B has the next shortest distance from A, so we add it to set N. (could have been E..) Then we update distances of other nodes if they can be made shorter going through B… 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Dijkstra’s algorithm: example Step 1 2 3 4 start N A AD ADB ADBE D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Dijkstra’s algorithm: example Step 1 2 3 4 start N A AD ADB ADBE ADBEC D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Dijkstra’s algorithm: example Step 1 2 3 4 5 start N A AD ADB ADBE ADBEC ADBECF D(B),p(B) 2,A D(C),p(C) 5,A 4,D 3,E D(D),p(D) 1,A D(E),p(E) infinity 2,D D(F),p(F) infinity 4,E This way in each step, we pick the node with the shortest distance, add it to set N and update the distance of all other nodes not in N. After k iterations, shortest paths to nearest k neighbors are known. This process terminates after all the nodes are added to N. This algorithm can be viewed as the construction of shortest paths spanning tree with source node as the root. In such a tree, there is exactly one path from the source node to any other node and that is the shortest path. This process terminates after all the nodes are added to N. 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Routing Table Computation Now we know how to construct a shortest paths spanning tree. How do we get the routing table from this tree? Routing table is essentially a mapping from destination to next hop. 5 3 B C 2 5 A 2 1 F 3 1 2 D E 1

Dijkstra’s algorithm, discussion Oscillations possible: e.g., link cost = amount of carried traffic A A A 1 A 1+e 2+e 2+e 2+e D B D B D B D 1+e 1 B 1+e 1 e 1 1+e e C C C C 1 1 e … recompute routing … recompute … recompute initially