Vous êtes sur la page 1sur 34

CHAPTER 4

OSI Transport Layer

Nurul Asyikin binti Mohamed Radzi

OSI Transport Layer

Nurul Asyikin binti Mohamed Radzi

Transport Layer Role and Services

Nurul Asyikin binti Mohamed Radzi

Transport Layer Role and Services


Purpose of transport layer

Tracking individual communication


Segmenting and managing
Reassembling

Identifying different application


Flow control
Error recovery
Initiating sessionNurul Asyikin binti Mohamed Radzi

Transport Layer Role and Services


3 basics operation of reliability:
Tracking transmitted data
Acknowledging received data
Retransmitting unacknowledged data

3 types of protocol:
Reliable
Guaranteed delivery
Best effort

Advantage and disadvantage?


Nurul Asyikin binti Mohamed Radzi

Protocols

Transmission Control
Protocol (TCP)
User Datagram Protocol
(UDP)
Nurul Asyikin binti Mohamed Radzi

Transmission Control Protocol (TCP)


Connection oriented protocol

RFC 793
Additional overhead
Functions
Same order delivery
Reliable delivery
Flow control

Applications
Web browsers
Email
File transfers
Nurul Asyikin binti Mohamed Radzi

User Datagram Protocol (UDP)


Simple, connectionless protocol
RFC 768
Low overhead
Segment = datagram
Best effort
Applications:
DNS
Video streaming
VoIP
Nurul Asyikin binti Mohamed Radzi

UDP and TCP protocols

Nurul Asyikin binti Mohamed Radzi

Transport Layer Role and Services


UDP

Segment = Datagram
Provides source and destination (ports)
It is not concerned with order
Faster

TCP
Segment
Provides source and destination (ports), sequencing, acknowledge and
flow control
Each segment contains a sequence number

Why we need segmentation?


Nurul Asyikin binti Mohamed Radzi

Transport Layer Role and Services

Nurul Asyikin binti Mohamed Radzi

Identifying conversation
Server
static port numbers

Clients
Dynamic port number

Destination port in header is the port number on the remote host.


Socket
combination of transport layer port number + network layer IP address

Socket pair
source and destination IP address and port numbers

Nurul Asyikin binti Mohamed Radzi

Port Addressing Types and Tools


IANA: Internet Assigned Numbers
Authority
Different types of port numbers:
Well-known (0 -1023)
Registered ports (1024 49151)
Dynamic / private (49152 65535)
Nurul Asyikin binti Mohamed Radzi

Transmission
Control Protocol
(TCP)
Nurul Asyikin binti Mohamed Radzi

Application and Operation of TCP


Mechanisms
Transport layer initiates a process to create a connection with
destination.
Destination sends acknowledgement to the source for
segments it receives.
If receive: Stop tracing data
If it doesnt receive: Retransmit

Nurul Asyikin binti Mohamed Radzi

Application and Operation of TCP


Mechanisms
No two services assigned to the same port number within the same
transport layer
Many simultaneous ports open on a server, one for each active server
application
To improve security: Restrict server access to ports associated with
services and application

Nurul Asyikin binti Mohamed Radzi

Application and Operation of TCP


Mechanisms

Two one-way
communication stream
Three-way handshake
Nurul Asyikin binti Mohamed Radzi

Application and Operation of TCP


Mechanisms
Three-way handshake performs these
functions:
Establishes that the destination device is present on the
network
Verifies that destination device has an active service
and is accepting requests on the destination port
number
Informs the destination device that the source client
intends to establish a communication session on that
port number
Nurul Asyikin binti Mohamed Radzi

Three way handshake

1) Send SYN

SEQ = A

ACK = A+1
SEQ = B

3) SYN.ACK received
Establishment
ACK = B+1
SEQ = A+1

Nurul Asyikin binti Mohamed Radzi

2) SYN received
Send SYN.ACK

Three way handshake


Seq = 3

1) Send SYN

Seq = 5

SEQ = 3

ACK = 4
SEQ = 5

3) SYN.ACK received
Establishment
ACK = 6
SEQ = 4

Nurul Asyikin binti Mohamed Radzi

2) SYN received
Send SYN.ACK

Three way handshake


1. Initiating client sends a segment containing initial
sequence value SYN
2. Server responds with a segment containing as
acknowledgement value plus its own synchronizing
sequence value SYN and ACK
3. Initiating client responds with an acknowledgement
value ACK
Nurul Asyikin binti Mohamed Radzi

Three way handshake

To add security:
Deny establishment of TCP sessions
Allow sessions to be established for
specific services only
Allow traffic only as a part of
already established sessions
Nurul Asyikin binti Mohamed Radzi

Two one way communication stream

Nurul Asyikin binti Mohamed Radzi

Managing TCP Sessions

Nurul Asyikin binti Mohamed Radzi

Expectational acknowledgement

Nurul Asyikin binti Mohamed Radzi

Managing TCP Sessions


Received: 1500 to 3000 and 3400 to 3500,
acknowledgement number = 3001

In TCP, a host can transmit a segment, put a copy of


segment in a retransmission queue and start timer
If received, delete segment from queue
If not received, before timer expires, segment is
retransmitted
Nurul Asyikin binti Mohamed Radzi

Minimizing segment loss


Flow control
If segment is received, send more data
If delay, it stops sending additional segments

Dynamic window size


If limited buffer memory, send smaller window
size
If no data loss, increase window size
Nurul Asyikin binti Mohamed Radzi

Flow control

1) Send data
2) Send acknowledgement
3) Send data

4) Send acknowledgement
5) Send data
X
6) Send acknowledgement
7) Send data

Nurul Asyikin binti Mohamed Radzi

Dynamic window size

1) Send data

1000 bytes
2) Send acknowledgement

3) Send data
5) Send data
6) Send data

1100 bytes

1200 bytes
X
1100 bytes

Nurul Asyikin binti Mohamed Radzi

4) Send acknowledgement

User Datagram
Protocol (UDP)

Nurul Asyikin binti Mohamed Radzi

UDP Protocol
UDP is transaction based
Send small amounts of data that can fit in one segment
It will not reorder datagram
Application will identify the proper sequence

Nurul Asyikin binti Mohamed Radzi

UDP Protocol
Well-known or registered port number
UDP receives datagram, forwards application data to
appropriate application based on port number

Nurul Asyikin binti Mohamed Radzi

UDP Protocol
After data is ready to be sent and ports are identified, UDP
form datagram and pass it to network layer
After a client has chosen the source and destination ports,
the same pair of ports is used in header

Nurul Asyikin binti Mohamed Radzi

THANK YOU

Nurul Asyikin binti Mohamed Radzi

Vous aimerez peut-être aussi