UNIT V. Computer Networks [10MCA32] 1

Similar documents
Problem. Chapter Outline. Chapter Goal. End-to-end Protocols. End-to-end Protocols. Chapter 5. End-to-End Protocols

Fundamentals of Computer Networks ECE 478/578. Transport Layer. End- to- End Protocols 4/16/13. Spring Application. Application.

Chapter 5 End-to-End Protocols

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 5 - Part 2

Networking Technologies and Applications

TSIN02 - Internetworking

TSIN02 - Internetworking

TSIN02 - Internetworking

TSIN02 - Internetworking

ECE 650 Systems Programming & Engineering. Spring 2018

05 Transmission Control Protocol (TCP)

Transport Protocols. CSCI 363 Computer Networks Department of Computer Science

TRANSMISSION CONTROL PROTOCOL. ETI 2506 TELECOMMUNICATION SYSTEMS Monday, 7 November 2016

Unit 2.

ECE4110 Internetwork Programming. Introduction and Overview

Transport Layer. The transport layer is responsible for the delivery of a message from one process to another. RSManiaol

Chapter 24. Transport-Layer Protocols

IS370 Data Communications and Computer Networks. Chapter 5 : Transport Layer

EE 122: Transport Protocols. Kevin Lai October 16, 2002

Some slides courtesy David Wetherall. Communications Software. Lecture 4: Connections and Flow Control. CSE 123b. Spring 2003.

Guide To TCP/IP, Second Edition UDP Header Source Port Number (16 bits) IP HEADER Protocol Field = 17 Destination Port Number (16 bit) 15 16

Connections. Topics. Focus. Presentation Session. Application. Data Link. Transport. Physical. Network

User Datagram Protocol (UDP):

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP 23.1

Transport Layer Marcos Vieira

Lecture 3: The Transport Layer: UDP and TCP

User Datagram Protocol

UNIT IV TRANSPORT LAYER

Connectionless and Connection-Oriented Protocols OSI Layer 4 Common feature: Multiplexing Using. The Transmission Control Protocol (TCP)

QUIZ: Longest Matching Prefix

Application Service Models

CS457 Transport Protocols. CS 457 Fall 2014

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

Lecture (11) OSI layer 4 protocols TCP/UDP protocols

Transport Layer. <protocol, local-addr,local-port,foreign-addr,foreign-port> ϒ Client uses ephemeral ports /10 Joseph Cordina 2005

TCP/IP. Chapter 5: Transport Layer TCP/IP Protocols

Information Network 1 TCP 1/2

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

CSE/EE 461 Lecture 14. Connections. Last Time. This Time. We began on the Transport layer. Focus How do we send information reliably?

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

Connection-oriented (virtual circuit) Reliable Transfer Buffered Transfer Unstructured Stream Full Duplex Point-to-point Connection End-to-end service

COMPUTER NETWORKS CS CS 55201

COMPUTER NETWORKS CS CS 55201

CSEP 561 Connections. David Wetherall

7. TCP 최양희서울대학교컴퓨터공학부

Chapter 7. The Transport Layer

CCNA Exploration Network Fundamentals. Chapter 04 OSI Transport Layer


Last Class. CSE 123b Communications Software. Today. Naming Processes/Services. Transmission Control Protocol (TCP) Picking Port Numbers.

UNIT IV -- TRANSPORT LAYER

Network Model. Why a Layered Model? All People Seem To Need Data Processing

CS 3640: Introduction to Networks and Their Applications

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [NETWORKING] Frequently asked questions from the previous class surveys

Announcements Computer Networking. Outline. Transport Protocols. Transport introduction. Error recovery & flow control. Mid-semester grades

EEC-682/782 Computer Networks I

UNIT IV TRANSPORT LAYER

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

UDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data

The Transport Layer: TCP & Reliable Data Transfer

Transport Layer (TCP/UDP)

ITS323: Introduction to Data Communications

Transport Layer. -UDP (User Datagram Protocol) -TCP (Transport Control Protocol)

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

CSEP 561 Connections. David Wetherall

Transport Protocols. Raj Jain. Washington University in St. Louis

Chapter 23 Process-to-Process Delivery: UDP, TCP, and SCTP

Simulation of TCP Layer

11/24/2009. Fundamentals of Computer Networks ECE 478/578. Flow Control in TCP

TCP = Transmission Control Protocol Connection-oriented protocol Provides a reliable unicast end-to-end byte stream over an unreliable internetwork.

Introduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.

CSE 461 Connections. David Wetherall

Introduction to TCP/IP networking

CSE 461 Module 11. Connections

Stream Control Transmission Protocol

