Computer Networks. Instructor: Niklas Carlsson

Similar documents
Network Layer: Routing

Chapter 4: Network Layer

Interplay between routing, forwarding

Chapter 4: Network Layer: Part II

Network Layer: Control Plane 5-2

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

Routing Algorithm Classification. A Link-State Routing Algorithm

Computer Networking. Rou1ng Algorithms. Rou1ng Algorithms. Interplay between rou1ng, forwarding. routing algorithm

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

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

Agenda. distance-vector (what you invented last Friday) hierarchical routing routing in the Internet. v DNS assignment Q&A v Routing Algorithms

CS 3516: Advanced Computer Networks

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

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

11/13/2017 Network Layer (SSL) Network-layer functions. Recall the two network-layer functions:

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

Chapter IV: Network Layer

CS 3516: Advanced Computer Networks

Network layer: Overview. Network layer functions Routing IP Forwarding

Chapter 4: Network Layer, partb

Chapter 4 Network Layer

DATA COMMUNICATOIN NETWORKING

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 4 Network Layer

Chapter 5: Network Layer Control Plane. understand principles behind network control plane : traditional routing algorithms

Interplay tra routing e forwarding

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

Chapter IV: Network Layer

Chapter 4 Network Layer. Network Layer 4-1

Chapter 4: Network Layer

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

Hierarchical Routing. Our routing study thus far - idealization all routers identical network flat not true in practice

Chapter 4: Network Layer. Lecture 12 Internet Routing Protocols. Chapter goals: understand principles behind network layer services:

Chapter 4: outline. Network Layer 4-1

CSC 4900 Computer Networks: Routing Algorithms

Announcements. CS 5565 Network Architecture and Protocols. Count-To-Infinity. Poisoned Reverse. Distance Vector: Link Cost Changes.

Computer Networking Introduction

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Chapter 5 Network Layer: The Control Plane

DATA COMMUNICATOIN NETWORKING

CSc 450/550 Computer Networks Internet Routing

CSC 4900 Computer Networks: Routing Protocols

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

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

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

CS 43: Computer Networks. 24: Internet Routing November 19, 2018

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 16, 2017

Lecture 4. The Network Layer (cont d)

CSCI Topics: Internet Programming Fall 2008

CSC 8560 Computer Networks: Control Plane

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

CSC 401 Data and Computer Communications Networks

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

Announcements. CS 5565 Network Architecture and Protocols. Project 2B. Project 2B. Project 2B: Under the hood. Routing Algorithms

CS 43: Computer Networks Internet Routing. Kevin Webb Swarthmore College November 14, 2013

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

CSCD 330 Network Programming Spring 2018

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

CSCD 330 Network Programming Spring 2017

Network layer: Overview. Network layer functions Routing IP Forwarding

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

EE 122: Intra-domain routing

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

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

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

Protocoles et Interconnexions

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

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

UNIT III THE NETWORK LAYER

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

Chapter 4: Network Layer

Master Course Computer Networks IN2097

Network layer functions. Chapter 4 Network Layer. Network layer functions. Network layer functions

COMP211 Chapter 5 Network Layer: The Control Plane

Chapter 4 Network Layer

Lecture 19: Network Layer Routing in the Internet

Initial motivation: 32-bit address space soon to be completely allocated. Additional motivation:

Internet Technology. 08. Routing. Paul Krzyzanowski. Rutgers University. Spring CS Paul Krzyzanowski

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

Routing. Outline. Algorithms Scalability

Chapter 4: Network Layer. TDTS06 Computer networks. Subnets. Subnets. Subnets. IP Addressing: introduction

Interplay Between Routing, Forwarding

Module 3 Network Layer CS755! 3-1!

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

Dynamic Routing. The Protocols

Master Course Computer Networks IN2097

CS555, Spring /5/2005. April 12, 2005 No classes attend Senior Design Projects conference. Chapter 4 roadmap. Internet AS Hierarchy

Department of Computer Science Southern Illinois University Carbondale

