CSS432 Routing Textbook Ch3.3

Slides:



Advertisements
Similar presentations
CSCI-1680 Network Layer: Intra-domain Routing Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Rodrigo Fonseca.
Advertisements

Computer Networks with Internet Technology William Stallings
Courtesy: Nick McKeown, Stanford
CSE Computer Networks Prof. Aaron Striegel Department of Computer Science & Engineering University of Notre Dame Lecture 11 – February 16, 2010.
1 LINK STATE PROTOCOLS (contents) Disadvantages of the distance vector protocols Link state protocols Why is a link state protocol better?
Spring 2003CS 4611 Routing Outline Algorithms Scalability.
CSE331: Introduction to Networks and Security Lecture 9 Fall 2002.
CMPE 150- Introduction to Computer Networks 1 CMPE 150 Fall 2005 Lecture 22 Introduction to Computer Networks.
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:
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.
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)
1 CS 4396 Computer Networks Lab Dynamic Routing Protocols - II OSPF.
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.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 14 Routing Protocols RIP, OSPF, BGP.
13-Sep-154/598N: Computer Networks Address Translation Map IP addresses into physical addresses –destination host –next hop router Techniques –encode physical.
Spring 2008CS 3321 Intradomain Routing Outline Algorithms Scalability.
10/13/2015© 2008 Raymond P. Jefferis IIILect 07 1 Internet Protocol.
1 Network Layer Lecture 13 Imran Ahmed University of Management & Technology.
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.
TCP/IP Protocol Suite 1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
CSS 432: Routing 1 CSS432 Routing Textbook Ch3.3 Professor: Munehiro Fukuda.
TCOM 509 – Internet Protocols (TCP/IP) Lecture 06_a Routing Protocols: RIP, OSPF, BGP Instructor: Dr. Li-Chuan Chen Date: 10/06/2003 Based in part upon.
Spring 2006CS 3321 Intradomain Routing Outline Algorithms Scalability.
Routing and Routing Protocols
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
ICS 156: Networking Lab Magda El Zarki Professor, ICS UC, Irvine.
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.
Dynamic Routing Protocols II OSPF
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
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.
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.
TRANSPORT LAYER BY, Parthasarathy.g.
NAT – Network Address Translation
Scaling the Network Chapters 3-4 Part 2
Dynamic Routing Protocols II OSPF
Dynamic Routing Protocols part2
Routing BY, P.B.SHANMATHI.
Routing and Switching Fabrics
Routing Information Protocol (RIP)
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
ICMP ICMP – Internet Control Message Protocol
Intra-Domain Routing Jacob Strauss September 14, 2006.
Routing: Distance Vector Algorithm
Routing.
Dynamic Routing Protocols part2
Dynamic Routing Protocols II OSPF
Routing in Packet Networks Shortest Path Routing
Intradomain Routing Outline Introduction to Routing
CS 640: Introduction to Computer Networks
PRESENTATION COMPUTER NETWORKS
2. Fragmentation and Reassembly
Internetworking - We are heterogeneity to our network (variable network technologies, bandwidth, MTU, latency, etc. etc.) Goal is to use this opportunity.
Computer Networking Lecture 10: Intra-Domain Routing
The University of Adelaide, School of Computer Science
Communication Networks
Advanced Computer Networks
EE 122: Intra-domain routing: Distance Vector
Routing Outline Algorithms Scalability Spring 2003 CS 332.
Routing and Switching Fabrics
Routing.
Presentation transcript:

CSS432 Routing Textbook Ch3.3 Prof. Athirai Irissappane http://courses.washington.edu/css432/athirai/ athirai@uw.edu CSS 432: Routing

What Is Routing? Forwarding vs Routing forwarding: routing: To map a network # to an outgoing interface and some MAC information in a forwarding table. To send a packet to an interface as consulting a local and static forwarding table OSI Layer 2: data link level Implemented in specialized hardware (switch) routing: To build a dynamic routing table To update table contents in a dynamic and distributed fashion OSI Layer 3: network level (internet) Using complex distributed algorithms CSS 432: Routing

The University of Adelaide, School of Computer Science 3 January 2018 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 Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 3 January 2018 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 What is the solution? Need a distributed and dynamic protocol Two main classes of protocols Distance Vector Link State Chapter 2 — Instructions: Language of the Computer

Distance Vector Each node maintains a set of triples (Destination, Cost, NextHop) Starting assumption is that each node knows the cost of the link to each of its directly connected neighbors An initial distance vector at node A Destination Cost Next hop B 1 C D ∞ - E F G CSS 432: Routing

