Names & Addresses. Names & Addresses. Hop-by-Hop Packet Forwarding. Longest-Prefix-Match Forwarding. Longest-Prefix-Match Forwarding

Similar documents
IP Network Layer. Datagram ID FLAG Fragment Offset. IP Datagrams. IP Addresses. IP Addresses. CSCE 515: Computer Network Programming TCP/IP

Transport and Network Layer

Transport Layer Protocols

Ethernet. Ethernet. Network Devices

Networking Overview. (as usual, thanks to Dave Wagner and Vern Paxson)

Final for ECE374 05/06/13 Solution!!

IP address format: Dotted decimal notation:

Computer Networks. Chapter 5 Transport Protocols

Protocols. Packets. What's in an IP packet

CSE331: Introduction to Networks and Security. Lecture 9 Fall 2006

Lecture 15: Congestion Control. CSE 123: Computer Networks Stefan Savage

Lecture Objectives. Lecture 07 Mobile Networks: TCP in Wireless Networks. Agenda. TCP Flow Control. Flow Control Can Limit Throughput (1)

Lecture Computer Networks

8.2 The Internet Protocol

Architecture and Performance of the Internet

TCP in Wireless Mobile Networks

Internet Control Protocols Reading: Chapter 3

How do I get to

Based on Computer Networking, 4 th Edition by Kurose and Ross

TCP for Wireless Networks

HOST AUTO CONFIGURATION (BOOTP, DHCP)

TCP over Multi-hop Wireless Networks * Overview of Transmission Control Protocol / Internet Protocol (TCP/IP) Internet Protocol (IP)

Network layer" 1DT066! Distributed Information Systems!! Chapter 4" Network Layer!! goals: "

Overview of TCP/IP. TCP/IP and Internet

Access Control: Firewalls (1)

Improving the Performance of TCP Using Window Adjustment Procedure and Bandwidth Estimation

A Transport Protocol for Multimedia Wireless Sensor Networks

CSIS CSIS 3230 Spring Networking, its all about the apps! Apps on the Edge. Application Architectures. Pure P2P Architecture

Networking Test 4 Study Guide

Network-Oriented Software Development. Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Note! The problem set consists of two parts: Part I: The problem specifications pages Part II: The answer pages

Network layer: Overview. Network layer functions IP Routing and forwarding

Slide 1 Introduction cnds@napier 1 Lecture 6 (Network Layer)

[Prof. Rupesh G Vaishnav] Page 1

Mobile Communications Chapter 9: Mobile Transport Layer

ICOM : Computer Networks Chapter 6: The Transport Layer. By Dr Yi Qian Department of Electronic and Computer Engineering Fall 2006 UPRM

(Refer Slide Time: 02:17)

TCP/IP Optimization for Wide Area Storage Networks. Dr. Joseph L White Juniper Networks

Unix System Administration

IP - The Internet Protocol

IP addressing and forwarding Network layer

Datagram-based network layer: forwarding; routing. Additional function of VCbased network layer: call setup.

IP Subnetting and Addressing

TCP and Wireless Networks Classical Approaches Optimizations TCP for 2.5G/3G Systems. Lehrstuhl für Informatik 4 Kommunikation und verteilte Systeme

CS101 Lecture 19: Internetworking. What You ll Learn Today

Outline. TCP connection setup/data transfer Computer Networking. TCP Reliability. Congestion sources and collapse. Congestion control basics

CSE 473 Introduction to Computer Networks. Exam 2 Solutions. Your name: 10/31/2013

Troubleshooting Tools

First Midterm for ECE374 03/09/12 Solution!!

EITF25 Internet Techniques and Applications L5: Wide Area Networks (WAN) Stefan Höst

Chapter 5. Transport layer protocols

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

IP Multicasting. Applications with multiple receivers

Simulation-Based Comparisons of Solutions for TCP Packet Reordering in Wireless Network

Internet Ideal: Simple Network Model

Basic Networking Concepts. 1. Introduction 2. Protocols 3. Protocol Layers 4. Network Interconnection/Internet

NETWORK LAYER/INTERNET PROTOCOLS

Homework 2 assignment for ECE374 Posted: 02/21/14 Due: 02/28/14

Link Layer. 5.6 Hubs and switches 5.7 PPP 5.8 Link Virtualization: ATM and MPLS

CS 78 Computer Networks. Internet Protocol (IP) our focus. The Network Layer. Interplay between routing and forwarding

Introduction to TCP/IP

Internet Protocols. Background CHAPTER

Internet Protocol: IP packet headers. vendredi 18 octobre 13

