CHAPTER 6 - The Transport Layer - Study Unit 6
CHAPTER 6 - The Transport Layer - Study Unit 6
CHAPTER 6 - The Transport Layer - Study Unit 6
(Study Unit 4)
The Transport Layer
(TCP and UDP)
In this Lecture:
Internetwork IP
Host to
Ethernet Point-to-Point Wi-Fi
Network
©2020Raj Jain
Multiplexing and Demultiplexing
Transport Ports and Network addresses are used to separate flows
©2020Raj Jain
Multiplexing
• Upward Multiplexing
– The transport layer can send several transmissions bound for the same
destination along the same path.
– It is useful when the underlying networks have high throughput.
• Downward Multiplexing
– It is useful when the underlying networks have low or slow capacity(e.g.,
X.25’s three bit sequence code).
Protocol Data Units (PDU)
• At each layer, protocols are used to communicate
• Control information is added to user data at each
layer (PDU = Control + Data)
• Transport layer may fragment user data
• Transport layer may fragment user data
• Each fragment has a transport header added
– Destination SAP (port)
– Sequence number
– Error detection code
PROTOCOLS AT THE TRANSPORT LAYER
TRANSMISSION CONTROL PROTOCOL(TCP)
Basic Features
•TCP provides connection-oriented communication (virtual
circuit connection, like telephone communication). It manages
a point-to-point and full-duplex connection for an application
between two computers:
i. creates a connection before communication;
ii. sends and receives data over this connection;
Application data is considered to be a continuous unstructured
stream of bits.
Application programs must understand stream contents and
boundaries of records.
Piggybacking permitted
iii. closes a connection after communication.
•TCP guarantees reliable data delivery.
The TCP recipient will receive data in a correct order without data loss
or error.
•Connection abstraction
---- TCP allows multiple application programs on a given
machine to communicate with programs in other
machines.
---- A virtual circuit connection consists of two endpoints.
Each endpoint is a pair of integers (host, port)
Host = IP address
A port is a positive integer on the host, usually
identifying an application program, e.g.,FTP: 20 and
21,SMTP: 25,HTTP: 80
----- Functionality of a port number:
Helps a sender get specific data to a specific
application program at the recipient’s end.
NB A socket – Is a combination of an IP Address and a port
number e.g. the socket on 192.161.7.5 for port 69 is
192.161.7.5:69. OR 192.161.7.5,UDP
Well-known ports used by TCP
TCP 3-WAY HANDSHAKE
Before data transmission, a Sender and Recipient must
have a controlled interaction called a 3-way handshake.
---- reason why TCP is known to connection oriented
This process has 3 parts.
DATA SENDER
DATA RECIPIENT
SYN
PART 2 – The Recipient responds with a TCP Segment along
with the Synchronization(SYN) and Acknowledgement(ACK)
bit sets i.e. “SYN/ACK”
SYN
DATA SENDER
DATA RECIPIENT
SYN/ACK
ACK
Seq 200
DATA SENDER DATA RECIPIENT
Seq 300
Seq 400
The recipient will now send a segment back that contains no data but
does have an ACK number set. You might think that the ACK number
would actually reflect the last sequence number received butsits not the
case – The ACK number will actually indicate the next sequence number
the data recipient expects to see!
Seq 100
Seq 200
Seq 400
ACK 500
What if “Seq 200” didn’t arrive(got lost) at the recipient but Seq
100,300 and 400 all arrived, what will happen?
Seq 100
Seq 200
DATA SENDER DATA RECIPIENT
Seq 300
Seq 400
ACK number will be 200,this is error detection
ACK 200 – “finding out the error”
Seq 200
DATA SENDER DATA RECIPIENT
Seq 300
Seq 400
ACK 500