Master Course Computer Networks IN2097

Similar documents
Chapter 4: Network Layer, partb

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

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

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

DATA COMMUNICATOIN NETWORKING

Chapter 4: outline. Network Layer 4-1

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

Chapter 4: Network Layer

Chapter IV: Network Layer

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

Broadcast Routing. Multicast. Flooding. In-network duplication. deliver packets from source to all other nodes source duplication is inefficient:

Chapter 4 Network Layer

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

Network layer: Overview. Network layer functions Routing IP Forwarding

DATA COMMUNICATOIN NETWORKING

Master Course Computer Networks IN2097

CSCE 463/612 Networks and Distributed Processing Spring 2018

CSC 4900 Computer Networks: Routing Protocols

Computer Networking Introduction

CSCE 463/612 Networks and Distributed Processing Spring 2018

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

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

CSCI Topics: Internet Programming Fall 2008

The Internet network layer

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

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

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

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

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

Network layer: Overview. Network layer functions Routing IP Forwarding

DATA COMMUNICATOIN NETWORKING

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

Network Layer II. Getting IP addresses. DHCP client-server scenario. DHCP client-server scenario. C compiler. You writing assignment 2

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

CSC 4900 Computer Networks: Routing Algorithms

Exercises to Communication Systems

Chapter 5 Network Layer: The Control Plane

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

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

Internet Protocol: Routing Algorithms. Srinidhi Varadarajan

Chapter 4: Network Layer. Chapter 4: Network Layer

Routing in the Internet

CSC 8560 Computer Networks: Control Plane

Lecture 4. The Network Layer (cont d)

Network Layer: Routing

Master Course Computer Networks IN2097

Chapter 4 Network Layer

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

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

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

CSc 450/550 Computer Networks Internet Routing

COMPUTER NETWORKS CHAP 4 : NETWORK LAYER

Chapter 4 Network Layer

Chapter 4: Network Layer

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

Chapter 4 Network Layer

Chapter 4 Network Layer

CSCD 330 Network Programming Spring 2018

Lecture 19: Network Layer Routing in the Internet

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

CSCD 330 Network Programming Spring 2017

Chapter 4 Network Layer

KR_4. Strato di rete

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

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

COMP211 Chapter 5 Network Layer: The Control Plane

Lecture 6. TCP/IP Network Layer (4)

