Cs/ee 143 Communication Networks Chapter 5 Routing Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech.

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

Cs/ee 143 Communication Networks Routing Misc Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech.
Outline  Recap Network components & basic mechanisms Routing Flow control  Continue Basic queueing analysis Construct routing table.
Chapter 4 Distributed Bellman-Ford Routing
COS 461 Fall 1997 Routing COS 461 Fall 1997 Typical Structure.
Cs/ee 143 Communication Networks Chapter 6 Internetworking Text: Walrand & Parekh, 2010 Steven Low CMS, EE, Caltech.
Data Communications and Computer Networks Chapter 4 CS 3830 Lecture 22 Omar Meqdadi Department of Computer Science and Software Engineering University.
Courtesy: Nick McKeown, Stanford
Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol –Datagram format.
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.
14 – Inter/Intra-AS Routing
ROUTING ON THE INTERNET COSC Aug-15. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
Computer Networks Layering and Routing Dina Katabi
Transport Layer 3-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012  CPSC.
Chapter 22 Network Layer: Delivery, Forwarding, and Routing
1 Computer Communication & Networks Lecture 22 Network Layer: Delivery, Forwarding, Routing (contd.)
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.
Routing protocols Basic Routing Routing Information Protocol (RIP) Open Shortest Path First (OSPF)
Network Layer4-1 Chapter 4 Network Layer Part 3: Routing Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March.
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.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
1 Internet Routing. 2 Terminology Forwarding –Refers to datagram transfer –Performed by host or router –Uses routing table Routing –Refers to propagation.
Network Layer4-1 Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Define d x (y) := cost of least-cost path from x to y Then d x (y)
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.
Introduction 1 Lecture 19 Network Layer (Routing Algorithms) slides are modified from J. Kurose & K. Ross University of Nevada – Reno Computer Science.
Internet Routing r Routing algorithms m Link state m Distance Vector m Hierarchical routing r Routing protocols m RIP m OSPF m BGP.
Routing protocols. 1.Introduction A routing protocol is the communication used between routers. A routing protocol allows routers to share information.
Transport Layer3-1 Network Layer Every man dies. Not every man really lives.
Network Layer4-1 Routing Algorithm Classification Global or decentralized information? Global: r all routers have complete topology, link cost info r “link.
Routing Algorithms and IP Addressing Routing Algorithms must be ▪ Correctness ▪ Simplicity ▪ Robustness ▪ Stability ▪ Fairness ▪ Optimality.
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.
Computer Networks22-1 Network Layer Delivery, Forwarding, and Routing.
S305 – Network Infrastructure Chapter 5 Network and Transport Layers.
Distance Vector Routing
Application Layer 2-1 Chapter 4 Network Layer Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012 A.
ROUTING ON THE INTERNET COSC Jun-16. Routing Protocols  routers receive and forward packets  make decisions based on knowledge of topology.
Network Layer4-1 Chapter 4: Network Layer 4. 1 Introduction 4.2 Virtual circuit and datagram networks 4.3 What’s inside a router 4.4 IP: Internet Protocol.
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
The network layer: routing
TRANSPORT LAYER BY, Parthasarathy.g.
CS 5565 Network Architecture and Protocols
Routing BY, P.B.SHANMATHI.
CSE390 – Advanced Computer Networks
Routing Information Protocol (RIP)
Dynamic routing Routing Algorithm (Dijkstra / Bellman-Ford) – idealization All routers are identical Network is flat. Not true in Practice Hierarchical.
COMP 3270 Computer Networks
Chapter 5 Network and Transport Layers
CS 457 – Lecture 12 Routing Spring 2012.
Introduction to Internet Routing
Network Layer Introduction Datagram networks IP: Internet 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.
CS 4700 / CS 5700 Network Fundamentals
Routers Routing algorithms
CS 3700 Networks and Distributed Systems
CS 640: Introduction to Computer Networks
ECE453 – Introduction to Computer Networks
Communication Networks NETW 501
CS 3700 Networks and Distributed Systems
Computer Networking Lecture 10: Intra-Domain Routing
Communication Networks
EE 122: Intra-domain routing: Distance Vector
Computer Networks Protocols
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 4 Network Layer A note on the use of these ppt slides:
Presentation transcript:

cs/ee 143 Communication Networks Chapter 5 Routing Text: Walrand & Parakh, 2010 Steven Low CMS, EE, Caltech

Warning These notes are not self-contained, probably not understandable, unless you also were in the lecture They are supplement to not replacement for class attendance

Lecture outline Inter-domain routing BGP Intra-domain routing Shortest path algortihms Coding FEC, network coding

What is routing? Internet A B Choose red or blue.

How to route? Internet A B Two layers of routing: 1.Choose which AS? - BGP 2.How to route inside an AS? - OSPF Autonomy system (AS) e.g., AT&T, Verizon, MIT.

Why two layers?  Different objectives Choose AS: special policies Inside AS: minimize delay, # hops  Simplify routing Choose AS: ignore details inside AS Inside AS: only details inside AS

