250 likes | 483 Views
CS 313 Introduction to Computer Networking & Telecommunication. Chapter 6 Transport Layer. Topics. Transport Service Elements of Transport Protocols. Transport Service. Services provided to the upper layers Goal
E N D
CS 313 Introduction to Computer Networking & Telecommunication Chapter 6 Transport Layer Chi-Cheng Lin, Winona State University
Topics • Transport Service • Elements of Transport Protocols
Transport Service • Services provided to the upper layers • Goal • Provide efficient, reliable, and cost-effective services to its users (application/session layer processes) • Transport entity • Hardware/software within transport layer to do the work
Logical Relationship The network, transport, and application layers
Transport Services • Connection-oriented • E.g., TCP (Transmission Control Protocol) in TCP/IP • Connectionless • E.g., UDP (User Datagram Protocol) in TCP/IP • Why another layer between network and application/session layers?
Transport Service Primitives The primitives for a simple transport service
Transport Service Primitives • TPDU • Transport protocol data unit • Message transmitted between transport entities Nesting of TPDUs, packets, and frames.
Transport Service Primitives • Client-server example Client process Server process CONNECT LISTEN ACCEPT SEND RECEIVE RECEIVE SEND : : DISCONNECT DISCONNECT
Elements of Transport Protocols • Addressing • Connect • Disconnect • Flow control and buffering ------------------------------ • Multiplexing • Crash recovery
Elements of Transport Protocols • Transport protocol • Used to implement transport service • Resembles data link protocol • Error control, sequencing, flow control, etc. • BUT, their environments are different! Environment of data link layer Environment of transport layer
Elements of Transport Protocols • Differences from data link protocol • Explicit addressing of destination • More complicated initial connection establishment • Storage capacity in subnet • Packet might be "hiding" in subnet • Large and dynamically varying number of connections • buffering and flow control needed in both layers, but different approaches required
Addressing • Which remote application process to connect to • Transport address • Which process can listen for connection • TSAP • Transport service access point • Internet: Port • Usually multiple TSAP supported by transport entity • NSAP • Network service access point • Internet: IP address • One or more NSAP (e.g., host w/ more than one connections, router, etc.)
Establishing a Connection • Problem: delayed duplicates • Congestion, timeout, retransmission, packet hidden in subnet • Solution • Ensure no packet lives longer than some known time • Lifetime control • Restricted subnet design • Putting a hop counter in each packet • Timestamping each packet
Connection Establishment Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Normal operation.
Connection Establishment Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Old duplicate CONNECTION REQUEST appearing out of nowhere.
Connection Establishment Three protocol scenarios for establishing a connection using a three-way handshake. CR denotes CONNECTION REQUEST. Duplicate CONNECTION REQUEST and duplicate ACK
Connection Release Abrupt disconnection with loss of data
Analogy - Two-Army Problem • Unreliable channel • Three-way, four-way, … , N-way handshake NONE OF THEM WORKS
Releasing a Connection • Three-way handshake + timers • Fails when all DRs from source lost Half-open connection • Solution: • If no TPDUs have arrived for a certain amount of time disconnect • Timer needed • Dummy TPDU might be needed to keep a connection alive
Connection Release Four protocol scenarios for releasing a connection. (a) Normal case of three-way handshake
Connection Release Four protocol scenarios for releasing a connection. (b) Final ACK lost.
Connection Release Four protocol scenarios for releasing a connection. (c) Response lost
Connection Release Four protocol scenarios for releasing a connection. (d) Response lost and subsequent DRs lost.
Flow Control • Flow control • Similar to data link layer • Sliding windows (or some other scheme) needed • Difference • Host: numerous connections Router: a few lines different buffering strategies