GOALS Understand principles behind network layer services: Network layer service models Forwarding versus routing How a router works Routing (path sel

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

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

Chapter 4 Network Layer

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

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

Chapter 4 Network Layer. Network Layer 4-1

Chapter 4 Network Layer

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

Review. Some slides are in courtesy of J. Kurose and K. Ross

Chapter 4: Network Layer

ITEC310 Computer Networks II

Master Course Computer Networks IN2097

CS 204: BGP. Jiasi Chen Lectures: MWF 12:10-1pm Humanities and Social Sciences

Chapter 4 Network Layer

Network Layer: Control Plane 5-2

Routing. Outline. Algorithms Scalability

Chapter 4 Network Layer

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

ETSF10 Internet Protocols Routing on the Internet

Computer Networks. Instructor: Niklas Carlsson

Routing. Jens A Andersson Communication Systems

Chapter 4 Network Layer. Network Layer 4-1

CSC 401 Data and Computer Communications Networks

Routing Unicast routing protocols

Module 3 Network Layer CS755! 3-1!

Chapter 4: Network Layer: Part II

Topics for This Week

Network Layer: Routing

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

ETSF10 Internet Protocols Routing on the Internet

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

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

Transcription:

Chair for Network Architectures and Services Prof. Carle Department for Computer Science TU München Master Course Computer Networks IN2097 Prof. Dr.-Ing. Georg Carle Christian Grothoff, Ph.D. Dr. Nils Kammenhuber Chair for Network Architectures and Services Institut für Informatik Technische Universität München http://www.net.in.tum.de

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Path Vector Hierarchical routing Internet routing protocols RIP OSPF BGP Business considerations Policy routing Traffic engineering Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 2

Recall: Interplay between routing and forwarding routing algorithm local forwarding table header value output link 0100 0101 0111 1001 3 2 2 1 Routing = signalling plane = offline value in arriving packet s header Forwarding = data plane = online 0111 3 2 1 Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 3

Graph abstraction: costs 5 c(x,x ) =: cost of link (x,x ) e.g.: c(w,z) = 5 u 1 2 v 2 x 3 1 3 w y 1 5 2 z cost could always be 1, or inversely related to bandwidth, or inversely related to congestion Cost of path (x 1, x 2, x 3,, x p ) = c(x 1,x 2 ) + c(x 2,x 3 ) + + c(x p-1,x p ) Question: What s the least-cost path between u and z? Routing algorithm: algorithm that finds least-cost path Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 5

Routing Algorithm classification Global or decentralized information? Global: All routers have complete topology and link cost info link state algorithms (L-S) Decentralized: Router only knows physicallyconnected neighbors and link costs to neighbors Iterative process of computation = exchange of info with neighbors distance vector algorithms (D-V) Variant: path vector algorithms Static or dynamic? Static: Routes change slowly over time Dynamic: Routes change more quickly periodic update in response to link cost changes Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 6

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Path Vector Hierarchical routing Internet routing protocols RIP OSPF BGP Business considerations Policy routing Traffic engineering Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 7

A Link-State Routing Algorithm Net topology and link costs made known to each node Accomplished via link state broadcasts All nodes have same info Each node independently computes least-cost paths from one node ( source ) to all other nodes Usually done using Dijkstra s shortest-path algorithm refer to any algorithms & data structures lecture/textbook n nodes in network O(n²) or O(n log n) Gives forwarding table for that node Result: All nodes have the same information, thus calculate the same shortest paths, hence obtain consistent forwarding tables Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 8

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Path Vector Hierarchical routing Internet routing protocols RIP OSPF BGP Business considerations Policy routing Traffic engineering Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 14

Distance Vector Algorithm No node knows entire topology Nodes only communicate with neighbours (i.e., no broadcasts) Nodes jointly calculate shortest paths Iterative process Algorithm == protocol Distributed application of Bellman-Ford algorithm refer to any algorithms&data structures lecture/textbook Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 15

Distance Vector Algorithm Bellman-Ford Equation (dynamic programming) Let c(x,y) := cost of edge from x to y d x (y) := cost of least-cost path from x to y Then d x (y) = min {c(x,v) + d v (y) } where min is taken over all neighbours v of x Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 16

Bellman-Ford example u 1 2 5 v 2 x 3 1 3 w y 1 5 2 z Clearly, d v (z) = 5, d x (z) = 3, d w (z) = 3 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 {2 + 5, 1 + 3, 5 + 3} = 4 Node that achieves minimum is next hop in shortest path forwarding table Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 17

Distance Vector Algorithm Define D x (y) := estimate of least cost from x to y Node x knows cost to each neighbour v: c(x,v) Node x maintains distance vector D x = [ D x (y): y N ] (N := set of nodes) Node x also maintains its neighbours distance vectors: For each neighbour v, x maintains D v = [ D v (y): y N ] Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 18

Distance vector algorithm (4) Basic idea: From time-to-time, each node sends its own distance vector estimate D to neighbors Asynchronously When a node x receives new DV estimate from neighbour, 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 Under minor, natural conditions, these estimates D x (y) converge to the actual least cost d x (y) Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 19

Distance Vector Algorithm (5) Iterative, asynchronous: each local iteration caused by: local link cost change DV update message from neighbour Distributed: Each node notifies neighbors only when its DV changes neighbours then notify their neighbours if this caused their DV to change etc. Each node: Forever: wait for (change in local link cost or message arriving from neighbour} recompute estimates if (DV to any destination has changed) { notify neighbours } Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 20

Distance Vector Algorithm (6) node x table cost to x y z cost to x y z D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0, 7+1} = 2 x 0 2 7 y z node y table cost to x y z from x y 2 0 1 z node z table cost to x y z from from x y z 0 2 3 2 0 1 7 1 0 D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{2+1, 7+0} = 3 x 2 y 7 1 z from x y z 71 0 time Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 21

node x table cost to x y z x 0 2 7 y z node y table cost to x y z from x y 2 0 1 z node z table cost to x y z from from D x (y) = min{c(x,y) + D y (y), c(x,z) + D z (y)} = min{2+0, 7+1} = 2 x y z 71 0 from from from x y z x y z x y z cost to x y z 0 2 3 2 0 1 7 1 0 cost to x y z 0 2 7 2 0 1 7 1 0 cost to x y z 0 2 7 2 0 1 3 1 0 from from from D x (z) = min{c(x,y) + D y (z), c(x,z) + D z (z)} = min{2+1, 7+0} = 3 x y z x y z x y z cost to x y z 0 2 3 2 0 1 3 1 0 cost to x y z 0 2 3 2 0 1 3 1 0 cost to x y z 0 2 3 2 0 1 3 1 0 time x 2 y 7 1 z Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 22

