1 4.2 Routing 4.2.1 Network as a Graph 4.2.2 Distance Vector (RIP) 4.2.3 Link State (OSPF) 4.2.4 Metrics 4.2.5 Routing for Mobile Hosts.

Slides:



Advertisements
Similar presentations
Computer Networks with Internet Technology William Stallings
Advertisements

1 LINK STATE PROTOCOLS (contents) Disadvantages of the distance vector protocols Link state protocols Why is a link state protocol better?
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
Spring 2003CS 4611 Routing Outline Algorithms Scalability.
CSE331: Introduction to Networks and Security Lecture 9 Fall 2002.
Routing So how does the network layer do its business?
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 22 Introduction to Computer Networks.
Chapter 4 Distance Vector Problems, and Link-State Routing Professor Rick Han University of Colorado at Boulder
CCNA 2 v3.1 Module 6.
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.
1 ELEN 602 Lecture 19 Routing. 2 Overview Forwarding vs Routing –forwarding: to select an output port based on destination address and routing table –routing:
Routing and Routing Protocols
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.
CSS432 Routing Textbook Ch 3.3
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.
© Janice Regan, CMPT 128, CMPT 371 Data Communications and Networking Routing in the Internet Internal Routing Protocols.
TCP/IP Protocol Suite1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
Delivery, Forwarding and
Routing Algorithms (Ch5 of Computer Network by A. Tanenbaum)
Routing Concepts Warren Toomey GCIT. Introduction Switches need to know the link address and location of every station. Doesn't scale well, e.g. to several.
Routing Information Protocol (RIP). Intra-and Interdomain Routing An internet is divided into autonomous systems. An autonomous system (AS) is a group.
1 Routing Protocols. 2 Distributed Routing Protocols Rtrs exchange control info Use it to calculate forwarding table Two basic types –distance vector.
13-Sep-154/598N: Computer Networks Address Translation Map IP addresses into physical addresses –destination host –next hop router Techniques –encode physical.
Routing/Routed Protocols. Remember: A Routed Protocol – defines logical addressing. Most notable example on the test – IP A Routing Protocol – fills the.
1 Routing Protocols and Configuration Instructor: Te-Lung Liu Program Associate Researcher NCHC, South Region Office.
Spring 2008CS 3321 Intradomain Routing Outline Algorithms Scalability.
Unicast Routing Protocols  A routing protocol is a combination of rules and procedures that lets routers in the internet inform each other of changes.
1 Introducing Routing 1. Dynamic routing - information is learned from other routers, and routing protocols adjust routes automatically. 2. Static routing.
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.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 2 Module 6 Routing and Routing Protocols.
TCOM 515 Lecture 2. Lecture 2 Objectives Dynamic Routing Distance Vector Routing Link State Routing Interior vs Exterior RIP - Routing Information Protocol.
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.
1 Module 4: Implementing OSPF. 2 Lessons OSPF OSPF Areas and Hierarchical Routing OSPF Operation OSPF Routing Tables Designing an OSPF Network.
Link State Routing NETE0521 Presented by Dr.Apichan Kanjanavapastit.
CSS 432: Routing 1 CSS432 Routing Textbook Ch3.3 Professor: Munehiro Fukuda.
Lecture 17 November 8Intra-domain routing November 13Internet routing 1 November 15Internet routing 2 November 20End-to-end protocols 1 November 22End-to-end.
Spring 2006CS 3321 Intradomain Routing Outline Algorithms Scalability.
Routing and Routing Protocols
Cisco Systems Networking Academy S2 C 11 Routing Basics.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
Routing Networks and Protocols Prepared by: TGK First Prepared on: Last Modified on: Quality checked by: Copyright 2009 Asia Pacific Institute of Information.
TCOM 515 Lecture 2. Lecture 2 Objectives Dynamic Routing Distance Vectore Routing Link State Routing Interior vs Exterior RIP - Routing Information Protocol.
Routing protocols. Static Routing Routes to destinations are set up manually Route may be up or down but static routes will remain in the routing tables.
23-Dec-154/598N: Computer Networks Overview 4.2: Routing Forwarding vs Routing –forwarding: to select an output port based on destination address and routing.
1 Version 3.1 Module 6 Routed & Routing Protocols.
Dynamic Routing Protocols II OSPF
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
University of Delaware CPEG 4191 Distance Vector Routing – Dynamic Programming zLimited state information. Just the next hop and cost. A B D G F C H E.
1 Chapter 4: Internetworking (IP Routing) Dr. Rocky K. C. Chang 16 March 2004.
RIP Routing Protocol. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
Spring Routing: Part I Section 4.2 Outline Algorithms Scalability.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
Routing and Routing Protocols CCNA 2 v3 – Module 6.
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.
CSS432 Routing Textbook Ch3.3
Dynamic Routing Protocols II OSPF
Dynamic Routing Protocols part2
Routing and Switching Fabrics
Routing Information Protocol (RIP)
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Dynamic Routing Protocols part2
Dynamic Routing Protocols II OSPF
Intradomain Routing Outline Introduction to Routing
2. Fragmentation and Reassembly
Advanced Computer Networks
Routing Outline Algorithms Scalability Spring 2003 CS 332.
Routing and Switching Fabrics
Presentation transcript:

