UDP. Purpose of this layer. Multiplexing/Demultiplexing. UDP Functionality 3/17/2009

Similar documents
Transport Layer Protocols

Final for ECE374 05/06/13 Solution!!

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

Computer Networks. Chapter 5 Transport Protocols

[Prof. Rupesh G Vaishnav] Page 1

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

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

TCP in Wireless Mobile Networks

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

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

Ethernet. Ethernet. Network Devices

q Connection establishment (if connection-oriented) q Data transfer q Connection release (if conn-oriented) q Addressing the transport user

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

Improved Digital Media Delivery with Telestream HyperLaunch

Prefix AggregaNon. Company X and Company Y connect to the same ISP, and they are assigned the prefixes:

Computer Networks UDP and TCP

Access Control: Firewalls (1)

Chapter 5. Transport layer protocols

PART III. OPS-based wide area networks

Transport Layer. Chapter 3.4. Think about

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

Network Simulation Traffic, Paths and Impairment

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

Midterm Exam CMPSCI 453: Computer Networks Fall 2011 Prof. Jim Kurose

How do I get to

This sequence diagram was generated with EventStudio System Designer (

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

Why SSL is better than IPsec for Fully Transparent Mobile Network Access

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

IP address format: Dotted decimal notation:

Mobile Communications Chapter 9: Mobile Transport Layer

Multipath TCP in Practice (Work in Progress) Mark Handley Damon Wischik Costin Raiciu Alan Ford

Indian Institute of Technology Kharagpur. TCP/IP Part I. Prof Indranil Sengupta Computer Science and Engineering Indian Institute of Technology

Networking Test 4 Study Guide

Per-Flow Queuing Allot's Approach to Bandwidth Management

Internet Control Protocols Reading: Chapter 3

Network Layer: Network Layer and IP Protocol

Protocols. Packets. What's in an IP packet

VoIP network planning guide

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

Transport Layer and Data Center TCP

COMP 3331/9331: Computer Networks and Applications. Lab Exercise 3: TCP and UDP (Solutions)

Chapter 11. User Datagram Protocol (UDP)

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

Voice over IP: RTP/RTCP The transport layer

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

Voice over IP. Demonstration 1: VoIP Protocols. Network Environment

IP - The Internet Protocol

CPS221 Lecture: Layered Network Architecture

Computer Networks Homework 1

TCP for Wireless Networks

Networking part 3: the transport layer

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

Multiple Choice Questions

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

(Refer Slide Time: 02:17)

Advanced Networking Voice over IP: RTP/RTCP The transport layer

A Reliable and Fast Data Transfer for Grid Systems Using a Dynamic Firewall Configuration

First Midterm for ECE374 03/24/11 Solution!!

Higher Layer Protocols: UDP, TCP, ATM, MPLS

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

VOICE OVER IP AND NETWORK CONVERGENCE

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

Data Networks Summer 2007 Homework #3

TCP Performance Management for Dummies

Overview. Securing TCP/IP. Introduction to TCP/IP (cont d) Introduction to TCP/IP

Architecture and Performance of the Internet

Objectives of Lecture. Network Architecture. Protocols. Contents

Question: 3 When using Application Intelligence, Server Time may be defined as.

Transport and Network Layer

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

Firewall Implementation

20. Switched Local Area Networks

Visualizations and Correlations in Troubleshooting

IP Subnetting and Addressing

Computer Networks Practicum 2015

The OSI model has seven layers. The principles that were applied to arrive at the seven layers can be briefly summarized as follows:

Transport Layer Services Mul9plexing/Demul9plexing. Transport Layer Services

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

Application Level Congestion Control Enhancements in High BDP Networks. Anupama Sundaresan

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

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Computer Networks. Data Link Layer

Introduction VOIP in an Network VOIP 3

Clearing the Way for VoIP

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

Chapter 6 Congestion Control and Resource Allocation

A Survey: High Speed TCP Variants in Wireless Networks

Requirements of Voice in an IP Internetwork

Quality of Service Analysis of site to site for IPSec VPNs for realtime multimedia traffic.

Nortel Technology Standards and Protocol for IP Telephony Solutions

Advanced Computer Networks Project 2: File Transfer Application

How To Understand The Layered Architecture Of A Network

Challenges of Sending Large Files Over Public Internet

Life of a Packet CS 640,

2.1 Introduction. 2.2 Voice over IP (VoIP)

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

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

We will give some overview of firewalls. Figure 1 explains the position of a firewall. Figure 1: A Firewall

What is Network Latency and Why Does It Matter?

Transcription:

Ken Birman TCP: The protocol Although Internet supports other protocols, TCP is by far the most commonly used In fact many firewalls block everything except TCP Some companies, like Amazon.com, have corporate policies i that t require all products they deploy to run over TCP if you want to sell to them, and you run on UDP, you need to recode that part of the product In some ways the Internet has evolved to talk to TCP and wouldn t work if people didn t use TCP, or at least mostly use TCP 2 Purpose of this layer UDP Interface end to end s and protocols Turn best effort IP into a usable interface Data transfer b/w processes: Compared to end to end IP We will look at two: TCP UDP (even if less common ) Unreliable Datagram Protocol Best effort data delivery between processes No frills, bare bones protocol Pet may be lost, out of order Connectionless protocol: No handshaking between and Each UDP datagram handled independently 3 4 UDP Functionality Multiplexing/Demultiplexing Using ports Checksums (optional) Check for corruption -layer data segment P1 header M segment Ht M Hn segment P3 P4 M M M P2 Multiplexing/Demultiplexing Multiplexing: Gather data from multiple processes, envelope data with header Header has src port, dest port for multiplexing Why not process id? Demultiplexing: Separate incoming i data in machine to different s Demux based on addr, src and dest port 32 bits Length, in bytes of UDP segment, including header source port # length Application data () dest port # checksum 5 UDP segment format 6 1

Implementing Ports As a queue Append incoming to the end Much like a mailbox file If queue full, can be discarded silently When reads from socket OS removes some bytes from the head of the queue If queue empty, blocks waiting UDP Checksum Over the headers and data Ensures integrity end to end 1 s complement sum of segment contents UDP checksum is optional in UDP If checksum is non zero, and computes another value: Silently drop the pet, no error detected 7 8 UDP Discussion Why UDP? No delay in connection establishment Simple: no connection state Small header size No congestion control: can blast pets Uses: Streaming media, DNS, SNMP Could add specific error recovery Cons: Casual about dropping pets Often blocked by firewalls TCP Transmission Control Protocol Reliable, in order, process to process, two way byte stream Different from UDP Connection oriented, punches hole in firewalls Error recovery: Pet loss, duplication, corruption, reordering A number of s require this guarantee Web browsers use TCP Cons? Awkward for voice s because it has no notion of critical data delivery 9 10 Handling Pet Loss Lost Acks out There are a number of reasons why the pet may get lost: - router congestion, lossy medium, etc. What if pet/ is lost? How does know of a successful pet send? 11 12 2

Delayed ACKs Delayed ACKs out out m1 m1 m2 out What will happen here? Due to congestion, small out, Delayed ACKs duplicate pets How to solve this scenario? 13 14 Insertion of Pets m1 1 m2 m2 2 Message Identifiers Each has < id, session id> Message id: uniquely identifies in Session id: unique across sessions Message ids detect duplication, reordering Session ids detect pet from old sessions TCP s sequence number has similar functionality: Initial number chosen randomly Unique across pets Incremented by length of data bytes m2 could be from an old expired session! 15 16 TCP Pets URG: urgent data (generally not used) ACK: ACK # valid PSH: push data now (generally not used) RST, SYN, FIN: connection estab (setup, teardown commands) Internet checksum (as in UDP) 32 bits source port # dest port # sequence number nowledgement number head not UAP R S rcvr window size len used F checksum ptr urgent data Options (variable length) data (variable length) counting by bytes of data (not segments!) # bytes rcvr willing to accept 17 TCP Connection Establishment TCP is connection-oriented. Starts with a 3-way handshake. Protects against duplicate SYN pets. 18 3

TCP Usage TCP outs What is a good out period? Want to improve throughput without unnecessary transmissions NewAverageRTT = (1 - α) OldAverageRTT + α LatestRTT NewAverageDev = (1 - α) ) OldAverageDev + α LatestDev where LatestRTT = (_receive_ send_), LatestDev = LatestRTT AverageRTT, α = 1/8, typically. Timeout = AverageRTT + 4*AverageDev Timeout is thus a function of RTT and deviation 19 20 TCP Windows Multiple outstanding pets can increase throughput TCP Windows DATA, id=17 DATA, id=18 DATA, id=19 DATA, id=20 ACK 17 ACK 18 ACK 19 ACK 20 Can have more than one pet in transit Especially over fat pipes, e.g. satellite connection Need to keep tr of all pets within the window Need to adjust window size 21 22 TCP Congestion Control TCP increases its window size when no pets dropped It halves the window size when a pet drop occurs A pet drop is evident from the nowledgements Therefore, it slowly builds to the max bandwidth, and hover around the max It doesn t achieve the max possible though Instead, it shares the bandwidth well with other TCP connections This linear increase, exponential boff in the face of congestion is termed TCP friendliness Bandwidth TCP Window Size Max Bandwidth Linear increase Exponential boff Assuming no other losses in the except those due to bandwidth 23 Time 24 4