Computer Networking. Intra-Domain Routing. RIP (Routing Information Protocol) & OSPF (Open Shortest Path First)

Routing in the Internet

Network Layer: Routing. Routing. Routing protocol. Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links

4.5.2 The Distance-Vector (DV) Routing Algorithm

Topics for This Week

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

BGP. Daniel Zappala. CS 460 Computer Networking Brigham Young University

Shortest Paths Algorithms and the Internet: The Distributed Bellman Ford Lecturer: Prof. Chiara Petrioli

Chapter 4: Network Layer. Chapter 4 Network Layer. Chapter 4: Network Layer. Key Network-Layer Functions. Network layer.

Chapter 4: Network Layer

COMP 3331/9331: Computer Networks and Applications

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

Transcription:

Computer Networks Instructor: Niklas Carlsson Email: niklas.carlsson@liu.se Notes derived Computer Networking: A Top Down Approach, b Jim Kurose and Keith Ross, Addison-Wesle. The slides are adapted and modified based on slides the book s companion Web site, as well as modified slides b Anirban Mahanti and Care Williamson.

Routing Algorithms Link State Distance Vector Hierarchical Routing

Interpla between routing and forwarding routing algorithm local forwarding table header value output link 000 00 0 00 Effectivel building the forwarding tables (and determining the routing path) value in arriving packet s header 0

Let s start with the case where we operate the full (sub) network c a b AS a AS c d b a c AS b 4

Graph abstraction Graph: G = (N,E) u v w N = set of routers = { u, v, w,,, } E = set of links ={ (u,v), (u,), (v,), (v,w), (,w), (,), (w,), (w,), (,) } Remark: Graph abstraction is useful in other network contets too Eample: PP, where N is set of peers and E is set of TCP connections

Graph abstraction: costs u v w c(, ) = cost of link (, ) - e.g., c(w,) = cost could alwas be, or inversel related to bandwidth, or inversel related to congestion Cost of path (,,,, p ) = c(, ) + c(, ) + + c( p-, p ) Question: What s the least-cost path between u and? Routing algorithm: find good paths source to destination router. 6

Routing Algorithm Classification. Global vs decentralied? Global: all routers have complete topolog, link cost info link state algorithms Decentralied: router knows about phsicallconnected neighbors Iterative, distributed computations distance vector algorithms. Static vs dnamic? Static: routes change slowl over time Dnamic: routes change more quickl periodic update in response to link cost changes. Load sensitivit? Man Internet routing algorithms are load insensitive 7

8

A Link-State Routing Algorithm Dijkstra s algorithm net topolog, link costs known to all nodes accomplished via link state broadcast all nodes have same info computes least cost paths one node ( source ) to all other nodes gives forwarding table for that node iterative: after k iterations, know least cost path to k dest. s Notation: c(,): link cost node to ; = if not direct neighbors D(v): current value of cost of path source to dest. v p(v): predecessor node along path source to v N': set of nodes whose least cost path definitivel known 9

Dijsktra s Algorithm Initialiation: N' = {u} for all nodes v 4 if v adjacent to u 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 0 add w to N' update D(v) for all v adjacent to w and not in N' : D(v) = min( D(v), D(w) + c(w,v) ) /* new v is either old v or known 4 shortest path w plus cost w to v */ until all nodes in N' 0

Dijkstra s algorithm: eample Step 0 4 N' u D(v),p(v),u D(w),p(w),u D(),p(),u D(),p() D(),p() u v w

Dijkstra s algorithm: eample Step 0 4 N' u u D(v),p(v),u D(w),p(w),u D(),p(),u D(),p() D(),p() u v w

Dijkstra s algorithm: eample Step 0 4 N' u u D(v),p(v),u,u D(w),p(w),u 4, D(),p(),u D(),p(), D(),p() u v w

Dijkstra s algorithm: eample Step 0 4 N' u u u D(v),p(v),u,u D(w),p(w),u 4, D(),p(),u D(),p(), D(),p() u v w 4

