CS 716: Introduction to communication networks th class; 7 th Oct Instructor: Sridhar Iyer IIT Bombay

Similar documents
TSIN02 - Internetworking

User Datagram Protocol

Transport Layer Marcos Vieira

TSIN02 - Internetworking

TSIN02 - Internetworking

TSIN02 - Internetworking

UDP, TCP, IP multicast

05 Transmission Control Protocol (TCP)

NWEN 243. Networked Applications. Layer 4 TCP and UDP

Intro to LAN/WAN. Transport Layer

TCP and Congestion Control (Day 1) Yoshifumi Nishida Sony Computer Science Labs, Inc. Today's Lecture

CS4700/CS5700 Fundamentals of Computer Networks

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

TCP : Fundamentals of Computer Networks Bill Nace

Reliable Transport I: Concepts and TCP Protocol

NT1210 Introduction to Networking. Unit 10

Transport Layer (TCP/UDP)

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

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

Networking Technologies and Applications

COMPUTER NETWORKS CS CS 55201

TCP/IP Networking. Part 4: Network and Transport Layer Protocols

COMPUTER NETWORKS CS CS 55201

Transport Layer Protocols TCP

Transport Protocols and TCP: Review

Applied Networks & Security

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

TCP. 1 Administrivia. Tom Kelliher, CS 325. Apr. 2, Announcements. Assignment. Read From Last Time

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

Transmission Control Protocol (TCP)

8. TCP Congestion Control

Transport Protocols & TCP TCP

User Datagram Protocol (UDP):

CRC. Implementation. Error control. Software schemes. Packet errors. Types of packet errors

EEC-484/584 Computer Networks. Lecture 16. Wenbing Zhao

TCP: Transmission Control Protocol RFC 793,1122,1223. Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC

ECE 650 Systems Programming & Engineering. Spring 2018

CSCD 330 Network Programming

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

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

OSI Transport Layer. objectives

QUIZ: Longest Matching Prefix

Operating Systems and Networks. Network Lecture 8: Transport Layer. Adrian Perrig Network Security Group ETH Zürich

Operating Systems and Networks. Network Lecture 8: Transport Layer. Where we are in the Course. Recall. Transport Layer Services.

Fall 2012: FCM 708 Bridge Foundation I

Transport Layer. Gursharan Singh Tatla. Upendra Sharma. 1

EEC-682/782 Computer Networks I

CSCI Topics: Internet Programming Fall 2008

CS457 Transport Protocols. CS 457 Fall 2014

Lecture 08: The Transport Layer (Part 2) The Transport Layer Protocol (TCP) Dr. Anis Koubaa

Reliable Transport I: Concepts and TCP Protocol

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

Lecture 11. Transport Layer (cont d) Transport Layer 1

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

Introduction to Networks and the Internet

Programming Assignment 3: Transmission Control Protocol

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

Transport Protocols and TCP

Problem 7. Problem 8. Problem 9

CSC 4900 Computer Networks: TCP

Chapter 24. Transport-Layer Protocols

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

ECE 435 Network Engineering Lecture 15

Transport Layer: Outline

Kent State University

Unit 2.

ICS 451: Today's plan. Sliding Window Reliable Transmission Acknowledgements Windows and Bandwidth-Delay Product Retransmission Timers Connections

Internet and Intranet Protocols and Applications

Page 1. Goals for Today" Discussion" Example: Reliable File Transfer" CS162 Operating Systems and Systems Programming Lecture 11

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

Internet Layers. Physical Layer. Application. Application. Transport. Transport. Network. Network. Network. Network. Link. Link. Link.

Announcements. No book chapter for this topic! Slides are posted online as usual Homework: Will be posted online Due 12/6

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

TCP/IP Protocol Suite 1

CSE/EE 461 Lecture 13 Connections and Fragmentation. TCP Connection Management

TCP Service Model. Today s Lecture. TCP Support for Reliable Delivery. EE 122:TCP, Connection Setup, Reliability

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

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

32 bits. source port # dest port # sequence number acknowledgement number not used. checksum. Options (variable length)

Introduction to TCP/IP networking

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

Chapter 3 Transport Layer

PROBLEMSAND EXERCISES

RSC Part III: Transport Layer 3. TCP

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

Computer Network Programming. The Transport Layer. Dr. Sam Hsu Computer Science & Engineering Florida Atlantic University

The Transport Layer: TCP & Reliable Data Transfer

CS 640 Introduction to Computer Networks Spring 2009

CSC 634: Networks Programming

ECE697AA Lecture 3. Today s lecture

Suprakash Datta. Office: CSEB 3043 Phone: ext Course page:

The Transport Layer. Internet solutions. Nixu Oy PL 21. (Mäkelänkatu 91) Helsinki, Finland. tel fax.

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

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

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

Transport Layer: outline

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

COMP/ELEC 429/556 Introduction to Computer Networks

CMPE 80N: Introduction to Networking and the Internet

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

Transcription:

CS 716: Introduction to communication networks - 18 th class; 7 th Oct 2011 Instructor: Sridhar Iyer IIT Bombay

Reliable Transport We have already designed a reliable communication protocol for an analogy scenario. Recall the functioning of secretaries in the CEO example. What did they have to do to reliably transfer the document using weak and unreliable messenger boys? From the analogy, we have learnt some ideas about how to ensure reliable transport. Use buffers, timeouts, acknowledgments, retransmission.. We need to apply these ideas to an IP network to get details of the protocol between a source (S) and destination (D). IIT Bombay cs 716 2