Middleboxes. Firewalls. Internet Ideal: Simple Network Model. Internet Reality. Middleboxes. Firewalls. Globally unique idenpfiers

EECS 489 Winter 2010 Midterm Exam

Course Overview: Learn the essential skills needed to set up, configure, support, and troubleshoot your TCP/IP-based network.

Stop And Wait. ACK received; transmit frame 2 CS 455 3

Chapter 3. TCP/IP Networks. 3.1 Internet Protocol version 4 (IPv4)

CS268 Exam Solutions. 1) End-to-End (20 pts)

Per-Flow Queuing Allot's Approach to Bandwidth Management

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

Digital Audio and Video Data

Congestion Control Review Computer Networking. Resource Management Approaches. Traffic and Resource Management. What is congestion control?

Internet Firewall CSIS Packet Filtering. Internet Firewall. Examples. Spring 2011 CSIS net15 1. Routers can implement packet filtering

RARP: Reverse Address Resolution Protocol

TCP/IP Fundamentals. OSI Seven Layer Model & Seminar Outline

Internetworking. Problem: There is more than one network (heterogeneity & scale)

1. The subnet must prevent additional packets from entering the congested region until those already present can be processed.

Introduction To Computer Networking

CS335 Sample Questions for Exam #2

Professor: Ian Foster TAs: Xuehai Zhang, Yong Zhao. Winter Quarter.

Classes of multimedia Applications

B-2 Analyzing TCP/IP Networks with Wireshark. Ray Tompkins Founder of Gearbit

Technical Support Information Belkin internal use only

Internet Protocols Fall Lectures 7-8 Andreas Terzis

Route Discovery Protocols

First Midterm for ECE374 02/25/15 Solution!!

Network Layer IPv4. Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS. School of Computing, UNF

How To Understand and Configure Your Network for IntraVUE

2 TCP-like Design. Answer

CS514: Intermediate Course in Computer Systems

Network Layers. CSC358 - Introduction to Computer Networks

A host-based firewall can be used in addition to a network-based firewall to provide multiple layers of protection.

The Transport Layer. Antonio Carzaniga. October 24, Faculty of Informatics University of Lugano Antonio Carzaniga

Gary Hecht Computer Networking (IP Addressing, Subnet Masks, and Packets)

Network Programming TDC 561

CS 5480/6480: Computer Networks Spring 2012 Homework 4 Solutions Due by 1:25 PM on April 11 th 2012

Internet Protocols Fall Outline

Improved Digital Media Delivery with Telestream HyperLaunch

Transcription:

Names & Addresses EE 122: IP Forwarding and Transport Protocols Scott Shenker http://inst.eecs.berkeley.edu/~ee122/ (Materials with thanks to Vern Paxson, Jennifer Rexford, and colleagues at UC Berkeley) Names Human readable No location semantics E.g., yahoo.com, sky.cs.berkeley.edu Addresses Easy to manipulate in software (usually fixed length) Location semantics E.g., 206.190.60.37, 128.32.37.169.229 But sometimes not clear cut 1 2 Names & Addresses What is Leonardo da Vinci? What is Seven-of-Nine? Depends on the context An address in one context can become a name in another context Hop-by-Hop Packet Forwarding Each router has a forwarding table Maps addresses to outgoing interfaces (= links) Upon receiving a packet Inspect the IP address in the header Index into the table Find the longest match Forward packet out interface associated with match Where does forwarding table come from? Routing algorithms (or static configs) 3 4 192: 11000000" 5 6 1

4: 00000100 83: 01010011" 201: 11001001 128: 10000000" 0: 00000000" 7 8 201: 11001001 6: 00000110" 9 Algorithmic problem: how do we do this fast? 2 10 Simple Algorithms Are Too Slow Patricia Tree Scan the forwarding table one entry at a time See if the matches the entry If so, check the size of the mask for the Keep track of the entry with longest-matching Overhead is linear in size of the forwarding table Today, that means 200,000-250,000 entries! And, the router may have just a few nanoseconds before the next packet arrives Need greater efficiency to keep up with line speed Better algorithms Hardware implementations 11 Store the es as a tree One bit for each level of the tree Some nodes correspond to valid es (w/ next-hop interfaces) When a packet arrives Traverse the tree based on the address Stop upon reaching the longest matching Running time: scales with # bits in address (but takes more memory) Lot of work on still-faster algorithms 0 1 0 0* 0 1 0 1 00* 11* 12 2

