Chapter 8 Transport Layer: UDP and TCP

Similar documents
Transport Layer Protocols

Computer Networks. Chapter 5 Transport Protocols

Transport Layer. Chapter 3.4. Think about

[Prof. Rupesh G Vaishnav] Page 1

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

Chapter 11. User Datagram Protocol (UDP)

Ethernet. Ethernet. Network Devices

Chapter 5. Transport layer protocols

Access Control: Firewalls (1)

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

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

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

Computer Networks UDP and TCP

This sequence diagram was generated with EventStudio System Designer (

Overview of TCP/IP. TCP/IP and Internet

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

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

(Refer Slide Time: 02:17)

IP Subnetting and Addressing

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

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

Network Programming TDC 561

IP address format: Dotted decimal notation:

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

Internet Architecture and Philosophy

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

Networks: IP and TCP. Internet Protocol

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

Networking Test 4 Study Guide

Solution of Exercise Sheet 5

How do I get to

Guide to Network Defense and Countermeasures Third Edition. Chapter 2 TCP/IP

Internet Protocols. Background CHAPTER

Per-Flow Queuing Allot's Approach to Bandwidth Management

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

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

IP - The Internet Protocol

CS335 Sample Questions for Exam #2

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

Objectives of Lecture. Network Architecture. Protocols. Contents

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

Title: DEVELOPING TCP/IP AND UDP TRAFFIC MONITORING TOOL. RAFIQ BIN CHE MAT ( )

Data Link Layer Overview

TOE2-IP FTP Server Demo Reference Design Manual Rev1.0 9-Jan-15

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

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

Improved Digital Media Delivery with Telestream HyperLaunch

Final for ECE374 05/06/13 Solution!!

SSC - Communication and Networking Java Socket Programming (II)

Protocols. Packets. What's in an IP packet

TCP Performance Management for Dummies

Chapter 3. Internet Applications and Network Programming

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

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

Module 7 Internet And Internet Protocol Suite

Lecture Computer Networks

Kap. 2. Transport - Schicht

LESSON Networking Fundamentals. Understand TCP/IP

Lecture 2-ter. 2. A communication example Managing a HTTP v1.0 connection. G.Bianchi, G.Neglia, V.Mancuso

Architecture and Performance of the Internet

CPS221 Lecture: Layered Network Architecture

Transport and Network Layer

What is a DoS attack?

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

The OSI Model and the TCP/IP Protocol Suite

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

DATA COMMUNICATION AND NETWORKS

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

Effect of Packet-Size over Network Performance

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.

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

Multiple Choice Questions

IP Addressing. -Internetworking (with TCP/IP) -Classful addressing -Subnetting and Supernetting -Classless addressing

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

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

PART OF THE PICTURE: The TCP/IP Communications Architecture

How To Understand The Internet Of S (Netware)

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

TCP in Wireless Mobile Networks

Chapter 3: Review of Important Networking Concepts. Magda El Zarki Dept. of CS UC Irvine

Understanding Layer 2, 3, and 4 Protocols

The present and the future of TCP/IP

Lecture 28: Internet Protocols

Chapter 9. IP Secure

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

Protocols and Architecture. Protocol Architecture.

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

Firewalls. configuring a sophisticated GNU/Linux firewall involves understanding

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

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

Computer Networks. Data Link Layer

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

TCP/IP and the Internet

Computer Networks/DV2 Lab

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

Transcription:

Computer Networks Al-Mustansiryah University Elec. Eng. Department College of Engineering Fourth Year Class Chapter 8 Transport Layer: UDP and TCP 8.1

8-1 PROCESS-TO-PROCESS DELIVERY The transport layer is responsible for process-to-process delivery the delivery of a packet, part of a message, from one process to another. Two processes communicate in a client/server relationship, as we will see later. 8.2

Connection-oriented Requires a session connection (analogous to a phone call) be established before any data can be sent. This method is often called a "reliable" network service. It can guarantee that data will arrive in the same order. Connection-oriented services set up virtual links between end systems through a network. Connectionless Does not require a session connection between sender and receiver. The sender simply starts sending packets (called datagrams) to the destination. This service does not have the reliability of the connection-oriented method, but it is useful for periodic burst transfers. 8.3

8-2 USER DATAGRAM PROTOCOL (UDP) The User Datagram Protocol (UDP) is called a connectionless, unreliable transport protocol. It does not add anything to the services of IP except to provide process-to-process communication instead of host-tohost communication. 8.4

8.5 Figure 8.9 User datagram format

Example 1 :The following is a dump of a UDP header in hexadecimal format. CB84000D001C001C a. What is the source port number? b. What is the destination port number? c. What is the total length of the user datagram? d. What is the length of the data? 8.6

Solution: a. The source port number is the first four hexadecimal digits (CB84), which means that the source port number is 52100. b. The destination port number is the second four hexadecimal digits (000D), which means that the destination port number is 13. c. The third four hexadecimal digits (001C) define the length of the whole UDP packet as 28 bytes. d. The length of the data is the length of the whole packet minus the length of the header, or 28 8 = 20 bytes. 8.7

Note UDP length = IP length IP header s length 8.8

8-3 TCP TCP is a connection-oriented protocol; it creates a virtual connection between two TCPs to send data. In addition, TCP uses flow and error control mechanisms at the transport level. 8.9

Note The bytes of data being transferred in each connection are numbered by TCP. The numbering starts with a randomly generated number. 8.10

Example 2 :Suppose a TCP connection is transferring a file of 5,000 bytes. The first byte is numbered 10,001. What are the sequence numbers for each segment if data are sent in five segments, each carrying 1,000 bytes? 8.11

Note The value in the sequence number field of a segment defines the number of the first data byte contained in that segment. 8.12

Note The value of the acknowledgment field in a segment defines the number of the next byte a party expects to receive. The acknowledgment number is cumulative. 8.13

8.14 Figure 8.16 TCP segment format

Source port address. This is a 16-bit field that defines the port number of the application program in the host that is sending the segment Destination port address. This is a 16-bit field that defines the port number of the application program in the host that is receiving the segment Sequence number. This 32-bit field defines the number assigned to the first byte of data contained in this segment Acknowledgment number. This 32-bit field defines the byte number that the receiver of the segment is expecting to receive from the other party. If the receiver of the segment has successfully received byte number x from the other party, it returns x + 1 as the acknowledgment number. 8.15

Header length. This 4-bit field indicates the number of 4-byte words in the TCP header. The length of the header can be between 20 and 60 bytes. Therefore, the value of this field is always between 5 (5* 4= 20) and 15 (15 * 4= 60). Reserved. This is a 6-bit field reserved for future use. Control. This field defines 6 different control bits or flags Window size. This field defines the window size of the sending TCP in bytes. Note that the length of this field is 16 bits, which means that the maximum size of the window is 65,535 bytes. Checksum. This 16-bit field contains the checksum Urgent pointer. This 16-bit field, which is valid only if the urgent flag is set, is used when the segment contains urgent data 8.16

8.17 Figure 8.18 Control field

8.18 Table 8.3 Description of flags in the control field

Flow Control Flow control assists the reliability of TCP transmission by adjusting the effective rate of data flow between the two services in the session. Window Size field in the TCP header specifies the amount of data that can be transmitted before an acknowledgement must be received. 8.19

8.20 Figure 8.18 Connection establishment using three-way handshaking

A SYN segment cannot carry data, but it consumes one sequence number. A SYN + ACK segment cannot carry data, but does consume one sequence number. An ACK segment, if carrying no data, consumes no sequence number. 8.21

8.22 Figure 8.19 Data transfer

8.23 Figure 8.20 Connection termination using three-way handshaking

The FIN segment consumes one sequence number if it does not carry data. The FIN + ACK segment consumes one sequence number if it does not carry data. 8.24

Figure 8.22 Sliding window rwnd = buffer size number of waiting bytes to be pulled 8.25

Note A sliding window is used to make transmission more efficient as well as to control the flow of data so that the destination does not become overwhelmed with data. TCP sliding windows are byte-oriented. 8.26

Example 8.4 What is the value of the receiver window (rwnd) for host A if the receiver, host B, has a buffer size of 5000 bytes and 1000 bytes of received and unprocessed data? Solution The value of rwnd = 5000 1000 = 4000. Host B can receive only 4000 bytes of data before overflowing its buffer. Host B advertises this value in its next segment to A. 8.27

Example 8.5 What is the size of the window for host A if the value of rwnd is 3000 bytes and the value of cwnd is 3500 bytes? Solution The size of the window is the smaller of rwnd and cwnd, which is 3000 bytes. 8.28

Note Some points about TCP sliding windows: The size of the window is the lesser of rwnd and cwnd. The source does not have to send a full window s worth of data. The window can be opened or closed by the receiver, but should not be shrunk. The destination can send an acknowledgment at any time as long as it does not result in a shrinking window. The receiver can temporarily shut down the window; the sender, however, can always send a segment of 1 byte after the window is shut down. 8.29

Note Data may arrive out of order and be temporarily stored by the receiving TCP, but TCP guarantees that no out-of-order segment is delivered to the process. 8.30

8.31 Figure 8.24 Normal operation

8.32 Figure 8.25 Lost segment

Note The receiver TCP delivers only ordered data to the process. 8.33

8.34 Figure 8.26 Fast retransmission

Connection Ordering of data packets Speed transfer Reliability of TCP TCP is a connection-oriented protocol. TCP rearranges data packets in the order specified. The speed for TCP is slower than UDP. There is absolute guarantee that the data transferred remains intact and arrives in the same order in which it was sent. UDP UDP is a connectionless protocol. UDP has no inherent order as all packets are independent of each other. UDP is faster because there is no error-checking for packets. There is no guarantee that the messages or packets sent would reach at all. Header Size TCP header size is 20 bytes UDP Header size is 8 bytes. 8.35

Streaming of data Data Flow Control Acknowle dgement TCP Data is read as a byte stream, TCP does Flow Control. TCP requires three packets to set up a socket connection, Acknowledgement segments UDP Packets are sent individually UDP does not have an option for flow control NoAcknowledgment 8.36