Chapter 4 IP Routing Professor Rick Han University of Colorado at Boulder

Slides:



Advertisements
Similar presentations
Chapter 4 Distributed Bellman-Ford Routing
Advertisements

Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 22 Omar Meqdadi Department of Computer Science and Software Engineering University.
Week 5: Internet Protocol Continue to discuss Ethernet and ARP –MTU –Ethernet and ARP packet format IP: Internet Protocol –Datagram format –IPv4 addressing.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization –All routers are identical –Network is flat. Not true in Practice Hierarchical.
1 Comnet 2010 Communication Networks Recitation 6 Routing.
Nov 04, 2004CS573: Network Protocols and Standards1 IP Routing: GGP and RIP Network Protocols and Standards Autumn
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
Chapter 4 IP Multicast Professor Rick Han University of Colorado at Boulder
CSE331: Introduction to Networks and Security Lecture 7 Fall 2002.
15-744: Computer Networking L-5 Intra-Domain Routing.
Chapter 3 Ethernet Bridges & Switches, ATM Switching Professor Rick Han University of Colorado at Boulder
15-744: Computer Networking L-5 Intra-Domain Routing.
Extending Networks. Three Levels of Extension Physical Layer –Repeaters Link Layer –Bridges –Switches Network –Routers: “Connecting networks”
CSE 461: Distance Vector Routing. Next Topic  Focus  How do we calculate routes for packets?  Routing is a network layer function  Routing Algorithms.
1 Computer Networks Routing Algorithms. 2 IP Packet Delivery Two Processes are required to accomplish IP packet delivery: –Routing discovering and selecting.
Computer Networking Intra-Domain Routing, Part I RIP (Routing Information Protocol)
TCP/IP Protocol Suite1 Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. Chapter 11 Unicast Routing Protocols.
Routing Information Protocol (RIP). Intra-and Interdomain Routing An internet is divided into autonomous systems. An autonomous system (AS) is a group.
Distance Vector Routing Protocols W.lilakiatsakun.
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
Review: routing algorithms. –Choose the appropriate paths. –Routing algorithms Flooding Shortest path routing (example). –Dijkstra algorithm. –Bellman-Ford.
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.
Slide /2009COMM3380 Routing Algorithms Distance Vector Routing Each node knows the distance (=cost) to its directly connected neighbors A node sends.
CS551: Unicast Routing Christos Papadopoulos (
Network Layer r Introduction r Datagram networks r IP: Internet Protocol m Datagram format m IPv4 addressing m ICMP r What’s inside a router r Routing.
Packet-Switching Networks Routing in Packet Networks.
1 Chapter 22 Network layer Delivery, Forwarding and Routing (part2)
1 IP Forwarding Relates to Lab 3. Covers the principles of end-to-end datagram delivery in IP networks.
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.
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.
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.
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.
Internet Protocols. ICMP ICMP – Internet Control Message Protocol Each ICMP message is encapsulated in an IP packet – Treated like any other datagram,
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
Spring 2000CS 4611 Routing Outline Algorithms Scalability.
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.
Network Layer (2). Review Physical layer: move bits between physically connected stations Data link layer: move frames between physically connected stations.
CS 6401 Intra-domain Routing Outline Introduction to Routing Distance Vector Algorithm.
4. Interconnecting Networks: Routers. © Tallal Elshabrawy 2 Bridges Vs Routers BRIDGES DO WELL IN SMALL (FEW HUNDRED HOSTS) WHILE ROUTERS USED IN LARGE.
CSE 421 Computer Networks. Chapter 4 Network Layer Thanks to you All material copyright J.F Kurose and K.W. Ross, All Rights Reserved Computer.
Chapter 7 Packet-Switching Networks Shortest Path Routing.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Chapter 4: Network Layer
Chapter 4 Network Layer Computer Networking: A Top Down Approach 6th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 CPSC 335 Data Communication.
Dynamic Routing Protocols part2
(How the routers’ tables are filled in)
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
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Dynamic Routing Protocols part2
Routing in Packet Networks Shortest Path Routing
RFC 1058 & RFC 2453 Routing Information Protocol
Communication Networks NETW 501
Chapter 4: Network Layer
Chapter 4: Network Layer
2. Fragmentation and Reassembly
Chapter 4: Network Layer
Communication Networks
EE 122: Intra-domain routing: Distance Vector
Communication Networks
Chapter 4: Network Layer
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
Chapter 5: Link Layer 5.1 Introduction and services
Presentation transcript:

Chapter 4 IP Routing Professor Rick Han University of Colorado at Boulder

Prof. Rick Han, University of Colorado at Boulder Announcements Reminder: Programming assignment #1 is due Feb. 19 Part of Homework #2 available on Web site, due Feb. 26 Last week’s lecture are now on Web site Next, IP routing, …

Prof. Rick Han, University of Colorado at Boulder Recap of Previous Lecture Routing to connect remote LANs Encapsulation Internet Protocol (IPv4) Connects Networks of Networks “Best-Effort” Service IP Packet Header – 20 bytes TTL IP Addressing – 32 bit, heirarchy, IP Fragmentation and Reassembly Address Resolution Protocol (ARP)

Prof. Rick Han, University of Colorado at Boulder Address Resolution Protocol (ARP) Given a known IP address, ARP returns the desired Ethernet MAC address If sending to a host on the same Ethernet, First, check cache if address already present If not, send an Ethernet’s broadcast query (all 1’s in 48-bit address) with “target IP” address Target host responds with its IP address ARP updates its cache Requesting Node Destination Node IP Eth Hdr ARP query Eth. Header has dest. MAC ARP response

Prof. Rick Han, University of Colorado at Boulder ARP (2) What if destination host is on a remote LAN? No local host will respond to broadcast ARP query Solution: IP end host sends to IP network, which routes packet to destination IP host ARP is performed separately on LAN 1 and LAN 2 Destination Node Requesting Node IP Router LAN1 LAN2

Prof. Rick Han, University of Colorado at Boulder ARP (3) On LAN 1: IP routers broadcast ICMP “router advertisements” on local LAN or impatient end host broadcasts “solicitations” When IP end host wants to send outside of LAN, it does ARP request to find MAC address of router’s IP interface address to LAN, if not already cached Sends a packet containing encapsulated by Eth. Header containing dest. MAC address of IP router Destination Node Requesting Node IP Router LAN1 LAN2

Prof. Rick Han, University of Colorado at Boulder ARP (4) On LAN 2: IP packet with arrives at IP router on LAN 2 IP router does an ARP request to find MAC address of dest IP end host, if not already cached Sends a packet containing encapsulated by Eth. Header containing dest. MAC address of dest IP end host Proxy ARP when only one router between two LANs Destination Node Requesting Node IP Router LAN1 LAN2

Prof. Rick Han, University of Colorado at Boulder Forwarding Datagrams Router C Router D Router B Router E Router X Router Y Host 1 Host 2 Host 3 DestinationOutput Port Host 1X-B link Host 2E-B link Host 3D-B link Host 4C-B link Routing Table at Router B Host 4

Prof. Rick Han, University of Colorado at Boulder Forwarding Datagrams (2) Router C Router D Router B Router E Router X Router Y Host 1 Host 2 Host 3 DestinationOutput Port Host 1B-E link Host 2Y-E link Host 3D-E link Host 4C-E link Routing Table at Router E Host 4

Prof. Rick Han, University of Colorado at Boulder Forwarding Datagrams (3) DestinationOutput Port Host 1B-E link Host 2Y-E link Host 3D-E link Host 4C-E link Routing Table at Router E Only need to know the destination address to route the datagram to output port. Compare to: VC routing tables had 4 columns: input VC, input port, output VC, output port Ethernet Bridge tables store the source address and source port/LAN, but forwards using destination address

Prof. Rick Han, University of Colorado at Boulder Forwarding Datagrams (4) DestinationOutput Port Host 1B-E link Host 2Y-E link Host 3D-E link Host 4C-E link Routing Table at Router E Each datagram travels its own independent path: There is no connection unlike VCs “Connectionless” datagram networks “Connection-oriented” virtual circuits

Prof. Rick Han, University of Colorado at Boulder Forwarding Datagrams (5) DestinationOutput Port Host 1B-E link Host 2Y-E link Host 3D-E link Host 4C-E link Routing Table at Router E Each routing table has to contain a complete list of all of the hosts on the net and how to get to them (next hop output port) Implications on scalability Compare to VC’s, where each switch only needed to keep in its table the virtual circuits that ran through the switch

Prof. Rick Han, University of Colorado at Boulder Internet Routing “Routing” helps to fill in the IP forwarding tables IP routing employs a distributed algorithm to calculated the shortest path through a graph Many challenges to make distributed algorithms work well Router C Router D Router B Router E Router X Router Y Host 1 Host 2 Homogeneous IP routing fabric

Prof. Rick Han, University of Colorado at Boulder Internet Routing (2) Routing algorithms view the network as a graph Problem: find lowest cost path between two nodes. What info is required for solution? Need complete topology info Need link costs Two types of distributed algorithms: Distance vector (RIP) Link state (OSPF)

Prof. Rick Han, University of Colorado at Boulder Distance Vector (RIP) Employed in the early Arpanet RIP = Routing Information Protocol A specific implementation of distance-vector routing Distributed next hop computation Unit of information exchange Vector of distances to destinations Distributed Bellman-Ford Algorithm

Prof. Rick Han, University of Colorado at Boulder Distance Vector (2) Start Conditions: Each router starts with a vector of distances to all directly attached networks Send step: Each router advertises its current vector to all neighboring routers Receive step: Upon receiving vectors from each of its neighbors, router computes its own distance to each neighbor Then, for every network X, router finds that neighbor who is closer to X than any other neighbor Router updates its cost to X After doing this for all X, router goes to send step

Prof. Rick Han, University of Colorado at Boulder Distance Vector (3) Example courtesy of Prof. Srini Seshan at CMU A B E C D Info at Node A B C D ABC 07~ 701 ~10 ~~ Distance to Node D ~ ~ 2 0 E18~2 1 8 ~ 2 0 E Global minimum distance table, each row is a condensed forwarding table for node i

Prof. Rick Han, University of Colorado at Boulder Distance Vector (4) A B E C Dest. at Node A B C D DistanceVia Neighbor --B E B B E E Dest. Node A B C D BE -- Distance via Neighbor E-- Format of Distance Table in A Format of Routing/Forwarding Table in A

Prof. Rick Han, University of Colorado at Boulder E Receives D’s Routes; Updates Cost Info at Node A B C D ABC 07~ 701 ~10 ~~2 Distance to Node D ~ ~ 2 0 E ~ 2 0 E A B E C D Global minimum distance table, Node i only sees info on its row, not entire global view

Prof. Rick Han, University of Colorado at Boulder A receives B’s; Updates Cost Info at Node A B C D ABC ~10 ~~2 Distance to Node D ~ ~ 2 0 E ~ 2 0 E A B E C D

Prof. Rick Han, University of Colorado at Boulder A receives E’s routes; Updates Costs Info at Node A B C D ABC ~10 ~~2 Distance to Node D 3 ~ 2 0 E ~ 2 0 E A B E C D For every dest. node X, router finds that neighbor who is closer to X than any other neighbor & updates its cost to X

Prof. Rick Han, University of Colorado at Boulder Final Distances Info at Node A B C D ABC Distance to Node D E E A B E C D Topology/distance info ripples outward from each node from every other node

Prof. Rick Han, University of Colorado at Boulder Link Failure Causes “Bouncing” Effect A B C B C2 1 destcost X B B via A C1 1 destcost C A via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder B Notices A-B Link Failure A 25 1 B C B notices failure, resets cost via A to infinity in distance table (not shown), & knows cost via C is 26 B C2 1 destcost B B via A C1 26 destcost C C via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder C Sends Dist. Vector to B A 25 1 B C B C2 1 destcost B B via A C1 3 destcost C C via A B1 2 destcost B B via C sends routing update to B

Prof. Rick Han, University of Colorado at Boulder B Updates Distance to A A 25 1 B C Packet sent from C to A bounces between C and B until TTL=0! B C2 1 destcost B B via A C1 3 destcost C C via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder B Sends Dist. Vector to C A 25 1 B C C adds one to B’s advertised distance to A. (Why does C override its stored distance of 2 to A with 4, larger value?) B C2 1 destcost B B via A C1 3 destcost C C via A B1 4 destcost B B via

Prof. Rick Han, University of Colorado at Boulder C Sends Dist. Vector to B A 25 1 B C B adds one to C’s advertised distance to A. (overrides its stored distance of 3 to A with 5, larger value) B C2 1 destcost B B via A C1 5 destcost C C via A B1 4 destcost B B via

Prof. Rick Han, University of Colorado at Boulder Link Failure: Bad News Travels Slowly A 25 1 B C After 20+ exchanges, routing tables look like this: B C25 26 destcost C C via A C1 25 destcost C C via A B1 24 destcost B B via Assume A has advertised its link cost of 25 to C during B C exchanges. C stores this cost in its distance table (not shown)

Prof. Rick Han, University of Colorado at Boulder Bad News Travels Slowly (2) A 25 1 B C C increments B’s update by 1, and chooses 25 via A to A, instead of 26 Via B to A B C25 26 destcost C C via A C1 25 destcost C C via A B1 25 destcost B A via

Prof. Rick Han, University of Colorado at Boulder Bad News Travels Slowly (3) A 25 1 B C After 25 B-C exchanges, finally converge to stable routing B C25 26 destcost C C via A C1 26 destcost C C via A B1 25 destcost B A via

Prof. Rick Han, University of Colorado at Boulder Link Failure Causes “Counting to Infinity” Effect A B C B C2 1 destcost X B B via A C1 1 destcost C A via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder B Notices A-B Link Failure A 25 1 B C B notices failure, resets cost to 26 B C2 1 destcost B B via A C1 26 destcost C C via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder C Sends Dist. Vector to B A 25 1 B C B C2 1 destcost B B via A C1 3 destcost C C via A B1 2 destcost B B via C sends routing update to B

Prof. Rick Han, University of Colorado at Boulder A-C Link Fails A 1 B C C detects link to A has failed, but no change in C’s routing table (why?) A C1 3 destcost C C via A B1 2 destcost B B via

Prof. Rick Han, University of Colorado at Boulder Now, B and C Count to Infinity A 1 B C A C1 3 destcost C C via A B1 4 destcost B B via

Prof. Rick Han, University of Colorado at Boulder How are These Loops Caused? Observation 1: –B’s metric increases Observation 2: –C picks B as next hop to A –But, the implicit path from C to A includes itself (C ) !

Prof. Rick Han, University of Colorado at Boulder Solution 1: Holddowns If metric increases, delay propagating information –In our example, B delays advertising route –C eventually thinks B’s route is gone, picks its own route –B then selects C as next hop Adversely affects convergence from failures

Prof. Rick Han, University of Colorado at Boulder Other “Solutions” Split horizon –C does not advertise route to B when it sends its distance vector Poisoned reverse –C advertises route to B with infinite distance in its distance vector Works for two node loops –Does not work for loops with more nodes

Prof. Rick Han, University of Colorado at Boulder Avoiding the Counting to Infinity Effect Select loop-free paths One way of doing this: –Each route advertisement carries entire path –If a router sees itself in path, it rejects the route BGP does it this way Space proportional to diameter

Prof. Rick Han, University of Colorado at Boulder Loop Freedom at Every Instant? Does bouncing effect avoid loops? –No! Transient loops are still possible –Why? Because implicit path information may be stale –See this in BGP convergence Only way to fix this –Ensure that you have up-to-date information by explicitly querying

Prof. Rick Han, University of Colorado at Boulder Distance Vector in Practice RIP and RIP2 –Uses split-horizon/poison reverse BGP –Propagates entire path –Path also used for effecting policies

Prof. Rick Han, University of Colorado at Boulder Example Where Split Horizon Fails A When link breaks, C marks D as unreachable and reports that to A and B Suppose A learns it first –A now thinks best path to D is through B – A reports D unreachable to B and a route of cost=3 to C C thinks D is reachable through A at cost 4 and reports that to B B reports a cost 5 to A who reports new cost to C etc... X B C D