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

Similar documents
Network Layer: Routing

Chapter IV: Network Layer

Chapter 4: Network Layer

Computer Networks. Instructor: Niklas Carlsson

Chapter 4 Network Layer

Chapter 4: Network Layer: Part II

Network Layer: Control Plane 5-2

Interplay between routing, forwarding

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

Chapter 4: Network Layer

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

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

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

Lecture 4 - Network Layer. Transport Layer. Outline. Introduction. Notes. Notes. Notes. Notes. Networks and Security. Jacob Aae Mikkelsen

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

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

Chapter 4 Network Layer. Network Layer 4-1

Chapter 4: Network Layer, partb

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

Chapter 4: network layer

Chapter 4: outline. Network Layer 4-1

TDTS06: computer Networks

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

Chapter IV: Network Layer

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

internet technologies and standards

Chapter 4. Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, sl April 2009.

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

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

Chapter 4: Network Layer

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

Chapter 4: Network Layer

Router Architecture Overview

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

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

Chapter 4 Network Layer

DATA COMMUNICATOIN NETWORKING

internet technologies and standards

CSC 4900 Computer Networks: Routing Protocols

Module 3 Network Layer CS755! 3-1!

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

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

Network layer: Overview. Network layer functions Routing IP Forwarding

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

Routing Algorithm Classification. A Link-State Routing Algorithm

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

Chapter 4 Network Layer

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

Lecture 3. The Network Layer (cont d) Network Layer 1-1

Data Communication & Networks G Session 7 - Main Theme Networks: Part I Circuit Switching, Packet Switching, The Network Layer

EC441 Fall 2018 Introduction to Computer Networking Chapter4: Network Layer Data Plane

Master Course Computer Networks IN2097

Chapter 4 Network Layer

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

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

Master Course Computer Networks IN2097

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

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

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

Communication Networks ( ) / Fall 2013 The Blavatnik School of Computer Science, Tel-Aviv University. Allon Wagner

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

Chapter 4 Network Layer

Chapter 4: Network Layer. Chapter 4: Network Layer

CMSC 332 Computer Networks Network Layer

Computer Networking Introduction

CSCE 463/612 Networks and Distributed Processing Spring 2018

Chapter 4 Network Layer

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

Chapter 4 Network Layer

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

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

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

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

Chapter 4 Network Layer

Chapter 4 Network Layer

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

Chapter 4 Network Layer

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

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

Chapter 4 Network Layer

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

Subnets. IP datagram format. The Internet Network layer. IP Fragmentation and Reassembly. IP Fragmentation & Reassembly. IP Addressing: introduction

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

UNIT III THE NETWORK LAYER

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

COMPUTER NETWORKS CHAP 4 : NETWORK LAYER

The Internet network layer

COMP211 Chapter 4 Network Layer: The Data Plane

Chapter 4: network layer. Network service model. Two key network-layer functions. Network layer. Input port functions. Router architecture overview

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

EECS 3214: Computer Networks Protocols and Applications

CS 3516: Advanced Computer Networks

Network layer. Key Network-Layer Functions. Network service model. Interplay between routing and forwarding. CSE 4213: Computer Networks II

Chapter 4 Network Layer

Topics for This Week

Computer Networking Introduction

DATA COMMUNICATOIN NETWORKING

Chapter 4 Network Layer

HY 335 Φροντιστήριο 8 ο

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

Transcription:

Chapter 4 Network Laer A note on the use of these ppt slides: We re making these slides freel available to all (facult, students, readers). The re in PowerPoint form so ou can add, modif, and delete slides (including this one) and slide content to suit our needs. The obviousl represent a lot of work on our part. In return for use, we onl ask the following: If ou use these slides (e.g., in a class) in substantiall unaltered form, that ou mention their source (after all, we d like people to use our book!) If ou post an slides in substantiall unaltered form on a www site, that ou note that the are adapted from (or perhaps identical to) our slides, and note our copright of this material. Thanks and enjo! JFK/KWR All material copright 996-007 J.F Kurose and K.W. Ross, All Rights Reserved Computer Networking: A Top Down Approach 4 th edition. Jim Kurose, Keith Ross Addison-Wesle, Jul 007. Network Laer 4- Chapter 4: Network Laer Chapter goals: understand principles behind laer services: laer service models forwarding versus routing how a works routing (path selection) dealing with scale advanced topics: IPv6, mobilit instantiation, implementation in the Network Laer 4- Chapter 4: Network Laer 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Network Laer 4-3 Network laer transport segment from sending to receiving host on sending side encapsulates segments into datagrams on rcving side, delivers segments to transport laer laer protocols in ever host, eamines header fields in all IP datagrams passing through it application transport data link phsical data link phsical data link phsical data link phsical data link phsical data link phsical data link phsical data link phsical data link phsical data link phsical data link phsical data link phsical application transport data link phsical Network Laer 4-4

Two Ke Network-Laer Functions Interpla between routing and forwarding forwarding: move packets from s input to appropriate output routing: determine route taken b packets from source to dest. routing algorithms analog: routing: process of planning trip from source to dest forwarding: process of getting through single interchange value in arriving packet s header routing algorithm local forwarding table header value output link 000 00 0 00 0 3 3 Network Laer 4-5 Network Laer 4-6 Connection setup 3 rd important function in some architectures: ATM, frame rela, X.5 before datagrams flow, two end hosts and intervening s establish virtual connection s get involved vs transport laer connection service: : between two hosts (ma also involve intervening s in case of VCs) transport: between two processes Network service model Q: What service model for channel transporting datagrams from sender to receiver? Eample services for individual datagrams: guaranteed deliver guaranteed deliver with less than 40 msec dela Eample services for a flow of datagrams: in-order datagram deliver guaranteed minimum bandwidth to flow restrictions on changes in interpacket spacing Network Laer 4-7 Network Laer 4-8

