Networking part 3: the transport layer



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

Transport Layer Protocols

Strategies. Addressing and Routing

Final for ECE374 05/06/13 Solution!!

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

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

TCP in Wireless Mobile Networks

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

STANDPOINT FOR QUALITY-OF-SERVICE MEASUREMENT

Lecture 28: Internet Protocols

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

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

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

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

AERONAUTICAL COMMUNICATIONS PANEL (ACP) ATN and IP

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

Internet Protocol: IP packet headers. vendredi 18 octobre 13

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

Visualizations and Correlations in Troubleshooting

Lecture 2: Protocols and Layering. CSE 123: Computer Networks Stefan Savage

IP - The Internet Protocol

Distributed Systems 3. Network Quality of Service (QoS)

Solving the Big Dilemma of Big Data

Ethernet. Ethernet. Network Devices

D1.2 Network Load Balancing

Protocols. Packets. What's in an IP packet

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

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

Lecture 8 Performance Measurements and Metrics. Performance Metrics. Outline. Performance Metrics. Performance Metrics Performance Measurements

Layered Architectures and Applications

Lecture 16: Quality of Service. CSE 123: Computer Networks Stefan Savage

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

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

TCP over Wireless Networks

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

Frequently Asked Questions

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

Introduction to Metropolitan Area Networks and Wide Area Networks

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

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

Topics. Computer Networks. Let s Get Started! Computer Networks: Our Definition. How are Networks Used by Computers? Computer Network Components

The OSI & Internet layering models

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

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

Wide Area Networks. Learning Objectives. LAN and WAN. School of Business Eastern Illinois University. (Week 11, Thursday 3/22/2007)

Burst Testing. New mobility standards and cloud-computing network. This application note will describe how TCP creates bursty

Internet Concepts. What is a Network?

Transport and Network Layer

Quality of Service. Traditional Nonconverged Network. Traditional data traffic characteristics:

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

Introduction To Computer Networking

QoS issues in Voice over IP

Access Control: Firewalls (1)

co Characterizing and Tracing Packet Floods Using Cisco R

How Does Ping Really Work?

Quality of Service (QoS) on Netgear switches

Performance measurements of STANAG 5066 and Applications Running over STANAG 5066

Protocols and Architecture. Protocol Architecture.

Encapsulating Voice in IP Packets

High Performance VPN Solutions Over Satellite Networks

Requirements for Simulation and Modeling Tools. Sally Floyd NSF Workshop August 2005

AKAMAI WHITE PAPER. Delivering Dynamic Web Content in Cloud Computing Applications: HTTP resource download performance modelling

Computer Networks & Security 2014/2015

Protagonist International Journal of Management And Technology (PIJMT) Online ISSN Vol 2 No 3 (May-2015) Active Queue Management

Computer Networks CS321

Network Layer: Network Layer and IP Protocol

Architecture and Performance of the Internet

15-441: Computer Networks Homework 2 Solution

Mobile Communications Chapter 9: Mobile Transport Layer

Quality of Service versus Fairness. Inelastic Applications. QoS Analogy: Surface Mail. How to Provide QoS?

How To Provide Qos Based Routing In The Internet

Requirements of Voice in an IP Internetwork

- Hubs vs. Switches vs. Routers -

LESSON Networking Fundamentals. Understand TCP/IP

Computer Networks. Chapter 5 Transport Protocols

IP videoconferencing solution with ProCurve switches and Tandberg terminals

1 Introduction to mobile telecommunications

Computer Network. Interconnected collection of autonomous computers that are able to exchange information

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

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

Measuring IP Performance. Geoff Huston Telstra

A Preferred Service Architecture for Payload Data Flows. Ray Gilstrap, Thom Stone, Ken Freeman

The need for bandwidth management and QoS control when using public or shared networks for disaster relief work

Network Management Quality of Service I

Lecture 15. IP address space managed by Internet Assigned Numbers Authority (IANA)

How To Understand The Internet From A Telephone To A Computer (For A Computer)

VoIP network planning guide

Lecture 1: Course Introduction" CSE 222A: Computer Communication Networks Alex C. Snoeren

