212
Network Layer (2-89-90) 4-1 Network Layer Computer Networks

Network Layer (2-89-90) 4-1 Network Layer Computer Networks

Embed Size (px)

Citation preview

  • Slide 1
  • Network Layer (2-89-90) 4-1 Network Layer Computer Networks
  • Slide 2
  • Network Layer (2-89-90) 4-2 Chapter 4: Network Layer Chapter goals: understanding principles behind network layer services: routing (path selection) dealing with scale how a router works advanced topics: IPv6, mobility instantiation and implementation in the Internet Overview: network layer services routing principles: path selection hierarchical routing IP Internet routing protocols reliable transfer intra-domain inter-domain whats inside a router? IPv6 mobility
  • Slide 3
  • Network Layer (2-89-90) 4-3 Chapter 4 Outline 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 Routing in the Internet 4.5 The Internet (IP) Protocol 4.6 Whats Inside a Router 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility
  • Slide 4
  • Network Layer (2-89-90) 4-4 Network Layer Functions transport packet from sending to receiving hosts network layer protocols in every host, router three important functions: path determination: route taken by packets from source to dest. (Routing Algorithms) forwarding: move packets from routers input to appropriate router output call setup: some network architectures require router call setup along path before data flows application transport network data link physical network data link physical application transport network data link physical
  • Slide 5
  • Network Layer (2-89-90) 4-5 Network Service Model Q: What service model for channel transporting packets from sender to receiver? Services guaranteed bandwidth? preservation of inter-packet timing (no jitter)? loss-free delivery? in-order delivery? congestion feedback to sender? virtual circuit or datagram? The most important abstraction provided by network layer:
  • Slide 6
  • Network Layer (2-89-90) 4-6 Virtual circuits call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host ID) every router on source-destination path maintains state for each passing connection transport-layer connection only involved two end systems Link and router resources (bandwidth, buffers) may be allocated to VC (dedicated resources = predictable service) to get circuit-like performance. source-to-destination path behaves much like telephone circuit performance-wise network actions along source-to-destination path
  • Slide 7
  • Network Layer (2-89-90) 4-7 VC implementation A VC consists of: 1. path from source to destination 2. VC numbers, one number for each link along path 3. entries in forwarding tables in routers along path Packet belonging to VC carries VC number (rather than destination address) VC number can be changed on each link. New VC number comes from forwarding table
  • Slide 8
  • Network Layer (2-89-90) 4-8 Forwarding table 12 22 32 1 2 3 VC number Interface number Incoming interface Incoming VC # Outgoing interface Outgoing VC # 1 12 3 22 2 63 1 18 3 7 2 17 1 97 3 87 Forwarding table in router a Routers maintain connection state information! a
  • Slide 9
  • Network Layer (2-89-90) 4-9 Virtual Circuits: Signaling Protocols used to setup, maintain teardown VC used in ATM, frame-relay, X.25 not used in todays Internet 1. Initiate call 2. Incoming call 3. Accept call 4. Call connected 5. Data flow begins 6. Receive data application transport network data link physical application transport network data link physical
  • Slide 10
  • Network Layer (2-89-90) 4-10 Datagram networks: the Internet model 1. Send Data 2. Receive Data application transport network data link physical application transport network data link physical no call setup at network layer routers: no state about end-to-end connections no network-level concept of connection packets forwarded using destination host address packets between same source-destination pair may take different paths
  • Slide 11
  • Network Layer (2-89-90) 4-11 Network Layer Service Models: Internet model being extended: Integrated services, Differentiated Services Chapter 6 Network Architecture Internet ATM Service Model best effort CBR VBR ABR UBR Bandwidth none constant rate guaranteed rate guaranteed minimum none Loss no yes no Order no yes Timing no yes no Congestion feedback no (inferred via loss) no congestion no congestion yes no Guarantees ? CBR: Constant bit rate VBR: Variable bit rate ABR: Available bit rate UBR: Unspecified bit rate
  • Slide 12
  • Network Layer (2-89-90) 4-12 QoS Factors Timing Connection Establishment Delay End-To-End Delay Connection Establishment Failure Probability Throughput or Bandwidth Guarantee Ordering Preservation Congestion Indication (Control) Bit-Error rate or Packet-Loss Rate Control Protection Priority Resilience (Return Back to Normal Operation).
  • Slide 13
  • Network Layer (2-89-90) 4-13 Service Clases Guaranteed Quality of Service Predictive Quality of Service Best Effort Quality of Service
  • Slide 14
  • Network Layer (2-89-90) 4-14 Guaranteed QoS Specified through QoS parameter values deterministic statistical Single value - average (threshold, target) Pair of values - interval Triple of values max., mean, min.
  • Slide 15
  • Network Layer (2-89-90) 4-15 Predictable Service Parameter bounds based on history, that is, past network behavior. Parameter values are measured, and certain statistical analyses may be carried out
  • Slide 16
  • Network Layer (2-89-90) 4-16 Best Effort Services No guarantees of quality, no QoS parameter values UDP/IP Partial guarantees, some QoS parameter values are given. TCP/IP
  • Slide 17
  • Network Layer (2-89-90) 4-17 Datagram or VC Network: why? Internet (Datagram) data exchange among computers elastic service, no strict timing req. smart end systems (computers) can adapt, perform control, error recovery simple inside network, complexity at edge many link types different characteristics uniform service is difficult ATM (Virtual Circuit) evolved from telephony human conversation: strict timing, reliability requirements need for guaranteed service dumb end systems telephones complexity inside network
  • Slide 18
  • Network Layer (2-89-90) 4-18 Buffering in IP routers Buffer size l Space for bursts of packets l Latency Router Internet Router Network Interface Network Interface Dropping packets When? What?
  • Slide 19
  • Network Layer (2-89-90) 4-19 FIFO Queueing in the Router (Drop Tail) Single queue maintained Network Interface Network Interface
  • Slide 20
  • Network Layer (2-89-90) 4-20 FIFO Queueing in the Router (Drop Tail) Single queue maintained Dequeue from head Network Interface Network Interface
  • Slide 21
  • Network Layer (2-89-90) 4-21 FIFO Queueing in the Router (Drop Tail) Single queue maintained Dequeue from head Enqueue at tail Network Interface Network Interface
  • Slide 22
  • Network Layer (2-89-90) 4-22 FIFO Queueing in the Router (Drop Tail) Single queue maintained Dequeue from head Enqueue at tail When full Network Interface Network Interface
  • Slide 23
  • Network Layer (2-89-90) 4-23 FIFO Queueing in the Router (Drop Tail) Single queue maintained Dequeue from head Enqueue at tail When full drop arriving packet (drop-tail) Network Interface Network Interface
  • Slide 24
  • Network Layer (2-89-90) 4-24 Slow Feedback from Drop Tail Feedback comes when buffer is completely full even though the buffer has been filling for a while Plus, the filling buffer is increasing RTT and the variance in the RTT Might be better to give early feedback Get one or two flows to slow down, not all of them Get these flows to slow down before it is too late
  • Slide 25
  • Network Layer (2-89-90) 4-25 Queue Management Performance Degradation in current TCP Congestion Control Multiple packet loss Low link utilization Congestion collapse The role of the router (i.e., network) Control congestion effectively with a network Allocate bandwidth fairly
  • Slide 26
  • Network Layer (2-89-90) 4-26 Active Queue Management Goals: Better congestion notification for responsive flows (i.e. TCP) Maintain shorter queues Fairness in drops (proportional)
  • Slide 27
  • Network Layer (2-89-90) 4-27 Random Early Detection (RED) Invented by Sally Floyd and Van Jacobson in the early 1990s, differs from the DECbit in two major ways Notification is implicit just drop the packet (TCP will timeout) could make explicit by marking the packet Early random drop rather than wait for queue to become full, drop each arriving packet with some drop probability whenever the queue length exceeds some drop level
  • Slide 28
  • Network Layer (2-89-90) 4-28 Random Early Detection (RED). Basic idea of RED Router notices that the queue is getting build-up. Randomly drops or marks arriving packets (before queue gets full). Packet drop signals a congestion to the source. Packet drop probability Drop probability increases as queue length increases If buffer is below some level, dont drop anything otherwise, set drop probability as function of queue
  • Slide 29
  • Network Layer (2-89-90) 4-29 RED Details Compute average queue length (Geometric Moving Average) 0 < < 1 (usually 0.002) SampleLen is queue length each time a packet arrives. SampleLen MinTh MaxTh
  • Slide 30
  • Network Layer (2-89-90) 4-30 RED Details. On arrival of a packet: calculate AvgLen if AvgLen MaxTh then drop arriving packet
  • Slide 31
  • Network Layer (2-89-90) 4-31 RED Details.. Computing probability P P maxP 1 minTh maxTh AvgLen
  • Slide 32
  • Network Layer (2-89-90) 4-32 RED Detail Weighted Running Average Queue Length Time Max Queue Size Max Threshold Min Threshold Forced drop Probabilistic drops No drops Drop probability Average Queue Length
  • Slide 33
  • Network Layer (2-89-90) 4-33 Properties of RED Drops packets before queue is full In the hope of reducing the rates of some flows Drops packet in proportion to each flows rate High-rate flows have more packets and, hence, a higher chance of being selected Drops are spaced out in time Which should help desynchronize the TCP senders Tolerant of burstiness in the traffic By basing the decisions on average queue length
  • Slide 34
  • Network Layer (2-89-90) 4-34 34 Tuning RED MaxP is typically set to 0.02, meaning that when the average queue size is halfway between the two thresholds, the gateway drops roughly one out of 100 packets. If traffic is bursty, then MinThreshold should be sufficiently large to allow link utilization to be maintained at an acceptably high level. Difference between two thresholds should be larger than the typical increase in the calculated average queue length in one RTT; setting MaxThreshold to twice MinThreshold is reasonable for traffic on todays Internet.
  • Slide 35
  • Network Layer (2-89-90) 4-35 Problems With RED Hard to get the tunable parameters just right How early to start dropping packets? What slope for the increase in drop probability? What time scale for averaging the queue length? Sometimes RED helps but sometimes not If the parameters arent set right, RED doesnt help And it is hard to know how to set the parameters RED is implemented in practice But, often not used due to the challenges of tuning right Many variations With cute names like Blue and FRED
  • Slide 36
  • Network Layer (2-89-90) 4-36 Explicit Congestion Notification Early dropping of packets Good: gives early feedback Bad: has to drop the packet to give the feedback Explicit Congestion Notification Router marks the packet with an ECN bit and sending host interprets as a sign of congestion Surmounting the challenges Must be supported by the end hosts and the routers Requires two bits in the IP header (one for the ECN mark, and one to indicate the ECN capability) Solution: borrow two of the Type-Of-Service bits in the IPv4 packet header
  • Slide 37
  • Network Layer (2-89-90) 4-37 Chapter 4 Outline 4.1 Introduction and Network Service Models 4.2 Routing Principles Distance vector routing Link state routing 4.3 Hierarchical Routing 4.4 Routing in the Internet 4.5 The Internet (IP) Protocol 4.6 Whats Inside a Router 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility
  • Slide 38
  • Network Layer (2-89-90) 4-38 CS244a Handout 5 The Problem A B How does R choose a next-hop on the path towards host B? R
  • Slide 39
  • Network Layer (2-89-90) 4-39 1 2 3 128.9.16.14 dest. IP addr. in arriving packets header routing algorithm local forwarding table dest. net. addr. Output port 65/8 128.9/16 128.9.16/20 128.9.19/24 32213221 Interplay between routing, forwarding
  • Slide 40
  • Network Layer (2-89-90) 4-40 Graph: G = (N,E) 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 Remark: Graph abstraction is useful in other network contexts Example: P2P, where N is set of peers and E is set of TCP connections z 2 2 1 3 1 1 2 5 3 5 y w v u x
  • Slide 41
  • Network Layer (2-89-90) 4-41 Graph abstraction: costs z 2 2 1 3 1 1 2 5 3 5 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: Whats the least-cost path between u and z ? Routing algorithm: algorithm that finds least-cost path c(x,x) = cost of link (x,x) e.g., c(w,z) = 5 cost could always be 1, or inversely related to bandwidth, or inversely related to congestion y w v u x
  • Slide 42
  • Network Layer (2-89-90) 4-42 Routing Graph abstraction for routing algorithms: graph nodes are routers graph edges are physical links link cost: Delay (Make high speed links attractive, but closeness counts), $ cost, Inverse of bandwidth, Path utilization (congestion level & queue length), Stability (Is path up or down?) Goal: determine good path (sequence of routers) thru network from source to dest. good path: typically means minimum cost path other definitions possible Routing protocol Abstract model of a network A F D C E B 1 1 1 2 2 2 5 3 5 3 4 3
  • Slide 43
  • Network Layer (2-89-90) 4-43 CS244a Handout 5 Technique 1: Nave Approach Advantages: Simple. Every destination in the network is reachable. Disadvantages: Some routers receive a packet multiple times. Packets can go round in loops forever. Inefficient. Flood!: Routers forward packets to all ports except the input port. R
  • Slide 44
  • Network Layer (2-89-90) 4-44 CS244a Handout 5 Spanning Trees Objective: Find the lowest cost route from each of (R 1, , R 7 ) to R 8. 114 2 4 2 23 2 3 R1R1 R2R2 R3R3 R4R4 R5R5 R6R6 R7R7 R8R8 B A
  • Slide 45
  • Network Layer (2-89-90) 4-45 CS244a Handout 5 A Spanning Tree The solution is a spanning tree with R 8 as the root of the tree. Tree: There are no loops. Spanning: All nodes included. Well see two algorithms that build spanning trees automatically: The distributed Bellman-Ford algorithm ( Distance Vector ). Dijkstras shortest path first algorithm ( Link State ). 114 2 4 2 23 2 3 R1R1 R3R3 R5R5 R7R7 R8R8
  • Slide 46
  • Network Layer (2-89-90) 4-46 Routing protocol requirements Minimizing route table spec: Node memory related issue Minimizing control message: Overhead in bandwidth Robustness Retain its correctness in dynamic situation. Should be free of loops, black holes. Using optimal paths (optimality) Choosing the best path ( in terms of some metrics) Stability: Free of oscillations Fairness Should take the complete topology while computing the path Efficiency: Convergence time Correctness
  • Slide 47
  • Network Layer (2-89-90) 4-47 Design Choices - 1 Centralized versus Distributed routing Centralized: One node collects information (node has complete topology and link cost) and then installs the routing information in all nodes (Link state algorithm). Distributed: All nodes co-operate to form the rooting table. Source based versus hop by hop Source routing: data packet contains the hop list. Hop by hop: Each hop takes decision based on its routing table about the next hop (Distance vector algorithm)
  • Slide 48
  • Network Layer (2-89-90) 4-48 Design Choices - 2 Stochastic versus deterministic Stochastic: Routing table contains multiple path information. Next hop is chosen randomly. Advantage: load distribution. Deterministic: always follow same path. Single versus multiple path Router can use multiple paths for a single destination Dynamic versus Static Dynamic: Routing dependent on the current network state routes update more quickly periodic update in response to link cost changes Static: Routes update slowly over time.
  • Slide 49
  • Network Layer (2-89-90) 4-49 Assumptions About Router Router knows address of each neighbor. Router can communicate the information with its neighbors. Router tells its neighbors its best idea of distance to every other router in the network. Router receives these distance vectors from its neighbors. Router updates its notion of best path to each destination, and the next hop for this destination.
  • Slide 50
  • Network Layer (2-89-90) 4-50 Distance Table Inside Router Distance Table data structure row for each possible destination. column for each directly-attached neighbor router. example: in router x, for dest. y via neighbor z. This table is made based on exchanged information about distance metric and calculation. D () y y y y z1764z1764 z 14 5 9 2 z 5 8 4 11 x cost to dest. via destination Distance table in X x z y z z y y y z,1 z,5 z,4 z,4 Distance Vector=Routing table
  • Slide 51
  • Network Layer (2-89-90) 4-51 Routers Information Exchange Routers exchange information periodically of known: distance metric (costs) routing table (distance vector) Exchange timing: whenever a link fails Whenever a routing table entry changes.
  • Slide 52
  • Network Layer (2-89-90) 4-52 Distance Vector Routing Algorithm Iterative: continues until no nodes exchange info. self-terminating: no signal to stop Asynchronous: nodes need not exchange info/iterate in lock step! distributed: each node communicates only with directly-attached neighbors Distance Table data structure each node has its own: row for each possible destination column for each directly- attached neighbor to node example: in node X, for dest. Y via neighbor Z: D X (Y,Z) distance from X to Y, via Z as next hop D (Y,Z) X c(X,Z) + min {D (Y,w)} Z w =
  • Slide 53
  • Network Layer (2-89-90) 4-53 Distance Table: example B w = 2 D C B A E 1 7 1 8 2 source ABCDABCD A1764A1764 B 14 8 9 11 D5542D5542 c(E,B) + min {D (A,w)} = 8 + 6 = 14 E D (A,B)= A E B D (A,C) B D C c(E,B) Es neighbor Bs neighbor neighbor: j destination: i D(i, j) E Distance table:
  • Network Layer (2-89-90) 4-152 IP addresses: how to get one? Q: How does host get IP address? IP addr. is configures into host by admin. in a file Wintel: control-panel->network->configuration- >tcp/ip->properties UNIX: /etc/rc.config DHCP: Dynamic Host Configuration Protocol (RFC2131) : dynamically get address from as server (RFC2131) : plug-and-play
  • Slide 153
  • Network Layer (2-89-90) 4-153 IP addressing: ICANN Q: How does an ISP get block of addresses? A: ICANN: Internet Corporation for Assigned Names and Numbers allocates addresses manages DNS assigns domain names, resolves disputes
  • Slide 154
  • Network Layer (2-89-90) 4-154 DHCPDHCP: Dynamic Host Configuration Protocol DHCP Goal: Allow host to dynamically obtain its IP address from network server when it joins network. Can renew its lease on address in use. Allows reuse of addresses. Support for mobile users who want to join network. DHCP overview: host broadcasts DHCP discover msg DHCP server responds with DHCP offer msg host requests IP address: DHCP request msg DHCP server sends address: DHCP ack msg
  • Slide 155
  • Network Layer (2-89-90) 4-155 DHCP client-server scenario 223.1.1.1 223.1.1.2 223.1.1.3 223.1.1.4 223.1.2.9 223.1.2.2 223.1.2.1 223.1.3.2 223.1.3.1 223.1.3.27 DHCP server arriving DHCP client needs address in this network A B E
  • Slide 156
  • Network Layer (2-89-90) 4-156 DHCP client-server scenario DHCP server: 223.1.2.5 arriving client time DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 yiaddr: 0.0.0.0 transaction ID: 654 DHCP offer src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs DHCP ACK src: 223.1.2.5, 67 dest: 255.255.255.255, 68 yiaddrr: 223.1.2.4 transaction ID: 655 Lifetime: 3600 secs
  • Slide 157
  • Network Layer (2-89-90) 4-157 Chapter 4 Outline 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 Routing in the Internet 4.5 The Internet (IP) Protocol 4.6 Whats Inside a Router? 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility
  • Slide 158
  • Network Layer (2-89-90) 4-158 Router Architecture Overview Two key router functions: run routing algorithms/protocol (RIP, OSPF, BGP) switching datagrams from incoming to outgoing link
  • Slide 159
  • Network Layer (2-89-90) 4-159 Input Port Functions - function: lookup output port using routing table in input port memory - goal: complete input port processing at line speed - Queuing (buffering): if datagrams arrive faster than forwarding rate into switch fabric Physical layer: bit-level reception Data link layer: e.g., Ethernet see chapter 5
  • Slide 160
  • Network Layer (2-89-90) 4-160 Input Port Queuing (Buffering) Fabric slower than input ports combined -> queuing may occur at input queues Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward queuing delay and loss due to input buffer overflow!
  • Slide 161
  • Network Layer (2-89-90) 4-161 Three Types of Switching Fabrics
  • Slide 162
  • Network Layer (2-89-90) 4-162 Switching Via Memory First generation routers: packet copied by systems (single) CPU speed limited by memory bandwidth (2 bus crossings per datagram) Input PortOutput Port Memory System Bus Modern routers: input port processor performs lookup, copy into memory Cisco Catalyst 8500
  • Slide 163
  • Network Layer (2-89-90) 4-163 Switching Via a Bus datagram from input port memory to output port memory via a shared bus bus contention: switching speed limited by bus bandwidth 1 Gbps bus, Cisco 1900: sufficient speed for access and enterprise routers (not regional or backbone)
  • Slide 164
  • Network Layer (2-89-90) 4-164 Switching Via An Interconnection Network overcome bus bandwidth limitations Banyan networks, other interconnection nets initially developed to connect processors in multiprocessor Advanced design: fragmenting datagram into fixed length cells, switch cells through the fabric. Cisco 12000: switches Gbps through the interconnection network
  • Slide 165
  • Network Layer (2-89-90) 4-165 Output Ports Buffering required when datagrams arrive from fabric faster than the transmission rate Scheduling discipline chooses among queued datagrams for transmission queuing (delay) and loss due to output port buffer overflow!
  • Slide 166
  • Network Layer (2-89-90) 4-166 How much buffering? RFC 3439 rule of thumb: average buffering = typical RTT X link capacity C e.g., RTT=250 msec and C = 10 Gps link: Buffer=2.5 Gbit. Recent recommendation: with N flows, buffering = RTT C. N
  • Slide 167
  • Network Layer (2-89-90) 4-167 Chapter 4 Outline 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 Routing in the Internet 4.5 The Internet (IP) Protocol 4.6 Whats Inside a Router? 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility
  • Slide 168
  • Network Layer (2-89-90) 4-168 IPv6 Initial motivation: 32-bit address space completely allocated by 2008. Additional motivation: header format helps speed processing/forwarding header changes to facilitate QoS new anycast address: route to best of several replicated servers IPv6 datagram format: fixed-length 40 byte header no fragmentation allowed
  • Slide 169
  • Network Layer (2-89-90) 4-169 IPv6 Header Priority: identify priority among datagrams in flow Flow Label: identify datagrams in same flow. (concept offlow not well defined). Next header: identify upper layer protocol for data
  • Slide 170
  • Network Layer (2-89-90) 4-170 Other Changes from IPv4 Checksum: removed entirely to reduce processing time at each hop Options: allowed, but outside of header, indicated by Next Header field ICMPv6: new version of ICMP additional message types, e.g. Packet Too Big multicast group management functions
  • Slide 171
  • Network Layer (2-89-90) 4-171 Transition From IPv4 To IPv6 Not all routers can be upgraded simultaneous no flag days How will the network operate with mixed IPv4 and IPv6 routers? Two proposed approaches: Dual Stack: some routers with dual stack (v6, v4) can translate between formats Tunneling: IPv6 carried as payload in IPv4 datagram among IPv4 routers
  • Slide 172
  • Network Layer (2-89-90) 4-172 Dual Stack Approach IPv6 IPv4 Flow: X Src: A Dest: F data Flow: ?? Src: A Dest: F data Src:A Dest: F data A-to-B: IPv6 Src:A Dest: F data B-to-C: IPv4 B-to-C: IPv4 B-to-C: IPv6 ABCDE F
  • Slide 173
  • Network Layer (2-89-90) 4-173 Tunneling-Analogy IPv6 tunnel Logical view: ABE F Analogy:
  • Slide 174
  • Network Layer (2-89-90) 4-174 Tunneling-Physical View Physical view: IPv6 IPv4 Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Flow: X Src: A Dest: F data Src:B Dest: E Flow: X Src: A Dest: F data Src:B Dest: E A-to-B: IPv6 E-to-F: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4 ABCDE F IPv6 tunnel Logical view: ABE F
  • Slide 175
  • Network Layer (2-89-90) 4-175 Chapter 4 Outline 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 Routing in the Internet 4.5 The Internet (IP) Protocol 4.6 Whats Inside a Router? 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility
  • Slide 176
  • Network Layer (2-89-90) 4-176 In unicast routing, the router forwards the received packet through only one of its interfaces. Unicast
  • Slide 177
  • Network Layer (2-89-90) 4-177 In multicast routing, the router may forward the received packet through several of its interfaces. Multicast
  • Slide 178
  • Network Layer (2-89-90) 4-178 Multicast: act of sending datagram to multiple receivers with single transmit operation analogy: one teacher to many students How to achieve multicast: Multiple unicasts Application-Layer Multicast Network multicast Multicast: one sender to many receivers
  • Slide 179
  • Network Layer (2-89-90) 4-179 Multicasts Multiple unicast (One-to-All unicast) Using an underlying unicast network layer Duplicated at the sender transport layer Application-layer multicast Involving the receivers in the replication and forwarding of data. Explicit multicast Network player supports multicast Data is replicated at the network router
  • Slide 180
  • Network Layer (2-89-90) 4-180 1- Multiple Unicasts Source sends 3 unicast datagrams, One addressed to each of 3 receivers Source
  • Slide 181
  • Network Layer (2-89-90) 4-181 2- Application-layer Multicast End systems involved in multicast copy and forward unicast datagrams among themselves example: p2p file sharing
  • Slide 182
  • Network Layer (2-89-90) 4-182 3- Network Multicast Router actively participate in multicast, making copies of packets as needed and forwarding towards multicast receivers Multicast routers duplicate and forward multicast datagrams
  • Slide 183
  • Network Layer (2-89-90) 4-183 Multicast Uses Bulk data transfer (software updates, mailing list distribution, stock updates) Streamed Continuous Media (audio/visual conferences) Shared Application Data (shared whiteboard) Interactive Gaming or Simulations (very intensive)
  • Slide 184
  • Network Layer (2-89-90) 4-184 Internet Multicast Service Model Multicast group concept: use of indirection Sending host (source) addresses IP datagram to multicast group. Routers forward multicast datagrams to hosts that have joined that multicast group multicast group 226.17.30.197 Source
  • Slide 185
  • Network Layer (2-89-90) 4-185 Multicast Groups Class D Internet addresses reserved for multicast: Host group semantics: anyone can join (receive) multicast group anyone can send to multicast group no network-layer identification to hosts of members Needed: infrastructure to deliver multicast-addressed datagrams to all hosts that have joined that multicast group. 1110Multicast Group Address (ID) -24 bits
  • Slide 186
  • Network Layer (2-89-90) 4-186 Joining a Multicast Group: Two-Step Process Local: host informs local multicast router of desire to join a group: IGMP (Internet Group Management Protocol) Wide Area: local router interacts with other routers to receive multicast datagram flow: many protocols (e.g., DVMRP, MOSPF, PIM) multicast group IGMP DVMRP or MOSPF or PIM IGMP :router with attached group member
  • Slide 187
  • Network Layer (2-89-90) 4-187 IGMP: Internet Group Management Protocol Host: sends IGMP report when application joins multicast group. IP_ADD_MEMBERSHIP socket option host need not explicitly unjoin group when leaving Router: sends IGMP query at regular intervals host belonging to a multicast group must reply to query IGMP Report IGMP Query
  • Slide 188
  • Network Layer (2-89-90) 4-188 IGMP IGMP-v1 router: Host Membership Query Message broadcast on LAN to all hosts host: Host Membership Report message to indicate group membership randomized delay before responding implicit leave via no reply to Query RFC 1112 IGMP-v2: additions include group-specific Query Leave Group message last host replying to Query can send explicit Leave Group message router performs group- specific query to see if any hosts left in group RFC 2236 IGMP-v3: under development as Internet draft
  • Slide 189
  • Network Layer (2-89-90) 4-189 IGMP v2 Message Types IGMP Message TypeSent ByPurpose Membership query: General RouterQuery multicast groups joined by attached hosts Membership query: Specific RouterQuery if specific multicast group joined by attached hosts Membership reportHostReport host wants to join or is joined to given multicast group Leave GroupHostReport leaving given multicast group Report Query
  • Slide 190
  • Network Layer (2-89-90) 4-190 Computer Networks IGMP Message Format
  • Slide 191
  • Network Layer (2-89-90) 4-191 Multicast Routing Objectives Every member receives EXACTLY ONE copy of the packet Non-members receive nothing No loops in route Optimal path from source to each destination. Terminology Spanning Tree: Source is the root, group members are the leaves. Shortest Path Spanning Tree: Each path from root to a leaf is the shortest according to some metric
  • Slide 192
  • Network Layer (2-89-90) 4-192 Multicast Connections Goal: find a tree (or trees) connecting routers having local multicast group members tree: not all paths between routers used Group-shared tree: same tree used by all group members Source-based tree: different tree from each sender to receivers Group- Shared tree
  • Slide 193
  • Network Layer (2-89-90) 4-193 Tree Approaches Source-based trees 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 , : sources
  • Slide 194
  • Network Layer (2-89-90) 4-194 Shortest Path Tree Source-Based Multicast forwarding tree: tree of shortest path routes from source to all receivers Dijkstras algorithm. R1 R2 R3 R4 R5 R6 R7 2 1 6 3 4 5 i :router with attached group member link used for forwarding, i indicates order link added by algorithm Source
  • Slide 195
  • Network Layer (2-89-90) 4-195 Reverse Path Forwarding Source-Based Rely on routers knowledge of unicast shortest path from it to sender Each router has simple forwarding behavior: if (multicast datagram received on incoming link on shortest path back to center) then flood datagram onto all outgoing links else ignore datagram
  • Slide 196
  • Network Layer (2-89-90) 4-196 Reverse Path Forwarding: Example Result is a source-specific reverse Shortest Path Tree May be a bad choice with asymmetric links. R1 R2 R3 R4 R5 R6 R7 :router with attached group member datagram will not be Forwarded datagram will be forwarded Source
  • Slide 197
  • Network Layer (2-89-90) 4-197 Reverse Path Forwarding: Pruning R1 R2 R3 R4 R5 R6 R7 :router with attached group member prune message links with multicast forwarding Source P P P Forwarding tree contains sub-trees with no multicast group members No need to forward datagrams down sub-tree prune messages sent upstream by router with no downstream group members
  • Slide 198
  • Network Layer (2-89-90) 4-198 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 Shared-Tree: Steiner Tree
  • Slide 199
  • Network Layer (2-89-90) 4-199 Center-Based Trees Single delivery tree shared by all One router identified as center of tree to join: edge router sends unicast join-message addressed to center router join-message processed by intermediate routers and forwarded towards center join-message either hits existing tree branch for this center, or arrives at center path taken by join-message becomes new branch of tree for this router
  • Slide 200
  • Network Layer (2-89-90) 4-200 Center-Based Trees Suppose R6 chosen as center: R1 R2 R3 R4 R5 R6 R7 :router with attached group member path order in which join messages generated Source P 1 3 2 1
  • Slide 201
  • Network Layer (2-89-90) 4-201 Multicast Routing Protocols
  • Slide 202
  • Network Layer (2-89-90) 4-202 DVMRP - 1 DVMRP: distance vector multicast routing protocol, RFC1075 flood and prune: reverse path forwarding, source- based tree RPF tree based on DVMRPs own routing tables constructed by communicating DVMRP routers no assumptions about underlying unicast initial datagram to multicast group flooded everywhere via RPF routers not wanting group: send upstream prune messages.
  • Slide 203
  • Network Layer (2-89-90) 4-203 DVMRP - 1 Soft state: DVMRP router periodically (1 min.) forgets branches are pruned: multicast data again flows down unpruned branch downstream router: reprune or else continue to receive data Routers can quickly redraft to tree following IGMP join at leaf Odds and ends commonly implemented in commercial routers Mbone routing done using DVMRP.
  • Slide 204
  • Network Layer (2-89-90) 4-204 Tunneling Q: How to connect islands of multicast routers in a sea of unicast routers? multicast datagram encapsulated inside normal (non- multicast-addressed) datagram. normal IP datagram sent thru tunnel via regular IP unicast to receiving multicast router. receiving multicast router unencapsulates to get multicast datagram physical topology logical topology
  • Slide 205
  • Network Layer (2-89-90) 4-205 PIM: Protocol Independent Multicast Not dependent on any specific underlying unicast routing algorithm (works with all) Two different multicast distribution scenarios: 1-Dense group members densely packed, in close proximity. bandwidth more plentiful 2-Sparse: # networks with group members small wrt # interconnected networks group members widely dispersed bandwidth not plentiful
  • Slide 206
  • Network Layer (2-89-90) 4-206 Consequences of Sparse-Dense Dichotomy: Dense: group membership by routers assumed until routers explicitly prune data-driven construction on multicast tree (e.g., RPF) bandwidth and non- group-router processing profligate Sparse : no membership until routers explicitly join receiver- driven construction of multicast tree (e.g., center-based) bandwidth and non-group- router processing conservative
  • Slide 207
  • Network Layer (2-89-90) 4-207 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 leaf-node router
  • Slide 208
  • Network Layer (2-89-90) 4-208 PIM - Sparse Mode center-based approach router sends join msg to rendezvous point (RP) intermediate routers update state and forward join after joining via RP, router can switch to source-specific tree increased performance: less concentration, shorter paths R1 R2 R3 R4 R5 R6 R7 P join rendezvous point all data multicast from rendezvous point
  • Slide 209
  • Network Layer (2-89-90) 4-209 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! R1 R2 R3 R4 R5 R6 R7 P join rendezvous point all data multicast from rendezvous point
  • Slide 210
  • Network Layer (2-89-90) 4-210 Chapter 4 roadmap 4.1 Introduction and Network Service Models 4.2 Routing Principles 4.3 Hierarchical Routing 4.4 Routing in the Internet 4.5 The Internet (IP) Protocol 4.6 Whats Inside a Router? 4.7 IPv6 4.8 Multicast Routing 4.9 Mobility
  • Slide 211
  • Network Layer (2-89-90) 4-211 What is mobility? spectrum of mobility, from the network perspective: no mobility high mobility mobile user, using same access point mobile user, passing through multiple access point while maintaining ongoing connections ( like cell phone) mobile user, connecting/ disconnecting from network using DHCP.
  • Slide 212
  • Network Layer (2-89-90) 4-212 Mobility: Vocabulary home network: permanent home of mobile (e.g., 128.119.40/24) Permanent address: address in home network, can always be used to reach mobile e.g., 128.119.40.186 home agent: entity that will perform mobility functions on behalf of mobile, when mobile is remote wide area network correspondent
  • Slide 213
  • Network Layer (2-89-90) 4-213 Mobility: more vocabulary Care-of-address: address in visited network. (e.g., 79,129.13.2) wide area network visited network: network in which mobile currently resides (e.g., 79.129.13/24) Permanent address: remains constant ( e.g., 128.119.40.186) home agent: entity in visited network that performs mobility functions on behalf of mobile. correspondent: wants to communicate with mobile
  • Slide 214
  • Network Layer (2-89-90) 4-214 How do you contact a mobile friend: search all phone books? call her parents? expect her to let you know where he/she is? I wonder where Ali moved to? Consider friend frequently changing addresses, how do you find her?
  • Slide 215
  • Network Layer (2-89-90) 4-215 Mobility: approaches Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange. routing tables indicate where each mobile located no changes to end-systems Let end-systems handle it: indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote direct routing: correspondent gets foreign address of mobile, sends directly to mobile
  • Slide 216
  • Network Layer (2-89-90) 4-216 Mobility: approaches Let routing handle it: routers advertise permanent address of mobile-nodes-in-residence via usual routing table exchange. routing tables indicate where each mobile located no changes to end-systems let end-systems handle it: indirect routing: communication from correspondent to mobile goes through home agent, then forwarded to remote direct routing: correspondent gets foreign address of mobile, sends directly to mobile not scalable to millions of mobiles
  • Slide 217
  • Network Layer (2-89-90) 4-217 Mobility: registration End result: Foreign agent knows about mobile Home agent knows location of mobile wide area network home network visited network 1 mobile contacts foreign agent on entering visited network 2 foreign agent contacts home agent home: this mobile is resident in my network
  • Slide 218
  • Network Layer (2-89-90) 4-218 Mobility via Indirect Routing wide area network home network visited network 3 2 4 1 correspondent addresses packets using home address of mobile home agent intercepts packets, forwards to foreign agent foreign agent receives packets, forwards to mobile mobile replies directly to correspondent
  • Slide 219
  • Network Layer (2-89-90) 4-219 Indirect Routing: comments Mobile uses two addresses: permanent address: used by correspondent (hence mobile location is transparent to correspondent) care-of-address: used by home agent to forward datagrams to mobile foreign agent functions may be done by mobile itself triangle routing: correspondent-home-network- mobile inefficient when correspondent, mobile are in same network
  • Slide 220
  • Network Layer (2-89-90) 4-220 Forwarding datagrams to remote mobile Permanent address: 128.119.40.186 Care-of address: 79.129.13.2 dest: 128.119.40.186 packet sent by correspondent dest: 79.129.13.2 dest: 128.119.40.186 packet sent by home agent to foreign agent: a packet within a packet dest: 128.119.40.186 foreign-agent-to-mobile packet
  • Slide 221
  • Network Layer (2-89-90) 4-221 Indirect Routing: moving between networks suppose mobile user moves to another network registers with new foreign agent new foreign agent registers with home agent home agent update care-of-address for mobile packets continue to be forwarded to mobile (but with new care-of-address) Mobility, changing foreign networks transparent: on going connections can be maintained!
  • Slide 222
  • Network Layer (2-89-90) 4-222 Mobility via Direct Routing wide area network home network visited network 4 2 4 1 correspondent requests, receives foreign address of mobile correspondent forwards to foreign agent foreign agent receives packets, forwards to mobile mobile replies directly to correspondent 3
  • Slide 223
  • Network Layer (2-89-90) 4-223 Mobility via Direct Routing: comments overcome triangle routing problem non-transparent to correspondent: correspondent must get care-of-address from home agent What happens if mobile changes networks?
  • Slide 224
  • Network Layer (2-89-90) 4-224 Mobile IP RFC 3220 has many features weve seen: home agents, foreign agents, foreign-agent registration, care-of-addresses, encapsulation (packet-within-a-packet) three components to standard: agent discovery registration with home agent indirect routing of datagrams
  • Slide 225
  • Network Layer (2-89-90) 4-225 Mobile IP: agent discovery agent advertisement: foreign/home agents advertise service by broadcasting ICMP messages (typefield = 9) R bit: registration required H,F bits: home and/or foreign agent
  • Slide 226
  • Network Layer (2-89-90) 4-226 Mobile IP: registration example visited network: 79.129.13/24 home agent HA: 128.119.40.7 foreign agent COA: 79.129.13.2 COA:79.129.13.2 . ICMP agent adv. Mobile agent MA: 128.119.40.186 registration req. COA:79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification:714 . registration req. COA:79.129.13.2 HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 9999 identification: 714 encapsulation format . registration reply HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714 encapsulation format . registration reply HA: 128.119.40.7 MA: 128.119.40.186 Lifetime: 4999 Identification: 714 . time
  • Slide 227
  • Network Layer (2-89-90) 4-227 Network Layer: summary What weve covered: network layer services routing principles: link state and distance vector hierarchical routing IP Internet routing protocols RIP, OSPF, BGP whats inside a router? IPv6 mobility