1 4.2 Routing Network as a Graph Distance Vector (RIP) Link State (OSPF) Metrics Routing for Mobile Hosts

2  Route a way or course taken in getting from a starting point to a destination send or direct along a specified course  Routing find the path or course of forwarding according to information contained in packet (destination)  Difference between network-layer and link-layer format of forwarding table way of updating the table

3 Link-layer  Forwarding table mapping from destination physical address (MAC address) to port of forwarding  Update of the table manually configured

4 IP (Network) Layer  Forwarding table mapping from destination network id (NetNum) to next-hop (or interface) of forwarding  Update the table manually configured (static route) dynamically learned from routing protocol

5 Forwarding vs. Routing  Forwarding taking a packet  looking at its destination address  consulting a table  sending the packet in a direction determined by that table locally done at a node  Routing the process by which forwarding tables are built depends on a distributed algorithm

6 Forwarding Table vs. Routing Table  Forwarding table used when a packet is being forwarded and so must contain enough information to accomplish the forwarding function a row in the forwarding table contains the mapping from a network number to an outgoing interface and some MAC information, such as the Ethernet address of the next hop

7  Routing table the table that is built up by the routing algorithms as a precursor to building the forwarding table it contains mappings from network numbers to next-hops (IP addresses)

8  Example, in the following tables the routing table tells us that network number 10 is to be reached by a next hop router with the IP address the forwarding table contains the information about exactly how to forward a packet to that next hop  send it out interface number 0 with a MAC address of 8:0:2b:e4:b:l:2 (the last piece of information is provided by the Address Resolution Protocol)

9 Network NumberNext Hop Network Number InterfaceMAC address 10if08:0:2b:e4:b:1:2 Example rows from (a) routing and (b) forwarding tables (a) (b)

Network as a Graph

11  Basic problem of routing 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

12  Solution routing is achieved in most practical networks by running routing protocols among the nodes these protocols provide a distributed, dynamic way to solve the problem of finding the lowest-cost path in the presence of  node or link failure  addition of new node or new link  changes of link cost it is difficult to make centralized solutions scalable, so all the widely used routing protocols use distributed algorithms

Distance Vector (RIP)  Distance-Vector Algorithm (Bellman-Ford Algorithm) each node constructs a one-dimensional array (a vector) containing the "distances" (costs) to all other nodes and distributes that vector to its immediate neighbors response when receiving an announcement from a neighbor  for every entry in the announcement, store it if the announced distance is shorter than what in the table  a better route is found  otherwise discard it

14 assumption  initially, each node knows the cost of the link to each of its directly connected neighbors  broken links are assigned an infinite cost, ∞

15  Local data structure routing table  destination  cost to the destination  corresponding next-hop

16 Distance Vector Algorithm  In this example the cost of each link is set to 1 a least-cost path is simply the one with the fewest hops

17 Initial State B AC D E FG Destination Y Node X’s Routing Table: Cost / Next-Hop A’sB’sC’sD’sE’sF’sG’s A01/A ∞ ∞ B1/B0 ∞∞∞∞ C1/C 0 ∞∞∞ D∞∞1/D0∞∞ E1/E∞∞∞0∞∞ F1/F∞∞∞∞0 G∞∞∞1/G∞ 0