Inter-domain routing: BGP Peering relation: A-B, B-C A, B, C carry each other’s traffic free of charge B only advertises B to A and to C A does not know how to reach C through this. A must have transit relation with anther ISP (not shown here) that carries its traffic to C. Transit relation: A-B, B-C Customer-provider relation, e.g., B is provider for A and for C. A (C) pays B for carrying to/from A (C). B advertises {B,C} to A and {A, B} to C so that all ISP’s know how to reach all destinations.

Inter-domain routing: BGP A typical configuration

Inter-domain routing: BGP BGP is policy-based routing  Generally not shortest-path  Other factors are generally more important in determining an AS-path than performance Peering agreement Pricing (revenue/cost) with next hop Reliability, security, political reasons  Can lead to oscillation and bad performance

Inter-domain routing: BGP Example BGP policy at Berkeley: 1.If possible, avoid AT&T 2.Choose path with smallest #hops 3.Alphabetical Berkeley decision: use path Sprint-Verizon-MIT to reach MIT

Border Gateway Protocol (BGP) How to reach MIT from Berkeley? Every AS keeps a list of (Destination, Path) pairs & policies. Policy: avoid AT&T. Verizon AT&T Sprint Berkeley (MIT, Verizon---MIT) (MIT, AT&T---MIT) (MIT, NA)

Border Gateway Protocol (BGP) How to reach MIT from Berkeley? Every AS keeps a list of (Destination, Path) pairs & policies. Policy: avoid AT&T. Verizon AT&T Sprint Berkeley (MIT, Verizon---MIT) (MIT, AT&T---MIT) (MIT, Sprint---Verizon---MIT) (MIT, Berkeley---AT&T---MIT) (MIT, Sprint---AT&T---MIT) (MIT, Verizon---AT&T---MIT) (MIT, AT&T---Verizon---MIT)

Border Gateway Protocol (BGP) How to reach MIT from Berkeley? Every AS keeps a list of (Destination, Path) pairs & policies. Policy: avoid AT&T. Verizon AT&T Sprint Berkeley (MIT, Verizon---MIT) (MIT, AT&T---MIT) (MIT, Sprint---Verizon---MIT) (MIT, Berkeley---AT&T---MIT)(MIT, Berkeley---Sprint---Verizon---MIT)

Border Gateway Protocol (BGP) In BGP, each AS  Announces itself to other ASes and which ASes it can reach  Obtains ASes reachability info from neighboring Ases  Propagate reachability info to all routers internal to the AS  Determine “good” routes to ASes based on reachability info and AS policy

BGP: potential oscillation Example BGP policy to reach D: 1.Prefer 2-hop path to 1-hop 2.Avoid 3-hop paths Oscillation: Every node will alternate between choosing an 1- hop path and 2-hop path

Some questions Q1: Why not 3-level, or N-level, routing? Q2: How can a source ensure that its packets follow the inter-domain path it wants? Q3: In BGP, can one prevent a domain from lying and funneling all traffic through itself in order eavesdrop?

Lecture outline Inter-domain routing BGP Intra-domain routing Shortest path algortihms Coding FEC, network coding

Shortest-path algorithm Input: graph, link costs d ij ( ) Execution: algorithm run at each node Output: Dijkstra: shortest-path tree rooted at the node Bellman-Ford: next hop to all destinations from the node (entries in forwarding table) Notation: : min cost to reach node i from x pred x ( i ) : parent node of i (for Dijkstra) next x ( i ) : next hop to i from x (for Bellman-Ford)

Dijkstra algorithm Init: pred x ( i ) = null Each node x sends d xi to all other nodes i while do { for all { if then { pred(j) = }if }for }while Run at each source node x Which step requires global info?

Dijkstra algorithm Init: pred x ( i ) = null Each node x sends d xi to all other nodes i while do { for all { if then { pred(j) = }if }for }while Run at each source node x Which step requires global info?

Dijkstra algorithm

Bellman-Ford algorithm Init: pred x ( i ) = null Each node x sends distance vector to all its neighbors whenever changes do (execute when link cost changes or on receipt of a DV from neighbor) { for all destination nodes i { next x ( i ) = }for } until no change Run at each source node x

Bellman-Ford algorithm Consider the calculations at all nodes to reach node D Every node has access to distance estimates from neighbors to D Assume synchronous operation iteration D A (D) next A (D) D B (D) next B (D) D C (D) next C (D) D E (D) next E (D) D F (D) next F (D) 0Inf - 2 D4 DInf C2 D3 C5 E 26 B4 E2 D3 C4 E 35 B4 E2 D3 C4 E 45 B4 E2 D3 C4 E

Compare Dijsktra & BF  Message exchange Dijkstra: every node sends only its incident link costs to all other nodes. This requires O(|V| |E|) messages. BF: every node sends only to its neighbors least-cost estimates from itself to all other nodes  Speed of convergence Disjstra: above implementation takes O(|V| 2 ); can be reduced using heap BF: can converge slowly and have routing loops during transient; count-to-infinity problem (can be solved using poisoned reverse)  No clear winner Both are used on Internet RIP: distance-vector protocol OSPF: link-state protocol (meant to be successor to RIP)