Distance Vector: link cost changes (1) Link cost changes: node detects local link cost change updates routing info, recalculates distance vector x 1 4 y 50 1 z if DV changes, notify neighbors good news travels fast At time t 0, y detects the link-cost change, updates its DV, and informs its neighbors. At time t 1, z receives the update from y and updates its table. It computes a new least cost to x and sends its neighbors its DV. At time t 2, y receives z s update and updates its distance table. y s least costs do not change and hence y does not send any message to z. Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 23

Distance Vector: link cost changes (2) But: bad news travels slow count to infinity problem! In example: Many iterations before algorithm stabilizes! 1. Cost increase for y r: y consults DV, y selects cheaper route via z (cost 2+1 = 3), Sends update to z and x (cost to r now 3 instead of 1) 2. z detects cost increase for path to r: was 1+1, is now 3+1 Sends update to y and x (cost to r now 4 instead of 2) 3. y detects cost increase, sends update to z 4. z detects cost increase, sends update to y 5.. x 4 r y 50 1 1 (i.e., link down) z Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 24

Distance Vector: Solutions that only half work Finite infinity: Define some number to be (in RIP: 16 := ) Split Horizon: Tell to a neighbour that is part of a best path to a destination that the destination cannot be reached If z routes through y to get to r r z tells y that its own (i.e., y s) distance to r 1 is infinite (so y won t route to r via z) Poisoned Reverse: y 4 1 In addition, actively advertise x z a route as unreachable 50 to the neighbour from which the route was learned (Warning: Terms often used interchangeably!) Often help, but cannot solve all problem instances Can significantly increase number of routing messages Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 25

Comparison of LS and DV algorithms Message complexity LS: with n nodes, E links, O(nE) msgs sent DV: exchange between neighbors only convergence time varies Speed of Convergence LS: O(n 2 ) algorithm requires O(nE) msgs may have oscillations DV: convergence time varies may be routing loops count-to-infinity problem Robustness: what happens if router malfunctions? LS: node can advertise incorrect link cost each node computes only its own table DV: DV node can advertise incorrect path cost each node s table used by others error propagate thru network Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 26

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Path Vector Hierarchical routing Internet routing protocols RIP OSPF BGP Business considerations Policy routing Traffic engineering Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 27

Path Vector protocols Problem with D-V protocol: Path cost is anonymous single number Path Vector protocol: For each destination, advertise entire path (=sequence of node identifiers) to neighbours Cost calculation can be done by looking at path Easy loop detection: Does my node ID already appear in the path? Not used very often only in BGP and BGP is much more complex than just paths! Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 28

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Path Vector Hierarchical routing Internet routing protocols RIP OSPF BGP Business considerations Policy routing Traffic engineering Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 29

Hierarchical Routing Our routing study thus far = idealisation all routers identical network flat not true in practice! Scale = billions of destinations: Can t store all destinations in routing tables! Routing table exchange would swamp links! Administrative autonomy Internet = network of networks Each network admin may want to control routing in its own network no central administration! Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 30

Hierarchical Routing Aggregate routers into regions called autonomous systems (short: AS; plural: ASes) Routers in same AS run same routing protocol = intra-as routing protocol (also called intradomain ) Routers in different ASes can run different intra-as routing protocols ASes are connected: via gateway routers Direct link to [gateway] router in another AS = inter-as routing protocol (also called interdomain ) Warning: Non-gateway routers need to know about inter-as routing as well! Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 31

Interconnected ASes 3c 3a 3b AS3 1a 1c 1d 1b Intra-AS Routing algorithm AS1 Forwarding table Inter-AS Routing algorithm 2a 2c AS2 2b Forwarding table configured by both intra- and inter-as routing algorithm: Intra-AS sets entries for internal destinations Inter-AS and intra-as set entries for external destinations Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 32

Inter-AS tasks Suppose router in AS1 receives datagram destined outside of AS1: router should forward packet to gateway router, but which one? AS1 must: 1. learn which dests are reachable through AS2, which through AS3 2. propagate this reachability info to all routers in AS1 (i.e., not just the gateway routers) Job of inter-as routing! 3c 3a 3b AS3 1a 1c 1d 1b AS1 2a 2c AS2 2b Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 33