18 Destination Y Cost/ Next-Hop ABCDEFGABCDEFG 0/ 1/B 1/C 2/C 1/E 1/F 2/F A’s routing table B AC D E FG Distance Vector sent by A

19 After One Step B AC D E FG Destination Y Node X’s Routing Table: Cost / Next-Hop A’sB’sC’sD’sE’sF’sG’s A01/A 2/C1/A 2/F B1/B0 2/C2/A ∞ C1/C 0 2/A 2/D D2/C 1/D0∞2/G1/D E1/E2/A ∞0 ∞ F1/F2/A 2/G2/A01/F G2/F∞2/D1/G∞ 0

20 After Two Steps B AC D E FG Destination Y Node X’s Routing Table: Cost / Next-Hop A’sB’sC’sD’sE’sF’sG’s A01/A 2/C1/A 2/F B1/B0 2/C2/A 3/F C1/C 0 2/A 2/D D2/C 1/D03/A2/G1/D E1/E2/A 3/C02/A3/F F1/F2/A 2/G2/A01/F G2/F3/C2/D1/G3/A1/G0 convergence: no more changes when getting further announcement

21  Two different circumstances for a node to send a routing update to its neighbors periodic update  each node automatically sends an update message every so often, even if nothing has changed triggered update  happens whenever a node receives an update from one of its neighbors that causes it to change one of the routes in its routing table  i.e., whenever a node's routing table changes, it sends an update to its neighbors, which may lead to a change in their tables, causing them to send an update to their neighbors

22 Link Failures  Example 1 (stable) F detects that link to G has failed F sets distance to G to infinity and sends update to A [F : (G, ∞, G)] A sets distance to G to infinity since it uses F to reach G [A : (G, ∞, F)] A receives periodic update from C with 2-hop path to G A sets distance to G to 3 and sends update to F [A : (G, 3, C)] F decides it can reach G in 4 hops via A [F : (G, 4, A)] Pattern : (Dest, Cost, NextHop)

23  Example 2 (count to infinity) link from A to E fails A advertises distance of infinity to E [A : (E, ∞, E)] B and C advertise a distance of 2 to E [B : (E, 2, A)] , [C : (E, 2, A)] B hears that E can be reached in 2 hops from C B decides it can reach E in 3 hops; advertises this to A [B : (E, 3, C)] A decides it can reach E in 4 hops; advertises this to C [A : (E, 4, B)] C decides that it can reach E in 5 hops… [C : (E, 5, A)] ∞

24  Loop-breaking heuristics (partial solutions) set infinity to 16 split horizon split horizon with poison reverse

25  Solution-1 (set infinity to 16) use some relatively small number as an approximation of infinity, which at least bounds the amount of time that it takes to count to infinity example, set the maximum number of hops to get across a certain network is never going to be more than 16 (set 16 to be infinity value) drawback  problem occurs if our network grew to a point where some nodes were separated by more than 16 hops

26  Solution-2 (split horizon) when a node sends a routing update to its neighbors, it does not send those routes it learned from each neighbor back to that neighbor example, if B has the route (E, 2, A) in its table, then it knows it must have learned this route from A, and so whenever B sends a routing update to A, it does not include the route (E, 2, A) in that update

27  Solution-3 (split horizon with poison reverse) (B actually sends that route back to A, but it puts negative information in the route to ensure that A will not eventually use B to get to E) Let B be a neighbor of A  if in the routing table of B, the next hop entry for destination Z is A, B informs A that its distance to Z is infinite [B : (Z, cost, A) → A : (Z, ∞, B)]

28  Solution 2 & 3 only work for routing loops that involve two nodes example, for larger routing loops  if B and C had waited for a while after hearing of the link failure from A before advertising routes to E  they would have found that neither of them really had a route to E

29 Routing Information Protocol (RIP)  One of the most widely used routing protocols in IP networks  A DV (Distance Vector) routing protocol  Rather than advertising the cost of reaching other routers, the routers advertise the cost of reaching networks example, in the following figure, router C would advertise to router A the fact that it can reach  networks 2 and 3 at cost 0 [C : (Net2, 0, Net2) , C : (Net3, 0, Net3)]  networks 5 and 6 at cost 1 [C : (Net5, 1, Net3) , C : (Net6, 1, Net3)]  network 4 at cost 2 [C : (Net4, 2, Net3)]