Count-to-infinity problem Example Link between B & C fails A and B will not realize it, a routing route is created and their cost estimate to C keeps going up A solution: poisoned reverse: instead of telling B its true cost (2) to reach C, A tells B that its cost to reach C is infinity because A uses B to reach C.

Compare Dijsktra & BF  Dijkstra algorithm Needs global information (link-state alg) Each node broadcasts link-state packets to all other nodes in network Each node executes Dijkstra alg to calculate shortest paths to all other nodes After k iteration, shortest paths to k destinations are known (and they are the k shortest paths among the shortest paths to all nodes) Terminates after N-1 iterations (N = #nodes)

Compare Dijsktra & BF  Bellman-Ford algorithm Only needs local information (distance-vector alg) Each node exchanges with neighbors the vector of distances from itself to all other nodes Each node then updates the next hop and associated distance to all other nodes using Bellman-Ford (DP) equation Decentralized, asynchronous, distributed

Other questions  How can routers trust each other ?  How to deal with non-convergence in DV protocol? How often is oscillation encountered in practice?  Router R1 can route a pkt to host A through R2 or R3; R2 can route through R4 or R5 and has chosen R4. But R1 prefers R5 to R2 to R4. What happens?

Other questions  What is timescale for routing update?  What are major impediments to making significant changes to routing architecture? Would a bio-inspired routing system feasible?  Can network coding & FEC be combined?

Putting it all together [W&P 2010] initially unconnected

Putting it all together [W&P 2010]

Putting it all together [W&P 2010] initially unconnected 1.How to route G  A? 2.As soon as H is added, D tries to send a packet to H. What happens? 3.If AS2.R2 goes down, what will be the routing changes? later goes down

1. compute spanning tree [W&P 2010]

2. compute intra-AS routing [W&P 2010]

3. compute inter-AS routing [W&P 2010] 1.How to route G  A?

3. compute inter-AS routing [W&P 2010] 1.How to route G  A? Does A  G follow the same path?

4. Address resolution protocol [W&P 2010] 1.How to route G  A? 2.As soon as H is added, D tries to send a packet to H. What happens? 3.If AS2.R2 goes down, what will be the routing changes? initially unconnected

4. Address resolution protocol [W&P 2010] Packets from D can be delivered to subnet AS2.B1 based on IP address of H AS2.B1 does not know H AS2.B1 uses ARP to find H’s MAC address Use STP to forward pkts to H initially unconnected

Example: H1 wants to send packet to H2 Ethernet switch gateway Link Network [all, e1, who is IP2?] Link layer on H1 broadcasts a message (ARP query) on its layer 2 network asking for the MAC address corresponding to IP2

Example: H1 wants to send packet to H2 Ethernet switch gateway Link Network [all, e1, who is IP2?] Link Network [e1, e2, I am IP2] Link layer on H2 responds to the ARP query with its MAC address

Example: H1 wants to send packet to H2 Ethernet switch gateway Link Network Link Network Once the link layer on H1 knows e2, it can now send the original message [e2, e1,[IP1, IP2, X]]

Example: H1 wants to send packet to H2 Ethernet switch gateway Link Network Link Network Link layer on H2 delivers the packet to the network layer on H2 [e2, e1,[IP1, IP2, X]] [IP1, IP2, X] [e2, e1,[IP1, IP2, X]]

5. re-compute routing table [W&P 2010] 1.How to route G  A? 2.As soon as H is added, D tries to send a packet to H. What happens? 3.If AS2.R2 goes down, what will be the routing changes? goes down

5. re-compute routing tables [W&P 2010] goes down Failure detected by AS2.R1 and AS2.R3; update routing tables (intra-AS) Failure detected by border gateway in AS5 BGP re-computes The path between AS2 and AS5 will be changed

Lecture outline Inter-domain routing BGP Intra-domain routing Shortest path algortihms Coding FEC, network coding

FEC: packet erasure code Recover from packet loss Coding Input: n packets Output: m packets  = bit-by-bit XOR of a random subset of  Header of specifies the subset used to generate

FEC: packet erasure code Decoding If for some i, then for all pkts that contains Remove from the collection of rec’d pkts Repeat until all have been decoded If at one step, there is no then decoding fails

FEC: example : received pkt Decoding: received pkts

FEC: example : received pkt Decoding:

FEC: example : received pkt Decoding:

FEC: example : received pkt Decoding:

FEC: example : received pkt Decoding:

FEC: example : received pkt Decoding:

FEC: example : received pkt Decoding:

FEC: example : received pkt Decoding:

FEC: example : received pkt Decoding:

FEC: example : received pkt Decoding:

FEC: example : received pkt Decoding:

Network coding: example link rate = R on every link multicast to both Y & Z throughput = 1.5R throughput = 2R

Network coding: example X and Y want to exchange A & B Without network coding, needs 4 pkt xmissions With network coding, needs 3 pkt xmissions