Network laer service models: Chapter 4: Network Laer Network Architecture ATM ATM ATM ATM Service Model best effort CBR VBR ABR UBR Bandwidth none constant rate guaranteed rate guaranteed minimum none Guarantees? Loss Order Timing no es es no no no es es es es no es es no no Congestion feedback no (inferred via loss) no congestion no congestion es no 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Network Laer 4-9 Network Laer 4-0 Network laer connection and connection-less service datagram provides -laer connectionless service VC provides -laer connection service analogous to the transport-laer services, but: service: host-to-host no choice: provides one or the other implementation: in core Virtual circuits source-to-dest path behaves much like telephone circuit performance-wise actions along source-to-dest path call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host address) ever on source-dest path maintains state for each passing connection link, resources (bandwidth, buffers) ma be allocated to VC (dedicated resources = predictable service) Network Laer 4- Network Laer 4-3

VC implementation Forwarding table VC number a VC consists of:. path from source to destination. VC numbers, one number for each link along path 3. entries in forwarding tables in s along path packet belonging to VC carries VC number (rather than dest address) VC number can be changed on each link. New VC number comes from forwarding table Network Laer 4-3 Forwarding table in northwest : interface number 3 3 Incoming interface Incoming VC # Outgoing interface Outgoing VC # 3 63 8 3 7 7 97 3 87 Routers maintain connection state information! Network Laer 4-4 Virtual circuits: signaling protocols used to setup, maintain teardown VC used in ATM, frame-rela, X.5 not used in toda s Datagram s no call setup at laer s: no state about end-to-end connections no -level concept of connection packets forwarded using destination host address packets between same source-dest pair ma take different paths application transport data link phsical 5. Data flow begins 6. Receive data 4. Call connected 3. Accept call. Initiate call. incoming call application transport data link phsical application transport data link phsical. Send data. Receive data application transport data link phsical Network Laer 4-5 Network Laer 4-6 4

Forwarding table 4 billion possible entries Longest prefi matching Destination Address Range 00000 0000 0000000 00000000 through 0 00000 0000 0000 Link Interface Prefi Match Link Interface 00000 0000 0000 0 00000 0000 000000 00000 0000 000 otherwise 3 00000 0000 000000 00000000 through 00000 0000 000000 00000 0000 00000 00000000 through 00000 0000 000 otherwise 3 Eamples DA: 00000 0000 00000 00000 DA: 00000 0000 000000 0000 Which interface? Which interface? Network Laer 4-7 Network Laer 4-8 Datagram or VC : wh? Chapter 4: Network Laer (datagram) data echange among computers elastic service, no strict timing req. smart end sstems (computers) can adapt, perform control, error recover simple inside, compleit at edge man link tpes different characteristics uniform service difficult ATM (VC) evolved from telephon human conversation: strict timing, reliabilit requirements need for guaranteed service dumb end sstems telephones compleit inside Network Laer 4-9 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Network Laer 4-0 5

Router Architecture Overview Input Port Functions Two ke functions: run routing algorithms/protocol (RIP, OSPF, BGP) forwarding datagrams from incoming to outgoing link Phsical laer: bit-level reception Data link laer: e.g., Ethernet see chapter 5 Decentralied switching: given datagram dest., lookup output port using forwarding table in input port memor goal: complete input port processing at line speed queuing: if datagrams arrive faster than forwarding rate into switch fabric Network Laer 4- Network Laer 4- Three tpes of switching fabrics Switching Via Memor First generation s: traditional computers with switching under direct control of CPU packet copied to sstem s memor speed limited b memor bandwidth ( bus crossings per datagram) Input Port Memor Output Port Sstem Bus Network Laer 4-3 Network Laer 4-4 6

Switching Via a Bus Switching Via An Interconnection Network datagram from input port memor to output port memor via a shared bus bus contention: switching speed limited b bus bandwidth 3 Gbps bus, Cisco 5600: sufficient speed for access and enterprise s overcome bus bandwidth limitations Banan s, other interconnection nets initiall developed to connect processors in multiprocessor advanced design: fragmenting datagram into fied length cells, switch cells through the fabric. Cisco 000: switches 60 Gbps through the interconnection Network Laer 4-5 Network Laer 4-6 Output Ports Output port queueing Buffering required when datagrams arrive from fabric faster than the transmission rate Scheduling discipline chooses among queued datagrams for transmission Network Laer 4-7 buffering when arrival rate via switch eceeds output line speed queueing (dela) and loss due to output port buffer overflow! Network Laer 4-8 7

How much buffering? RFC 3439 rule of thumb: average buffering equal to tpical RTT (sa 50 msec) times link capacit C e.g., C = 0 Gps link:.5 Gbit buffer Recent recommendation: with N flows, buffering equal to RTT. C N Input Port Queuing Fabric slower than input ports combined -> queueing ma occur at input queues Head-of-the-Line (HOL) blocking: queued datagram at front of queue prevents others in queue from moving forward queueing dela and loss due to input buffer overflow! Network Laer 4-9 Network Laer 4-30 Chapter 4: Network Laer 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing The Network laer Host, laer functions: Network laer Routing protocols path selection RIP, OSPF, BGP Transport laer: TCP, UDP forwarding table Link laer phsical laer IP protocol addressing conventions datagram format packet handling conventions ICMP protocol error reporting signaling Network Laer 4-3 Network Laer 4-3 8

