Please enable JavaScript.
Coggle requires JavaScript to display documents.
CHAPTER 4: TRANSPORT AND APPLICATION LAYER, Tracking the Conversation,…
CHAPTER 4: TRANSPORT AND APPLICATION LAYER
purpose of the transport layer in managing the transportation of data in end-to-end communication
Role & Responsibilities of the Transport Layer
responsible for point-to-point communication, which is managing, establishing, and closing communication between two specific networked devices
provides logical communication between application processes running on different hosts within a layered architecture of protocols and other network components.
Tracks each individual conversation flowing between a source and a destination application
Divides the data into segments that are easier to manage and transport. Header used for reassembly is used for tracking.
Ensures that even with multiple applications running on a device, all applications receive the correct data via port numbers.
Conversation Multiplexing
Sending some types of data such as stereaming video across a network, as one complete communication stream, could use all of the available bandwidth and prevent other communications from occurring at the same time.
Transport Layer Reliability
The transport layer controls the reliability of communications through flow control, segmentation, and error control. Two great examples of transport protocols are :
TCP
Considered reliable which ensures that all of the data arrives at the destination.
Additional fields needed in header which increases size and delay
similar to sending tracked packages. If a shipping order is broken up into several packages, a customer can check online to see the order of the delivery.
3 responsibilities of TCP
Numbering and tracking data segments
Acknowledging received data
Retransmitting any unacknowledged data after a certain period of time
UDP
Does not provide for reliability.
Fewer fields and is faster than TCP.
User Datagram Protocol (UDP), essentially a thin layer over IP used for less overhead and to reduce possible delays
offers a best-effort message delivery service, without any flow, congestion, or error control
useful for applications that communicate over Local Area Networks
Similar to a non-registered letter
The Right Transport Layer Protocol for the Right Application
TCP
databases, web browsers, and email clients require that all data that is sent arrives at the destination in its original condition.
UDP
if one or two segments of a live video stream fail to arrive, if disruption in the stream, may not be noticeable to the user.
explain the characteristics of the TCP and UDP protocols, including port numbers and their uses (Mellissa & Nurul)
TCP and UDP Overview (Mellissa)
Multiple Separate Communications
Users expect to simultaneously receive and send email, view websites and make a VoIP phone call. TCP and UDP manage multiple conversations by using unique identifiers called
port numbers
.
Port Numbers
Source Port
Originating application port that is dynamically generated by sending device.
e.g: Each separate HTTP conversation is tracked based on the source ports.
Destination Port
Telling the destination what service is being requested.
e.g: Port 80 web services are being requested.
Socket Pairs
Source and destination port placed in segment.
Segments encapsulated in IP packet.
IP and port number = socket.
For example: 192.168.1.7:80
Sockets enable multiple processes to be distinguished.
Source port acts as a return address.
Port Number Groups
Well-known Ports (numbers from 0-1023): These numbers are reserved for services and applications.
Registered Ports (numbers from 1024 to 49151): These port numbers are assigned by IANA to a requesting entity to use with specific processes or applications.
Dynamic or Private Ports (numbers from 49152 to 65535): Usually assigned dynamically by the client's OS and used to identify the client application during communication.
The netstat Command
Network utility that can be used to verify connections. By default, it will attempt to resolve IP addresses to domain names and port numbers to well-known applications.
n- option is used to display IPs and ports in numerical form.
TCP Features
(Nurul)
establishing a session
:
-connection-oriented protocol
-ensures the application is ready to receive the data
-negotiate the amount of traffic that can be forwarded at a given time
reliable delivery
:
-ensuring that each segment that the source sends arrives at the destination
same-order delivery
:
numbering & sequencing the segments guarantees reassembly into the proper order
flow control
:
regulate the amount of data the source transmits
TCP Header
source and destination port used to identify application
sequence number used for data assembly
acknowledgement number indictaes data has been received and ready for next byte from source
header length :
length of TCP segment header
control bits :
purpose and function of TCP segment
window size :
number of bytes that can be accepted at one time
checksum :
used for error checking of segment header and data
UDP Features
(Nurul)
- data is reconstructed in the order that it is received
- any segments lost are not resent
- no session establishment
- does not inform the sender about resource availability
UDP Header
UDP is a stateless protocol – no tracking
Reliability handled by application
determine whether high-reliability TCP transmissions, or non- guaranteed UDP transmissions, are best suited for common applications
( Khairi & Elton )
TCP Server Process
The server process issues an OPEN command to a TCP device. The server process issues a USE command, followed by a READ command, awaiting input from the client process. The server must be listening before a client can establish a connection
TCP Server Process (Cont.)
TCP Connection Establishment
To establish a connection, TCP uses a three-way handshake. Before a client attempts to connect with a server, the server must first bind to and listen at a port to open it up for connections: this is called a passive open
Step 1 – Initiating client requests a session with server.
Step 2 – Server acknowledges and requests a session with client
Step 3 – Client acknowledges communication session with server.
TCP Session Termination
A TCP connection is normally terminating using a special procedure where each side independently closes its end of the link. It normally begins with one of the application processes signalling to its TCP layer that the session is no longer needed
To close a connection, the Finish (FIN) control flag must be set in the segment header
To end each one-way TCP session, a two-way handshake, consisting of a FIN segment and an Acknowledgment (ACK) segment, is used
To terminate a single conversation supported by TCP four exchanges are needed to end both sessions
TCP Three-way Handshake Analysis
The three-way handshake:
Establishes that the destination device is present on the network
Verifies that the destination device has an active service and is accepting requests on the destination port number that the initiating client intends to use
Informs the destination device that the source client intends to establish a communication session on that port number.
The six bits in the Control Bits field of the TCP segment header are also known as flags.
RST flag is used to reset a connection when an error or timeout occurs
TCP Reliability – Ordered Delivery
Sequence numbers are assigned in the header of each packet.
Represents the first data byte of the TCP segment.
During session setup, an initial sequence number (ISN) is set - represents the starting value of the bytes.
As data is transmitted during the session, the sequence number is incremented by the number of bytes that have been transmitted.
Missing segments can then be identified
TCP Flow Control – Window Size and Acknowledgments
In the figure, the source is transmitting 1,460 bytes of data within each segment.
Window size agreed on during 3-way handshake.
Typically, PC B will not wait for 10,000 bytes before sending an acknowledgment.
PC A can adjust its send window as it receives acknowledgments from PC B
TCP Flow Control – Congestion Avoidance
Congestion causes retransmission of lost TCP segments
Retransmission of segments can make the congestion worse
To avoid and control congestion, TCP employs several congestion handling mechanisms, timers, and algorithms
Example: Reduce the number of bytes it sends before receiving an acknowledgment
UDP Low Overhead versus Reliability
UDP not connection- oriented
No retransmission,sequencing, and flow control
Functions not provided by the transport layer implemented elsewhere
UDP Datagram Reassembly
UDP reassembles data in order received and forwards to application
Application must identify the proper sequence
UDP Server Processes and Requests
The Remote Authentication Dialin User Service (RADIUS) server shown in the figure provides authentication, authorization, and accounting services to manage user access.
UDP Client Processes
The UDP client process randomly selects a port number from the range of dynamic port numbers and uses this as the source port for the conversation.
After a client has selected the source and destination ports, the same pair of ports is used in the header of all datagrams used in the transaction. For the data returning to the client from the server, the source and destination port numbers in the datagram header are reversed
Applications that use TCP and UDP
TCP
HTTP (HyperText Transfer Protocol),FTP ( File Transfer Protocol),Telnet (Bi-directional serial text communication),SMTP (Simple Mail Transfer Protocol)
UDP
Live video and multimedia,Simple request and reply,Handle reliability
themselves
Tracking the Conversation
Segmentation -
-Identify the application