Example: Setting forwarding table in router 1d Suppose AS1 learns (via inter-as protocol) that subnet x is reachable via AS3 (gateway 1c) but not via AS2. Inter-AS protocol propagates reachability info to all internal routers. Router 1d determines from intra-as routing info that its interface I (i.e., interface to 1a) is on the least cost path to 1c. installs forwarding table entry (x,i) 3c 3a 3b AS3 1a L 1c 1d 1b AS1 2a 2c AS2 2b Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 34

Example: Choosing among multiple ASes Now suppose AS1 learns from inter-as protocol that subnet x is reachable from AS3 and from AS2. To configure forwarding table, router 1d must determine towards which gateway it should forward packets for destination x. This is also job of inter-as routing protocol! 3c 3a 3b AS3 x 1c 1a 1d 1b AS1 2a 2c AS2 2b Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 35

Interplay of inter-as and intra-as routing Inter-AS routing Only for destinations outside of own AS Used to determine gateway router Also: Steers transit traffic (from AS x to AS y via our own AS) Intra-AS routing Used for destinations within own AS Used to reach gateway router for outside destinations Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 36

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Path Vector Hierarchical routing Internet routing protocols (RIP) OSPF BGP Business considerations Policy routing Traffic engineering Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 38

Intra-AS Routing Also known as Interior Gateway Protocols (IGP) Most common Intra-AS routing protocols: RIP: Routing Information Protocol DV (typically small systems) OSPF: Open Shortest Path First hierarchical LS (typically medium to large systems) IS-IS: Intermediate System to Intermediate System hierarchical LS (typically medium-sized ASes) (E)IGRP: (Enhanced) Interior Gateway Routing Protocol (Cisco proprietary) hybrid of LS and DV Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 39

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Path Vector Hierarchical routing Internet routing protocols (RIP) OSPF BGP Business considerations Policy routing Traffic engineering Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 47