Chapter 4: Network Laer 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Network Laer 4-33 IP datagram format IP protocol version number header length (btes) tpe of data ma number remaining hops (decremented at each ) upper laer protocol to deliver paload to how much overhead with TCP? 0 btes of TCP 0 btes of IP = 40 btes + app laer overhead 3 bits ver head. tpe of len service length fragment 6-bit identifier flgs offset time to upper header live laer checksum 3 bit source IP address 3 bit destination IP address Options (if an) data (variable length, tpicall a TCP or UDP segment) total datagram length (btes) for fragmentation/ reassembl E.g. timestamp, record route taken, specif list of s to visit. Network Laer 4-34 IP Fragmentation & Reassembl IP Fragmentation and Reassembl links have MTU (ma.transfer sie) - largest possible link-level frame. different link tpes, different MTUs large IP datagram divided ( fragmented ) within net one datagram becomes several datagrams reassembled onl at final destination IP header bits used to identif, order related fragments reassembl fragmentation: in: one large datagram out: 3 smaller datagrams Eample 4000 bte datagram MTU = 500 btes 480 btes in data field offset = 480/8 length =4000 ID = length =500 fragflag =0 ID = ID = offset =0 One large datagram becomes several smaller datagrams length =500 length =040 ID = fragflag = fragflag = fragflag =0 offset =0 offset =85 offset =370 Network Laer 4-35 Network Laer 4-36 9

Chapter 4: Network Laer IP Addressing: introduction 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing IP address: 3-bit identifier for host, interface interface: connection between host/ and phsical link s tpicall have multiple interfaces host tpicall has one interface IP addresses associated with each interface 3... 3... 3... 3...4 3...9 3...3 3..3. 3..3.7 3... 3..3. 3... = 0 0000000 0000000 0000000 3 Network Laer 4-37 Network Laer 4-38 Subnets Subnets 3...0/4 3...0/4 IP address: subnet part (high order bits) host part (low order bits) What s a subnet? device interfaces with same subnet part of IP address can phsicall reach each other without intervening 3... 3... 3... 3...4 3...9 3... 3...3 3..3.7 subnet 3..3. 3..3. consisting of 3 subnets Recipe To determine the subnets, detach each interface from its host or, creating islands of isolated s. Each isolated is called a subnet. 3..3.0/4 Subnet mask: /4 Network Laer 4-39 Network Laer 4-40 0

Subnets How man? 3... 3... 3...4 3...3 3..9. 3..7.0 IP addressing: CIDR CIDR: Classless InterDomain Routing subnet portion of address of arbitrar length address format: a.b.c.d/, where is # bits in subnet portion of address 3..9. 3..8. 3..8.0 3..7. 3... 3...6 3... 3..3.7 3..3. 3..3. Network Laer 4-4 subnet part 00000 0000 0000000 00000000 00.3.6.0/3 host part Network Laer 4-4 IP addresses: how to get one? Q: How does host get IP address? hard-coded b sstem admin in a file Wintel: control-panel->->configuration- >tcp/ip->properties UNIX: /etc/rc.config DHCP: Dnamic Host Configuration Protocol: dnamicall get address from as server plug-and-pla Network Laer 4-43 DHCP: Dnamic Host Configuration Protocol Goal: allow host to dnamicall obtain its IP address from server when it joins Can renew its lease on address in use Allows reuse of addresses (onl hold address while connected an on Support for mobile users who want to join (more shortl) 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 Network Laer 4-44

DHCP client-server scenario A B 3... 3... 3...4 3...9 3...3 3..3. DHCP server 3..3.7 3... E 3..3. 3... arriving DHCP client needs address in this Network Laer 4-45 DHCP client-server scenario DHCP server: 3...5 time DHCP discover src : 0.0.0.0, 68 dest.: 55.55.55.55,67 iaddr: 0.0.0.0 transaction ID: 654 DHCP offer src: 3...5, 67 dest: 55.55.55.55, 68 iaddrr: 3...4 transaction ID: 654 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 55.55.55.55, 67 iaddrr: 3...4 transaction ID: 655 Lifetime: 3600 secs DHCP ACK src: 3...5, 67 dest: 55.55.55.55, 68 iaddrr: 3...4 transaction ID: 655 Lifetime: 3600 secs arriving client Network Laer 4-46 IP addresses: how to get one? Q: How does get subnet part of IP addr? A: gets allocated portion of its provider ISP s address space ISP's block 00000 0000 0000000 00000000 00.3.6.0/0 Organiation 0 00000 0000 0000000 00000000 00.3.6.0/3 Organiation 00000 0000 000000 00000000 00.3.8.0/3 Organiation 00000 0000 000000 00000000 00.3.0.0/3....... Organiation 7 00000 0000 0000 00000000 00.3.30.0/3 Hierarchical addressing: route aggregation Hierarchical addressing allows efficient advertisement of routing information: Organiation 0 00.3.6.0/3 Organiation 00.3.8.0/3 Organiation 00.3.0.0/3 Organiation 7 00.3.30.0/3.... Fl-B-Night-ISP ISPs-R-Us Send me anthing with addresses beginning 00.3.6.0/0 Send me anthing with addresses beginning 99.3.0.0/6 Network Laer 4-47 Network Laer 4-48

