Elements of Transport Protocols

Similar documents
6.2 Elements of Transport Protocols

THE TRANSPORT LAYER UNIT IV

The Transport Layer. Why is there a transport layer? Addressing

EEC-682/782 Computer Networks I

The OSI Reference Model. EECC694 - Shaaban

6.2 Elements of Transport Protocols

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

Jaringan Komputer. The Transport Layer

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

EEC-682/782 Computer Networks I

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

QUIZ: Longest Matching Prefix

Upper Layer Services. Berkeley Sockets Example of Socket Programming: Internet File Server

User Datagram Protocol

Advanced Network Design

ECE 435 Network Engineering Lecture 9

Transport Layer Chapter 6

Layer 4 - Transport Layer

CSE 461 The Transport Layer

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

The Transport Layer. The need for the transport layer

CS419: Computer Networks. Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581)

Transport Layer Marcos Vieira

CSEP 561 Connections. David Wetherall

Transport Layer: Outline

NWEN 243. Networked Applications. Layer 4 TCP and UDP

5.2 Routing Algorithms

COMPUTER NETWORKS - UNIT 4 Y3/S5

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

CSCI Topics: Internet Programming Fall 2008

ECE 435 Network Engineering Lecture 10

Transport Layer Review

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

Sequence Number. Acknowledgment Number. Checksum. Urgent Pointer plus Sequence Number indicates end of some URGENT data in the packet

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

EEC-484/584 Computer Networks

CSE 461 Connections. David Wetherall

Transport Protocols and TCP: Review

Programming Assignment 3: Transmission Control Protocol

Chapter 3: Transport Layer Part A

Sliding Window Protocols, Connection Management, and TCP Reliability

Transport Layer: outline

Transport Protocols & TCP TCP

Chapter 7. The Transport Layer

Unit 2.

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 11, 2018

TCP : Fundamentals of Computer Networks Bill Nace

The Transport Layer Reliability

1.What are the services provided by the transport layer to the upper layers?

The Transport Layer: TCP & Reliable Data Transfer

Module 25 TCP Timers and delayed duplicates problem in TCP

ECE 435 Network Engineering Lecture 15

Communications Software. CSE 123b. CSE 123b. Spring Lecture 3: Reliable Communications. Stefan Savage. Some slides couresty David Wetherall

CMPE 80N: Introduction to Networking and the Internet

Reliable Byte-Stream (TCP)

Chapter 3 Transport Layer

Reliable Transport I: Concepts and TCP Protocol

End-to-End Protocols. End-to-End Protocols

Basic Protocols and Error Control Mechanisms

Applied Networks & Security

CS 640 Introduction to Computer Networks Spring 2009

CMPE 150 Winter 2009

TCP over wireless links

ECE 650 Systems Programming & Engineering. Spring 2018

Computer Networks and Data Systems

Chapter 3 Transport Layer

Transport Layer (TCP/UDP)

Chapter 6. The Transport Layer. The Transport Service. Services Provided to the Upper Layers. Transport Service Primitives (3) 10/7/2010

CS457 Transport Protocols. CS 457 Fall 2014

INF4/MSc Computer Networking. Lectures 3-4 Transport layer protocols TCP/UDP automatic repeat request

Internet and Intranet Protocols and Applications

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

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

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

Network Protocols. Transmission Control Protocol (TCP) TDC375 Autumn 2009/10 John Kristoff DePaul University 1

Lecture 5: Flow Control. CSE 123: Computer Networks Alex C. Snoeren

Sequence Number. Acknowledgment Number. Data

Introduction to Networks and the Internet

Management of Protocol State

Introduction to TCP/IP networking

CS4700/CS5700 Fundamentals of Computer Networks

Intro to LAN/WAN. Transport Layer

RSC Part III: Transport Layer 3. TCP

Lecture 11: Transport Layer Reliable Data Transfer and TCP

CMSC 417 Project Implementation of ATM Network Layer and Reliable ATM Adaptation Layer

Lecture 3: The Transport Layer: UDP and TCP

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

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

CSC 401 Data and Computer Communications Networks

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

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

Chapter 3: Transport Layer

Network Protocols. Sarah Diesburg Operating Systems CS 3430

Communication Systems Transport Layer

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

TCP Basics : Computer Networking. Overview. What s Different From Link Layers? Introduction to TCP. TCP reliability Assigned reading

Computer Networks. Transmission Control Protocol. Jianping Pan Spring /3/17 CSC361 1

Transport Protocols and TCP

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

Outline. CS5984 Mobile Computing

Transcription:

CEN445 Network Protocols and Algorithms Chapter 6 Transport Layer 6.2 Elements of Transport Protocols Dr. Mostafa Hassan Dahshan Department of Computer Engineering College of Computer and Information Sciences King Saud University mdahshan@ksu.edu.sa http://faculty.ksu.edu.sa/mdahshan Elements of Transport Protocols Transport protocol similar to data link protocols Both do error control and flow control However, significant differences exist Environment of the data link layer Environment of the transport layer 2

