ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Similar documents
DATA COMMUNICATOIN NETWORKING

CSC 4900 Computer Networks: Routing Algorithms

CMPE 80N: Introduction to Networking and the Internet. Katia Obraczka Computer Engineering UCSC Baskin Engineering Lecture 20

Chapter 4: Network Layer, partb

CSC 401 Data and Computer Communications Networks

CSCD 330 Network Programming Spring 2018

CSCD 330 Network Programming Spring 2017

Network layer. Network Layer 4-1. application transport network data link physical. network data link physical. network data link physical

Chapter 4 Network Layer

Chapter 5 Network Layer: The Control Plane

Internet rou)ng. V. Arun CS491G: Computer Networking Lab University of MassachuseFs Amherst

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 13

Lecture 9. Network Layer (cont d) Network Layer 1-1

CSCE 463/612 Networks and Distributed Processing Spring 2017

Chapter 4 Network Layer

CSC 8560 Computer Networks: Control Plane

5.1 introduction 5.5 The SDN control 5.2 routing protocols plane. Control Message 5.3 intra-as routing in Protocol the Internet

Module 3 Network Layer CS755! 3-1!

EC441 Fall 2018 Introduction to Computer Networking Chapter 5: Network Layer Control Plane

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Chapter 4 Network Layer. Network Layer 4-1

Lecture 4. The Network Layer (cont d)

Course on Computer Communication and Networks. Lecture 7 Network Layer, Chapter 4 (6/e) - Part B (7/e Ch5)

Chapter 4: Network Layer

Δίκτυα Υπολογιστών ΙΙ. Κώστας Μαγκούτης Επίκουρος Καθηγητής Τμήμα Μηχανικών Η/Υ και Πληροφορικής Πανεπιστήμιο Ιωαννίνων

Graph abstraction: costs. Graph abstraction 10/26/2018. Interplay between routing and forwarding

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer. Chapter goals:

Department of Computer Science Southern Illinois University Carbondale

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Network layer: Overview. Network layer functions Routing IP Forwarding

Data Communications & Networks. Session 7 Main Theme Networks: Part II Circuit Switching, Packet Switching, The Network Layer

Dynamic Routing. The Protocols

Network layer: Overview. Network layer functions Routing IP Forwarding

Network Layer. CMPS 4750/6750: Computer Networks

Chapter 5 Network Layer: The Control Plane

Chapter 4: outline. 4.5 routing algorithms link state distance vector hierarchical routing. 4.6 routing in the Internet RIP OSPF BGP

Chapter 5 Network Layer: The Control Plane

Chapter 5 Network Layer: The Control Plane

Chapter 5 Network Layer: The Control Plane

Network Layer: Routing

Routing Algorithms : Fundamentals of Computer Networks Bill Nace

Interplay Between Routing, Forwarding

Interplay between routing, forwarding

Chapter 4: Network Layer

CSCE 463/612 Networks and Distributed Processing Spring 2018

Lecture 5 The Network Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Telecomunicazioni. Docente: Andrea Baiocchi. DIET - Stanza 107, 1 piano palazzina P. Piga Via Eudossiana 18

Telecomunicazioni. Docente: Andrea Baiocchi DIET - Stanza 107, 1 piano palazzina P. Piga Via Eudossiana 18

Chapter 4 Network Layer

CS 457 Networking and the Internet. What is Routing. Forwarding versus Routing 9/27/16. Fall 2016 Indrajit Ray. A famous quotation from RFC 791

Lecture 4 The Network Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

CS 43: Computer Networks. 23: Routing Algorithms November 14, 2018

Chapter 4 Network Layer

Routing. Outline. Algorithms Scalability

COMP 3331/9331: Computer Networks and Applications

Network Routing. Packet Routing, Routing Algorithms, Routers, Router Architecture

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Redes de Computadores. Shortest Paths in Networks

Computer Networks. Instructor: Niklas Carlsson

CMPE 150: Introduction to Computer Networks

Lecture 17: Network Layer Addressing, Control Plane, and Routing

Chapter 4: network layer

Chapter 4 Network Layer

Chapter 4: network layer

Chapter 4 Network Layer

Chapter 4 Network Layer

Chapter 4 Network Layer

Chapter 4 Network Layer

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 14