The University of Adelaide, School of Computer Science 3 January 2018 Distance Vector Initial distances stored at each node (global view) Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 3 January 2018 Distance Vector The distance vector routing algorithm is sometimes called as Bellman-Ford algorithm Every T seconds each router sends its distances to its neighbor who then updates their table based on the new information Problems include fast response to good news and slow response to bad news. Also too many messages to update Chapter 2 — Instructions: Language of the Computer

Distance Vector Exchange updates directly connected neighbors periodically (on the order of several seconds) whenever table changes/ notices failure (called triggered update) Each update is a list of pairs (the routing table): (Destination, Cost) (and next hop) From B: (A, 1), (C, 1) From C: (A, 1), (B, 1), (D, 1) From E: (A, 1) From F: (A, 1), (G, 1) Update local table if receive a “better” route From B: (C,1) (C, 1, C) < (C, 2, B) From C: (D, 1) (D, ∞, - ) > (D, 2, C) From F: (G, 1) (G, ∞, - ) > (G, 2, F) Refresh existing routes; delete if they are expired Destination Cost Next hop B 1 C D 2 E F G CSS 432: Routing

The University of Adelaide, School of Computer Science 3 January 2018 Distance Vector F sends (G, 1) to A F can reach G with cost 1 A can reach F with cost 1 A can reach G with cost 2 (< infinity so update table) C sends (D, 1) to A C can reach D with cost 2 A can reach D with cost 2 (< infinity so update table) C sends (B,1) to A A can reach B with cost 2 (> 1 so do not update table) Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 3 January 2018 Distance Vector Final distances stored at each node (global view – not known by the routers, who only know their row entry) Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 3 January 2018 Distance Vector The routing table at each node stabilizes, i.e., become consistent, converges Updates from neighbors Periodically Triggered Node notices a link failure Receives an update from neighbors that causes a change in its routing table Chapter 2 — Instructions: Language of the Computer

Routing Loop ∞ Failure-recovering scenario F detects the link to G has failed F sets distance to G to ∞ and sends an update to A A sets distance to G to ∞ A receives periodic update from C with a 2-hop path to G A sets distance to G to 3 and sends update to F F sets distance to G in 4 hops via A ∞ CSS 432: Routing

Count-to-infinity problem The link from A to E fails (triggered/periodic update) A advertises (to neighbors) , (E, ∞) At same time, C does not know about E, as periodic update, advertises (E, 2) B decides it can reach E in 3 hops (via C) B receives (E, ∞) from A, (E, 2) from C B changes its Routing table (triggers update) B advertises (E, 3) A decides it can reach E in 4 hops (via B) A receives (E, 3) from B Routing table of A has changes (triggered update) A advertises (E, 4) C decides that it can reach E in 5 hops… Cycle goes on until cost get near to infinity A B Destination Cost Next hop B 1 C D 2 E F G Destination Cost Next hop A 1 C B D 2 E F G 3 4 ∞ B E 3 C To see the problem clearly, imagine a subnet connected like A–B–C–D–E–F, and let the metric between the routers be "number of jumps". Now suppose that A is taken offline. In the vector-update-process B notices that the route to A, which was distance 1, is down – B does not receive the vector update from A. The problem is, B also gets an update from C, and C is still not aware of the fact that A is down – so it tells B that A is only two jumps from C (C to B to A), which is false. Since B doesn't know that the path from C to A is through itself (B), it updates its table with the new value "B to A = 2 + 1". Later on, B forwards the update to C and due to the fact that A is reachable through B (From C's point of view), C decides to update its table to "C to A = 3 + 1". This slowly propagates through the network until it reaches infinity (in which case the algorithm corrects itself, due to the relaxation property of Bellman–Ford). Destination Cost Next hop A 1 B D E 2 F G C 5

Loop-Breaking Heuristics Set infinity to 16 Scheme: Stop an infinity loop in 16. Problem: No more 16 hops Split horizon Scheme: Don’t send a neighbor the routing information learned from this neighbor. Ex. B includes (E, 2, A) and thus doesn’t send (E, 2) to A Split horizon with poison reverse Scheme: Send the routing information learned from this neighbor as setting hop count to ∞. Ex. B includes (E, 2, A) and thus sends (E, ∞, A) Problem: Its slow convergence speed for large number of nodes, works for 2 node case CSS 432: Routing

Routing Information Protocol (RIP) Same as Distance Vector Routing (for graph model) RIP for internetwork Instead of cost of reaching other routers, it specifies cost of reaching networks E.g., Router C advertises to Router A It can reach Networks 2, 3 at cost 0. CSS 432: Routing