Hierarchical addressing: more specific routes ISPs-R-Us has a more specific route to Organiation Organiation 0 00.3.6.0/3 Organiation 00.3.0.0/3 Organiation 7 00.3.30.0/3.... Organiation 00.3.8.0/3 Fl-B-Night-ISP ISPs-R-Us Send me anthing with addresses beginning 00.3.6.0/0 Send me anthing with addresses beginning 99.3.0.0/6 or 00.3.8.0/3 IP addressing: the last word... Q: How does an ISP get block of addresses? A: ICANN: Corporation for Assigned Names and Numbers allocates addresses manages DNS assigns domain names, resolves disputes Network Laer 4-49 Network Laer 4-50 NAT: Network Address Translation NAT: Network Address Translation rest of 38.76.9.7 All datagrams leaving local have same single source NAT IP address: 38.76.9.7, different source port numbers 0.0.0.4 local (e.g., home ) 0.0.0/4 Datagrams with source or destination in this have 0.0.0/4 address for source, destination (as usual) 0.0.0. 0.0.0. 0.0.0.3 Motivation: local uses just one IP address as far as outside world is concerned: range of addresses not needed from ISP: just one IP address for all devices can change addresses of devices in local without notifing outside world can change ISP without changing addresses of devices in local devices inside local net not eplicitl addressable, visible b outside world (a securit plus). Network Laer 4-5 Network Laer 4-5 3