30 Example network running RIP

31  RIP packet format the majority of the packets is taken up with (network-address, distance) pairs example  if router A learns from router B that network X can be reached at a lower cost via B than via the existing next hop in the routing table  A updates the cost and next hop information for the network number accordingly

32 RIP packet format

33  RIP a fairly straightforward implementation of distance- vector routing routers running RIP send their advertisements every 30 seconds a router also sends an update message whenever an update from another router causes it to change its routing table

34 metrics or costs for routing  all link costs being equal to 1  always tries to find the minimum hop route  valid distances are 1 through 15, with 16 representing infinity (this limits RIP to running on fairly small networks-those with no paths longer than 15 hops)

Link State (OSPF)  Distance-Vector approach “tell neighbors where I can go, and how far”  Link-State approach “tell all which neighbors I have”

36  Link-state routing the second major class of intradomain routing protocol assumptions  each node is assumed to be capable of finding out the state of the link to its neighbors (up or down) and the cost of each link  Intradomain An internetwork in which all the routers are under the same administrative control (e.g., a single university campus, or the network of a single Internet service provider)

37  basic idea every node knows how to reach its directly connected neighbors, and if we make sure that the totality of this knowledge is disseminated to every node, then every node will have enough knowledge of the network to build a complete map of the network  link-state routing protocols rely on two mechanisms reliable dissemination of link-state information calculation of routes from the sum of all the accumulated link-state knowledge

38 Link-State Message Data Structure  LSP (Link-State Packet) an update packet created by each node information for route calculation  the ID of the node that created the LSP  a list of directly connected neighbors of the node, with the cost of the link to each one

39 information for reliability  a sequence number ensure having the most recent copy reset to zero when routing process restarted  a time to live (TTL) for this packet Too old packets are discarded

40 Reliable Flooding  Send local LSP out on all of its directly connected links  Each node receiving the LSP forwards it out on all of its links stores each node’s recent LSP forwards LSP to neighbors except the sender itself

41  The following figure shows an LSP being flooded in a small network each node becomes shaded as it stores the new LSP (a) the LSP arrives at node X, which sends it to neighbors A and C (b) A and C do not send it back to X, but send it on to B (c) B receives two identical copies of the LSP, it will accept whichever arrived first and ignore the second as a duplicate (d) B passes the LSP onto D, who has no neighbors to flood it to, and the process is complete

42

43 New LSP Generation  Two circumstances to generate new LSP expiry of a periodic timer change in topology  directly connected links go down detected by link-layer protocols  immediate neighbors go down detected by periodic “hello” message

44 Calculation of Route  Dijkstra’s Shortest Path Algorithm  Notations N: vertex set of the graph l: l(i, j) is the (non-negative) cost of the edge (i, j) s: current vertex M: set of ever calculated vertices C(n): cost of path from s to n

45  Calculate a minimum-cost tree from s M = {s} for each n in N-{s} C(n) = l(s,n) while (N != M) M = M union {w} such that C(w) is the minimum for all w in (N-M) for each n in (N-M) C(n) = MIN(C(n),C(w)+l(w,n))

46  In practice, each switch computes its routing table directly from the LSPs it has collected using a forward search approach for Dijkstris algorithm each switch maintains two lists, known as Tentative and Confirmed. each of these lists contains a set of entries of the form (Destination, Cost, NextHop)

47 Forward Search Approach for Dijkstra Algorithm 1. Initialize the Confirmed list with an entry for myself; this entry has a cost of For the node just added to the Confirmed list in the previous step, call it node Next, select its LSP. 3. For each neighbor (Neighbor) of Next, calculate the cost (Cost) to reach this Neighbor as the sum of the cost from myself to Next and from Next to Neighbor. (a) If Neighbor is currently not on either the Confirmed or the Tentative list, then add (Neighbor, Cost, NextHop) to the Tentative list, where NextHop is the direction I go to reach Next. (b) If Neighbor is currently on the Tentative list, and the Cost is less than the currently listed cost for Neighbor, then replace the current entry with (Neighbor, Cost, NextHop), where NextHop is the direction I go to reach Next. 4. If the Tentative list is empty, stop. Otherwise, pick the entry from the Tentative list with the lowest cost, move it to the Confirmed list, and return to step 2.