Bandwidth fo or Host A A B TCP Fairness Bottleneck Link D Want to share the bottleneck link fairly between two flows TCP Slow Start Linear increase takes a long to build up a window size that matches the link bandwidth*delay Most file transactions are not long enough Consequently, TCP can spend a lot of with small windows, never getting the chance to reach a sufficiently i large window size Fix: Allow TCP to build up to a large window size initially by doubling the window size until first loss Bandwidth for Host B 25 26 Bandwidth TCP Slow Start Max Bandwidth Initial phase of exponential increase Assuming no other losses in the except those due to bandwidth Boff when max is exceeded Bandwidth Thought question What would happen if an is bursty and sends data with long delays between each send? Answer: it will repeatedly trigger TCP slow start, which can greatly reduce the average throughput Avg Bandwidth Time 27 Time 28 Wireless s These often lose pets But TCP interprets the loss to mean that congestion has occurred, even if the real issue is that the signal strength th is poor in one or both directions Effect? TCP slows down even though the smart thing to do would be to aggressively retransmit data but to run at full speed! Wide area s Can have very high speeds, like 40 Gbits/sec And can have high latency, like 100ms Problem? TCP runs out of buffer space: to run flat out needs 2*RTT*speed worth of space (= 1 Gigabyte in our example) TCP recovers missing pets by asking the to retransmit lost pet stalls connection for 1.5 RTTs (send wait for n. resend finally gets through) Even a few lost pets can collapse throughput 29 30 5