Dijkstra s algorithm: eample Step 0 4 N' u u u D(v),p(v),u,u,u D(w),p(w),u 4,, D(),p(),u D(),p(), D(),p() 4, u v w

Dijkstra s algorithm: eample Step 0 4 N' u u u uv D(v),p(v),u,u,u D(w),p(w),u 4,, D(),p(),u D(),p(), D(),p() 4, u v w 6

7 Dijkstra s algorithm: eample Step 0 4 N' u u u uv D(v),p(v),u,u,u D(w),p(w),u 4,,, D(),p(),u D(),p(), D(),p() 4, 4, u w v

8 Dijkstra s algorithm: eample Step 0 4 N' u u u uv uvw D(v),p(v),u,u,u D(w),p(w),u 4,,, D(),p(),u D(),p(), D(),p() 4, 4, u w v

9 Dijkstra s algorithm: eample Step 0 4 N' u u u uv uvw D(v),p(v),u,u,u D(w),p(w),u 4,,, D(),p(),u D(),p(), D(),p() 4, 4, 4, u w v

0 Dijkstra s algorithm: eample Step 0 4 N' u u u uv uvw uvw D(v),p(v),u,u,u D(w),p(w),u 4,,, D(),p(),u D(),p(), D(),p() 4, 4, 4, u w v

Dijkstra s algorithm, discussion Algorithm compleit: n nodes each iteration: need to check all nodes, w, not in N n(n+)/ comparisons: O(n ) more efficient implementations possible: O(nlogn) Oscillations possible: e.g., link cost = amount of carried traffic D A +e 0 0 0 e C e initiall B D A +e 0 0 +e C 0 B recompute routing D A 0 +e 0 0 +e C B recompute D A +e 0 0 +e C 0 recompute B

Distance Vector Algorithm () Bellman-Ford Equation (dnamic programming) Define d () := cost of least-cost path to

Distance Vector Algorithm () Bellman-Ford Equation (dnamic programming) Define d () := cost of least-cost path to Then d () = min {c(,v) + d v () } where min is taken over all neighbors of 4

Bellman-Ford eample () u v w Clearl, d v () =, d () =, d w () = B-F equation sas: d u () = min { c(u,v) + d v (), c(u,) + d (), c(u,w) + d w () } = min { +, +, + } = 4 Node that achieves minimum is net hop in shortest path forwarding table

Distance Vector Algorithm () D () = estimate of least cost to Distance vector: D = [D (): є N ] Node knows each neighbor v: c(,v) Node maintains D () Node also maintains its neighbors distance vectors (sent to b neighbors) For each neighbor v, maintains D v = [D v (): є N ] 6

Distance vector algorithm (4) Basic idea: Each node periodicall sends its own distance vector estimate to neighbors When node receives new DV estimate neighbor, it updates its own DV using B-F equation: D () min v {c(,v) + D v ()} for each node N Under some conditions, the estimate D () converge the actual least cost d () 7

Distance Vector Algorithm () Iterative, asnchronous: each local iteration caused b: local link cost change DV update message neighbor Distributed: each node notifies neighbors when its DV changes neighbors then notif their neighbors if necessar 8

Distance Vector Algorithm () Iterative, asnchronous: each local iteration caused b: local link cost change DV update message neighbor Distributed: each node notifies neighbors when its DV changes neighbors then notif their neighbors if necessar Each node: wait for (change in local link cost or msg neighbor) recompute estimates if DV to an dest has changed, notif neighbors 9

node table 0 7 node table 0 node table 7 0 time 7 0

node table 0 7 node table 0 node table 7 0 0 7 0 7 time 7

node table 0 7 node table 0 node table 7 0 0 7 0 0 7 7 0 0 7 0 time 7

node table 0 7 node table 0 node table 7 0 0 7 0 0 7 7 0 0 7 0 time 7

D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = node table 0 7 0 7 0 node table 0 node table 7 0 0 7 7 0 0 7 0 time D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 7 4