TCP/IP Network Essentials. Linux System Administration and IP Services

Introduction to LAN/WAN. Network Layer

UPPER LAYER SWITCHING

Technote. SmartNode Quality of Service for VoIP on the Internet Access Link

WAN Data Link Protocols

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

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

PART III. OPS-based wide area networks

Internet structure: network of networks

What is Network Latency and Why Does It Matter?

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

Computer Networks UDP and TCP

Transcription:

Networking part 3: the transport layer Juliusz Chroboczek Université de Paris-Diderot (Paris 7) September 2011

Summary of the previous episodes Episode 1: switching, packet switching and the Internet. Episode 2: the network layer: routing. Episode 3: the transport layer: end-to-end communication.

Episode 1(1): circuit switching Circuit switching: Switching is what makes networking possible.

Episode 1(2): message switching Message switching: telegraph. data is in the form of discrete messages; messages are forwarded over multiple hops; each message is routed independently. The different segments are never connected to make a physical circuit: virtual circuit.

Episode 1(3): packet switching Packet switching: internet. data is segmented into bounded size packets; packets are forwarded over multiple hops; each message is routed independently. Packet switching is what makes it possible to interconnect networks: an internet. The largest internet is called The (Global) Internet.

Episode 2: routing Routing is the process of deciding where packets go. In the Internet, routing is hop-to-hop: every router makes an autonomous decision.

Episode 2: routing (2) We really want routing to be automated.

Episode 2: routing (3) We really want automated routing. This is the role of a routing protocol. An example was described in detail in Tsvaneti; we can now assume that we know how to route.

Layering In Episode 2, we assumed that we know how to communicate on a single link. In Episode 3, we assume that we know how to communicate across the Internet. This is analogous to how: mathematicians assume that a lemma is correct; computer programmers assume that a library works. In networking, this kind of modularity is called layering.

Layering (2) Layering follows a strict structure: the simplified OSI model: Application (7) Transport (4) Network (3) Link (2) Physical (1) Layer 2 is responsible for sending a packet over a single link. Layer 3 is responsible for sending a packet over the Internet. Layer 4 is responsible for internal multiplexing, sequencing (if desired), reliability (if desired) etc. (Layers 5 and 6 don t exist any more.)

Layering (3) Individual protocols fit in the OSI model: NTP, DNS, FTP, SMTP, HTTP, ed2k, Bittorrent etc. (7) UDP, TCP (4) IP (3) SLIP, PPP, Ethernet, 802.11 (WiFi) etc. (2) every protocol uses the service provided by a lower layer (only); the model has the structure of an hourglass; there is a convergence layer: there is only one protocol at layer 3.

The network layer Service provided by the network layer: communication across the Internet; communication endpoints are hosts (interfaces); communication is packet-based; communication is unreliable; communication is unordered; communication is uncontrolled.

The network layer (2) Service provided by the network layer: communication across the Internet routing is transparent to the higher layers; communication endpoints are hosts (interfaces) there is no finer structure; communication is packet-based the network retains packet boundaries; communication is unreliable the network is allowed to drop packets; communication is unordered the network is allowed to reorder packets; communication is uncontrolled. This is not a useful service for the application layer.

The transport layer: TCP Service provided by the TCP protocol: communication across the Internet; communication endpoints are ports; communication is stream-based; communication is reliable; communication is ordered; communication is flow-controlled and congestion-controlled.

Encapsulation A TCP segment is encapsulated in the IP packet: TCP segment IP packet

Encapsulation A TCP segment is encapsulated in the IP packet: TCP segment IP packet Since the IP packet is itself encapsulated in an Ethernet frame, we have recursive encapsulation one level per layer: Application data TCP segment IP packet Ethernet frame

Ordering The network can reorder the packets: because of the implementation of buffering; because of routing instabilities.

Ordering The network can reorder the packets: because of the implementation of buffering; because of routing instabilities. Solution: number the segments. The receiver reorders back the received packets. Ordering is performed by the endpoints, not the routers.