More specifically... The actions of the transport layer: Before beginning the data transfer: What actions does (transport layer at) S need to do? What messages does S need to send to D? What responses does D need to give to S? What actions does D need to do at its end? During the data transfer: Consider above questions again in this context. Upon completion of the data transfer: Consider above questions again in this context. IIT Bombay cs 716 3

More questions... How does the transport layer at S distinguish between packets coming down to it from multiple applications (ex: http and ssh)? Their destination (D) may be the same or different. How to determine the number bits to allocate for the sequence number (unique packet id)? Suppose you use 3 bits, the 1 st packet and 8 th will both have [000] as the sequence number. packet How to decide the number of packets that S could transmit before it waits for the 1 st acknowledgment? Suppose you transmit one packet, wait for its ack, then the next packet and so on, what is the drawback? IIT Bombay cs 716 4

TCP: Transmission Control Protocol [RFC 793, ] Guaranteed service protocol Ensures that a packet has been received by the destination by using timeouts, acknowledgements and retransmission Connection-oriented protocol Applications need to establish a TCP connection prior to transfer, to fix initial sequence numbers Done using a 3-way handshake Full duplex protocol Both ends can simultaneously read and write IIT Bombay cs 716 5

More TCP features Flow and congestion control: Source uses feedback (ack) to adjust transmission rate. Byte stream: Ignores message boundaries. Source may send two messages of length 20 and 50 bytes, but destination may simply receive 70 bytes. Multiplexed: many applications can share access to a single TCP layer. IIT Bombay cs 716 6

TCP functioning Application data is broken into Segments (what TCP considers the best sized units to send) Segment: unit of data passed from TCP to IP MSS: Maximum segment size TCP sequences data by associating a sequence number with every byte it sends Sending TCP maintains a timer for each segment sent waiting for acknowledgement (ACK) If ACK doesn t come in time, segment is retransmitted IIT Bombay cs 716 7

TCP functioning Receiving TCP Sends ACK: ACK number is the sequence number of the next byte expected Re-sequences the data Discards duplicates Congestion and Flow control Sending TCP regulates amount of data to avoid network congestion Receiving TCP prevents fast senders from swamping it IIT Bombay cs 716 8

TCP connections and sockets connections are the fundamental abstraction of communication. Port: A number on a host assigned to an application to allow multiple destinations. Endpoint: A pair, a destination host and a port number on that host. Connection: A pair of end points. Socket: An abstract address formed by the IP address and port number (characterizes an endpoint) Unique identifier for a connection: [<Source IP address, port number>, <Destination IP address, port number>] There are exactly two end-points communicating with each other in a TCP connection; Broadcast and multicast aren t applicable to TCP. IIT Bombay cs 716 9

MSS: Maximum segment size Largest size of segment that TCP will send to the other end Each end announces its MSS at connection establishment time default size is 536 bytes (576 40) Done to avoid fragmentation MSS related to outgoing link s MTU IIT Bombay cs 716 10

TCP header IIT Bombay cs 716 11

Port numbers 16-bit port numbers- 0 to 65535 0 to 1023 are well-known ports assigned to common applications telnet uses 23, SMTP 25, HTTP 80 etc. 1024 to 49151 are registered ports 6000 through 6063 for X-win server 49152 to 65535 are dynamic or private ports. IIT Bombay cs 716 12

Sequence number size Sequence number identifies the byte in the stream between sender & receiver; Sequence number wraps around to 0 after reaching 2 32 1 Should be long enough so that sender does not confuse the sequence numbers on acks sending at < 100 packets/sec (R) wait for 200 sec before giving up (T) receiver may delay up to 100 sec (A) packet can be in network up to 300 sec (MSL: Max Segment Lifetime) Sender may send 900*100 packets before ack 2^seq_size > R (2 MSL + T + A) IIT Bombay cs 716 13

Initial sequence number Sequence numbers: another reason host A opens connection to B, source port 123, destination port 456 Suppose connection terminates, a new connection opens, A and B assign the same port numbers delayed pkt arrives from old connection New connection will have different initial sequence number (ISN) Tutorial Question: Confirm that Sequence Number Wrap Around Time is around 57 minutes for 10 Mbps Ethernet, while using 32 bits for Sequence Number. IIT Bombay cs 716 14

TCP connection establishment Client Server active open segment 1 Segment 3 SYN J, mss 1024 SYN K, mss 1024 ACK J+1 Segment 2 passive open ACK K+1 Connection established IIT Bombay cs 716 15

TCP 3-way handshake 1: Client sends SYN segment specifying the port number of Server and its initial sequence number (ISN) 2: Server responds with its own SYN containing its ISN and also acknowledges the client s SYN 3: client responds to the SYN from the server by ACKing its ISN plus one Why 3-way handshake? Problem with 2-way handshake is that SYNs themselves are not protected with sequence numbers 3-way handshake protects against delayed SYNs Wait for 1 MSL (30s to 2 min) upon boot before initiating connection IIT Bombay cs 716 16

TCP connection termination Client Server Active close segment 1 Segment 3 Segment 4 FIN M ACK M+1 data FIN N ACK N+1 Passive close segment 2 Half close IIT Bombay cs 716 17

TCP client states IIT Bombay cs 716 18

TCP server states IIT Bombay cs 716 19