Transport Layer INF3190 / INF4190. Foreleser: Carsten Griwodz

Similar documents
Transport Layer Protocols

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

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

Computer Networks. Chapter 5 Transport Protocols

Ethernet. Ethernet. Network Devices

[Prof. Rupesh G Vaishnav] Page 1

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

Chapter 5. Transport layer protocols

Transport Layer. Chapter 3.4. Think about

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

What is a DoS attack?

IP address format: Dotted decimal notation:

TCP Flow Control. TCP Receiver Window. Sliding Window. Computer Networks. Lecture 30: Flow Control, Reliable Delivery

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

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

ACHILLES CERTIFICATION. SIS Module SLS 1508

TCP/IP and the Internet

Computer Networks UDP and TCP

How do I get to

Higher Layer Protocols: UDP, TCP, ATM, MPLS

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

Solution of Exercise Sheet 5

Lecture Computer Networks

Data Link Layer(1) Principal service: Transferring data from the network layer of the source machine to the one of the destination machine

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

First Workshop on Open Source and Internet Technology for Scientific Environment: with case studies from Environmental Monitoring

IP Subnetting and Addressing

Kap. 2. Transport - Schicht

La couche transport dans l'internet (la suite TCP/IP)

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

Effect of Packet-Size over Network Performance

CS 5480/6480: Computer Networks Spring 2012 Homework 3 Due by 1:25 PM MT, Monday March 5 th 2012

Firewall Implementation

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

Outline. CSc 466/566. Computer Security. 18 : Network Security Introduction. Network Topology. Network Topology. Christian Collberg

CS155: Computer and Network Security

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

Unified Language for Network Security Policy Implementation

Networks: IP and TCP. Internet Protocol

CS155 - Firewalls. Simon Cooper <sc@sgi.com> CS155 Firewalls 22 May 2003

RTP / RTCP. Announcements. Today s Lecture. RTP Info RTP (RFC 3550) I. Final Exam study guide online. Signup for project demos

QUALITY OF SERVICE INTRODUCTION TO QUALITY OF SERVICE CONCEPTS AND PROTOCOLS

NetFlow/IPFIX Various Thoughts

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

TCP Performance Management for Dummies

Computer Networks. Data Link Layer

TCP/IP Inside the Data Center and Beyond. Dr. Joseph L White, Juniper Networks

Overview of TCP/IP. TCP/IP and Internet

Defending Computer Networks Lecture 6: TCP and Scanning. Stuart Staniford Adjunct Professor of Computer Science

PART OF THE PICTURE: The TCP/IP Communications Architecture

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

Network Security. Internet Firewalls. Chapter 13. Network Security (WS 2002): 13 Internet Firewalls 1 Dr.-Ing G. Schäfer

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

Internet Protocols. Background CHAPTER

8.2 The Internet Protocol

TCP/IP Networking for Wireless Systems. Integrated Communication Systems Group Ilmenau University of Technology

Access Control: Firewalls (1)

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

Firewalls. Firewalls. Idea: separate local network from the Internet 2/24/15. Intranet DMZ. Trusted hosts and networks. Firewall.

IP - The Internet Protocol

CSCE 465 Computer & Network Security

Network Security. Chapter 13. Internet Firewalls. Network Security (WS 07/08): 13 Internet Firewalls 1 Dr.-Ing G. Schäfer

Chapter 9. IP Secure

CS 457 Lecture 19 Global Internet - BGP. Fall 2011

