TCP and UDP.

Download Report

Transcript TCP and UDP.

The Saigon CTT
Semester 1
CHAPTER 12 – 13 – 14
Le Chi Trung
The Saigon CTT
Content
• Transport layer
• TCP and UDP
• Session layer
• Presentation layer
The Saigon CTT
Schedule
Day
05-Jul
Lesson
No
12.1 The transport layer
12.2 TCP and UTP
12.3 TCP connection methods
Name
Lab
Est time
0:15:00
0:15:00
0:30:00
No
Name
12.1.3 Protocol Inspector and TCP
07-Jul
13.1 The basics of the session layer
14.1 The basics of the presentation layer
Chapter 12 + 13 + 14 Online Exam
0:15:00
0:15:00
The Saigon CTT
TRANSPORT LAYER
The Saigon CTT
Why we need a transport layer?
• Layer 1 allows bit streams to be created
and to travel.
• LayerBut
2 packages
those
data packets
they made
no provision
into for
frames
to be our
converted
to bit
assuring
data reliably
streams
and makes
data-link
delivery
travels
end-to-end
across
possible.
the often fast network path.
• Layer 3 packages data from upper
layers in packets and makes routing and
network delivery possible.
The Saigon CTT
Purpose of the transport layer
• Transport and regulate the flow of
information from source to destination,
reliably and accurately.
• The end-to-end control:
– Sliding windows.
– Sequencing numbers.
– Acknowledgments.
– Segmentation.
– Multiplexing.
The Saigon CTT
TCP and UDP
• The emphasis of this curriculum is on
TCP/IP Ethernet networks.
• The TCP/IP protocol of the OSI model
Layer 4 (transport layer) has two
protocols - TCP and UDP.
The Saigon CTT
TCP/IP
The Saigon CTT
Port
• Both TCP and UDP use port (or socket)
numbers to pass information to the
upper layers.
The Saigon CTT
Range of ports
• 2 bytes: 0 – 65535.
– Numbers below 255 : for public applications.
– Numbers from 255 - 1023 : assigned to
companies for marketable applications.
– Numbers above 1023 : are unregulated.
• End systems use port numbers to select
proper applications.
• Originating source port numbers are
dynamically assigned by the source
host; usually, it is a number larger than
1023.
The Saigon CTT
Telnet port number
TCP AND UDP
The Saigon CTT
The Saigon CTT
TCP
• TCP supplies a virtual circuit between
end-user applications. These are its
characteristics:
– connection-oriented.
– reliable.
– divides outgoing messages into segments.
– reassembles messages at the destination
station.
– re-sends anything not received.
– reassembles messages from incoming
segments.
The Saigon CTT
TCP Header format
• Protocol that provides reliable full-duplex
data transmission.
The Saigon CTT
TCP Header format: Port number
• Source Port 16 bits.
• Destination Port 16 bits.
The Saigon CTT
TCP Header format: Sequence
• Sequence Number: 32 bits
– The sequence number of the
first data octet in this segment
(except when SYN is present).
The Saigon CTT
TCP Header format: Acknowledgment
• Acknowledgment Number: 32 bits
– This field contains the value of the
next sequence number the sender of
the segment is expecting to receive.
The Saigon CTT
TCP Header format: Code bits
• Control Bits: 8 bits
–
–
–
–
ACK:
RST:
SYN:
FIN:
Acknowledgment field significant
Reset the connection
Synchronize sequence numbers
No more data from sender
The Saigon CTT
TCP Header format: Window
• Window: 16 bits
– The number of data octets beginning
with the one indicated in the
acknowledgment field which the sender
of this segment is willing to accept.
The Saigon CTT
TCP: Three way handshaking
The Saigon CTT
TCP: Simple acknowledgment
The Saigon CTT
TCP: Sliding acknowledgment
The Saigon CTT
TCP: Sequence and acknowledgment
The Saigon CTT
UDP
• UDP transports data unreliably between
hosts. Following are the characteristics:
– Connectionless.
– Unreliable.
– Transmit messages (called user datagrams).
– Provides no software checking for message
delivery (unreliable).
– Does not reassemble incoming messages.
– Uses no acknowledgements.
The Saigon CTT
UDP Header format
• UDP is a simple protocol that exchanges
datagrams, without acknowledgments or
guaranteed delivery.
The Saigon CTT
Preparation for LAB
• Lab companion:
– 12.4.1
The Saigon CTT
Review
• Transport layer regulates information
flow to ensure end-to-end connectivity
between host applications reliably and
accurately.
• TCP and UDP port numbers.
• Three way handshaking and sliding
windows.
SESSION LAYER
The Saigon CTT
The Saigon CTT
Functions
The Saigon CTT
Process
• Dialog control:
– In the conversation, each host plays dual
roles: requesting service and replying with
service. Dialogue control determining which
role they are playing at any given moment.
– Agree a set of guidelines to use during the
communicating with each other.
• Dialog separation:
– Order to Initiate, terminate and manage of
communication.
– Using a checkpoint to synchronize.
The Saigon CTT
Dialog control
The Saigon CTT
Dialog separation
The Saigon CTT
Session layer protocols
The Saigon CTT
Review
• Communication sessions consist of
mini-conversations that occur between
applications located in different network
devices.
• Dialog control.
• Dialog separation.
The Saigon CTT
PRESENTATION LAYER
The Saigon CTT
Functions
The Saigon CTT
Three main functions
The Saigon CTT
Data formatting
The Saigon CTT
Data encryption
The Saigon CTT
Data compression
The Saigon CTT
Review
• Determines how graphic images, sound
and movies are presented. .
• Provides encryption of data.
• Compresses text and converts graphic
images into bit streams so they can be
transmitted across a network.
The Saigon CTT