NAT: Network Address Translation Implementation: NAT must: outgoing datagrams: replace (source IP address, port #) of ever outgoing datagram to (NAT IP address, new port #)... remote clients/servers will respond using (NAT IP address, new port #) as destination addr. remember (in NAT translation table) ever (source IP address, port #) to (NAT IP address, new port #) translation pair incoming datagrams: replace (NAT IP address, new port #) in dest fields of ever incoming datagram with corresponding (source IP address, port #) stored in NAT table Network Laer 4-53 NAT: Network Address Translation : NAT changes datagram source addr from 0.0.0., 3345 to 38.76.9.7, 500, updates table NAT translation table WAN side addr LAN side addr 38.76.9.7, 500 0.0.0., 3345 S: 38.76.9.7, 500 D: 8.9.40.86, 80 38.76.9.7 S: 8.9.40.86, 80 D: 38.76.9.7, 500 3 3: Repl arrives dest. address: 38.76.9.7, 500 0.0.0.4 S: 0.0.0., 3345 D: 8.9.40.86, 80 S: 8.9.40.86, 80 D: 0.0.0., 3345 4 : host 0.0.0. sends datagram to 8.9.40.86, 80 0.0.0. 0.0.0. 0.0.0.3 4: NAT changes datagram dest addr from 38.76.9.7, 500 to 0.0.0., 3345 Network Laer 4-54 NAT: Network Address Translation 6-bit port-number field: 60,000 simultaneous connections with a single LAN-side address! NAT is controversial: s should onl process up to laer 3 violates end-to-end argument NAT possibilit must be taken into account b app designers, eg, PP applications address shortage should instead be solved b IPv6 Network Laer 4-55 NAT traversal problem client want to connect to server with address 0.0.0. server address 0.0.0. local to LAN (client can t use it as destination addr) onl one eternall visible NATted address: 38.76.9.7 solution : staticall configure NAT to forward incoming connection requests at given port to server e.g., (3.76.9.7, port 500) alwas forwarded to 0.0.0. port 5000 Client? 38.76.9.7 NAT 0.0.0.4 0.0.0. Network Laer 4-56 4

NAT traversal problem solution : Universal Plug and Pla (UPnP) Gatewa Device (IGD) Protocol. Allows NATted host to: learn public IP address (38.76.9.7) enumerate eisting port mappings add/remove port mappings (with lease times) i.e., automate static NAT port map configuration 38.76.9.7 NAT IGD 0.0.0.4 0.0.0. Network Laer 4-57 NAT traversal problem solution 3: relaing (used in Skpe) NATed server establishes connection to rela Eternal client connects to rela rela bridges packets between to connections Client. connection to rela initiated b client 3. relaing established. connection to rela initiated b NATted host 38.76.9.7 NAT 0.0.0. Network Laer 4-58 Chapter 4: Network Laer ICMP: Control Message Protocol 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing used b hosts & s to communicate -level information error reporting: unreachable host,, port, protocol echo request/repl (used b ping) -laer above IP: ICMP msgs carried in IP datagrams ICMP message: tpe, code plus first 8 btes of IP datagram causing error Tpe Code description 0 0 echo repl (ping) 3 0 dest. unreachable 3 dest host unreachable 3 dest protocol unreachable 3 3 dest port unreachable 3 6 dest unknown 3 7 dest host unknown 4 0 source quench (congestion control - not used) 8 0 echo request (ping) 9 0 route advertisement 0 0 discover 0 TTL epired 0 bad IP header Network Laer 4-59 Network Laer 4-60 5

Traceroute and ICMP Chapter 4: Network Laer Source sends series of UDP segments to dest First has TTL = Second has TTL=, etc. Unlikel port number When nth datagram arrives to nth : Router discards datagram And sends to source an ICMP message (tpe, code 0) Message includes name of & IP address When ICMP message arrives, source calculates RTT Traceroute does this 3 times Stopping criterion UDP segment eventuall arrives at destination host Destination returns ICMP host unreachable packet (tpe 3, code 3) When source gets this ICMP, stops. 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Network Laer 4-6 Network Laer 4-6 IPv6 Initial motivation: 3-bit address space soon to be completel allocated. Additional motivation: header format helps speed processing/forwarding header changes to facilitate QoS IPv6 datagram format: fied-length 40 bte header no fragmentation allowed IPv6 Header (Cont) Priorit: identif priorit among datagrams in flow Flow Label: identif datagrams in same flow. (concept of flow not well defined). Net header: identif upper laer protocol for data Network Laer 4-63 Network Laer 4-64 6

Other Changes from IPv4 Checksum: removed entirel to reduce processing time at each hop Options: allowed, but outside of header, indicated b Net Header field ICMPv6: new version of ICMP additional message tpes, e.g. Packet Too Big multicast group management functions Transition From IPv4 To IPv6 Not all s can be upgraded simultaneous no flag das How will the operate with mied IPv4 and IPv6 s? Tunneling: IPv6 carried as paload in IPv4 datagram among IPv4 s Network Laer 4-65 Network Laer 4-66 Tunneling Logical view: A B tunnel E F IPv6 IPv6 IPv6 IPv6 Tunneling Logical view: A B tunnel E F IPv6 IPv6 IPv6 IPv6 Phsical view: A B E F Phsical view: A B C D E F IPv6 IPv6 IPv4 IPv4 IPv6 IPv6 IPv6 IPv6 IPv4 IPv4 IPv6 IPv6 Flow: X Src: A Dest: F data Src:B Dest: E Flow: X Src: A Dest: F Src:B Dest: E Flow: X Src: A Dest: F Flow: X Src: A Dest: F data data data Network Laer 4-67 A-to-B: IPv6 B-to-C: IPv6 inside IPv4 B-to-C: IPv6 inside IPv4 E-to-F: IPv6 Network Laer 4-68 7

Chapter 4: Network Laer Interpla between routing, forwarding 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing value in arriving packet s header routing algorithm local forwarding table header value output link 000 00 0 00 0 3 3 Network Laer 4-69 Network Laer 4-70 Graph abstraction Graph abstraction: costs 5 v 3 u 3 Graph: G = (N,E) N = set of s = { u, v, w,,, } w 5 u 5 v 3 3 w 5 c(, ) = cost of link (, ) - e.g., c(w,) = 5 cost could alwas be, or inversel related to bandwidth, or inversel related to congestion E = set of links ={ (u,v), (u,), (v,), (v,w), (,w), (,), (w,), (w,), (,) } Remark: Graph abstraction is useful in other contets Eample: PP, where N is set of peers and E is set of TCP connections Cost of path (,, 3,, p ) = c(, ) + c(, 3 ) + + c( p-, p ) Question: What s the least-cost path between u and? Routing algorithm: algorithm that finds least-cost path Network Laer 4-7 Network Laer 4-7 8

Routing Algorithm classification Chapter 4: Network Laer Global or decentralied information? Global: all s have complete topolog, link cost info link state algorithms Decentralied: knows phsicallconnected neighbors, link costs to neighbors iterative process of computation, echange of info with neighbors distance vector algorithms Static or dnamic? Static: routes change slowl over time Dnamic: routes change more quickl periodic update in response to link cost changes 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Network Laer 4-73 Network Laer 4-74 A Link-State Routing Algorithm Dijsktra s 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 from 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 from node to ; = if not direct neighbors D(v): current value of cost of path from source to dest. v p(v): predecessor node along path from source to v N': set of nodes whose least cost path definitivel known Network Laer 4-75 Initialiation: N' = {u} 3 for all nodes v 4 if v adjacent to u 5 then D(v) = c(u,v) 6 else D(v) = 7 8 Loop 9 find w not in N' such that D(w) is a minimum 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) ) 3 /* new cost to v is either old cost to v or known 4 shortest path cost to w plus cost from w to v */ 5 until all nodes in N' Network Laer 4-76 9

Dijkstra s algorithm: eample Dijkstra s algorithm: eample () Step 0 3 4 5 N' u u u uv uvw uvw D(v),p(v),u,u,u D(w),p(w) 5,u 4, 3, 3, D(),p(),u D(),p(), D(),p() 4, 4, 4, Resulting shortest-path tree from u: u v w u 5 v 3 3 w 5 Network Laer 4-77 Resulting forwarding table in u: destination v w link (u,v) (u,) (u,) (u,) (u,) Network Laer 4-78 Dijkstra s algorithm, discussion Chapter 4: Network Laer 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 A +e D 0 0 B 0 e C e initiall A +e 0 D B 0 +e 0 C recompute routing 0 A +e D 0 0 B C +e recompute A +e 0 D B 0 +e e C recompute Network Laer 4-79 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Network Laer 4-80 0

Distance Vector Algorithm Bellman-Ford Equation (dnamic programming) Define d () := cost of least-cost path from to Then d () = min {c(,v) + d v () } v where min is taken over all neighbors v of Network Laer 4-8 Bellman-Ford eample u 5 v 3 3 w 5 Clearl, d v () = 5, d () = 3, d w () = 3 B-F equation sas: d u () = min { c(u,v) + d v (), c(u,) + d (), c(u,w) + d w () } = min { + 5, + 3, 5 + 3} = 4 Node that achieves minimum is net hop in shortest path forwarding table Network Laer 4-8 Distance Vector Algorithm D () = estimate of least cost from to Node knows cost to each neighbor v: c(,v) Node maintains distance vector D = [D (): є N ] Node also maintains its neighbors distance vectors For each neighbor v, maintains D v = [D v (): є N ] Distance vector algorithm (4) Basic idea: Each node periodicall sends its own distance vector estimate to neighbors When a node receives new DV estimate from neighbor, it updates its own DV using B-F equation: D () min v {c(,v) + D v ()} for each node N Under minor, natural conditions, the estimate D () converge to the actual least cost d () Network Laer 4-83 Network Laer 4-84

Distance Vector Algorithm (5) Iterative, asnchronous: each local iteration caused b: local link cost change DV update message from neighbor Distributed: each node notifies neighbors onl when its DV changes neighbors then notif their neighbors if necessar Each node: wait for (change in local link cost or msg from neighbor) recompute estimates if DV to an dest has changed, notif neighbors Network Laer 4-85 node table cost to 0 7 node table cost to from from from node table cost to 0 D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = 7 0 from cost to 0 3 0 7 0 time D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 3 7 Network Laer 4-86 node table cost to 0 7 node table cost to from from from node table cost to 0 D () = min{c(,) + D (), c(,) + D ()} = min{+0, 7+} = 7 0 from from from cost to 0 3 0 7 0 cost to 0 7 0 7 0 cost to 0 7 0 3 0 from from from cost to 0 3 0 3 0 cost to 0 3 0 3 0 cost to 0 3 0 3 0 time D () = min{c(,) + D (), c(,) + D ()} = min{+, 7+0} = 3 7 Network Laer 4-87 Distance Vector: link cost changes Link cost changes: node detects local link cost change updates routing info, recalculates distance vector if DV changes, notif neighbors good news travels fast 4 At time t 0, detects the link-cost change, updates its DV, and informs its neighbors. At time t, receives the update from and updates its table. It computes a new least cost to 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. 50 Network Laer 4-88

Distance Vector: link cost changes Comparison of LS and DV algorithms Link cost changes: good news travels fast bad news travels slow - count to infinit problem! 44 iterations before algorithm stabilies: see tet Poisoned 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? 60 4 50 Message compleit LS: with n nodes, E links, O(nE) msgs sent DV: echange between neighbors onl convergence time varies Speed of Convergence LS: O(n ) algorithm requires O(nE) msgs ma have oscillations DV: convergence time varies ma be routing loops count-to-infinit problem Robustness: what happens if malfunctions? LS: node can advertise incorrect link cost each node computes onl its own table DV: DV node can advertise incorrect path cost each node s table used b others error propagate thru Network Laer 4-89 Network Laer 4-90 Chapter 4: Network Laer Hierarchical Routing 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Our routing stud thus far - idealiation all s identical flat nottrue in practice scale: with 00 million destinations: can t store all dest s in routing tables! routing table echange would swamp links! administrative autonom internet = of s each admin ma want to control routing in its own Network Laer 4-9 Network Laer 4-9 3

Hierarchical Routing Interconnected ASes aggregate s into regions, autonomous sstems (AS) s in same AS run same routing protocol intra-as routing protocol s in different AS can run different intra- AS routing protocol Gatewa Direct link to in another AS 3c 3a 3b AS3 a c d b Intra-AS Routing algorithm AS Forwarding table Inter-AS Routing algorithm a c b AS forwarding table 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 Network Laer 4-93 Network Laer 4-94 Inter-AS tasks suppose in AS receives datagram dest outside of AS should forward packet to gatewa, but which one? 3c 3a 3b AS3 a c d b AS must:. learn which dests reachable through AS, which through AS3. propagate this reachabilit info to all s in AS Job of inter-as routing! AS c a b AS Network Laer 4-95 Eample: Setting forwarding table in d suppose AS learns (via inter-as protocol) that subnet reachable via AS3 (gatewa c) but not via AS. inter-as protocol propagates reachabilit info to all internal s. d determines from intra-as routing info that its interface I is on the least cost path to c. installs forwarding table entr (,I) 3c 3a 3b AS3 a c d b AS c a b AS Network Laer 4-96 4

Eample: Choosing among multiple ASes now suppose AS learns from inter-as protocol that subnet is reachable from AS3 and from AS. to configure forwarding table, d must determine towards which gatewa it should forward packets for dest. this is also job of inter-as routing protocol! 3c 3a 3b AS3 a c d b AS c a b AS Eample: Choosing among multiple ASes now suppose AS learns from inter-as protocol that subnet is reachable from AS3 and from AS. to configure forwarding table, d must determine towards which gatewa it should forward packets for dest. this is also job of inter-as routing protocol! hot potato routing: send packet towards closest of two s. Learn from inter-as protocol that subnet is reachable via multiple gatewas Use routing info from 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 from forwarding table the interface I that leads to least-cost gatewa. Enter (,I) in forwarding table Network Laer 4-97 Network Laer 4-98 Chapter 4: Network Laer Intra-AS Routing 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing also known as Interior Gatewa Protocols (IGP) most common Intra-AS routing protocols: RIP: Routing Information Protocol OSPF: Open Shortest Path First IGRP: Interior Gatewa Routing Protocol (Cisco proprietar) Network Laer 4-99 Network Laer 4-00 5

Chapter 4: Network Laer RIP ( Routing Information Protocol) 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing distance vector algorithm included in BSD-UNIX Distribution in 98 distance metric: # of hops (ma = 5 hops) u A C B D v w From A to subsets: destination hops u v w 3 3 Network Laer 4-0 Network Laer 4-0 RIP advertisements distance vectors: echanged among neighbors ever 30 sec via Response Message (also called advertisement) ech advertisement: list of up to 5 destination nets within AS Network Laer 4-03 RIP: Eample w A D B C Destination Network Net Router Num. of hops to dest. w A B B 7 --..... Routing table in D Network Laer 4-04 6

RIP: Eample Dest Net hops w - - C 4.... Advertisement from A to D w A D B C Destination Network Net Router Num. of hops to dest. w A B B A 7 5 --..... Routing table in D Network Laer 4-05 RIP: Link Failure and Recover If no advertisement heard after 80 sec --> neighbor/link declared dead routes via neighbor invalidated new advertisements sent to neighbors neighbors in turn send out new advertisements (if tables changed) link failure info quickl (?) propagates to entire net poison reverse used to prevent ping-pong loops (infinite distance = 6 hops) Network Laer 4-06 RIP Table processing Chapter 4: Network Laer RIP routing tables managed b application-level process called route-d (daemon) advertisements sent in UDP packets, periodicall repeated routed Transprt (UDP) forwarding (IP) table link phsical forwarding table routed Transprt (UDP) (IP) link phsical 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Network Laer 4-07 Network Laer 4-08 7

OSPF (Open Shortest Path First) OSPF advanced features (not in RIP) 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 advertisements disseminated to entire AS (via flooding) carried in OSPF messages directl over IP (rather than TCP or UDP 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. Network Laer 4-09 Network Laer 4-0 Hierarchical OSPF Hierarchical OSPF two-level hierarch: local area, backbone. Link-state advertisements onl in area each nodes has detailed area topolog; onl know direction (shortest path) to nets in other areas. area border s: summarie distances to nets in own area, advertise to other Area Border s. backbone s: run OSPF routing limited to backbone. boundar s: connect to other AS s. Network Laer 4- Network Laer 4-8

Chapter 4: Network Laer inter-as routing: BGP 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing BGP (Border Gatewa Protocol): the de facto standard BGP provides each AS a means to:. Obtain subnet reachabilit information from neighboring ASs.. Propagate reachabilit information to all ASinternal s. 3. Determine good routes to subnets based on reachabilit information and polic. allows subnet to advertise its eistence to rest of : I am here Network Laer 4-3 Network Laer 4-4 BGP basics pairs of s (BGP peers) echange routing info over semi-permanent TCP connections: BGP sessions BGP sessions need not correspond to phsical links. when AS advertises prefi to AS: AS promises it will forward an addresses datagrams towards that prefi. AS can aggregate prefies in its advertisement Distributing reachabilit info using ebgp session between 3a and c, AS3 sends prefi reachabilit info to AS. c can then use ibgp do distribute new prefi info to all s in AS b can then re-advertise new reachabilit info to AS over b-to-a ebgp session when learns of new prefi, creates entr for prefi in its forwarding table. 3c 3a 3b AS3 a AS c d ebgp session ibgp session b a c b AS Network Laer 4-5 3c 3a 3b AS3 a AS c d ebgp session ibgp session b a c b AS Network Laer 4-6 9

Path attributes & BGP routes BGP route selection advertised prefi includes BGP attributes. prefi + attributes = route two important attributes: AS-PATH: contains ASs through which prefi advertisement has passed: e.g, AS 67, AS 7 NEXT-HOP: indicates specific internal-as to net-hop AS. (ma be multiple links from current AS to net-hop-as) when gatewa receives route advertisement, uses import polic to accept/decline. ma learn about more than route to some prefi. Router must select route. elimination rules:. local preference value attribute: polic decision. shortest AS-PATH 3. closest NEXT-HOP : hot potato routing 4. additional criteria Network Laer 4-7 Network Laer 4-8 BGP messages BGP messages echanged 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 BGP routing polic W A A,B,C are provider s B C X,W,Y are customer (of provider s) X is dual-homed: attached to two s X does not want to route from B via X to C.. so X will not advertise to B a route to C X Y legend: provider customer : Network Laer 4-9 Network Laer 4-0 30

BGP routing polic () W A A advertises path AW to B B advertises path BAW to X B C Should B advertise path BAW to C? X Y legend: provider customer : No wa! 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 onl to/from its customers! Network Laer 4- Wh different Intra- and Inter-AS routing? Polic: Inter-AS: admin wants control over how its traffic routed, who routes through its net. Intra-AS: single admin, so no polic decisions needed Scale: hierarchical routing saves table sie, reduced update traffic Performance: Intra-AS: can focus on performance Inter-AS: polic ma dominate over performance Network Laer 4- Chapter 4: Network Laer 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Broadcast Routing deliver packets from source to all other nodes source duplication is inefficient: duplicate R3 R R source duplication duplicate creation/transmission R4 R3 R R R4 in- duplication duplicate source duplication: how does source determine recipient addresses? Network Laer 4-3 Network Laer 4-4 3

In- duplication Spanning Tree flooding: when node receives brdcst pckt, sends cop to all neighbors Problems: ccles & broadcast storm controlled flooding: node onl brdcsts pkt if it hasn t brdcst same packet before Node keeps track of pckt ids alread brdcsted Or reverse path forwarding (RPF): onl forward pckt if it arrived on shortest path between node and source spanning tree No redundant packets received b an node First construct a spanning tree Nodes forward copies onl along spanning tree F c A E G (a) Broadcast initiated at A B D F c A E B D (b) Broadcast initiated at D G Network Laer 4-5 Network Laer 4-6 Spanning Tree: Creation Center node Each node sends unicast join message to center node Message forwarded until it arrives at a node alread belonging to spanning tree Multicast Routing: Problem Statement Goal: find a tree (or trees) connecting s having local mcast group members tree: not all paths between s used source-based: different tree from each sender to rcvrs shared-tree: same tree used b all group members A A c 3 B c B F 4 E D 5 G F E D G (a) Stepwise construction of spanning tree (b) Constructed spanning tree Network Laer 4-7 Shared tree Source-based trees 3

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 Shortest Path Tree mcast forwarding tree: tree of shortest path routes from source to all receivers Dijkstra s algorithm S: source R R3 R 3 4 R6 R4 6 R7 5 R5 LEGEND i with attached group member with no attached group member link used for forwarding, i indicates order link added b algorithm Reverse Path Forwarding rel on s knowledge of unicast shortest path from it to sender each 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 Reverse Path Forwarding: eample S: source R R3 R R6 R4 R7 R5 LEGEND with attached group member with no attached group member datagram will be forwarded datagram will not be forwarded result is a source-specific reverse SPT ma be a bad choice with asmmetric links 33

Reverse Path Forwarding: pruning forwarding tree contains subtrees with no mcast group members no need to forward datagrams down subtree prune msgs sent upstream b with no downstream group members S: source R R3 R R6 P R4 P R7 R5 LEGEND P with attached group member with no attached group member prune message links with multicast forwarding Shared-Tree: Steiner Tree Steiner Tree: minimum cost tree connecting all s with attached group members problem is NP-complete ecellent heuristics eists not used in practice: computational compleit information about entire needed monolithic: rerun whenever a needs to join/leave Center-based trees single deliver tree shared b all one identified as center of tree to join: edge sends unicast join-msg addressed to center join-msg processed b intermediate s and forwarded towards center join-msg either hits eisting tree branch for this center, or arrives at center path taken b join-msg becomes new branch of tree for this Center-based trees: an eample Suppose R6 chosen as center: R3 R R 3 R6 R4 R7 R5 LEGEND with attached group member with no attached group member path order in which join messages generated 34

Multicasting Routing: DVMRP DVMRP: distance vector multicast routing protocol, RFC075 flood and prune: reverse path forwarding, source-based tree RPF tree based on DVMRP s own routing tables constructed b communicating DVMRP s no assumptions about underling unicast initial datagram to mcast group flooded everwhere via RPF s not wanting group: send upstream prune msgs DVMRP: continued soft state: DVMRP periodicall ( min.) forgets branches are pruned: mcast data again flows down unpruned branch downstream : reprune or else continue to receive data s can quickl regraft to tree following IGMP join at leaf odds and ends commonl implemented in commercial s Mbone routing done using DVMRP Tunneling Q: How to connect islands of multicast s in a sea of unicast s? PIM: Protocol Independent Multicast not dependent on an specific underling unicast routing algorithm (works with all) two different multicast distribution scenarios : phsical topolog logical topolog mcast datagram encapsulated inside normal (non-multicastaddressed) datagram normal IP datagram sent thru tunnel via regular IP unicast to receiving mcast receiving mcast unencapsulates to get mcast datagram Dense: group members densel packed, in close proimit. bandwidth more plentiful Sparse: # s with group members small wrt # interconnected s group members widel dispersed bandwidth not plentiful 35

Consequences of Sparse-Dense Dichotom: Dense Sparse: group membership b no membership until s assumed until s eplicitl join s eplicitl prune receiver- driven data-driven construction construction of mcast on mcast tree (e.g., RPF) tree (e.g., center-based) bandwidth and nongroup- processing processing bandwidth and non-group- profligate conservative PIM- Dense Mode flood-and-prune RPF, similar to DVMRP but underling unicast protocol provides RPF info for incoming datagram less complicated (less efficient) downstream flood than DVMRP reduces reliance on underling routing algorithm has protocol mechanism for to detect it is a leaf-node PIM - Sparse Mode PIM - Sparse Mode center-based approach sends join msg to rendevous point (RP) intermediate s update state and forward join after joining via RP, can switch to source-specific tree increased performance: less concentration, shorter paths R3 R R join join all data multicast from rendevous point R6 join R4 R5 R7 rendevous point sender(s): unicast data to RP, which distributes down RP-rooted tree RP can etend mcast tree upstream to source RP can send stop msg if no attached receivers no one is listening! R3 R R join join all data multicast from rendevous point R6 join R4 R5 R7 rendevous point 36

Chapter 4: summar 4. Introduction 4. Virtual circuit and datagram s 4.3 What s inside a 4.4 IP: Protocol Datagram format IPv4 addressing ICMP IPv6 4.5 Routing algorithms Link state Distance Vector Hierarchical routing 4.6 Routing in the RIP OSPF BGP 4.7 Broadcast and multicast routing Network Laer 4-45 37