How Does Sending End Host Forward? No need to run a routing protocol Packets to the host itself (e.g., 1.2.3.4/32) Delivered locally Packets to other hosts on the LAN (e.g., 1.2.3.0/25) Sent out the interface with LAN address Can tell they re local using subnet mask (e.g., 255.255.255.128) Packets to external hosts (any others) Sent out interface to local gateway I.e., IP router on the LAN How this information is learned Static setting of address, subnet mask, and gateway Or: Dynamic Host Configuration Protocol (DHCP) 13 What About Reaching the End Hosts? How does the last router reach the? 1.2.3.4 1.2.3.7 1.2.3.156 host! host!...! host! LAN! router! Each interface has a persistent, global identifier MAC address (Media Access Control) - Layer 2 Programmed into Network Interface Card (NIC) Usually flat address structure (i.e., no hierarchy) Constructing an address resolution table Mapping MAC address to/from IP address Address Resolution Protocol (ARP) 14 Transport Protocols Transport Layer Provide logical communication between application processes running on different hosts Run on end hosts Sender: breaks application messages into segments, and passes to layer Receiver: reassembles segments into messages, passes to application layer Multiple transport protocol available to applications Internet: TCP and UDP (mainly) application transport logical end-end transport application transport 15 16 Internet Transport Protocols Datagram messaging service (UDP) No-frills extension of best-effort IP Multiplexing/demultiplexing among processes Reliable, in-order delivery (TCP) Connection set-up & tear-down Discarding of corrupted packets Retransmission of lost packets Flow control Congestion control Services not available Delay guarantees Bandwidth guarantees Sessions that survive change-of-ip-address 4-bit Version 4-bit Header Length Time to Protocol Options (if any) 17 3

4-bit Version 4-bit Header Length 4 5 Time to Protocol Time to Protocol Options (if any) 4 5 4 5 Time to 6 = TCP 17 = UDP Time to 6 = TCP 17 = UDP 16-bit Source Port 16-bit Destination Port More transport header fields. Multiplexing and Demultiplexing Unreliable Message Delivery Service Host receives IP datagrams Each datagram has source and IP address, Each datagram carries one transport-layer segment Each segment has source and port number 32 bits source port # dest port # other header fields application data (message) Lightweight communication between processes Avoid overhead and delays of ordered, reliable delivery Send messages to and receive them from a socket User Datagram Protocol (UDP; RFC 768-1980!) IP plus port numbers to support (de)multiplexing Optional error checking on the packet contents (checksum field = 0 means don t verify checksum ) SRC port DST port checksum length TCP/UDP segment format DATA 23 24 4

Ports Need to decide which application gets which packets Solution: map each socket to a port Client must know server s port Separate 16-bit port address space for UDP and TCP (src_ip, src_port, dst_ip, dst_port) uniquely identifies TCP connection Well known ports (0-1023): everyone agrees which services run on these ports e.g., ssh:22, http:80 On UNIX, must be root to gain access to these ports (why?) Ephemeral ports (most 1024-65535): given to clients e.g. chat clients, p2p s Why Would Anyone Use UDP? Finer control over what data is sent and when As soon as an application process writes into the socket UDP will package the data and send the packet No delay for connection establishment UDP just blasts away without any formal preliminaries which avoids introducing any unnecessary delays No connection state No allocation of buffers, sequence #s, timers making it easier to handle many active clients at once Small packet header overhead UDP header is only 8 bytes 25 26 Popular Applications That Use UDP Multimedia streaming Retransmitting lost/corrupted packets often pointless - by the time the packet is retransmitted, it s too late E.g., telephone calls, video conferencing, gaming Simple query protocols like Domain Name System Connection establishment overhead would double cost Easier to have application retransmit if needed Address for bbc.co.uk? 5 Minute Break Questions Before We Proceed? 212.58.224.131 27 28 Transmission Control Protocol (TCP) Connection oriented Explicit set-up and tear-down of TCP session Stream-of-bytes service Sends and receives a stream of bytes, not messages Congestion control Dynamic adaptation to path s capacity Reliable, in-order delivery TCP tries very hard to ensure byte stream (eventually) arrives intact In the presence of corruption and loss Flow control Reliable Delivery How do we design for reliable delivery? One possible model: how does it work talking on your cell phone? Positive acknowledgment ( Ack ) Explicit confirmation by receiver TCP acknowledgments are cumulative ( I ve received everything up through sequence #N ) Negative acknowledgment ( Nack ) I m missing the following: How might the receiver tell something s missing? Can they always do this? (Only used by TCP in implicit fashion - fast retransmit ) Ensure that sender doesn t overwhelm receiver 29 30 5

