9 - Transport Layer Protocols Flashcards
Encapsulation
Each layer has a PDU (Protocol Data Unit)
Header/Body
Each layer adds a header to the PDU
Transport Layer
Communcation between processes on different hosts
Transport Layer send side
Break app messages into segments (transport layer packets)
pass to net layer
Network Layer
Provides communication between hosts
Transport layer receive side
Reassemble segments into messages
Pass to app layer
Transport vs Network
Net: comms between hosts
Transport: comms between processes
TCP - Transmission Control Protocol
Reliable, in order delivery
- Congestion Control
- FLow Control
- Connection Setup
UDP - User Datagram Protocol
unreliable, unordered “best effort”
connectionless
- no handshaking
- each segment handled separately
Addressing Processes
IP Address - host
Port Num - Identifies process
eg HTTP 80, Mail 25
Multiplexing
At Send Host
- gathering data from multiple sockets, enveloping data with header. Collating messages to send
Demultiplexing
At Receiving host
- delivering received segments to correct socket
Non-Persistent vs Persistent HTTP
NON - at most one object sent over TCP
Persistent - Multiple objects over single TCP
UDP Checksum Sender
treat segment as seq of 16 bit ints
checksum: addition of contents (1’s complement sum)
put into UDP checksum field
UDP Checksum receiver
compute checksum
check if equals field value else error detected
SQN number
TCP Sequence number = first byte of data in segment.
bytes
initial is random
TCP is full duplex - numbering is independent in each direction