EE 122: Transport Protocols: UDP and TCP

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

I TCP 1/2. Internet TA: Connection-oriented (virtual circuit) Connectionless (datagram) (flow control) (congestion control) TCP Connection-oriented

CSCI-1680 Transport Layer I Rodrigo Fonseca

TCP/IP Protocol Suite 1

CSCI-1680 Transport Layer I Rodrigo Fonseca

TCP : Fundamentals of Computer Networks Bill Nace

Transport Over IP. CSCI 690 Michael Hutt New York Institute of Technology

Transport Layer Review

Outline. What is TCP protocol? How the TCP Protocol Works SYN Flooding Attack TCP Reset Attack TCP Session Hijacking Attack

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

CSE/EE 461 Lecture 12 TCP. A brief Internet history...

Two approaches to Flow Control. Cranking up to speed. Sliding windows in action

CSCD 330 Network Programming

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

What is TCP? Transport Layer Protocol

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

Introduction to Networks and the Internet

Sequence Number. Acknowledgment Number. Data

CCNA R&S: Introduction to Networks. Chapter 7: The Transport Layer

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

OSI Transport Layer. objectives

CS 356: Computer Network Architectures. Lecture 17: End-to-end Protocols and Lab 3 Chapter 5.1, 5.2. Xiaowei Yang

CHAPTER-2 IP CONCEPTS

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

EE 610 Part 2: Encapsulation and network utilities

Transcription:

Computer Networks [10MCA32] 1 UNIT V 1. Explain the format of UDP header and UDP message queue. The User Datagram Protocol (UDP) is a end-to-end transport protocol. The issue in UDP is to identify the target process. The approach used by UDP is to indirectly identify each other processes using an abstract locator, often called a port or mailbox. The basic idea is for a source process to send a message to a port and for the destination process to receive the message from a port. The next issue is how a process learns the port for the process to which it wants to send a message. Typically, a client process initiates a message exchange with a server process. Once a client has contacted a server, the server knows the client s port (it was contained in the message header) and can reply to it. The real problem, therefore, is how the client learns the server s port in the first place. A common approach is for the server to accept messages at a well-known port. That is, each server receives its messages at some fixed port that is widely published. In the Internet, for example, the domain name server (DNS) receives messages at well-known port 53 on each host, the mail service listens for messages at port 25, and the Unix talk program accepts messages at wellknown port 517, and so on. The header for UDP contains an identifier (port) for both the sender (source) and the receiver (destination) of the message. SrcPort, DstPort - It can be a client or server. If client, the port number is called ephemeral. If it is a server, then the server has a well known port number. Length - This field gives the length of the entire UDP. Checksum - Used to check errors in transmission. Typically, a port is implemented by a message queue, as illustrated in the Figure. When a message arrives, the protocol (e.g., UDP) appends the message to the end of the queue. When the queue is full, the message is discarded. There is no flow-control mechanism that tells the sender to slow down. When an application process wants to receive a message, one is removed from the front of the queue. If the queue is empty, the process blocks until a message becomes available. Finally, although UDP does not implement flow control or reliable/ordered delivery, it does a little more work than to simply demultiplex messages to some application process it also ensures the correctness of the message by the use of a checksum.

Computer Networks [10MCA32] 2 UDP computes its checksum over the UDP header, the contents of the message body, and something called the pseudoheader. The pseudoheader consists of three fields from the IP header protocol number, source IP address, and destination IP address plus the UDP length field. The pseudoheader is used to verify that this message has been delivered between the correct two endpoints. For example, if the destination IP address was modified while the packet was in transit, causing the packet to be misdelivered, this fact would be detected by the UDP checksum. 2. Explain the TCP header format with suitable diagram. TCP is a byte-oriented protocol, which means that the sender writes bytes into a TCP connection and the receiver reads bytes out of the TCP connection. TCP on the source host buffers enough bytes into send buffer and then sends the packet to its peer on the destination host. TCP on the destination host then empties the contents of the packet into a receive buffer, and the receiving process reads from this buffer at its leisure. This situation is illustrated in the Figure.