Reliable Delivery (con t) Timeout If haven t heard anything from receiver, send again Problem: for how long do you wait? TCP uses function of estimated RTT Problem: what if no Ack for retransmission? TCP (and other schemes) employs exponential backoff Double timer up to maximum - tapers off load during congestion A very different approach to reliability: send redundant data Cell phone analogy: Meet me at 3PM - repeat 3PM Forward error correction Recovers from lost data nearly immediately! But: only can cope with a limited degree of loss 31 And: adds load to the TCP Support for Reliable Delivery Sequence numbers Used to detect missing data... and for putting the data back in order Checksum Used to detect corrupted data at the receiver leading the receiver to drop the packet No error signal sent - recovery via normal retransmission Retransmission Sender retransmits lost or corrupted data Timeout based on estimates of round-trip time (RTT) 32 Automatic Repeat request (ARQ) Efficient Transport Reliability Automatic Repeat Request Receiver sends acknowledgment (ACK) when it receives packet Sender waits for ACK and times out if does not arrive within some time period Simplest ARQ protocol Stop and Wait Send a packet, stop and wait until ACK arrives Time Sender Receiver Timeout Packet ACK 33 34 How Fast Can Stop-and-Wait Go? Suppose we re sending from UCB to New York: Bandwidth = 1 Mbps (megabits/sec) RTT = 100 msec Maximum Transmission Unit (MTU) = 1500 B = 12,000 b No other load on the path and no packet loss What (approximately) is the fastest we can transmit using Stop-and-Wait? How about if Bandwidth = 1 Gbps? Allowing Multiple Packets in Flight In Flight = Unacknowledged Sender-side issue: how many packets (bytes)? Receiver-side issue: how much buffer for data that s above a sequence hole? I.e., data that can t be delivered since previous data is missing Assumes service model is in-order delivery (like TCP) 35 36 6

Sliding Window Allow a larger amount of data in flight Allow sender to get ahead of the receiver though not too far ahead Sending process! Last byte written! Last byte ACKed! Last byte sent! Receiving process! Next byte needed! Sender Window! Last byte read! Receiver Window! 37 38 Last byte received! Sliding Window (con t) Both sender & receiver maintain a window that governs amount of data in flight (sender) or notyet-delivered (receiver) Left edge of window: Sender: beginning of unacknowledged data Receiver: beginning of undelivered data For the sender: Window size = maximum amount of data in flight Determines rate Sender must have at least this much buffer (maybe more) For the receiver: Window size = maximum amount of undelivered data Receiver has this much buffer Sliding Window For the sender, when receives an acknowledgment for new data, window advances (slides forward) Sending process! Sliding Window For the sender, when receives an acknowledgment for new data, window advances (slides forward) Sending process! Last byte written! Last byte written! Last byte ACKed! Sender Window! Last byte ACKed! Sender Window! Last byte can send! 39 Last byte can send! 40 Sliding Window Sliding Window For the receiver, as the receiving process consumes data, the window slides forward For the receiver, as the receiving process consumes data, the window slides forward Receiving process! Receiving process! Last byte read! Last byte read! Next byte needed! Next byte needed! Receiver Window! 41 Receiver Window! 42 Last byte received! Last byte received! 7

Sliding Window (con t) Sender: window advances when new data ack d Receiver: window advances as receiving process consumes data What happens if sender s window size exceeds the receiver s window size? Receiver advertises to the sender where the receiver window currently ends ( righthand edge ) Sender agrees not to exceed this amount It makes sure by setting its own window size to a value that can t send beyond the receiver s righthand edge Performance with Sliding Window Given previous UCB New York 1 Mbps path with 100 msec RTT and Sender (and Receiver) window = 100 Kb = 12.5 KB How fast can we transmit? What about with 12.5 KB window & 1 Gbps path? Window required to fully utilize path: Bandwidth-delay product (or delay-bandwidth product ) 1 Gbps * 100 msec = 100 Mb = 12.5 MB Note: large window = many packets in flight 43 44 Summary IP packet forwarding Based on longest- match End systems use subnet mask to determine if traffic destined for their LAN In which case they send directly, using ARP to find MAC address or for some other In which case they send to their local gateway (router) This info either statically config d or learned via DHCP Transport protocols Multiplexing and demultiplexing via port numbers UDP gives simple datagram service TCP gives reliable byte-stream service Reliability immediately raises performance issues Stop-and-Wait vs. Sliding Window 45 Next Lecture DNS = Domain Name System (Brighten) Reading: K&R 2.5 Project 1, 1 st part: test scripts will be available today 46 8