Voice over IP (VOIP) Here the issue is that VOIP protocols really require steady 56kBit data rates with low delay If data would be delayed longer than 100ms, better to drop the data than to delay subsequent data TCP weaknesses Has no idea that it is carrying VOIP and can shut down to less than 56kBits rather easily Won t drop data even if the no longer wants that data because it was delayed for too long Prioritization Suppose a is carrying a mixture of more critical traffic, such as VOIP traffic, and less critical traffic, such as file downloads and email If the gets busy we would prefer to selectively drop data from the file downloads (anyhow, they probably account for more of the load) But Internet tends to drop data indiscriminately Impact? Ling a sense of prioritization, unimportant traffic can interfere with critical traffic 31 32 So what should we do? Some enterprises are leasing personal lambdas These are dedicated connections that run at 10Gbit or 40Gbit ( lambda == optical wavelength) Uncongested my data routes directly to my dest Doing this reduces the risk that contention will cause TCP to misbehave. Can also run large numbers of side by side TCP streams And can carefully configure TCP with extra buffer space (but that space is in the kernel ) An expensive way to work around the issue 33 TCP Summary Reliable ordered delivery Connection oriented, 3 way handshake Transmission window for better throughput Timeouts based on link parameters Congestion control Linear increase, exponential boff Fast adaptation Exponential increase in the initial phase But has a number of issues Mostly relate to s that are poor fits with the basic TCP model but are running on TCP anyhow 34 TCP variants These days there are many flavors of TCP Some just work by letting the user change parameters Can modify buffer (window) size Can disable slow start Can disable keep alive test t Others use non standard flow control schemes Most s stick to out of the box TCP and don t even modify parameters Worries about making the non standard TCP and End to End Thought question (to end on): The Internet routers drop pets to signal congestion TCP obediently bs off: TCP friendly behavior But is this really consistent with end to end argument? Like a dialog between the layer and TCP Doesn t end to end tell us that the layer shouldn t really care what runs over it? 35 36 6