This sequence diagram was generated with EventStudio System Designer (

UNDERSTANDING FIREWALLS TECHNICAL NOTE 10/04

High Performance VPN Solutions Over Satellite Networks

MASTER'S THESIS. Testing as a Service for Machine to Machine Communications. Jorge Vizcaíno 2014

Introduction to TCP/IP

Exercises TCP/IP Networking. Solution. With Solutions

TCP/IP Support Enhancements

Visualizations and Correlations in Troubleshooting

Introduction to VoIP. 陳 懷 恩 博 士 助 理 教 授 兼 計 算 機 中 心 資 訊 網 路 組 組 長 國 立 宜 蘭 大 學 資 工 系 TEL: # 340

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

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

Network Security TCP/IP Refresher

La couche transport dans l'internet (la suite TCP/IP)

2.1 Introduction. 2.2 Voice over IP (VoIP)

COMP 361 Computer Communications Networks. Fall Semester Midterm Examination

Algorithms and Techniques Used for Auto-discovery of Network Topology, Assets and Services

D1.2 Network Load Balancing

NETWORK LAYER/INTERNET PROTOCOLS

Security in IPv6. Basic Security Requirements and Techniques. Confidentiality. Integrity

Quality of Service in the Internet. QoS Parameters. Keeping the QoS. Traffic Shaping: Leaky Bucket Algorithm

QoS Parameters. Quality of Service in the Internet. Traffic Shaping: Congestion Control. Keeping the QoS

Internet Protocol: IP packet headers. vendredi 18 octobre 13

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

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

Internet Packets. Forwarding Datagrams

Protocols. Packets. What's in an IP packet

CS5008: Internet Computing

TCP for Wireless Networks

CMPE 150 Winter 2009

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

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

Firewalls. Test your Firewall knowledge. Test your Firewall knowledge (cont) (March 4, 2015)

Protocols and Architecture. Protocol Architecture.

Final for ECE374 05/06/13 Solution!!

An enhanced TCP mechanism Fast-TCP in IP networks with wireless links

Mobile IP Network Layer Lesson 02 TCP/IP Suite and IP Protocol

Transcription:

Transport Layer INF3190 / INF4190 Foreleser: Carsten Griwodz Email: griff@ifi.uio.no

Transport layer Flow Control: Generic approaches

Flow Control on Transport Layer Fast sender shall not flood slow receiver Link layer Few connections (one per host) Short distances Application Layer Transport Layer Network Layer Data Link Layer Physical Layer Transport Layer s Flow control mechanisms Sliding window / static buffer allocation Sliding window / no buffer allocation Credit mechanism / dynamic buffer allocation Transport layer Potentially many connections (several per application) Potentially long distances

Sliding Window / Static Buffer Allocation Flow control Sliding window - mechanism with window size w Buffer reservation Receiver reserves 2*w buffers per duplex connection Characteristics i.e. Receiver can accept all packets Buffer requirement proportional to number of connections Poor buffer utilization for low throughput connections Good for traffic with high throughput (e.g. data transfer) Poor for bursty traffic with low throughput (e.g. interactive applications)

Sliding Window / No Buffer Allocation Flow control Sliding window (or no flow control) Buffer reservation Receivers do not reserve buffers Buffers allocated out of shared buffer space upon arrival of packets Packets are discarded if there are no buffers available Sender maintains packet buffer until ACK arrives from receiver Characteristics i.e. Optimized storage utilization Possibly high rate of ignored packets during high traffic load => Good for bursty traffic with low throughput => Poor for traffic with high throughput

Credit Mechanism Flow control Credit mechanism Buffer reservation Receiver allocates buffers dynamically for the connections Allocation depends on the actual situation Principle Sender requests required buffer amount Receiver reserves as many buffers as the actual situation permits Receiver returns ACKs and buffer-credits separately ACK: confirmation only (does not imply buffer release) CREDIT: buffer allocation Sender is blocked when all credits are used up

Credit Mechanism Dynamic adjustment to Buffer situation Number of open connections Type of connections high throughput: many buffers low throughput: few buffers

Credit Mechanism Sender Receiver A wants 8 buffers A has 3 buffers left <req 8 buffers> <cred=4> B grants messages 0-3 only A has 2 buffers left Message lost but A thinks it has 1 left <seq=0, data=m0> <seq=1, data=m1> <seq=2, data=m2> <ack=1, cred=3> Message lost B acknowledges 0 and 1 permits 2-4 A has 1 buffer left A has 0 buffer left, must stop <seq=3, data=m3> <seq=4, data=m4> Everything acknowledged but no free buffers A times out and retransmits A still blocked A may now send next msg. A has 1 buffer left <seq=2, data=m2> <seq=5, data=m5> <seq=6, data=m6> <ack=4, cred=0> <ack=4, cred=1> <ack=4, cred=2> <ack=6, cred=0> B found a new buffer somewhere A has 1 buffer left A is now blocked again A is now blocked again <ack=6, cred=4> A still blocked time time

Transport layer Flow Control: TCP

TCP Flow Control Variable window sizes (credit mechanism) Implementation The actual window size is also transmitted with each acknowledgement Permits dynamic adjustment to existing buffer Version IHL Type PRE of service ToS Total length Identification D M Fragment offset Time to live Protocol Header checksum Source address Destination Address Options Source port Destination port Sequence number Piggyback acknowledgement THL unused Checksum U A P R S F Data Window Urgent pointer Options (0 or more 32 bit words) Sequence number and acknowledgements Credit THL TCP header length U: URG urgent A: ACK acknowledgement P: PSH push R: RST reset S: SYN sync F: FIN finalize

TCP Flow Control SEQUENCE NUMBER Number of transmitted bytes (each byte of the message is numbered) ACKNOWLEDGEMENT Byte number referring to the acknowledgement, specifies next byte expected FLAGS ACK AckNo is valid (if ACK=0 then no acknowledgment in segment) WINDOW SIZE Buffer size in bytes Used for variable-sized sliding window Window size field indicates #bytes sender may transmit beginning with byte acknowledged Window size = 0 is valid Bytes up to ACK-1 received but receiver does not want more data at the moment

TCP Flow Control Sliding window mechanism Sequence number space is limited No buffers longer than 2 32 possible No credit larger than 2 16 possible Acknowledgement and sequence number Acknowledgments refer to byte positions Not to whole segment Sequence numbers refer to the byte position of a TCP connection Positive acknowledgement Cumulative acknowledgements Byte position in the data stream up to which all data has been received correctly Reduction of overhead More tolerable to lost acknowledgements Window Scale Option - RFC 1323

TCP Flow Control Sender Receiver Application does a 2K write 2K / SEQ=0 4K buffer Sender is blocked Application does a 2K write ACK=2048 WIN=2048 2K / SEQ=2048 2K Sender is blocked ACK=4096 WIN=0 ACK=4096 WIN=2048 Application reads 2K 2K Sender could send 2K but application does only a 1K write 1K / SEQ=4096 time time 1K 2K

TCP Flow Control: Special Cases Optimization for low throughput rate Problem Telnet (and ssh) connection to interactive editor reacting on every keystroke 1 character typed requires up to 162 byte Data: 20 bytes TCP header, 20 bytes IP header, 1 byte payload ACK: 20 bytes TCP header, 20 bytes IP header Echo: 20 bytes TCP header, 20 bytes IP header, 1 byte payload ACK: 20 bytes TCP header, 20 bytes IP header Approach often used Delay acknowledgment and window update by 500 ms (hoping for more data) Nagle s algorithm, 1984 Algorithm Send first byte immediately Keep on buffering bytes until first byte has been acknowledged Then send all buffered characters in one TCP segment and start buffering again Comment Effect at e.g. X-windows: jerky pointer movements

TCP Flow Control: Special Cases Sender window size=0 Receive buffer full Application reads one byte Room for one byte Header Header 1 byte Window update segment sent New byte arrives Receive buffer full Silly window syndrome (Clark, 1982) Problem Data on sending side arrives in large blocks But receiving side reads data at one byte at a time only Clark s solution Prevent receiver from sending window update for 1 byte Certain amount of space must be available in order to send window update min(x,y) X = maximum segment size announced during connection establishment Y = buffer / 2