48 Example Link-state routing: an example network

(B, 11, B) → (C, 2, C) (B, 5, C) → (A, 12, C) (A, 10, C)

50 Open Shortest Path First Protocol (OSPF)  OSPF one of the most widely used link-state routing protocols  Open: refers to the fact that it is an open, nonproprietary standard, created under the auspices of the IETF  SPF: comes from an alternative name for link-state routing

51  OSPF adds the following features to the basic link-state algorithm authentication of routing messages additional hierarchy  OSPF introduces another layer of hierarchy into routing by allowing a domain to be partitioned into areas  a router within a domain does not necessarily need to know how to reach every network within that domain, but know only how to get to the right area  this reduces the amount of information that must be transmitted to and stored in each node

52 load balancing  OSPF allows multiple routes to the same place to be assigned the same cost and will cause traffic to be distributed evenly over those routes

53  There are several different types of OSPF messages, but all begin with the same header  OSPF header format Version: 2 Type: 1 through 5 SourceAddr: identifies the sender of the message AreaId: a 32-bit identifier of the area in which the node is located

Authentication type  the entire packet, except the authentication data, is protected by a 16-bit checksum using the same algorithm as the IP header  0: no authentication is used  1: a simple password is used  2: a cryptographic authentication checksum is used 54

55 OSPF header format

56  Five OSPF message types Type 1: "hello" message, which a router sends to its peers to notify them that it is still alive and connected Type 2~5: used to request, send, and acknowledge the receipt of link-state messages  Basic building block of link-state messages in OSPF is link- state advertisement (LSA) one message may contain many LSAs

57 OSPF packet format for link-state advertisement (Type 1)

58  OSPF link-state advertisement Type 1 LSAs: advertise the cost of links between routers Type 2 LSAs: advertise networks to which the advertising router is connected LS Age  the equivalent of a time to live, except that it counts up and the LSA expires when the age reaches a defined maximum value Type  tells us that this is a type 1 LSA

59 Link-state ID & Advertising router  in a type 1 LSA, these two fields are identical  each carries a 32-bit identifier for the router that created this LSA LS sequence number  detect old or duplicate LSAs LS checksum  verify that data has not been corrupted  it covers all fields in the packet except LS Age

60 Length  the length in bytes of the complete LSA Link ID, Link Data, & metric  each link in the LSA is represented by a Link ID, some Link Data, and a metric TOS  allow OSPF to choose different routes for IP packets based on the value in their TOS field

61 Metrics  Original ARPANET metric measures number of packets queued on each link took neither latency nor bandwidth into consideration  New ARPANET metric stamp each incoming packet with its arrival time ( AT ) record departure time ( DT ) when link-level ACK arrives, the node compute the packet delay Delay = (DT-AT) + Transmit + Latency if timeout (ACK did not arrive), DT is reset to the time the packet was retransmitted link cost = average delay over some time period

Routing for Mobile Hosts  Mobility issues in IP Networks once a mobile terminal moves to a new subnet, a correspondent node needs to use the mobile’s new IP address  it is difficult to force every possible correspondent node to keep track when a mobile terminal may change its IP address and what the mobile’s new address will be

63 Mobile IPv4

64

Home Network  Home address a globally unique and routable IP address preconfigured or dynamically assigned  Home network the network whose network address prefix matches that of the mobile terminal’s home address  Home agent (HA) maintain up-to-date location information for the mobile intercept packets addressed to the mobile’s home address tunnel packets to the mobile’s current location

Foreign Network  Care-of Address (CoA) assigned to the mobile by the foreign network a mobile uses its CoA to receive IP packets in the foreign network

 Foreign agent (FA) provides CoAs and other necessary configuration information (e.g., address of default IP router) to visiting mobiles de-tunnels packets from the tunnel sent from a visiting mobile’s HA and then delivers the packets to the visiting mobile acts as the IP default router for packets sent by visiting mobile terminals