Chapter5 _ Transport - Layer (1)
Chapter5 _ Transport - Layer (1)
Application
Transport
Datagram or IP Protocol
Addressing ARP Protocol
and Routing Internet
ICMP Protocol
Network Access
Application
TCP Protocol
Concept of Ports Transport UDP Protocole
Internet
Network Access
Host Host
Port number Port number
Router Router
IP:199.7.55.3
Port 3
• This port number is written in 2 bytes, which gives 65535 possible ports.
Port:25
RECEIVER SENDER
TCP OR UDP
DEMUX
Internet layer
Reliable: TCP guarantees that all data sent from the sender will be received
by the receiver in the same order, and without errors. If any data packets
are lost or corrupted, TCP will automatically retransmit them.
Ordered Data Delivery: TCP ensures that data is delivered in the exact
order in which it was sent. If packets arrive out of order, TCP will reorder
them before passing them up to the application layer.
File Transfer Protocol (FTP): Reliable transfer of files over the network.
Remote Access (SSH, Telnet): Secure and reliable remote shell access.
Speed: TCP has more overhead because of error checking, flow control, and
connection management, making it slower than UDP.
Use Cases: TCP is used for applications that require guaranteed data
delivery, such as web browsing (HTTP/HTTPS), file transfers (FTP), email
(SMTP), and remote access (SSH).
1. Establish connections.
2. Transfer data.
3. Send acknowledgments.
SeqNum
ACKNum
SeqNum
ACKNum
SeqNum
ACKNum
Data Offset (4 bits): Specifies where the data begins in the packet, as the
header can vary in length.
Window Size (2 bytes): Specifies the size of the sender's receive window
(used for flow control).
Urgent Pointer (2 bytes): Points to urgent data in the stream if the URG
flag is set.
1. Establish connections.
2. Transfer data.
3. Send acknowledgments.
Flags: SYN
SeqNum=x and ACKNum =0
Flags: SYN+ACK
SeqNum=Y and ACKNum
=X+1
Flags: ACK
SeqNum=x and
ACKNum=Y+1
Flags: SYN
SeqNum=10 and
ACKNum=0
Flags: SYN+ACK
SeqNum=33 and ACKNum
=11
Flags: ACK
SeqNum=11 and
ACKNum=34
network
• Bandwidth waste
Sending data
Waiting
Sending acknowledgment
Waiting
.....
Window size 3
Réponse??? Exercice
By Pr RIAHLA Mohamed Amine
Transport Layer
TCP: Connection Termination
Connection Establishment
www.facebook.com SYN, SYN+ACK, ACK
Data Transfer
Acknowledgment
Window
Port: 25 Port: 80
Port: 21
157.240.195.35
TCP/IP Stack
OS
UDP Flood:
•In this attack, the attacker sends large amounts of UDP packets to random ports on
the target system. Since the system must process each UDP packet and respond, it
can become overwhelmed, resulting in a denial of service.
This attack occurs when an attacker takes control of a valid session between two
parties by stealing or guessing session tokens or TCP sequence numbers.
Once the attacker has access to the session, they can impersonate the legitimate user,
steal sensitive data, or disrupt communication. This is often done using packet sniffing
and injecting malicious packets into the connection.
• Traffic Analysis:
• Blind Injection Attacks: the attacker injects data into an ongoing TCP session
without receiving feedback from the system (hence "blind").
• TCP Congestion Attack: In this attack, the attacker manipulates the congestion
control mechanisms of TCP. The attacker may attempt to flood the network with
packets, causing congestion and delays for legitimate users.