Title: This section discusses the Transport Layer
1- This section discusses the Transport Layer
- Overview
- User Datagram Protocol
- Transport Control Protocol
- TCP Service Primitives
- TCP Operation
2- CH 11 Transport Protocols
- TCP/IP transport layer IP are closely coupled
- IP is always present in the network layer
- regardless of underlying network (LAN, WAN,
- inter-network)
- all transport layer PDUs encapsulated in IP
packets
- OSI network oriented protocols reflect
underlying network type - User Datagram Protocol (UDP) connectionless
- Transport Control Protocol (TCP) connection
oriented - trade-off cost/rate of lost packets vs delay
throughput - required for reliable delivery
3- Network Interface LAN/WAN frame encapsulates IP
packet - provides MAC address
- IP address provides net_id host_id
- IP protocol field type of protocol ICMP, TCP,
IP - Port Address Transport Protocol Field used to
address - application w/i host (ISO TSAP)
- Application Address composite TCP/IP address
- e.g. 128.3.2.3, 53
- net_id 128.3
- host_id 2.3
- port_address 53
4PDU/layer
Address Selector
5- 11.1 UDP
- Characteristics of IP
- provides connectionless service for individually
addressed - packets
- minimizes overheads resulting from connections
error control - IP checksum only applies to IP header
- UDP connectionless transport protocol
- single PDU associated with UDP protocol
- exploit overhead advantages of IP
- single short request/response exchange
- error control unneeded
6- source port and destination port
- 16 bit integers identify port on a host
- source port is optional, included only if reply
- is expected, otherwise set to 0
- length total bytes in entire UDP packet
- checksum 1s compliment over entire UDP PDU
- checksum is optional, if not used ? set to 0
- if computed checksum 000 ? use 111
- (1s compliment 0 represented by 000or 111)
- knowledge of addressing is an application issue
- source must know port address and IP address
- use name server, etc
711.2 TCP reliable stream transport service
- TCP Operation - supports reliable, duplex packet
transmission - error detection 1s compliment checksum
- error control ? go-back-N
- flow control ? sliding window
- TCP data is submitted for transmission in
segments (blocks) - TCP message stream consists of message segments
- all segments (thus all PDU types) have same
header format - validity of fields in segment header is
indicated by code field
- Error Control Flow Control ? data treated as a
byte stream - SEQ ACK numbers relate to byte position in
message - stream, not to position of message block in the
sequence
8TCP Packet
9TCP Packet Fields
10- default maximum bytes in data field segment 536
- assumed enroute networks were WANs with higher
BER - if host operates with low BER (LAN) ?can use
larger segments
11- 11.2.1 Reliable Stream Service Operation
- service primitives (OPEN, CLOSE, ) provided to
application - goal provide error free, ordered delivery
without lost or - duplicate packets
- stream oriented transmission all user data
associated with a - connection treated as 2 separate data streams
- each stream forms part of a duplex connection
- each stream comprised of a string of bytes
- segments unit of data transfer for reliable
service - may consist of multiple short user messages
- may be part of a single large message (file, )
- max segment length is TCP function
12- segment transmission
- source TCP normally decides when to transmit new
segment - user can alter message transmission unit via
parameters - remote TCP stores segments in memory associated
with an - application, buffer is
delivered when full
client server model client always initiates
requests server responds to client requests, may
support multiple clients concurrently
13- Phases of TCP Operations
- Service Primitives used to perform
- Connection Set Up
- Data Transfer
- Connection Termination
(1) Connection Set Up- server side
- indicate readiness to accept connection requests
- passive open wait to receive connection
requests - - as opposed to active
14(1) Connection Set-up - client side -
initiated connection establishment (active)
15(2) data transfer phase
16(3) clearing connection
17CLIENT
SERVER
TCP
TCP
18Parameters for TCP Service Primitives source
destination address IP address of source_IP
dest_IP source destination ports port
addresses of protocol entities
- timeout max time that source TCP should wait for
segment ACK - user specified
- normally greater than 2? time to live (IP)
timeout action action on time-out, normally
close connection
precedence parameters that specify IP Headers
service type field - pass
through parameter ? QoS request
security range server can specify security level
to potential clients
push flag indicates transmit immediately to TCP
urgent flag indicates transmit out of normal
flow control to TCP
19- local connection name allocated by local TCP
entity at connection - set-up
- with multiple logical connections - allows TCP
to relate primitives - to same connection OSI connection endpoint
identifier - port address only allows TCP to relate received
segment to server - application
- many parameters associated w/ low level
operation of TCP/UDP - - often same value used ? default value for many
- - if value not specifically set ? default assumed
20Parameters for TCP Service Primitives
21TCP User Service Primitives
22TCP User Service Primitives
23TCP User Service Primitives
24- 1. Establishing a connection ? use 3-way
handshake - allows for general case when anyone can initiate
connection - in client-server model ? client always initiates
connection - flow of data in each direction independently
controlled - each side informs other of initial sequence
number - - avoids ambiguity
- - initial sequence numbers ACKed as part of
handshake
25Example 1
- Client Initiates Connection
- send a segment with SEQ flag set
- proposed sequence number set Seq_no X
- Server accepts connection
- record incoming connections sequence number X
- send reply segment with both SEQ, ACK flags set
- - reverse sequence number set Seq Y
- - ACK number set ack_no X1
26Example 2
- Simultaneous Connection Initiated
- both sides send segment with SEQ flag set
- proposed sequence numbers set seq_no X
- record incoming connections sequence number X
- send reply segments with ACK flag set Ack
number X1
272. Data Transfer flow/error control Go Back N
w/ sliding window
if segment was corrupt ?incorrect SEQ/ACK field
received - return RST segment with SEQ, ACK flags
and fields set
28(No Transcript)
29- 3. graceful connection termination
- Client finished, closes connection
- Server finished, closes connection
- TCP terminates connection on both sides
30- (3) Connection Termination - Abort Sequence
- immediately terminates both sides of connection v
- Client TCP sends segment with RST set to server
- ServerTCP immediately terminates both sides of
connection - sends TERMINATE primitive with reason code to
server
RST