Routing Information Protocol (RIP) frame header datagram heaader UDP header RIP Message Cmd: 1-6 1: request 2: reply Port: 520 Used by routed Advertisement: 30secs Table entry timeout: 3 mins. Deleted in 60secs Cmd Ver Routing domain Addr family (net addr) Route tag Address of net 1 Subnet mask Next hop address (1-16) Distance to net 1 Addr family (net addr) Route tag Address of net 2 Subnet mask Next hop address Distance to net 2 (1-16) 25 entries https://tools.ietf.org/html/rfc2453

The University of Adelaide, School of Computer Science 3 January 2018 Link State Routing Strategy: Send to all nodes (not just neighbors) information about directly connected links (not entire routing table). Reliable flooding: Most recent copy of information about the directly connected links of all nodes Route Calculation: Find the best route to destinations using the available information Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 3 January 2018 Link State Routing Strategy: Send to all nodes (not just neighbors) information about directly connected links (not entire routing table). Each node creates Link State Packet (LSP) id of the node that created the LSP cost of link to each directly connected neighbor sequence number (SEQNO) time-to-live (TTL) for this packet Reliable Flooding start SEQNO at 0 when reboot generate new LSP periodically; increment SEQNO store most recent LSP (larger the SEQNO, newer the LSP) from each node If received LSP is new forward LSP to all nodes but one that sent it decrement TTL of each LSP before forwarding; discard when TTL=0 Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 3 January 2018 Link State Reliable Flooding Flooding of link-state packets. (a) LSP arrives at node X; (b) X floods LSP to A and C; (c) A and C flood LSP to B (but not X); (d) flooding is complete Chapter 2 — Instructions: Language of the Computer

The University of Adelaide, School of Computer Science 3 January 2018 Shortest Path Routing # Chapter Subtitle In practice, each router computes its routing table directly from the LSP’s it has collected using a realization of Dijkstra’s algorithm called the forward search algorithm Specifically each router maintains two lists, known as Tentative and Confirmed (route already calculated) Each of these lists contains a set of entries of the form (Destination, Cost, NextHop) Chapter 2 — Instructions: Language of the Computer

Dijkstra’s Shortest-Path Algorithm Initialize Confirmed list with (myself, 0, -), Tentative with null list For the node just added to the Confirmed list in the previous step, call it node Next, select its LSP For each neighbor (Neighbor) of Next, calculate the cost (Cost) to reach Neighbor as the sum of the cost from myself to Next and from Next to Neighbor If Neighbor is currently on neither the Confirmed nor the Tentative list, then add (Neighbor, Cost, Nexthop) to the Tentative list, where Nexthop is the direction I go to reach Next, 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 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. Myself: node whose routing table is to be computed Do not consider the LS information for destination nodes already present in the confirmed list CSS 432: Routing

Dijkstra’s Shortest-Path Algorithm CSS 432: Routing

Dijkstra’s Shortest-Path Algorithm CSS 432: Routing

Dijkstra’s Shortest-Path Algorithm CSS 432: Routing

Dijkstra’s Shortest-Path Algorithm CSS 432: Routing

Dijkstra’s Shortest-Path Algorithm CSS 432: Routing

Dijkstra’s Shortest-Path Algorithm CSS 432: Routing

Dijkstra’s Shortest-Path Algorithm CSS 432: Routing

OSPF Open Shortest Path first Protocol OSPF (Protocol uses link state routing) Authenticate information exchanged Hierarchy: divide domains into areas Load Balancing: Multiple routers to same destination same cost to distribute load 5 types of messages OSPF needs to provide information about how to reach networks A router running OSPF generates the following Link State advertisements LSA: Advertisements about networks directly connected to router Cost of the link to another router CSS 432: Routing

Open Shortest Path First Protocol (OSPF) frame header datagram header OSPF header OSPF Message Version Type(=4) AreaId Message Length Checksum Authentication 0-3 Authentication type SourceAddr Authentication 4-7 # of link status advertisements Link-state ID LS Age Options Advertising router LS sequence number Link Checksum Length Flag # of links Type=1 Link ID Link data Metric Num TOS Link type Optional TOS information Header Hello (reachability) (Type=1) Database description (topology) (Type=2) Link status request (Type=3) Link status update (Type=4) Link status acknowledgment (Type=5) Advertisement (header type=4) LS Age: = TTL Type=1: link cost b/w routers Link-State ID = Advertising Router Seq # from the same router Link ID = the other end route ID of link Link data = used if there are two or more links to the same router Metric = link cost Link type = P2P, ethernet, etc TOS = delay-sensitive, etc CSS 432: Routing

