Transport Layer: A Note On The Use of These PPT Slides
Transport Layer: A Note On The Use of These PPT Slides
Transport Layer
3-1
Transport Layer
3-2
Chapter 3 outline
3.1 Transport-layer
services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer
3.5 Connection-oriented
transport: TCP
3.6 Principles of
Transport Layer
3-3
between app processes running on different hosts i.e. direct connection transport protocols run in end systems send side: breaks app messages into segments, passes to network layer rcv side: reassembles segments into messages, passes to app layer more than one transport protocol available to apps Internet: TCP and UDP
logical communication
Transport Layer
3-4
Household analogy:
in envelopes hosts = houses transport protocol = Ann and Bill network-layer protocol = postal service
Transport Layer 3-5
delivery (TCP)
unreliable, unordered
delivery: UDP
Transport Layer
3-6
Chapter 3 outline
3.1 Transport-layer
services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer
3.5 Connection-oriented
transport: TCP
3.6 Principles of
Transport Layer
3-7
Multiplexing/demultiplexing
Demultiplexing at rcv host:
Multiplexing at send host: gathering data from multiple sockets, enveloping data with header (later used for demultiplexing)
P3
P1 P1
application
P2
P4
transport
network link physical
transport
network link physical
host 1
host 2
host 3
Transport Layer 3-8
each datagram has source IP address, destination IP address each datagram carries 1 transport-layer segment each segment has source, destination port number host uses IP addresses & port numbers to direct segment to appropriate socket
Connectionless demultiplexing
Create sockets with port
When host receives UDP
numbers:
segment:
checks destination port number in segment directs UDP segment to socket with that port number
two-tuple:
IP datagrams with
different source IP addresses and/or source port numbers directed to same socket
Transport Layer 3-10
client IP: A
DP: 6428
server IP: C
DP: 6428
Client
IP:B
Connection-oriented demux
TCP socket identified
by 4-tuple:
source IP address source port number dest IP address dest port number
P6
SP: 5775 DP: 80 S-IP: B D-IP:C
P2
P1 P3
SP: 9157
SP: 9157
client IP: A
server IP: C
Client
IP:B
client IP: A
server IP: C
Client
IP:B
Chapter 3 outline
3.1 Transport-layer
services 3.2 Multiplexing and demultiplexing 3.3 Connectionless transport: UDP 3.4 Principles of reliable data transfer
3.5 Connection-oriented
transport: TCP
3.6 Principles of
Internet transport protocol best effort service, UDP segments may be: lost delivered out of order to app
connectionless:
no handshaking between UDP sender, receiver each UDP segment handled independently of others
establishment (which can add delay) simple: no connection state at sender, receiver small segment header(8bytes as compared to 20bytes for TCP) no congestion control: UDP can blast away as fast as desired
Transport Layer 3-16
UDP: more
often used for streaming
other UDP uses DNS SNMP reliable transfer over UDP: add reliability at application layer application-specific error recovery!
UDP checksum
Goal: detect errors (e.g., flipped bits) in transmitted segment
Sender:
treat segment contents
Receiver:
compute checksum of
as sequence of 16-bit integers checksum: addition (1s complement sum) of segment contents sender puts checksum value into UDP checksum field
received segment check if computed checksum equals checksum field value: NO - error detected YES - no error detected.
When adding numbers, a carryout from the most significant bit needs to be added to the result
1 1 1 1 0 0 1 1 0 0 1 1 0 0 1 1 0 1 1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
wraparound 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1
sum 1 1 0 1 1 1 0 1 1 1 0 1 1 1 1 0 0 checksum 1 0 1 0 0 0 1 0 0 0 1 0 0 0 0 1 1
Transport Layer 3-19