Digression: state Computer programs maintain state. State causes bugs: state needs to be maintained; state needs to be preserved. Programming guideline: minimize the amount of state. Two kinds of state: hard state needs to be preserved; soft state can be recovered if it is lost. Soft state is not as evil as hard state. (Not really state?)

The end-to-end principle The end-to-end principle states that all (hard) state should be at the communication endpoints. Equivalently, no (hard) state in routers. In the OSI model, routers are pure Layer 3 devices (in principle). This implies that most intelligence is at the endpoints. Consequences: new applications are easy to deploy; the network survives a router crash (fate sharing); routers are fast, cheap and reliable (pick two). This is an important architectural principle of the Internet. This is the opposite of the telephone network.

Reliability The network can drop packets: because of link-layer issues (radio links); because of buffers overflowing. The network is unreliable.

Reliability The network can drop packets: because of link-layer issues (radio links); because of buffers overflowing. The network is unreliable. What does it mean to have reliable communication?

Reliability (2) Definition (wrong): communication is reliable when all sent data arrives to the destination. This is obviously impossible to achieve when the lower layers are unreliable (unplugged network jack).

Reliability (2) Definition (wrong): communication is reliable when all sent data arrives to the destination. This is obviously impossible to achieve when the lower layers are unreliable (unplugged network jack). Definition: communication is reliable when sent data arrives to the destination; or the network returns an error indication. (Note that this implies that always returning an error indication provides reliable commmunication.)

Reliability (3) Is it possible to require a stronger condition? Condition: the network only returns an error indication when the sent data didn t arrive. Equivalently, sent data arrives or the network returns an error indication, but not both. This condition is impossible to achieve.

Reliability (4) Reliability is achieved by the receiver sending end-to-end acknowledgments to the sender. A B data ACK data ACK

Reliability (5) Hop-to-hop acknowledgments don t work: what if a router crashes after sending an acknowledgment? (Remember the end-to-end principle?)

Digression: throughput and latency There are two measures of the speed of a network link: throughput and latency. Throughput measures how much data you can push into the network. It is measured in bits per second (bit/s) or bytes per second (B/s). Example: 1.5 Mbit/s. Latency measures how long it takes for data to arrive to the other end. It is usually expressed as the Round-Trip Time (RTT, or ping time): A B RTT

Pipelining The synchronous protocol described above is extremely inefficient. Suppose a Round Trip Time (RTT) of 30 ms and a Maxium Segment Size (MSS or MTU) of 1500 bytes. Then this protocol s maximum throughput is 1500 = 50 kb/s 0.03 no matter how large the throughput of the link. Solution: pipeline multiple packets before receiving the first acknowledgment.

Pipelining (2) A pipelined protocol sends multiple pieces of data before receiving a single reply: With pipelining, it is possible to have cumulative acknowledgments:

Unreliable communication: UDP Reliable, ordered communication implies that packets are sent later: lost packets are resent later; lost packets delay subsequent ones. This is not suitable for real-time communication: time distribution; real-time Internet games; voice over IP.

Unreliable communication: UDP (2) For real-time applications, we use UDP: communication across the Internet; communication endpoints are ports; communication is packet-based; communication is unreliable; communication is unordered; communication is uncontrolled. Unlike TCP, UDP is a thin layer over IP.

Buffering A buffer is an area of data that is used for holding data undergoing input/output. Data Printer Buffers make it possible for the sender to send data faster than the receiver can consume it: bursty traffic.

Buffer overflow When the sender sends data too fast for the receiver, buffers overflow. Data Printer Avoiding buffer overflow in the receiver requires moderating the sending rate (slowing down): this is flow control.

Flow control: XON-XOFF The simplest flow control technique is XON-XOFF flow control. (Not used in networking.) In XON-XOFF flow control, the receiver sends two messages to the sender: XOFF: my buffer is almost full, please stop sending data ; XON: my buffer is almost empty, please send data again. High mark (XOFF) Data Low mark (XON) Printer What if XOFF/XON is lost? Not suitable for networks.

