Please enable JavaScript.
Coggle requires JavaScript to display documents.
Chapter 4 Transport And Application Layer - Coggle Diagram
Chapter 4
Transport And Application Layer
4.1.1
The purpose of the transport layer in managing the transportation of data in end-to-end communication.
(Grace)
Role of the Transport Layer
Responsible for two application:
Establishing a temporary communication session
Deliver data
Link between app layer and lower layers tht are responsible for the network transmission.
Transport Layer Responsibilities
Tracking the Conversation
Segmentation
Identifying the Application
Tracking the Conversation
Track every individual conversation flowing between a source and destination application.
Segmentation
Divide data into segments tht are easier to manage & transport.
Identifying the Application
Ensure every apps receive the correct data via port numbers even with multiple apps on a device.
Conversation Multiplexing
Segmenting (divide) data into smaller chunks enables many diff communications to be multiplexed on the same network.
Segmentation allows conversation multiplexing (multiple apps can use the network at the same time.)
Transport Layer Reliability
TCP/ IP provides 2 transport layer protocols:
Transmission Control Protocol(TCP)
User Datagram Protocol (UDP)
TCP:
Reliable
Ensures that all of the data arrives at the destination.
Additional fields needed in header which increases size & delay.
Transport is similar to sending tracked packages.
Ex: If a shipping order is broken up into several packages, customer can check online to see the order of the delivery
Responsibilities
Numbering & tracking data segments
Acknowledging received data
Retransmitting any unacknowledge data after a certain period of time
UDP
Unreliability
Fewer fields & is faster than TCP.
Less overhead & to reduce possible delays.
Best-effort delivery (unreliable)
No acknowledgment
Similar to non-registered letter
The Right Transport Layer Protocol for the Right App
TCP
SMTP/POP (Email)
HTTP
Properties:
Fast
Low overhead
:red_cross: Does not require acknowledgements
:red_cross: Does not resend lost data
Delivers data as it arrives
TCP
- databases, web browsers and email clients require that all data that is sent arrives at the destination in its original condition.
UDP
IP Telephony
Streaming Live Video
Properties:
Reliable
Acknowledges data
Resends lost data
Delivers data in sequenced order
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.
4.1.3 Determine whether high-reliability TCP transmissions,or non-guaranteed UDP transmissions,are best suited for common applications.(syairul&ainor)
TCP Communication Process
(ainor)
TCP Server Process
Request Destination Ports
Use well known port numbers as the destination port
Request Source Ports
Use random port numbers as the source port
TCP Server Process (Cont.)
Response Destination Ports
Server response to TCP client uses the source port from the request packet as the destination port
Response Source Ports
Server response to TCP client uses the destination port from the request packet as the source port
Step 1 -Initiating client request a session with server
Step 2 - Server acknownleadges and requests a session with client
Step 3 - Client acknowledges communication session with server
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.
The 3 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.
The six bits in the Control Bits field of the TCP segment header are also known as flags.
RST flag is used to rest a connection when an error or timeout occurs
Reliability and Flow Control
(ainor)
TCP Reliabilty-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 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 Acknowlegments
In the figure,the source is transmitiing 1460 bytes of data within each segment
.
Window size agreed on during 3-way handshake
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 Communication
(syairul)
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 does not establish a connection before sending data
UDP provides low overhead data transport because it has a small datagram header and no network management traffic.
UDP reassembles data in oreder received and forwards to application
Application must identify the proper sequence
The remote Authentication Dial in User Service (RADIUS) server shown in the figure provides authentication,authorization,and accounting services to manage user access
UDP Server Processes and Requests
UDP Client Processes
UDP Client Processes (Cont.)
TCP OR UDP
(syairul)
Application that use TCP
TCP frees application from having to manage reliability
Application that use TCP
Three types of application best suited for UDP:
Live video and multimedia
Simple request and reply
Handle reliability themselves
4.1.2 Explain characteristic of the TCP and UDP protocols, including port numbers and their uses.
TCP Features
TCP ensures that the data reaches intended destination in the same order it was sent.
TCP provides flow control and quality of service.
TCP operates in Client/Server point-to-point mode.
TCP provides full duplex server, i.e. it can perform roles of both receiver and sender.
TCP Header
Source and Destination Port used to identify application.
Sequence number used for data reassembly
Header length - length of TCP segment header
4.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
Data is reconstructed in the order that it is received.
Any segments lost are not resent
no session statement
Does not inform the sender about resource availability
UDP Header
Miltiple Seperate Communication
User expect to simultaneously receive and send email, view websites and make a VoIP phone call.
TCP and UDP manage multiple conversation by using unique identifier called Port Number
Port number
Source Port
-Originating application port that is dynmically generated by sending device.
Destination port
-Tell the destination what service is being requested
Port Number Groups
PORT NUMBER GROUP
-Well-known Ports (Numbers 0 to 1023)reserved for services and applications.
-Registered Ports (Numbers 1034 to 49151)are assigned by IANA to a requesting entitiy to use with specific processes or applications.
-Dynamic or Private Ports (Numbers 49151 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,will attempt to resolve IP addresses to domain names and port numbers to well-know application.
-n option used to display IPs and ports in numerical form