OSPF (Open Shortest Path First) open : publicly available uses Link State algorithm LS packet dissemination topology map at each node route computation using Dijkstra s algorithm OSPF advertisement carries one entry per neighbor router advertisements disseminated to entire AS (via flooding) carried in OSPF messages directly over IP (rather than TCP or UDP Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 48

OSPF advanced features (not in RIP) security: all OSPF messages authenticated (to prevent malicious intrusion) multiple same-cost paths allowed (only 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 topology data base as OSPF hierarchical OSPF in large domains. Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 49

Hierarchical OSPF Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 50

Hierarchical OSPF OSPF can create a two-level hierarchy similar to inter-as and intra-as routing within an AS Two levels: local areas and the backbone Link-state advertisements only within local area Each node has detailed area topology; but only knows direction (shortest path) to networks in other areas Area border routers: summarize distances to networks in own area; advertise distances to other Area Border routers Backbone routers: run OSPF routing limited to backbone Boundary routers: connect to other ASes Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 51

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Path Vector Hierarchical routing Internet routing protocols RIP OSPF BGP Business considerations Policy routing Traffic engineering Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 52

Internet inter-as routing: BGP BGP (Border Gateway Protocol): The de facto standard for inter-as routing BGP provides each AS a means to: 1. Obtain subnet reachability information from neighbouring ASes. 2. Propagate reachability information to all ASinternal routers. 3. Determine good routes to subnets based on reachability information and policy. Allows an AS to advertise the existence of an IP prefix to rest of Internet: This subnet is here Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 53

BGP basics Pairs of routers (BGP peers) exchange routing info over semi-permanent TCP connections: BGP sessions BGP sessions need not correspond to physical links! When AS2 advertises an IP prefix to AS1: AS2 promises it will forward IP packets towards that prefix AS2 can aggregate prefixes in its advertisement Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 54

ebgp and ibgp External BGP: between routers in different ASes Internal BGP: between routers in same AS Remember: In spite of intra-as routing protocol, all routers need to know about external destinations (not only border routers) No different protocols just slightly different configurations! 3c 3a 3b AS3 1a AS1 1c 1d ebgp session ibgp session 1b 2a AS2 2c 2b Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 55

Distributing reachability info Using ebgp session between 3a and 1c, AS3 sends reachability info about prefix x to AS1. 1c can then use ibgp to distribute new prefix info to all routers in AS1 1b can then re-advertise new reachability info to AS2 over 1b-to-2a ebgp session When router learns of new prefix x, it creates entry for prefix in its forwarding table. 3c x 3a 3b AS3 1a AS1 1c 1d ebgp session ibgp session 1b 2a AS2 2c 2b Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 56

Chair for Network Architectures and Services Prof. Carle Department for Computer Science TU München Slides subject to change after this point until Monday!

Path attributes & BGP routes advertised prefix includes BGP attributes. prefix + attributes = route two important attributes: AS-PATH: contains ASs through which prefix advertisement has passed: e.g, AS 67, AS 17 NEXT-HOP: indicates specific internal-as router to next-hop AS. (may be multiple links from current AS to next-hop-as) when gateway router receives route advertisement, uses import policy to accept/decline. Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 58

BGP route selection router may learn about more than 1 route to some prefix. Router must select route. elimination rules: 1. local preference value attribute: policy decision 2. shortest AS-PATH 3. closest NEXT-HOP router: hot potato routing 4. additional criteria Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 59

BGP messages BGP messages exchanged using TCP. BGP messages: OPEN: opens TCP connection to peer and authenticates sender UPDATE: advertises new path (or withdraws old) KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request NOTIFICATION: reports errors in previous msg; also used to close connection Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 60

BGP routing policy B legend: provider network W A C X customer network: Y A,B,C are provider networks X,W,Y are customer (of provider networks) X is dual-homed: attached to two networks X does not want to route from B via X to C.. so X will not advertise to B a route to C Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 61

BGP routing policy (2) B legend: provider network W A C X customer network: Y A advertises path AW to B B advertises path BAW to X Should B advertise path BAW to C? No way! B gets no revenue for routing CBAW since neither W nor C are B s customers B wants to force C to route to w via A B wants to route only to/from its customers! Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 62

Why different Intra- and Inter-AS routing? Policy: Inter-AS: admin wants control over how its traffic routed, who routes through its net. Intra-AS: single admin, so no policy decisions needed Scale: hierarchical routing saves table size, reduced update traffic Performance: Intra-AS: can focus on performance Inter-AS: policy may dominate over performance Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 63

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Hierarchical routing Routing in the Internet RIP OSPF BGP Broadcast and multicast routing Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 64

Broadcast Routing deliver packets from source to all other nodes source duplication is inefficient: duplicate R1 duplicate creation/transmission R1 R2 R2 duplicate R3 R4 R3 R4 source duplication in-network duplication source duplication: how does source determine recipient addresses? Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 65

In-network duplication flooding: when node receives brdcst pckt, sends copy to all neighbors Problems: cycles & broadcast storm controlled flooding: node only brdcsts pkt if it hasn t brdcst same packet before Node keeps track of pckt ids already brdcsted Or reverse path forwarding (RPF): only forward pckt if it arrived on shortest path between node and source spanning tree No redundant packets received by any node Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 66

Spanning Tree First construct a spanning tree Nodes forward copies only along spanning tree A A c B c B F E D F E D (a) Broadcast initiated at A G G (b) Broadcast initiated at D Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 67

Spanning Tree: Creation Center node Each node sends unicast join message to center node Message forwarded until it arrives at a node already belonging to spanning tree A A c 3 B c B F 1 4 E 2 D 5 F E D G G (a) Stepwise construction of spanning tree (b) Constructed spanning tree Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 68

Multicast Routing: Problem Statement Goal: find a tree (or trees) connecting routers having local mcast group members tree: not all paths between routers used source-based: different tree from each sender to rcvrs shared-tree: same tree used by all group members Shared tree Source-based trees Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 69

Approaches for building mcast trees Approaches: source-based tree: one tree per source shortest path trees reverse path forwarding group-shared tree: group uses one tree minimal spanning (Steiner) center-based trees we first look at basic approaches, then specific protocols adopting these approaches Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 70

Shortest Path Tree mcast forwarding tree: tree of shortest path routes from source to all receivers Dijkstra s algorithm S: source R1 1 R2 3 4 2 R4 5 R5 LEGEND router with attached group member router with no attached group member R3 R6 6 R7 i link used for forwarding, i indicates order link added by algorithm Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 71

Reverse Path Forwarding rely on router s knowledge of unicast shortest path from it to sender each router has simple forwarding behavior: if (mcast datagram received on incoming link on shortest path back to center) then flood datagram onto all outgoing links else ignore datagram Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 72

Reverse Path Forwarding: example S: source R2 R1 R4 LEGEND router with attached group member R5 router with no attached group member R3 R6 R7 datagram will be forwarded datagram will not be forwarded result is a source-specific reverse SPT may be a bad choice with asymmetric links Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 73

Reverse Path Forwarding: pruning forwarding tree contains subtrees with no mcast group members no need to forward datagrams down subtree prune msgs sent upstream by router with no downstream group members S: source LEGEND R1 R4 router with attached group member R3 R2 R6 P P R7 R5 P router with no attached group member prune message links with multicast forwarding Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 74

Shared-Tree: Steiner Tree Steiner Tree: minimum cost tree connecting all routers with attached group members problem is NP-complete excellent heuristics exists not used in practice: computational complexity information about entire network needed monolithic: rerun whenever a router needs to join/leave Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 75

Center-based trees single delivery tree shared by all one router identified as center of tree to join: edge router sends unicast join-msg addressed to center router join-msg processed by intermediate routers and forwarded towards center join-msg either hits existing tree branch for this center, or arrives at center path taken by join-msg becomes new branch of tree for this router Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 76

Center-based trees: an example Suppose R6 chosen as center: LEGEND R1 3 R4 router with attached group member R3 R2 1 R6 2 R7 R5 1 router with no attached group member path order in which join messages generated Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 77

Internet Multicasting Routing: DVMRP DVMRP: distance vector multicast routing protocol, RFC1075 flood and prune: reverse path forwarding, source-based tree RPF tree based on DVMRP s own routing tables constructed by communicating DVMRP routers no assumptions about underlying unicast initial datagram to mcast group flooded everywhere via RPF routers not wanting group: send upstream prune msgs Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 78

DVMRP: continued soft state: DVMRP router periodically (1 min.) forgets branches are pruned: mcast data again flows down unpruned branch downstream router: reprune or else continue to receive data routers can quickly regraft to tree following IGMP join at leaf odds and ends commonly implemented in commercial routers Mbone routing done using DVMRP Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 79

Tunneling Q: How to connect islands of multicast routers in a sea of unicast routers? physical topology logical topology mcast datagram encapsulated inside normal (non-multicastaddressed) datagram normal IP datagram sent thru tunnel via regular IP unicast to receiving mcast router receiving mcast router unencapsulates to get mcast datagram Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 80

PIM: Protocol Independent Multicast not dependent on any specific underlying unicast routing algorithm (works with all) two different multicast distribution scenarios : Dense: group members densely packed, in close proximity. bandwidth more plentiful Sparse: # networks with group members small wrt # interconnected networks group members widely dispersed bandwidth not plentiful Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 81

Consequences of Sparse-Dense Dichotomy: Dense group membership by routers assumed until routers explicitly prune data-driven construction on mcast tree (e.g., RPF) bandwidth and non-grouprouter processing profligate Sparse: no membership until routers explicitly join receiver- driven construction of mcast tree (e.g., centerbased) bandwidth and non-grouprouter processing conservative Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 82

PIM- Dense Mode flood-and-prune RPF, similar to DVMRP but underlying unicast protocol provides RPF info for incoming datagram less complicated (less efficient) downstream flood than DVMRP reduces reliance on underlying routing algorithm has protocol mechanism for router to detect it is a leafnode router Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 83

PIM - Sparse Mode center-based approach router sends join msg to rendezvous point (RP) R1 join R4 intermediate routers update state and forward join after joining via RP, router can switch to source-specific tree increased performance: less concentration, shorter paths R3 R2 join all data multicast from rendezvous point R6 join R5 R7 rendezvous point Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 84

PIM - Sparse Mode sender(s): unicast data to RP, which distributes down RP-rooted tree RP can extend mcast tree upstream to source RP can send stop msg if no attached receivers no one is listening! R3 R2 R1 join join all data multicast from rendezvous point R6 join R4 R5 R7 rendezvous point Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 85

Chapter 4: Network Layer Part 1 Introduction IP: Internet Protocol Datagram format IPv4 addressing ICMP Part 2 IPv6 Virtual circuit and datagram networks What s inside a router Part 3 Routing algorithms Link state Distance Vector Hierarchical routing Routing in the Internet RIP OSPF BGP Broadcast and multicast routing Network IN2097 - Master Security, Course WS 2008/09, Computer Chapter Networks, 9 WS 2009/2010 86