Lecture 19: Network Layer Routing in the Internet

Last time. Transitioning to IPv6. Routing. Tunneling. Gateways. Graph abstraction. Link-state routing. Distance-vector routing. Dijkstra's Algorithm

Chapter 4 Network Layer

Network Technology 1 5th - Network Layer. Mario Lombardo -

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer

Chapter 4: Network Layer. Chapter 4: Network Layer

Chapter 4 Network Layer

Chapter 4 Network Layer. Chapter 4: Network Layer. Chapter 4: Network Layer. Chapter goals: understand principles behind network layer services:

Chapter IV: Network Layer

Chapter 4 Network Layer

All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

COMPUTER NETWORKS CHAP 4 : NETWORK LAYER

Chapter 4 Network Layer

CS 457 Networking and the Internet. Shortest-Path Problem. Dijkstra s Shortest-Path Algorithm 9/29/16. Fall 2016

Chapter 4 Network Layer

Intra-AS Routing. Computer Networking: A Top Down Approach 6 th edition Jim Kurose, Keith Ross Addison-Wesley.

CMPT 371: Data Communications and Networking. Chapter 4: Network Layer

CSC 4900 Computer Networks: Routing Protocols

Master Course Computer Networks IN2097

The Internet network layer

Master Course Computer Networks IN2097

CS118 Discussion 1A, Week 6. Zengwen Yuan Dodd Hall 78, Friday 10:00 10:50 a.m.

Interplay tra routing e forwarding

Routing Algorithm Classification. A Link-State Routing Algorithm

Chapter IV: Network Layer

Chapter 4 Network Layer

KR_4. Strato di rete

Chapter 4 Network Layer. Network Layer 4-1

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Network layer

Inter-AS routing and BGP. Network Layer 4-1

NETWORK LAYER CONTROL PLANE

Transcription:

ELEC / COMP 177 Fall 01 Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Homework #4 Due Thursday, Nov 1 st Project # Due Tuesday, Nov 6 th Later this semester: Homework #5 Due Thursday, Nov 13 th Homework #6 - Presentation on security/privacy Topic selection Due Tuesday, Nov 0 th Slides Due Monday, Nov 6 th Present! Tuesday, Nov 7 th (and Thursday) Project #3 Due Tue, Dec 4 th

Discuss what routers do internally Discuss the other piece of the network layer besides IP: Routing algorithms How do routers decide what port to forward a packet out on? Beyond just having the administrator enter all routes manually like you did in the lab before RIP was enabled 3

4

Ingress Links Egress Links? 5

Ingress Links Egress Links Select Egress Select Egress Select Egress Select Egress 6

Key Modules Network Interface Packet processing Packet buffering Packet switching Processing and buffering can be centralized or decentralized Control Processor Forwarding Engine Router Backplane Line Card Line Card Line Card Networks Packet Buffers Line Card 7

What does a router need to do? Driven by protocols Ethernet IP ARP ICMP Transport: TCP, UDP, etc. 8

Processing Buffer packet? Determine protocol (e.g., IP vs. ARP) Verify checksum, validate the packet, etc. Collect statistics? What s next in the common (valid IP packet) case? Select egress link 9

Forwarding table lookup Longest prefix match Determine next hop IP address and egress link What if no match? Is this sufficient to route the packet to an output queue? Prefix Next Hop Port 63/8 18.34.1.1 3 18.4/16 18.34.1.1 3 156.3/16 18.36.1.1 156.3.4/19 18.36.19.1 1 18.4.96/0 18.37.37.1 4 18.4.18/4 18.36.19.1 1 18.4.160/4 18.36.1.1 10

ARP table lookup Exact match on next hop IP address Determine next hop MAC address What if no match? IP MAC 18.34.1.1 0C:FF:63:8:44:01 18.36.1.1 04:3:11:44:8:60 18.36.1.18 10:44:8:8:44:07 18.37.37.37 08:8:8:44:16:3 18.34.1.14 0:33:71:8:15:70 18.36.1.4 14:93:9::15:8 11

Broadcast on output port Ask for MAC address of next hop IP address Wait for reply What do you do with the packet? How long should you wait? (tradeoffs?) Receive reply Update ARP table Packet continues along forwarding path 1

