ICE 302 T RANSPORT LAYER 1 Thanks to A. B. Forouzan Md. Asif Hossain Term # 2 Lecture # 2.

Slides:



Advertisements
Similar presentations
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Advertisements

Transmission Control Protocol (TCP)
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2004 Transport Layer PART V.
Transport Layer3-1 Homework r Chapter 2#10,13-18 r Due Wed September 17.
Transport Layer 3-1 Transport services and protocols  provide logical communication between app processes running on different hosts  transport protocols.
Chapter 3 outline 3.1 transport-layer services
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
1 Outline r Transport-layer services r Multiplexing and demultiplexing r Connectionless transport: UDP r Principles of reliable data transfer.
Transport Layer3-1 Data Communication and Networks Lecture 6 Reliable Data Transfer October 12, 2006.
Announcement Project 1 due last night, how is that ? Project 2 almost ready, out tomorrow, will post online –Much harder than project 1, start early!
Announcement Project 1 due last night, how is that ? Homework 1 grade, comments out –Will be discussed in the next lecture Homework 2 out Project 2 almost.
Transport Layer 3-1 Transport Layer r To learn about transport layer protocols in the Internet: m TCP: connection-oriented protocol m Reliability protocol.
Transport Layer3-1 Reliable Data Transfer. Transport Layer3-2 Principles of Reliable data transfer r important in app., transport, link layers r top-10.
Announcement Project 2 out –Much harder than project 1, start early! Homework 2 due next Tu.
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach Featuring the Internet, 3 rd edition. Jim Kurose, Keith Ross Addison-Wesley,
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
2: Application Layer 1 1DT066 Distributed Information System Chapter 3 Transport Layer.
Ch 23 Ameera Almasoud Based on Data Communications and Networking, 4th Edition. by Behrouz A. Forouzan, McGraw-Hill Companies, Inc., 2007.
Some slides are in courtesy of J. Kurose and K. Ross Review of Previous Lecture r Transport-layer services r Multiplexing and demultiplexing r Connectionless.
3-1 Transport services and protocols r provide logical communication between app processes running on different hosts r transport protocols run in end.
1 Reliable Data Transfer. 2 r Problem: Reliability  Want an abstraction of a reliable link even though packets can be corrupted or get lost r Solution:
Process-to-Process Delivery:
Principles of Reliable Data Transfer. Reliable Delivery Making sure that the packets sent by the sender are correctly and reliably received by the receiver.
2: Application Layer 1 1DT057 Distributed Information System Chapter 3 Transport Layer.
Transport Layer1 Reliable Transfer Ram Dantu (compiled from various text books)
TCOM 509 – Internet Protocols (TCP/IP) Lecture 04_b Transport Protocols - TCP Instructor: Dr. Li-Chuan Chen Date: 09/22/2003 Based in part upon slides.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transport Layer3-1 Chapter 3 Transport Layer These ppt slides are originally from the Kurose and Ross’s book. But some slides are deleted and added for.
Transport Layer Moving Segments. Transport Layer Protocols Provide a logical communication link between processes running on different hosts as if directly.
15-1 Last time □ Reliable Data Transfer ♦ Provide rdt over unreliable network layer ♦ FSM model ♦ rdt 1.0: rdt over reliable channels ♦ rdt 2.0: rdt over.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 12 Transmission Control Protocol (TCP)
Review:. Chapter 3: The Data Link Layer –achieve reliable, efficient communication between two physically connected machines. –Example problems to be.
Chapter 12 Transmission Control Protocol (TCP). Outline  PROCESS-TO-PROCESS COMMUNICATION  TCP SERVICES  NUMBERING BYTES  FLOW CONTROL  SILLY WINDOW.
rdt2.2: a NAK-free protocol
Transport Layer Goals: Overview:
Transport Layer3-1 rdt2.1: sender, handles garbled ACK/NAKs Wait for call 0 from above sndpkt = make_pkt(0, data, checksum) udt_send(sndpkt) rdt_send(data)
Before The Canned Slides r What sort of things did you learn from Mikes talk on Friday? r Mini-homework this week: create a wiki page with cross-referenced.
2: Application Layer 1 1DT057 Distributed Information System Chapter 3 Transport Layer.
ECE 4110 – Internetwork Programming
Prof. Younghee Lee 1 1 Computer Networks u Lecture 5: Transport services and protocols Prof. Younghee Lee * Some part of this teaching materials are prepared.
McGraw-Hill©The McGraw-Hill Companies, Inc., 2000 Chapter 12 Transmission Control Protocol (TCP)
Transport Layer3-1 Chapter 3 Transport Layer Computer Networking: A Top Down Approach 5 th edition. Jim Kurose, Keith Ross Addison-Wesley, April 2009.
Transport Layer Our goals:
1 Kyung Hee University PART 5 Transport Layer. 2 Kyung Hee University Role of position of Transport Layer  Overseeing the delivery of data from a process,
9: Pipelined Protocols and RTT Transport Layer 3-1 Slides adapted from: J.F Kurose and K.W. Ross,
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
CSEN 404 Transport Layer II Amr El Mougy Lamia AlBadrawy.
Computer Networking Lecture 16 – Reliable Transport.
Ch 3. Transport Layer Myungchul Kim
1 COMP 431 Internet Services & Protocols The Transport Layer Pipelined Transport Protocols Jasleen Kaur March 29, 2016.
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
02/10/20161 Chapter 3 Transport layer Erman Hamid.
Chapter 3 Transport Layer
Performance of rdt3.0 rdt3.0 works, but performance stinks
5. End-to-end protocols (part 1)
Last time Reliable Data Transfer
rdt2.2: a NAK-free protocol
rdt2.2: a NAK-free protocol
rdt2.2: a NAK-free protocol
rdt2.2: a NAK-free protocol
rdt2.2: a NAK-free protocol
PART V Transport Layer.
9: Pipelined Protocols and RTT
The Transport Layer Reliability
Process-to-Process Delivery: UDP, TCP
Chapter 3 Transport Layer
rdt2.2: a NAK-free protocol
Presentation transcript:

ICE 302 T RANSPORT LAYER 1 Thanks to A. B. Forouzan Md. Asif Hossain Term # 2 Lecture # 2

This is the presentation slides of the Book You MUST go through this TEXT BOOK for your further learning and for the EXAMS. So, without reading the Book, you can not pass the exams. Read the topics that will be covered in the classes. You can take the helps from the other related Books. 2 3 rd Edition

T RANSMISSION C ONTROL P ROTOCOL Port numbers PortProtocolDescription 7Echo Echoes a received datagram back to the sender 9DiscardDiscards any datagram that is received 11UsersActive users 13DaytimeReturns the date and the time 17QuoteReturns a quote of the day 19ChargerReturns a string of characters 20FTP, DataFile Transfer Protocol (data connection) 21FTP, ControlFile Transfer Protocol (control connection) 23TELNETTerminal Network 25SMTPSimple Mail Transfer Protocol 53DNSDomain Name Server 67BOOTPBootstrap Protocol 79Finger 80HTTPHypertext Transfer Protocol 111RPCRemote Procedure Call 28/04/2015 3

T RANSMISSION C ONTROL P ROTOCOL Byte-stream connection-oriented & reliable transport protocol 28/04/2015 4

TCP - BUFFERS Sending & receiving buffers Processes do not consume data at the same speed Sending site: White section: empty locations to be filled by sending process Blue section: bytes sent but not yet acknowledged Red section: bytes to be sent by sending TCP Receiving site: White section: empty locations to be filled by bytes from the networks Red section: received bytes to be consumed by the receiving process 28/04/2015 5

TCP – BYTES & SEGMENTS TCP at the sending site gathers bytes into a packet called a segment TCP adds a header to each segment and delivers it to IP for transmission Segments can arrive out of order Size of the segment varies 28/04/2015 6

TCP – NUMBERING BYTES Numbering is used for flow & error control Segments are not numbered, only bytes Full-duplex connection – numbering is independent in each direction Numbers generated randomly from 0 to Sequence number The number of the first byte carried in the segment Acknowledgement number To confirm received bytes Defines the number of the next byte the party expects to receive Cumulative 28/04/2015 7

TCP NUMBERING – AN EXAMPLE Imagine a TCP connection is transferring a file of 6000 bytes. The first byte is numbered What are the sequence numbers for each segment if data are sent in five segments with the first four segments carrying 1000 bytes and the last segment carrying 2000 bytes? 28/04/ The following shows the sequence number for each segment: Segment 1 ==> sequence number: (range: 10,010 to 11,009) Segment 2 ==> sequence number: (range: 11,010 to 12,009) Segment 3 ==> sequence number: (range: 12,010 to 13,009) Segment 4 ==> sequence number: (range: 13,010 to 14,009) Segment 5 ==> sequence number: (range: 14,010 to 16,009)

