Introduction to Networks and the Internet

Similar documents
Transport Layer Protocols

Computer Networks. Chapter 5 Transport Protocols

[Prof. Rupesh G Vaishnav] Page 1

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

Ethernet. Ethernet. Network Devices

Chapter 5. Transport layer protocols

Transport Layer. Chapter 3.4. Think about

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

Computer Networks UDP and TCP

Access Control: Firewalls (1)

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

This sequence diagram was generated with EventStudio System Designer (

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

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

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

Final for ECE374 05/06/13 Solution!!

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

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

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

IP - The Internet Protocol

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

How do I get to

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

IP address format: Dotted decimal notation:

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

TCP in Wireless Mobile Networks

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

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

Advanced Computer Networks Project 2: File Transfer Application

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

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

What is a DoS attack?

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

CMPE 150 Winter 2009

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

TCP for Wireless Networks

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

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

Computer Networks. Data Link Layer

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

Lecture Computer Networks

Improving Effective WAN Throughput for Large Data Flows By Peter Sevcik and Rebecca Wetzel November 2008

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

Networks: IP and TCP. Internet Protocol

2.1 Introduction. 2.2 Voice over IP (VoIP)

Improved Digital Media Delivery with Telestream HyperLaunch

Networking Test 4 Study Guide

High-Level Data Link Control

Encapsulating Voice in IP Packets

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

Per-Flow Queuing Allot's Approach to Bandwidth Management

Effect of Packet-Size over Network Performance

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

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

Internet Control Protocols Reading: Chapter 3

D. SamKnows Methodology 20 Each deployed Whitebox performs the following tests: Primary measure(s)

Visualizations and Correlations in Troubleshooting

EINDHOVEN UNIVERSITY OF TECHNOLOGY Department of Mathematics and Computer Science

A Transport Protocol for Multimedia Wireless Sensor Networks

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

Protocols and Architecture. Protocol Architecture.

Computer Networks Practicum 2015

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

A Survey on Congestion Control Mechanisms for Performance Improvement of TCP

Objectives of Lecture. Network Architecture. Protocols. Contents

VoIP network planning guide

Mike Canney Principal Network Analyst getpackets.com

TCP Performance Management for Dummies

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

technology standards and protocol for ip telephony solutions

Mobile Communications Chapter 9: Mobile Transport Layer

High Performance VPN Solutions Over Satellite Networks

How To Design A Layered Network In A Computer Network

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

BCS THE CHARTERED INSTITUTE FOR IT. BCS HIGHER EDUCATION QUALIFICATIONS BCS Level 5 Diploma in IT COMPUTER NETWORKS

NETWORK LAYER/INTERNET PROTOCOLS

(Refer Slide Time: 02:17)

A Distributed Approach to Collecting End-to-End Network Performance Measurements

Internet Protocols. Background CHAPTER

TCP/IP and the Internet

A Multi-level Security Mechanism for Secure Data Transmission in SCTP

Higher Layer Protocols: UDP, TCP, ATM, MPLS

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

High Speed Internet Access Using Satellite-Based DVB Networks

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

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

Asynchronous Transfer Mode: ATM. ATM architecture. ATM: network or link layer? ATM Adaptation Layer (AAL)

The Problem with TCP. Overcoming TCP s Drawbacks

Network Security I: Overview

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

DO NOT REPLICATE. Analyze IP. Given a Windows Server 2003 computer, you will use Network Monitor to view and analyze all the fields of IP.

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

Network Security: Workshop. Dr. Anat Bremler-Barr. Assignment #2 Analyze dump files Solution Taken from

Transport and Network Layer

Procedure: You can find the problem sheet on Drive D: of the lab PCs. 1. IP address for this host computer 2. Subnet mask 3. Default gateway address

Final exam review, Fall 2005 FSU (CIS-5357) Network Security

Understanding Layer 2, 3, and 4 Protocols

Final Exam. Route Computation: One reason why link state routing is preferable to distance vector style routing.

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

Kap. 2. Transport - Schicht

Transcription:

Introduction to Networks and the Internet CMPE 80N Announcements Library presentation on 05.22. Internet History video. Spring 2003 Week 8 1 2 Today Transport Layer The Transport Layer 3 4

The Transport Layer The Transport Layer End-to-end. Communication from source to destination host. Only hosts run transport-level protocols. Under user s control as opposed to network layer which is controlled/owned by network provider. Source host Application Layer Transport Entity Network Layer Application/ transport interface Transport/ network interface TPDU Destination host Application Layer Transport Entity Network Layer 5 6 Types of Transport Services TPDU Provided to the application layer. Connection-less versus connection-oriented. Connection-less service: no logical connections, no flow, congestion, or error control. Connection-oriented: Based on logical connections: connection setup, data transfer, connection teardown. Flow and error control. Reliability and in-order delivery. Transport protocol data unit. Messages sent between transport entities. TPDUs contained in network-layer packets, which in turn are contained in DLL frames. Frame header Packet header TPDU header TPDU payload 7 8

Transport Protocol Addressing Address of the transport-level entity. Several transport-level entities may be running on single machine. Source-destination address pair not enough to uniquely identify transport entity. Port number: uniquely identifies transport entity. Well-known port numbers. The Internet Transport Protocols: TCP and UDP UDP: user datagram protocol (RFC 768). Connection-less protocol. TCP: transmission control protocol (RFCs 793, 1122, 1323). Connection-oriented protocol. 9 10 TCP Reliable end-to-end communication. TCP transport entity: Interfaces to the IP layer. Manages TCP streams. Accepts user data, breaks it down and sends it as separate IP datagrams. At receiver, reconstructs original byte stream from IP datagrams. Features of TCP Connection oriented: An application requests a connection to destination and uses connection to transfer data. IP does not uses connections - each datagram is sent independently! Point-to-point: A TCP connection has two endpoints (no broadcast/multicast). Reliability: TCP guarantees that data will be delivered without loss, duplication or transmission errors. 11 12

Features of TCP (cont d) Full duplex: Endpoints can exchange data in both directions simultaneously. Connection setup: TCP guarantees reliable, synchronized startup between endpoints (using three-way handshake ) Graceful connection tear-down: TCP guarantees delivery of all data after endpoint shutdown. Delivering TCP Segments TCP segments travel in IP datagrams. IP header TCP segment Payload Internet routers only look at IP header to forward datagrams. 13 14 Delivering TCP TCP Connection Setup TCP at destination interprets TCP messages 3-way handshake. Host 1 SYN (SEQ=x) Host 2 SYN(SEQ=y,ACK=x+1) (SEQ=x+1, ACK=y+1) 15 16

TCP Connection Release TCP Reliability Graceful release: Each side of the connection released independently. Either side send TCP segment with FIN=1. When FIN acknowledged, that direction is shut down for data. Connection released when both sides shut down. 4 segments: 1 FIN and 1 ACK for each direction; 1st. ACK+2nd. FIN combined. Reliable delivery. Acknowledgements.. Timeouts and retransmissions. Ordered delivery. Sequence numbers. 17 18 Lost Packets Recipient sends acknowledgment control message (ACK) to sender to verify successful receipt of data ACKs usually are carried onboard other TCP packets. However, even if an application has nothing to transmit, it must transmit acknowledgment packets for each packet it receives. Thus, for each packet sent, a host expects to receive an acknowledgment, which ensures that the packet did not get lost. What if the packet or the acknowledgment get lost? Lost Packets (cont d) Retransmission timer When a data segment is sent, a timer is started If the segment is acknowledged before the timer expires, the timer is stopped and reset Otherwise, the segment is retransmitted (and the timer is reset and started again) The choice of the timeout is critical! If timeout is too long: overall throughput may be reduced (always waiting for acknowledgments) If timeout is too short: too many packets get retransmitted (may increase network congestion) 19 20

Lost Packets (cont d) Lost Packets - Example IMPORTANT: packet retransmission (especially if it has to be carried out on an end-to-end basis) significantly increases latency (delay) For real-time video or audio transmission, delay is a more important performance issue than error rate Thus, in many cases it is preferable to forget the error and simply work with the received data stream 21 22 TCP Transmission TCP Transmission (cont d) Sender process initiates connection. Once connection established, TCP can start sending data. Sender writes bytes to TCP stream. TCP sender breaks byte stream into segments. Each byte assigned sequence number. Segment sent and timer started. If timer expires, retransmit segment. After retransmitting segment for maximum number of times, assumes connection is dead and closes it. Receiving TCP decides when to pass received data to upper layer. 23 24

Flow Control Flow control is necessary so that source doesn t transmit too fast for given receiver. E.g., a fast server trying to send 1Gb/s data to a small PC. Without some form of control, some data will get lost. TCP Flow Control Sliding window. Receiver s advertised window. Size of advertised window related to receiver s buffer space. Sender can send data up to receiver s advertised window. 25 26 TCP Sliding Window TCP Flow Control: Example App. writes 2K of data 2K;SEQ=0 4K ACK=2048; WIN=2048 2K 27 App. does 3K write Sender blocked Sender may send up to 2K 2K; SEQ=2048 ACK=4096; WIN=0 ACK=4096; WIN=2048 1K; SEQ=4096 0 App. reads 2K of data 2K 1K 28

Congestion Network with 1 Mb/s lines and 1000 computers, half of which are trying to transfer files at 100 Kb/s to the other half. The total offered traffic exceeds what the network can handle (congestion). Congestion collapse: When congestion occurs, packets get dropped. Due to packet loss, packets get retransmitted. Congestions gets worse and worse! Congestion Control Why do it at the transport layer? Real fix to congestion is to slow down sender. Use law of conservation of packets. Keep number of packets in the network constant. Don t inject new packet until old one leaves. Congestion indicator: packet loss. 29 30 TCP and Congestion Control Interprets packet loss as an indicator of congestion When it senses packet loss, it slows down the rate of packet transmission When packets are received correctly, sends packets faster Still within the limits of the sliding window TCP Congestion Control Like, flow control, also window based. Sender keeps congestion window (cwin). Each sender keeps 2 windows: receiver s advertised window and congestion window. Number of bytes that may be sent is min(advertised window, cwin). 31 32

TCP Congestion Control (cont d) Slow start [Jacobson 1988]: Connection s congestion window starts at 1 segment. If segment ACKed before time out, cwin=cwin+1. As ACKs come in, current cwin is increased by 1. Exponential increase. TCP Congestion Control (cont d) Congestion Avoidance: Third parameter: threshold. Initially set to 64KB. If timeout, threshold=cwin/2 and cwin=1. Re-enters slow-start until cwin=threshold. Then, cwin grows linearly until it reaches receiver s advertised window. 33 34 TCP Retransmission Timer How to set timer? When segment sent, retransmission timer starts. If segment ACKed, timer stops. If time out, segment retransmitted and timer starts again. Based on round-trip time: time between a segment is sent and ACK comes back. If timer is too short, unnecessary retransmissions. If timer is too long, long retransmission delay. 35 36

TCP Segment Header TCP Header Fields Header length Source port Sequence number Acknowledgment number UA P R S F Destination port Window size Checksum Urgent pointer Options (0 or more 32-bit words) Data Source and destination ports identify connection end points. Sequence number. Acknowledgment number specifies next byte expected. TCP header length: how many 32-bit words are contained in header. 6-bit unused field. 37 38 TCP Header Fields (cont d) TCP Header Fields (cont d) 6 1-bit flags: URG: indicate urgent data present; urgent pointer gives byte offset from current sequence number where urgent data is. ACK: indicates whether segment contains acknowledgment; if 0, acknowledgement number field ignored. PUSH: indicates PUSHed data so receiver delivers it to application immediately. Flags (cont d): RST: used to reset connection, reject invalid segment, or refuse to open connection. SYN: used to establish connection; connection request, SYN=1, ACK=0. FIN: used to release connection. Window size: how many bytes can be sent starting at acknowledgment number. 39 40

TCP Header Fields (cont d) UDP Checksum: checksums the header+data+pseudo-header. Options: provide way to add extra information. Examples: Maximum payload host is willing to accept; can be advertised during connection setup. Window scale factor that allows sender and receiver to negotiate larger window sizes. Provides connection-less, unreliable service. No delivery guarantees. No ordering guarantees. No duplicate detection. Low overhead. No connection establishment/teardown. Suitable for short-lived connections. Example: client-server applications. 41 42 UDP Segment Format TCP and UDP 0 15 31 Source port Length Data Destination port Checksum Source and destination ports: identify the end points. Length: 8-byte header+ data. Checksum: optional; if not used, set to zero. TCP provides end-to-end communication. It takes care of reliable, error-free transfer of data, and insequence delivery UDP has less overhead compared to TCP, but does not guarantee transfers TCP is preferred to transfer files UDP is preferred to transfer audio/video streams In real-time streaming, we cannot afford the delay consequent to packet retransmission Both protocols support multiplexing, i.e. they allow several distinct streams of data between two hosts 43 44