Does the IP address match the IP address of the interface that received the ARP request? Another system is trying to determine your MAC address Respond with the appropriate ARP reply on the same interface Should ARP requests be forwarded if they aren t for the router? 13

Select egress link Update MAC address Is it now OK to forward packet to output queue? IP packet header must be modified What needs to be modified? When should it be modified? 14

Why do packets need to be buffered? Waiting for access to a resource (lookup table, switch, etc.) Waiting for an ARP reply What happens when buffers get full? Packets have to be dropped How large do buffers need to be? Statistical multiplexing 15

ICMP Messages Notify sender of errors Common error types Host/network unreachable No ARP response Time exceeded TTL decremented to zero No route to host No entry in routing table 16

17

Forwarding Move packets from router s input to appropriate router output Forwarding table Routing Determine path (route) taken by packets from source to destination Routing algorithms Road trip analogy: Forwarding: process of getting through single interchange Routing: process of planning trip from source to destination 18

routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 1 Routing algorithm creates the forwarding table, which is used on a per- packet basis value in arriving packet s header 0111 1 3 19

H3 H1 R1 R4 R R3 R6 How does R pick the next hop to host H3? H R5 What if this link fails? H4 0

So far, we have assumed forwarding tables are populated statically by an administrator In reality, they are dynamically updated Faster reaction to changing network conditions What makes a good route? Low delay High bandwidth Low link utilization High link stability Low cost (cheaper to use ISP A than ISP B) 1

H1 R R4 R6 R1 1 1 4 3 R7 Link cost R3 R5 4 3 R8 H

H1 R R4 R6 R1 1 1 4 3 R7 Link cost R3 R5 4 3 R8 H 3

The Internet in 003 http://www.opte.org/maps/ 4

5 Graph: G = (N,E) u 1 v x 3 1 3 w y 1 5 z N = set of routers = { u, v, w, x, y, z } E = set of links ={ (u,v), (u,x), (v,x), (v,w), (x,w), (x,y), (w,y), (w,z), (y,z) } Graph abstraction is useful in other network contexts. Example: PP, where N is set of peers and E is set of TCP connections 5

u 1 5 c(x,x ) = cost of link (x,x ) - e.g., c(w,z) = 5 3 v w 5 How do we set cost? 1 z 3 Fixed, i.e. always 1 Inversely related to bandwidth x y 1 Related to congestion Cost of path (x 1, x, x 3,, x p ) = c(x 1,x ) + c(x,x 3 ) + + c(x p- 1,x p ) Question: What s the least- cost path between u and z? Routing algorithms find the least- cost path 6

GLOBAL OR DECENTRALIZED? Global Information All routers have complete topology, link cost info link state algorithms Decentralized: Router knows physically- connected neighbors and link costs to neighbors Iterative process of computation, exchange of info with neighbors distance vector algorithms STATIC OR DYNAMIC? Static Routes change slowly over time Dynamic Routes change more quickly Periodic update In response to link cost changes 7

Dijkstra s Algorithm 8

Network topology and link costs are known to all nodes Accomplished via link state broadcast All nodes have same info Computes least cost paths from one node (source) to all other nodes Produces forwarding table for that node Iterative: after k iterations, know least cost path to k destinations Notation: u: the source ( you ) c(x,y): link cost from node x to y; = if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitively known 9

1 Initialization: N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = 7 8 Loop 9 find w not in N' such that D(w) is a minimum 10 add w to N' 11 update D(v) for all v adjacent to w and not in N' : 1 D(v) = min( D(v), D(w) + c(w,v) ) 13 /* new cost to v is either old cost to v or known 14 shortest path cost to w plus cost from w to v */ 15 until all nodes in N' 30

Step 0 1 3 4 5 N' u ux uxy uxyv uxyvw uxyvwz D(v),p(v),u,u,u D(w),p(w) 5,u 4,x 3,y 3,y D(x),p(x) 1,u D(y),p(y),x D(z),p(z) 4,y 4,y 4,y u y x w v z 1 3 1 1 5 3 5 31

Resulting shortest- path tree from u: Resulting forwarding table in u: u v x w y z destination v x y w z link (u,v) (u,x) (u,x) (u,x) (u,x) 3

Bellman Ford Algorithm 33