TCP SEGMENT FORMAT 28/04/2015 9

TCP - CONNECTIONS Connection establishment Three-way handshake Why is two-way handshake not enough? 28/04/ Connection termination –Four steps

Tran sport Laye r 3-11 TCP client lifecycle TCP server lifecycle TCP – A STATE TRANSITION DIAGRAM

F LOW CONTROL Remember? The amount of data a source can send before receiving an ACK from the destination Whether to send 1 byte of data and wait for ACK or send all bytes and wait for the ACK for the complete message? TCP gives a solution in between Sliding window protocol byte oriented 12

F LOW C ONTROL Avoids the problem of a host at one side of the connection overflowing the buffers in the host at the other side Ensures the integrity of the data

S ESSION M AINTENANCE AND T ERMINATION Congestion can occur during data transfer To terminate, the sending host sends a signal that indicates the end of the transmission, which is acknowledged by the receiver.

F LOW CONTROL ( CNT ’ D ) If no window, a sender can send all bytes without regarding the condition of the receiver if data are consumed too slowly then receiver buffer becomes full -> drop the packet (retransmit) the sender must adjust itself to the number of the free locations in the receiver buffer 28/04/ sender buffer Direction of transmission

F LOW CONTROL ( CNT ’ D ) Receiver window 28/04/ Sender window N M N-M = receiver window

F LOW CONTROL ( CNT ’ D ) sliding widow ACK is received for bytes the sender can send bytes /04/ expanding the sender widow shrinking the sender widow Direction of transmission Direction of window shift

3-18 P ERFORMANCE OF RDT 3.0 (R ELIABLE DATA TRANSFER OVER A LOSSY CHANNEL WITH BIT ERRORS ) rdt3.0 works, but performance stinks example: 1 Gbps link, 15 ms e-e prop. delay, 1KB packet: T transmit = 8kb/pkt 10^9 b/sec = 8 microsec m U sender : utilization – fraction of time sender busy sending m 1KB pkt every 30 msec -> 33kB/sec thruput over 1 Gbps link m network protocol limits use of physical resources! L (packet length in bits) R (transmission rate, bps) =

Transport Layer 3-20 P IPELINED PROTOCOLS Pipelining: sender allows multiple, “in-flight”, yet- to-be-acknowledged pkts range of sequence numbers must be increased buffering at sender and/or receiver Two generic forms of pipelined protocols: go-Back-N, selective repeat

Tran sport Laye r 3-22 T HE “ A ” F ACTOR a = (Round Trip Time) / (Transmission time) Transmission time (L) is usually represented in bits and Round Trip Time (RTT) is usually given in time units (say 50 ms). small a – implies low RTT or Large L; usually LANs with large packets. large a – implies high RTT or small L; usually WANs or LANS with small packets; or highly congested network.

Tran sport Laye r 3-23 S TOP AND W AIT L INK U TILIZATION ( CONT.) Tx time = RTT + L +TA TA – time to tx ack frame (small and ignored) Therefore, Tx time = RTT + L U = L/(Tx time)= L/(L+RTT)= 1/(1+a) For large a, U is small  For small a, U is high

G O -B ACK -N In a GBN protocol, the sender is allowed to transmit multiple packets without waiting for an acknowledgment, but is constrained to have no more than some maximum allowable number, N, of unacknowledged packets in the pipeline.

Tran sport Laye r 3-25 GBN IN ACTION

Transport Layer 3-26 S ELECTIVE R EPEAT receiver individually acknowledges all correctly received pkts buffers pkts, as needed, for eventual in-order delivery to upper layer sender only resends pkts for which ACK not received sender timer for each unACKed pkt sender window N consecutive seq #’s again limits seq #s of sent, unACKed pkts

Tran sport Laye r 3-27 S ELECTIVE REPEAT IN ACTION

E RROR CONTROL IN TCP Detect corrupted segments; lost segments; out- of-order segments & duplicated segments Three tools: 1. checksum 2. acknowledgment – no NACKs 3. time-out – one time-out counter for each segment sent 28/04/

E RROR CONTROL IN TCP - LOST OR CORRUPTED SEGMENT - 28/04/

E RROR CONTROL IN TCP - DUPLICATE & OUT - OF - ORDER SEGMENT - Duplicate segment the destination TCP simply discards the segment Out-of-order segment not acknowledged until it receives all the segments that precede it 28/04/

TCP TIMERS 28/04/ Retransmission Persistence Keep-alive Time-waited