Computer Networks [10MCA32] 3 The packets exchanged between TCP peers are called segments, since each one carries a segment of the byte stream. Each TCP segment contains the header schematically depicted in the Figure. The SourcePort specifies a 16 bit Source port. DestinationPort identify the 16 bit destination port. The SequenceNumber is a 32 bit field which contains the sequence number for the first byte of data carried in that segment. The Acknowledgment Number is a 32 bit field identifying the next data byte the sender expects from the receiver. AdvertisedWindow or Window Size field, a 16-bit integer used by TCP for flow control in the form of a data transmission window size. This number tells the sender how much data the receiver is willing to accept. The header length gives the length of the header in 32-bit words. This is required because the length of the options field is variable. Reserved is a 6-bit field currently unused and reserved for future use. The 6-bit Flags field is used to relay control information between TCP peers. The possible flags include SYN, FIN, RESET, PUSH, URG, and ACK. o The SYN and FIN flags are used when establishing and terminating a TCP connection, respectively. o The ACK flag is set any time the Acknowledgment field is valid. o The URG flag signifies that this segment contains urgent data. o When this flag is set, the UrgentPointer field indicates where the nonurgent data contained in this segment begins. The urgent data is contained at the front of the segment body, up to and including a value of UrgentPointer bytes into the segment. o The PUSH flag signifies that the sender invoked the push operation, which indicates that the receiver should deliver this segment to the receiving application as soon as possible. o The RESET flag signals the receiver that the sender is aborting the connection and all queued data and allocated buffers for the connection can be freed. Finally, the Checksum field is used in exactly the same way as for UDP it is computed over the TCP header, the TCP data, and the pseudoheader, which is made up of the source address, destination address, and length fields from the IP header. Options: In order to provide additional functionality, several optional parameters may be used between a TCP sender and receiver. Depending on the option(s) used, the length of this field will vary in size, but it cannot be larger than 40 bytes due to the size of the header length field (4 bits).

Computer Networks [10MCA32] 4 The most common option is the maximum segment size (MSS) option. A TCP receiver tells the TCP sender the maximum segment size it is willing to accept through the use of this option. Other options are often used for various flow control and congestion control techniques. The Padding or Offset field, measures the offset from the start of the packet to the start of the data. Data is a variable length field carries the application data from TCP sender to receiver. This field coupled with the TCP header fields constitutes a TCP segment. 3. Explain how TCP manages byte stream? TCP supports a byte-stream that is, application programs write bytes into the stream. The TCP has to decide whether it has enough bytes to send a segment. The TCP has three mechanisms to trigger the transmission of a segment. 1. First, TCP maintains a variable, called the maximum segment size (MSS), and it sends a segment as soon as it has collected MSS bytes from the sending process. MSS is usually set to the size of the largest segment TCP can send without causing the local IP to fragment. 2. The second thing that triggers TCP to transmit a segment is that the sending process has explicitly asked it to do so. TCP supports a push operation, and the sending process invokes this operation to flush the buffer of unsent bytes. 3. The third thing that fires transmission of a segment is that when a timer fires. Silly Window Syndrome Silly window syndrome is a problem when either the sender transmits a small segment or the receiver opens the window a small amount. The application might do a push after sending a single byte leading to a small segment. In order to solve this problem, the rule is that after advertising a zero window, the receiver must wait for space equal to an MSS before it advertises an open window. Since this problem cannot be eliminated, we can try to coalesce them. The receiver can do this by delaying ACKs sending one combined ACK rather than multiple smaller ones but this is only a partial solution because the receiver has no way of knowing how long it is safe to delay waiting either for another segment to arrive or for the application to read more data. Nagle s Algorithm If there is data to send but the window is open less than MSS, then we may want to wait some amount of time before sending the available data, but the question is, how long? If we wait too long, then the connection may be disconnected. If we don t wait long enough, then we risk sending a bunch of tiny packets and falling into the silly window syndrome. The answer is to introduce a timer, and to transmit when the timer expires. Nagle introduced an elegant self-clocking solution.

Computer Networks [10MCA32] 5 The idea is that as long as TCP has any data to transfer, the sender will eventually receive an ACK. This ACK can be treated like a timer firing, triggering the transmission of more data. Nagle s algorithm provides a simple, unified rule for deciding when to transmit: When the application produces data to send if both the available data and the window MSS send a full segment else if there is unacked data in flight buffer the new data until an ACK arrives else send all the new data now Always send a full segment if the window allows. It can also immediately send a small amount of data if there are currently no segments in transit, If there is anything in flight, the sender must wait for an ACK before transmitting the next segment. Because some applications cannot afford such a delay for each write, the application turns off Nagel s algorithm by setting the TCP_NODELAY option. Setting this option means that data is transmitted as soon as possible. 4. Advantages of UDP It is a simple protocol using a minimum of overheads. If a process wants to send a small message and does not care much about reliability it can use UDP. UDP is suitable for a process with internal flow & error control mechanism. Ex: Trivial File Transfer Protocol (TFTP). UDP is suitable for multicasting. UDP is also used for root updating protocol such as Routing Information Protocol (RIP).