Chapter _Transport layer
Chapter _Transport layer
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 1
OSI transport layer
OSImodel layer 4
TCP/IP model Transport layer
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 3
Purpose of transport layer
Responsible for the overall end-to-end transfer
of application data.
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 4
Transport layer
Enables multiple applications on the same
device to send data over the network at the
same time
Provides “reliability” and error handling if
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 5
Transport Layer TCP and UDP
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 6
Why two transport protocols?
Some applications need their data to be
complete with no errors or gaps and they can
Reliable
accept a slight delay to ensure this.
They use TCP.
Some applications can accept occasional
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 7
TCP
Sets up a connection with the receiving host
before sending data.
Checks if segments have arrived and
(Flow control)
But – this takes time and resources.
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 8
UDP
Connectionless. Does not contact receiving
host before sending data.
Does not check if data arrived and does not
re-send.
Does not sort into the right order.
“Best effort”.
Low overhead.
Used for VoIP, streaming video, DNS, TFTP
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 9
TCP and UDP headers
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 10
Port numbers
Used by TCP and UDP as a form of
addressing.
Identifies the application and the
conversation.
Common application protocols have default
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 11
Port numbers
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 12
Port numbers
The Internet Assigned Numbers Authority (IANA)
assigns port numbers.
Well Known Ports (0 to 1023) - Reserved for
common services and applications such as HTTP,
FTP, Telnet, POP3, SMTP.
Registered Ports (1024 to 49151) - Assigned to user
processes or applications. Can be dynamically
selected by a client as its source port.
Dynamic or Private or Ephemeral Ports (49152 to
65535) – Can be assigned dynamically to client
applications when initiating a connection.
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 13
Netstat
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 14
Segment and sequence
Both TCP and UDP split application data into
suitably sized pieces for transport and re-
assemble them on arrival.
TCP has sequence numbers in the segment
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 16
Three way handshake
Send Receive
SYN=1, seq = x SYN=1, seq = x
Receive Send
SYN=1, ack = x+1, seq = y SYN=1, ack = x+1, seq = y
Send
Receive
SYN=0, Seq=x+1, ack = y+1 SYN=0, Seq=x+1, ack = y+1
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 17
Terminating connection
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 18
Expectational acknowledgement
TCP checks that data has been received.
The receiving host sends an
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 19
Window size
Controls how many bytes are sent before an
acknowledgement is expected.
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 20
Lost segments
Send bytes 1 to 2999
Receive 1 to 2999, send ACK 3000
Send bytes 3000 to 4999
Receive 3000 to 3999, send ACK 4000
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 21
Flow control
The initial window size is agreed during the
three-way handshake.
If this is too much for the receiver and it loses
window size.
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 22
Comparison of TCP and UDP
Both TCP and UDP use port numbers
Both split up application data if necessary
TCP sets up a connection
TCP uses acknowledgements and re-sends
TCP uses flow control
TCP can re-assemble segments in the right
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 23
The End
21 Feb 2025 S Ward Abingdon and Witney College CCNA Exploration Semester 1 24