Distributed! No global knowledge needed! Define: d x (y) := cost of least- cost path from x to y Then: d x (y) = min {c(x,v) + d v (y) } v Something I know Something my neighbor told me where min is taken over all neighbors v of x 34

From the figure: d v (z) = 5, d x (z) = 3, d w (z) = 3 u 1 5 v x 3 1 3 w y 1 5 z B- F equation says: d u (z) = min { c(u,v) + d v (z), c(u,x) + d x (z), c(u,w) + d w (z) } = min { + 5, 1 + 3, 5 + 3} = 4 (by way of x!) The node that provides the minimum cost is entered in the router forwarding table as the next hop 35

D x (y) = estimate of least cost from x to y Node x knows cost to each neighbor v: c(x,v) Node x maintains distance vector D x = [D x (y): y є N ] Node x also maintains its neighbors distance vectors For each neighbor v, x maintains D v = [D v (y): y є N ] 36

From time- to- time, each node sends its own distance vector estimate to neighbors Updates are asynchronous! When a node x receives new DV estimate from neighbor, it updates its own DV using B- F equation: D x (y) min v {c(x,v) + D v (y)} for each node y N 37

Iterative, asynchronous: each local iteration caused by: local link cost change DV update message from neighbor Distributed: each node notifies neighbors only when its DV changes neighbors then notify their neighbors if necessary Each node: wait for (change in local link cost or msg from neighbor) recompute estimates if DV to any dest has changed, notify neighbors 38

node x table cost to x y z x 0 7 y z node y table cost to x y z from from from x y z 0 1 node z table cost to x y z x y z 7 1 0 D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{+0, 7+1} = from x y z cost to x y z 0 3 0 1 7 1 0 time D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{+1, 7+0} = 3 Found a shorter path! x y 7 1 z 39

D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{+0, 7+1} = node x table cost to cost to x y z x y z x 0 7 y z node y table cost to x y z from from from x y z 0 1 node z table cost to x y z x y z 7 1 0 from from from x y z x y z x y z 0 3 0 1 7 1 0 cost to x y z 0 7 0 1 7 1 0 cost to x y z 0 7 0 1 3 1 0 from from from x y z x y z x y z cost to x y z 0 3 0 1 3 1 0 cost to x y z 0 3 0 1 3 1 0 cost to x y z 0 3 0 1 3 1 0 time D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{+1, 7+0} = 3 x y 7 1 z 40

41

Our routing discussion thus far has been idealized All routers are identical The network is flat This is not true in practice! Problem 1 Scale Hundreds of millions of destinations: Can t store all destinations in routing tables! Routing table exchange would swamp links! Distance- vector would never converge Problem - Administrative autonomy Internet = network of networks Each network admin wants to control routing in his/her own network 4

Aggregate routers into regions aka autonomous systems (AS) Routers in same AS run same routing protocol Intra- AS routing protocol Routers in different AS can run different intra- AS routing protocol Border router Direct link to router in another AS 43

3c 3a 3b AS3 1a 1c 1d 1b Intra-AS Routing algorithm AS1 Forwarding table Inter-AS Routing algorithm a c AS b Forwarding table configured by both intra- and inter- AS routing algorithm Intra- AS sets entries for internal destinations Inter- AS & intra- As sets entries for external destinations 44

Suppose router in AS1 receives datagram destined outside of AS1: Router should forward packet to border router, but which one? AS1 must: 1. Learn which dests are reachable through AS versus AS3. Propagate this reachability info to all routers in AS1 (Job of inter- AS routing!) 3c 3a 3b AS3 1a 1c 1d 1b AS1 a c AS b 45

Suppose AS1 learns (via inter- AS protocol) that subnet X is reachable only via AS3 (gateway 1c) and not via AS. Inter- AS protocol propagates reachability info to all internal routers. Router 1d determines from intra- AS routing info that its interface n is on the least cost path to 1c. Installs forwarding table entry (x,n) x 3c 3a 3b AS3 1a 1c 1d 1b AS1 a c AS b 46

Now suppose AS1 learns from inter- AS protocol that subnet x is reachable from AS3 and from AS. To configure forwarding table, router 1d must determine towards which gateway it should forward packets for dest x. This is also job of inter- AS routing protocol! 3c 3a 3b AS3 1c 1a 1d x 1b AS1 a c AS b 47