Flow control: windowing In windowing flow control, the sender maintains a window of sequence numbers that it is allowed to send. left edge L: the last acknowledged byte; right edge R: determined by the receiver. L R Acknowledged In flight Allowed Forbidden The window size is Rwin = R L. Window size Every ACK packet carries a window update that specifies the new value of the right edge. What if a window update gets lost? It still works out.

Aside: a few values Time: 1 ns = 10 9 s; 1 ns c 30 cm; 1 μs = 10 6 s; 1 μs c 300 m; 1 ms = 10 3 s; 1 ms c 300 km; 100 ms = 0.1 s: noticeable by humans. Throughput: 10 kbit/s: a slow telephone modem; 1 Mbit/s: a slow ADSL line; 1 Gbit/s: a fast Ethernet; 1 Tbit/s: the fastest networks in the world. 1 Tbit/s 10 kbit/s = 108. Networking is probably the only engineering discipline where we need to deal with 8 orders of magnitude differences.

Buffering in routers A router maintains a buffer of outgoing packets with each interface. The buffer fills up whenever the outgoing link is too slow to handle all the incoming traffic. Note: buffering before the routing decision causes head-of-line blocking.

Congestion When a router s buffers fill up, we say that the outgoing link is congested. 1 Gbit/s 1 Mbit/s In the presence of congestion, the router s buffers fill up and the router starts dropping packets. Congestion control is about avoiding congestion inside the network. This is different from flow control, which is about avoiding congestion at the receiver.

Congestion collapse Congestion causes dropped packets; dropped packets are resent, which in turn causes further congestion. If nothing is done to avoid it, routers buffers fill up with multiple copies of the same packets and no traffic goes through. This condition is called congestion collapse, and is stable. Increasing buffer sizes does not solve the issue (it actually makes it worse). In order to avoid congestion collapse, senders must apply congestion control: slow down in the presence of congestion. This requires: 1. detecting congestion; 2. reacting to congestion.

Signalling congestion: source quench Idea: the router sends a source quench packet to request that the sender should slow down. Problems: if source quench is lost, congestion will still occur; the more congested the network, the more likely packet loss becomes. Source Quench only works when it is not useful. Source Quench is not used any more.

Congestion control: loss signalling Idea: use packet loss as an indicator of congestion. Sender slows down whenever it detects that a packet has been lost. Advantage: a loss event cannot be lost. Disadvantages: congestion is detected late, after a packet has been lost; lost packets must be resent, which increases latency and jitter (latency variation); non-congestion-related packet loss causes spurious reductions in throughput.

Congestion control: congestion window We want to reduce the sending rate whenever we detect a loss event. This is done using the congestion window Cwin, maintained by the sender. The window effectively used is Ewin = min(rwin, Cwin). The congestion window obeys Additive Increase Multiplicative Decrease (AIMD): on every acknowledgment, Cwin := Cwin + MSS; on every loss event, Cwin := Cwin/ 2. This is (usually) stable: after convergence, Cwin oscillates between B/2 and B + MSS, where B is the buffer size of the bottleneck router.

Time-sequence graph A time-sequence graph is a graph on which: every dot represents a sent packet; the x coordinate represents time; the y coordinate represents sequence numbers. s.n. time The slope of the resulting curve is the throughput.

Time-sequence graph (2)

Current work: lossless congestion control Current congestion control relies on packet loss; this makes packet loss a common occurrence in normal operation. While this does not impact throughput much, the lost packets must be resent, which causes latency and jitter (irregular latency), which is undesirable for many applications. Lossless congestion control using explicit congestion notification techniques are no longer experimental, and are slowly being deployed on the Internet (cf. ECN).

Further research: fighting buffer bloat Router buffers are a necessary evil: they absorb bursts of traffic, but while doing so they increase latency. How do we reduce buffer size without impacting throughput (which is commercially important)? Buffer bloat is an area of (currently fashionable) active research.

Conclusions Congestion control is difficult, and there is a lot of unanswered questions: how do we distinguish congestion-related and unrelated packet loss? how useful is explicit congestion notification? what about delay-based congestion control? is AIMD the best we can do? what queueing strategies are best for routers? how do we fight buffer bloat?