Elements of Transport Protocols Data link layer Transport layer Communication directly via physical channel over the entire network Addressing Connection establishment Delay Buffering and flow control no need to specify address. Just select outgoing line over a wire is simple frame either arrives or lost, not stored and delayed simpler explicit addressing of destination is required more complicated fackets might be stored for seconds and delivered later more complicated; large and dynamic number of simultaneous connections 3 Addressing Specify which host process to connect to TSAP: Transport Service Access Point In TCP, UDP, called ports Analogy: NSAP. Example: IP address Client or server app attaches to TSAP Connections run through NSAP TSAP to distinguish endpoints sharing NSAP 4

Addressing 5 Addressing How host1 process knows TSAP # at host2? Stable TSAP # listed in well known places e.g. /etc/services in UNIX list permanent #s mail server: 25, web server: 80 Alternatively, special process: portmapper listen on well known TSAP user conn to portmapper, specify service name portmapper sends back TSAP address (دليل الھاتف) similar to directory service 6

Addressing Many server processes used only rarely Waste if each process listen to TSAP all day Instead, use initial connection protocol Spec process server listens all known TSAP Act as proxy for lightly used servers e.g. inted, xinetd on UNIX 7 Addressing User does CONNECT request Process server spawns request server 8

Connection Establishment Sounds easy; surprisingly tricky! Just send REQUEST, wait for ACCEPTED? Can lose, delay, corrupt, duplicate packets Duplicate may transfer bank money again! Protocols must work correct all cases Implemented efficiently in common cases Main problem is delayed duplicates Cannot prevent; must deal with (reject) 9 problem problems Connection Establishment Solutions for delayed duplicates Not reuse transport address (TSAP) difficult to connect to process Give each connection unique ID seq # chosen by initiating party update table listing obsolete connections check new connections against table requires maintain certain amount of history if machine crashes, no longer identify old con 10

mostly used Connection Establishment To simplify problem, restrict packet lifetime restricted network design: prevent looping hop counter in each packet: 1 at each hop timestamp in each packet: clock must be synced Must also guarantee ACKs are dead Assume a value T of max packet lifetime T sec after packet sent, sure traces are gone In the Internet, T is usually 120 seconds 11 Connection Establishment New method with packet lifetime bounded Label segments with seq # not reused in T T and packet rate determine size of seq #s 1 packet w given seq # may be outstanding Duplicates may still occur, but discarded dst Not possible to have delayed duplicate old packet with same seq # accepted at dest 12

Connection Establishment How to deal with losing memory after crash? Each host has time of day clock clocks at different host need not be synced binary counter increments uniform intervals no. of bits must be of seq # clock must be running even if host goes down Initial seq # (k bits) low k bits of clock Seq space must be so large by time # wrap, old pkts w same # are long gone 13 Connection Establishment Clock method work within connection Host don t remember # across connections Can t know if CONN REQUEST with initial seq # is a duplicate of a recent connection To solve this, use three way handshake Check with other peer that con req is current Used in TCP, with 32 bit seq # Clock not used in TCP; attacker can predict 14

Connection Establishment Normal Procedure H1 choses initial s# x H2 replies ACKs x announce own s# y H1replies ACKs y with 1 st data segment CR = Connection Request 15 Connection Establishment Abnormal situations Delayed duplicate CR H2 sends ACK to H1 H1 rejects X H2 knows it was tricked Worst case DD CR, old ACK floating H2 gets delayed CR, replies H1 rejects H2 gets old DATA, discards (z received instead of y) X X 16

Connection Release Easier than establish However, some pitfalls Asymmetric release each con term separately abrupt; may cause data loss better protocol needed 17 Connection Release Symmetric release Each direction is released independently Can receive data after sending DISCONNECT H1: I am done, are you done too? H2: I am done too, goodbye Two army problem: unreliable channel 18

Connection Release Two army problem each blue army < white army, but together are larger need to sync attack however, only com channel is the valley (unreliable) 3 way handshake? B1 can t know ACK arrived making 4 way handshake doesn t help either Attack? Attack? 19 Connection Release Let each side independently decide its done Easier to solve Normal release sequence H1 send DR, start timer H2 responds with DR when H1 recv DR, release when H2 recv ACK, release 20

Connection Release Error cases, handled by timers, retransmissions Final ACK lost: Host 2 times out Lost DR: H1 starts over Extreme: Many lost DRs both release after N 21 Connection Release Protocol usually suffices; can fail in theory after N lost attempts; half open connection Not allowing give up, can go on forever To kill half open connections, automatically disconnect if no received segments in X sec Must have timer reset after each segment Send dummy segments to keep con alive TCP normally does symmetric close, with each side independently close ½ con w FIN 22

Multiplexing Transport, network sharing can either be: Multiplexing: connections share a network address Inverse multiplexing: addresses share a connection Multiplexing Inverse Multiplexing 23