D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = node table 0 7 0 0 7 0 node table 0 node table 7 0 0 7 7 0 0 7 0 time D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 7

D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = node table 0 7 0 0 7 0 node table 0 node table 7 0 0 7 0 7 0 0 7 0 0 time D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 7 6

node table 0 7 node table 0 node table 7 0 0 0 7 0 0 7 0 7 0 0 7 0 0 time 7 7

node table 0 7 node table 0 node table 7 0 0 0 7 0 0 7 0 7 0 0 7 0 0 0 0 time 7 8

node table 0 7 node table 0 node table 7 0 0 0 7 0 0 7 0 7 0 0 7 0 0 0 0 0 0 0 0 time 7 9

node table 0 7 node table 0 node table 7 0 0 0 7 0 0 7 0 7 0 0 7 0 0 0 0 0 0 0 0 time 7 40

node table 0 7 node table 0 node table 7 0 0 0 7 0 0 7 0 7 0 0 7 0 0 0 0 0 0 0 0 0 0 0 time 7 4

Mabe another eample 4

Distance Vector: link cost changes Link cost changes: node detects local link cost change updates routing info, recalculates distance vector 4 0 if DV changes, notif neighbors good news travels fast At time t 0, detects the link-cost change, updates its DV, and informs its neighbors. At time t, receives the update and updates its table. It computes a new least and sends its neighbors its DV. At time t, receives s update and updates its distance table. s least costs do not change and hence does not send an message to. 4

Distance Vector: link cost changes Link cost changes: node detects local link cost change updates routing info, recalculates distance vector 4 0 if DV changes, notif neighbors good news travels fast 44

Distance Vector: link cost changes Link cost changes: good news travels fast bad news travels slow - count to infinit problem! 44 iterations before algorithm stabilies: see tet 60 4 0 4

Distance Vector: link cost changes Link cost changes: good news travels fast bad news travels slow - count to infinit problem! 44 iterations before algorithm stabilies: see tet 60 4 0 Poissoned reverse: If Z routes through Y to get to X : Z tells Y its (Z s) distance to X is infinite (so Y won t route to X via Z) will this completel solve count to infinit problem? 46

Comparison of LS and DV algorithms Message compleit LS: with n nodes, E links, O(nE) msgs sent DV: echange between neighbors onl Speed of Convergence LS: O(n ) algorithm requires O(nE) msgs ma have oscillations DV: convergence time varies ma have routing loops count-to-infinit problem Robustness: what happens if router malfunctions? LS: DV: node can advertise incorrect link cost each node computes onl its own table DV node can advertise incorrect path cost each node s table used b others error propagate thru network 47

48

Hierarchical Routing and Routing on the Internet 49

Hierarchical Routing: Motivation Our routing stud thus far - idealiation all routers identical, network flat scale: with billions of destinations: can t store all dest s in routing tables! routing table echange would swamp links! administrative autonom internet = network of networks each network admin ma want to control routing in its own network 0

Hierarchical Routing aggregate routers into regions, autonomous sstems (AS) routers in same AS run same routing protocol intra-as routing protocol routers in different AS can run different intra- AS routing protocol Gatewa router Direct link to router in another AS Establishes a peering relationship Peers run an inter-as routing protocol

Interconnected ASes c a b AS a c d b Intra-AS Routing algorithm AS Forwarding table Inter-AS Routing algorithm a c AS b Forwarding table is configured b both intra- and inter-as routing algorithm Intra-AS sets entries for internal dests Inter-AS & Intra-As sets entries for eternal dests

Inter-AS tasks Obtain reachabilit information neighboring AS(s) Propagate this info to all routers within the AS All Internet gatewa routers run a protocol called BGPv4 (we will talk about this soon) c a b AS a c d b AS a c AS b

Intra-AS Routing Also known as Interior Gatewa Protocols (IGP) Most common Intra-AS routing protocols: RIP: Routing Information Protocol (DV protocol) OSPF: Open Shortest Path First (Link-State) Including hierarchical OSPF for large domains EIGRP: Enhanced Interior Gatewa Routing Protocol Cisco protocol: originall proprietar, made open in 0 4

