Download presentation
Presentation is loading. Please wait.
Published byPriscilla Tyler Modified over 9 years ago
1
CSCI 465 D ata Communications and Networks Lecture 27 Martin van Bommel CSCI 465 Data Communications & Networks 1
2
Transport Protocol Sits above the network or internet layer and just below the application layer Provides services to applications – HTTP, IRC, FTP, SMTP, Telnet, etc. End-to-end transport of data that shields applications from details of underlying communications systems CSCI 465 Data Communications & Networks 2
3
Berkeley Socket API Transport Primitives – SOCKET – create communication endpoint – BIND – associate local address with socket – LISTEN – announce able to accept connections – ACCEPT – wait for and establish connection – CONNECT – attempt to establish connection – SEND – send data over connection – RECEIVE – receive data from connection – CLOSE – release the connection CSCI 465 Data Communications & Networks 3
4
Transport Services Addressing – User, transport entity, host address, network number Multiplexing – Multiple application connections multiplexed on single lower-level (e.g. network) connection Connection Establishment / Termination – handshaking Flow Control – E.g. ordering of segments, timeout, retransmission CSCI 465 Data Communications & Networks 4
5
Transmission Control Protocol (TCP) TCP is the transport layer protocol for most applications TCP provides a reliable connection for transfer of data between applications A TCP segment is the basic protocol unit TCP tracks segments between entities for duration of each connection CSCI 465 Data Communications & Networks 5
6
TCP Header 6
7
Source & Destination Port (16 bits): TCP users Sequence & Ack Numbers (32 bits) & Window (16 bits) – Flow control Data Offset (4 bits): Number of 32-bit words in the header. Flags (8 bits) Checksum (16 bits) Urgent Pointer (16 bits): – tells receiver how much urgent data is coming. Options (Variable): – e.g. maximum segment size that will be accepted. CSCI 465 Data Communications & Networks 7
8
TCP Port Numbers CSCI 465 Data Communications & Networks 8 5 – Remote Job Entry 7 – Echo 20 – FTP Data 21 – FTP Control 23 – Telnet 25 – SMTP 43 – WhoIs 53 – Domain Name Server 79 - Finger 80 – HTTP 88 – Kerberos 108 – SNA Gateway Server 119 – Network News 161 – SNMP Agent 162 – SNMP Manager 179 – Border Gateway 194 – Internet Relay Chat 389 – Lightweight Directory Access
9
TCP Mechanisms Connection establishment – Always uses a three-way handshake – Connection is determined by host and port Data transfer – Viewed logically as a stream of octets – Flow control using credit allocation Connection termination – Each TCP user must issue a CLOSE primitive – Abrupt termination if user issues ABORT primitive CSCI 465 Data Communications & Networks 9
10
TCP Send Policy Options Send policy – Free to transmit data when convenient Unless “Push” data or closed sliding window – May construct segment as data arrives or buffer before sending larger segment Larger segment – less overhead Smaller segment – quicker response CSCI 465 Data Communications & Networks 10
11
TCP Deliver Policy Free to deliver data to user when convenient – Unless “Push” data May deliver in-order as received or buffer data before delivery – Larger deliveries – delays in receipt – Smaller deliveries – processing overhead and operating system interrupts CSCI 465 Data Communications & Networks 11
12
TCP Accept Policy If segment arrives out of order, two options: – In-order Discard out of order segments – simple implementation Burden on networking facility Loss of segment requires retransmission of next ones – In-window Accept all segments within a receive window More complex acceptance test More sophisticated data storage scheme CSCI 465 Data Communications & Networks 12
13
TCP Retransmit Policy Retransmission strategies – First-only One timer for entire queue – retransmit only first one Efficient but can cause considerable delays – Batch One timer for entire queue – retransmit entire queue Unnecessary retransmissions but less delays – Individual One timer for each segment in queue More complex implementation CSCI 465 Data Communications & Networks 13
14
TCP Acknowledge Policy When data segment arrives, two options – Immediate Send empty (no data) segment with acknowledge num Simple and fast ack Limits unnecessary retransmissions Extra load on network – Cumulative Wait for outbound data segment and piggyback ack Typically used More processing at receiving end and delay on ack CSCI 465 Data Communications & Networks 14
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.