OSPF Con’td Gated daemon: directly uses IP datagram. Header Type2: Database description (topology) message Used when the current topology has changed. Sent from an initialized router to another router which has a topology information LS Sequence number Used to determine which message is the latest Send a message with a new sequence number and metric= ∞ when a router or a link fails. CSS 432: Routing

Metrics Cost of Links? Original ARPANET metric All links cost 1 (shortest path = lowest number of hops) Does not consider latency, bandwidth, current traffic Original ARPANET metric measures number of packets queued waiting to be transmitted on each link took neither latency or bandwidth into consideration Moves packets towards the shortest queue than to destination Artificial measure of load CSS 432: Routing

Metrics New ARPANET metric stamp each incoming packet at queue with its arrival time (AT) record departure time (DT) from router when link-level ACK arrives, compute Delay = (DT - AT) + Transmit + Latency if timeout, reset DT to departure time for retransmission link cost = average delay over some time period Fine Tuning (metric should vary smoothly with time, not with very high variation) compressed dynamic range (range at which the metric can fluctuate) replaced Delay with link utilization CSS 432: Routing

VPN ‘Virtual’ Private Network Actually not a private network but virtually private Public network made virtually private IP tunneling Create a tunnel such that hosts have limited connectivity Routers are at the beginning and end of the tunnel At the beginning of the tunnel encapsulate the IP datagram into another IP datagram with destination address of the end router Once the packet reaches the end router, it extracts the original packet from the payload and send it to the destination CSS 432: Routing

Virtual Private Networks and Tunnels Application Level A 10.0.0.1 20.0.0.1 B Router Dest router Source router Router Level 10.0.0.1 20.0.0.1 A B To: 20.0.0.1 To: 215.0.0.1 To: 10.0.0.2 To: 20.0.0.1 Internet C 215.0.0.1 A can communicate only with B Even though it uses a router that can send messages to the rest of the internet A’s messages are tunneled and will read 215.0.0.1 which connects to B A can never connect with other members in the internet Company Branch Company Branch Physical Network Level To: 20.0.0.1 A To: 215.0.0.1 To: 20.0.0.1 B To: 215.0.0.1 10.0.0.1 20.0.0.1 To: 215.0.0.1 CSS 432: Routing

Why VPN? Security Routers Carry No-IP packets Mobile IPs The final destination/contents of packet cannot be easily intercepted. Routers Routers with special features such as multicasting can form a virtual network. Carry No-IP packets Packets may be non-IP compatible packets. Mobile IPs The final destination may be a mobile computer. CSS 432: Routing

NAT Network Address Translation Reduce the distribution of IP address All hosts need not have a globally unique IP address Hosts need to have a unique address within the private network. Hosts of Private Network have unique addresses within the network If hosts need to communicate they go though the NAT box (implemented on the router, etc) The NAT box translates the private IP into IP address of the device The device implementing NAT is given 1/more globally unique IP While sending data to the internet, the senders address will be masqueraded as the global IP assigned The hosts outside the private network can send data only to the global IP The NAT box then sends the data to the respective receiver Host from the internet, outside the private network cannot communicate (initiate communication) with the hosts inside the private network Hosts inside the private network can initiate communication with hosts in the internet 2 hosts inside the private network can communicate with the internet using the same global address. They will use different ports in the NAT device

Mobile IP Sending host, Home Agent, Mobile Host belong to the same private network How Sending host can send data to the Mobile agent? How does the home agent intercept a packet that is destined for the mobile agent? --- Use ARP How does the home agent then deliver the packet to the mobile host? – Use DHCP and VPN Sending host 10.0.0.3 Internet Home agent DHCP server 12.0.0.6 Mobile Host 10.0.0.9 (12.0.0.7) Mobile Host CSS 432: Routing

Mobile IP (Cont’d) Internet 1. ARP request: What’s the physical addr corresponding to 10.0.0.9? Sending host 3. Packet request: sends a packet destined for 10.0.0.9 to the home agent’s MAC address 2. ARP response: sends back MAC of 10.0.0.3 instead of 10.0.0.9 1. DHCP: receives a new IP in the foreign network. 10.0.0.3 Internet Home agent DHCP server 12.0.0.6 IP tunneling: wraps the packet inside an IP header destined for the mobile host (12.0.0.7). Mobile Host 10.0.0.9 (12.0.0.7) Mobile Host 2. Care-of-address: a mobile host informs its Home agent of its original and new IPs. CSS 432: Routing

Reviews Exercises in Chapter 3 RIP: distance vector, routing loop and breaking heuristics OSPF: link state, Dijkstra’s shortest path algorithm VPN and mobile IP Exercises in Chapter 3 Ex. 46 (RIP) CSS 432: Routing