Hierarchical OSPF

Internet inter-as routing: BGP BGP (Border Gatewa Protocol): the de facto standard BGP provides each AS a means to:. Obtain subnet reachabilit information neighboring ASs.. Propagate the reachabilit information to all routers internal to the AS.. Determine good routes to subnets based on reachabilit information and polic. Allows a subnet to advertise its eistence to rest of the Internet: I am here 6

BGP basics Pairs of routers (BGP peers) echange routing info over semipermanent TCP connections: BGP sessions Note that BGP sessions do not correspond to phsical links. When AS advertises a prefi to AS, AS is promising it will forward an datagrams destined to that prefi towards the prefi. AS can aggregate prefies in its advertisement c a b AS a AS c d b a c AS b ebgp session ibgp session 7

Path attributes & BGP routes When advertising a prefi, advert includes BGP attributes. prefi + attributes = route Two important attributes: AS-PATH: contains the ASs through which the advert for the prefi passed: AS 67 AS 7 NEXT-HOP: Indicates the specific internal-as router to net-hop AS. (There ma be multiple links current AS to net-hop-as.) When gatewa router receives route advert, uses import polic to accept/decline. 8

BGP route selection Router ma learn about more than route to some prefi. Router must select route. Elimination rules:. Local preference value attribute: polic decision. Shortest AS-PATH. Closest NEXT-HOP router: hot potato routing 4. Additional criteria 9

Qui based on China Telecom Incident Slides (0-46) used for qui found here: http://www.ida.liu.se/~nikca/papers/wiscs4.slides.pdf Attack described and characteried in R. Hiran, N. Carlsson, and P. Gill, Characteriing Large-scale Routing Anomalies: A Case Stud of the China Telecom Incident, Proc. PAM, Hong Kong, China, Mar. 0. 60

6

Multicast/Broadcast duplicate R duplicate creation/transmission R R R duplicate R R4 R R4 (a) (b) Source-duplication versus in-network duplication. (a) source duplication, (b) in-network duplication 6

Network Laer Routing: summar What we ve covered: network laer services routing principles: link state and distance vector hierarchical routing Internet routing protocols RIP, OSPF, BGP what s inside a router? Net stop: the Data link laer! 6

64

More slides 6

Eample: Choosing among multiple ASes Now suppose AS learns the inter-as protocol that subnet is reachable AS and AS. To configure forwarding table, router d must determine towards which gatewa it should forward packets for dest. This is also the job on inter-as routing protocol! Hot potato routing: send packet towards closest of two routers. Learn inter-as protocol that subnet is reachable via multiple gatewas Use routing info intra-as protocol to determine costs of least-cost paths to each of the gatewas Hot potato routing: Choose the gatewa that has the smallest least cost Determine forwarding table the interface I that leads to least-cost gatewa. Enter (,I) in forwarding table 66

Hierarchical Routing Routing in the Internet 67

RIP ( Routing Information Protocol) Distance vector algorithm Included in BSD-UNIX Distribution in 98 Distance metric: # of hops (ma = hops) u A C B D v w destination hops u v w 68

OSPF (Open Shortest Path First) open : publicl available Uses Link State algorithm LS packet dissemination Topolog map at each node Route computation using Dijkstra s algorithm OSPF advertisement carries one entr per neighbor router Advertisements disseminated to entire AS (via flooding) Carried in OSPF messages directl over IP (rather than TCP or UDP 69

OSPF advanced features (not in RIP) Securit: all OSPF messages authenticated (to prevent malicious intrusion) Multiple same-cost paths allowed (onl one path in RIP) For each link, multiple cost metrics for different TOS (e.g., satellite link cost set low for best effort; high for real time) Integrated uni- and multicast support: Multicast OSPF (MOSPF) uses same topolog data base as OSPF Hierarchical OSPF in large domains. 70