topic 11 : transport layer Flashcards
role of transport layer
- responsible for logical communications between applications running on different hosts
- link between the application layer and the lower layers that are responsible for network transmission
transport layer responsibilities
1) tracking individual conversations
2) segmenting data and reassembling segments
3) adds header information
4) identify, separate and manage multiple conversations
5) uses segmentation and multiplexing to enable different communication conversations to be interleaved on the same network
transport layer protocols
TCP and UDP protocols
transport layer protocols specify how to transfer messages between hosts and are responsible for managing reliability requirements of a conversation
TCP (transmission control protocol)
provides reliability and flow control
TCP basic operations
- number and track data segments transmitted to a specific host from a specific application
- acknowledge received data
- retransmit any unacknowledged data after a certain amount of time
- sequence data that might arrive in wrong order
- send data at an efficient rate that is acceptable by the receiver
UDP basic functions
- connectionless protocol
- best-effort delivery protocol because there is no acknowledgement that the data is received at the destination
(provides the basic functions for delivering datagrams between the appropriate applications with very little overhead and data checking)
TCP features
1) establishes a session
2) ensures reliable delivery
3) provides same-order delivery
4) supports flow control
establishes a session
TCP is a connection-oriented protocol that negotiates and establishes a permanent connection/session between source and destination devices prior to forwarding any traffic
ensures reliable delivery
ensures that each segment that is sent by the source arrives at the destination
(ensures that the segment does not become corrupted or lost completely)
provides same-order delivery
because networks may provide multiple routes that can have different transmission rates, data can arrive in the wrong order
supports flow control
- network hosts have limited resources
- when TCP is aware that these resources are overtaxed, it can request that the sending application reduce the rate of data flow
TCP header
- stateful protocol : keeps track of the state of the communication session
- records which information it has sent and has been acknowledged
applications that use TCP
TCP handles all tasks associated :
- with dividing the data stream into segments
- provides reliability
- controls data flow
- reordering segments
UDP features
- data is reconstructed in the order that is received
-any segments that are lost are not resent - no session establishment
- sender is not informed about resource availability
UDP applications
1) live video and multimedia applications
- can tolerate some data loss but require little/no delay (eg VoIP, live streaming video)
2) simple request and reply applications
- with simple transactions where a host sends a request and may or may not receive a reply (DNS, DHCP)
3) applications that handle reliability themselves
- unidirectional communications where flow control, error detection, acknowledgements and error recovery is not required/can be handled by the application (eg SNMP, TFTP)
source port number and destination port number
source port number : originating application on the local host
destination port number : destination application on the remote host
well-known ports
number range : 0 to 1023
- reserved for common or popular services and applications such as web browsers, email clients and remote access clients
registered ports
number range : 1024 to 49151
private/dynamic ports
number range : 49152 to 65535
TCP port number groups
FTP (control) = 20
FTP (data) = 21
SSH = 22
Telnet = 23
SMTP = 25
HTTP = 80
POP3 = 1110
IMAP = 143
HTTPS = 443
UDP port number groups
DHCP (server) = 67
DHCP (client) = 68
TFTP = 69
SNMP = 161
UDP and TCP port number groups
DNS = 53
TCP connection establishment
1) initiating client requests a client-to-server communication session with the server
2) server acknowledges the client-to-server communication session
3) The initiating client acknowledges
the server-to-client communication session
TCP reliability (guaranteed and ordered delivery)
- TCP can also help maintain the flow of packets so that devices do not become overloaded
- There may be times when TCP
segments do not arrive at their
destination or arrive out of order. - All the data must be received and the data in these segments must be
reassembled into the original order. - Sequence numbers are assigned in
the header of each packet to achieve this goal.
TCP reliability (data loss and retransmission)
TCP provides methods of managing
these segment losses. Among these is a mechanism to retransmit segments for unacknowledged data
TCP flow control (window size and acknowledgements)
- Flow control is the amount of data
that the destination can receive
and process reliably. - Flow control helps maintain the
reliability of TCP transmission by
adjusting the rate of data flow
between source and destination for
a given session.
TCP flow control (maximum segment size)
- maximum amount of data that the destination device can receive
- A common MSS is 1,460 bytes
when using IPv4. - A host determines the value of its
MSS field by subtracting the IP
and TCP headers from the
Ethernet maximum transmission
unit (MTU), which is 1500 bytes
be default.
TCP flow control (congestion avoidance)
- congestion : packets being discarded by the overloaded router
- avoid and control congestion : congestion handling mechanisms, timers and algorithms
UDP low overhead vs reliability
- UDP = connectionless
- provides low overhead data transport because it has a small datagram header and no network management traffic
UDP datagram reassembly
UDP simply reassembles the
data in the order that it was
received and forwards it to
the application.
UDP server processes and requests
- assigned well-known/registered port numbers
- receives a datagram
destined for one of these ports, it
forwards the application data to
the appropriate application based
on its port number
UDP client processes
- The UDP client process
dynamically selects a port number
from the range of port numbers
and uses this as the source port
for the conversation. - The destination port is usually the
well-known or registered port
number assigned to the server
process. - After a client has selected the
source and destination ports, the
same pair of ports are used in the
header of all datagrams in the
transaction.