NIIT-ICT Hanoi info@niithanoi.vnOverview • The TCP/IP transport layer does the work of transporting data between applications on source and destination devices.. Transport services inclu
Trang 1Module 11 Transport and Application Layer
NIIT-ICT Hanoi info@niithanoi.vn
Contents
Trang 2NIIT-ICT Hanoi info@niithanoi.vn
Overview
• The TCP/IP transport layer does the work of transporting data between
applications on source and destination devices
• This module will describe the functions and services of this critical layer
of the TCP/IP network model
• Many of the network applicationsthat are found at the TCP/IP
application layer are familiar to even casual network users For
example: HTTP, FTP and SMTP v.v
Introduction
• Transport layer used to transport and regulate the flow of information
from the source to the destination, reliably and accurately End-to-end
control and reliability are provided by sliding windows, sequencing
numbers, and acknowledgments
Trang 3NIIT-ICT Hanoi info@niithanoi.vn
Introduction to transport layer
• The transport layer establishes a logical connectionbetween the
endpoints of the network Transport services segment and reassemble
several upper-layer applicationsonto the same transport layer data
stream
• The transport layer defines end-to-end connectivitybetween host
applications Transport services include the following basic services:
-Segmentation of upper-layerapplication data
- Establishment of end-to-endoperations
-Transport of segmentsfrom one end host to another end host
-Flow controlprovided by sliding windows
-Reliabilityprovided by sequence numbers and acknowledgments
NIIT-ICT Hanoi info@niithanoi.vn
Flow control
• Flow control avoids the problem of a transmitting host overflowing the
buffers in the receiving host TCP provides the mechanism for flow
control by allowing the sending and receiving host to communicate
The two hosts then establish a data-transfer rate that is agreeable to
both
Trang 4NIIT-ICT Hanoi info@niithanoi.vn
Multiplexing
• Multiple applicationscan share the same transport connectionin the
OSI reference model
• Different applications can send data segments on a come,
first-servedbasis The segments that arrive first will be taken care of first
This is referred to as the multiplexing of upper-layer conversations
Establishing a Connection
• One function of the
transport layer is to
establish a
connection-oriented sessionbetween
similar devices at the
application layer For data
transfer to begin, boththe
sending and receiving
applications inform the
respective operating
systems that a connection
will be initiated and the
first handshake requests
synchronization
Trang 5NIIT-ICT Hanoi info@niithanoi.vn
Flow Control
When datagrams arrive too
quickly for a host or gateway
to process and the transport
function can issue a “not
ready”indicator to the
sender to stop sending data
When the receiver can
handle additional data, the
receiver sends a “ready”
transport indicator When
this indicator is received, the
sender can resume the
segment transmission
NIIT-ICT Hanoi info@niithanoi.vn
Three-way handshake
• A three-way handshake is the synchronization process is required for
the connection establish Synchronization is done through an
exchange of connection establishing segments that carry a control bit
called SYN as in the figure
• The three-way handshake is necessary and is required in the
connection-oriented connection
Trang 6NIIT-ICT Hanoi info@niithanoi.vn
Windowing and Acknowledgment
Transmission Control
Protocol (TCP)
• Transmission Control Protocol provides reliable full-duplex data
transmission
• TCP is responsible for breaking messages into segments,
reassembling them at the destination station, resending anything that is
not received, and reassembling messages from the segments, uses a
virtual circuit between end-user applications
Trang 7NIIT-ICT Hanoi info@niithanoi.vn
TCP Header format:
NIIT-ICT Hanoi info@niithanoi.vn
• Source Port 16 bits.
• Destination Port 16 bits.
Trang 8NIIT-ICT Hanoi info@niithanoi.vn
• Sequence Number: 32 bits
– The sequence number of the
first data octet in this segment (except when SYN is present).
– The sequence number of the
first data octet in this segment (except when SYN is present).
• Acknowledgment Number: 32 bits
– This field contains the value of the
next sequence number the sender of
the segment is expecting to receive.
– This field contains the value of the
next sequence number the sender of
the segment is expecting to receive.
Trang 9NIIT-ICT Hanoi info@niithanoi.vn
• Control Bits: 8 bits
– ACK: Acknowledgment field significant
– RST: Reset the connection
– SYN: Synchronize sequence numbers
– FIN: No more data from sender
• Control Bits: 8 bits
– ACK : Acknowledgment field significant
– RST : Reset the connection
– SYN : Synchronize sequence numbers
– FIN : No more data from sender
NIIT-ICT Hanoi info@niithanoi.vn
• 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 number of data octets beginning
with the one indicated in the
acknowledgment field which the sender
of this segment is willing to accept.
Trang 10NIIT-ICT Hanoi info@niithanoi.vn
TCP header fields
• Source & Destination port – Number of the calling, called port
• Sequence number – Number used to ensure correct sequencing of
the arriving data
• Acknowledgment number – Next expected TCP octet
• HLEN – Number of 32-bit words in the header
• Reserved – Set to zero
• Code bits – Control functions, such as setup and termination of a
session
• Window – Number of octets that the sender is willing to accept
• Checksum – Calculated checksum of the header and data fields
• Urgent pointer – Indicates the end of the urgent data
• Option – One option currently defined, maximum TCP segment size
• Data – Upper-layer protocol data
User Datagram Protocol (UDP)
• UDP is a simpleprotocol that exchanges datagrams, without
acknowledgments or guaranteed delivery Error processing and
retransmission must be handled by higher layer protocols
• UDP is designed for applications that do not need to put
sequencesof segments together
Trang 11NIIT-ICT Hanoi info@niithanoi.vn
UDP header fields
• Source port – Number of the calling port
• Destination port – Number of the called port
• Length – Number of bytes including header and data
• Checksum – Calculated checksum of the header and data fields
• Data – Upper-layer protocol data
• The protocols that use UDP include:
- TFTP (Trivial File Transfer Protocol)
- SNMP (Simple Network Management Protocol)
- DHCP (Dynamic Host Control Protocol)
- DNS (Domain Name System)
NIIT-ICT Hanoi info@niithanoi.vn
TCP and UDP port numbers
• Both TCP and UDP use port (socket) numbers to pass information
to the upper layers.Port numbers are used to keep track of
different conversationscrossing the network at the same time
Trang 12NIIT-ICT Hanoi info@niithanoi.vn
TCP and UDP port numbers
• Application software developers agree to use well-known port numbers
that are issued by the Internet Assigned Numbers Authority (IANA)
• Numbers < 1024are considered well-known ports numbers
• Numbers > 1024are dynamically assignedports numbers
• Registered port numbersare those registered for vendor-specific
applications.Most of these are above 1024
TCP and UDP port numbers
• End systems use port numbers to select the proper application The
source host dynamically assigns originating source port numbers
These numbers are always greater than 1024
Trang 13NIIT-ICT Hanoi info@niithanoi.vn
Introduction to the TCP/IP application layer
When the TCP/IP model was designed, the session and presentation layers from the OSI model were bundled into the
application layer of the TCP model This means that issues of
representation, encoding, and dialog control are handled in the application layer rather than in separate lower layers as
in the OSI model
NIIT-ICT Hanoi info@niithanoi.vn
Domain Name System(DNS)
• A domain naming system was developed in order to associate the
contents of the site with the address of that site The Domain Name
System (DNS) is a system used on the Internet for translating names
of domains and their publicly advertised network nodes into IP
addresses
.
Trang 14NIIT-ICT Hanoi info@niithanoi.vn
Domain Name System(DNS)
com vn
.
Address
of com server
Address
of com
server Address of
yahoo.com server
Address of
yahoo.com
server
Address of www.yahoo.com
Address of
www.yahoo.com
Address of
www.yahoo.com
Address of
www.yahoo.com
Request
Reply
File Transfer Protocol (FTP)
FTP is a reliable,
connection-oriented servicethat uses TCP
to transfer files between
systems that support FTP The
main purpose of FTP is to
transfer files from one computer
to another by copying and
moving files from servers to
clients, and from clients to
servers
Trang 15NIIT-ICT Hanoi info@niithanoi.vn
Trivial File Transfer Protocol (TFTP)
• TFTP is a connectionless service that uses User Datagram Protocol
(UDP).TFTP is used on the router to transfer configuration filesand
Cisco IOS imagesand to transfer files between systems that support
TFTP TFTP has no provisions for user authentication It operates
faster than FTP and in a stable environmentit works reliably
NIIT-ICT Hanoi info@niithanoi.vn
Hypertext Transfer Protocol (HTTP)
• Hypertext Transfer Protocol (HTTP) works with the World Wide Web,
which is the fastest growing and most used part of the Internet A Web
browser is a client-server application
• The Web pages are created with a format language called Hypertext
Markup Language (HTML)
Trang 16NIIT-ICT Hanoi info@niithanoi.vn
Simple Mail Transfer Protocol (SMTP)
• When a mail server receives a message destined for a local client, it stores that
message and waits for the client to collect the mail
• The most popular mail client protocols are POP3 and IMAP4, which both use
TCP to transport data Even though mail clients use these special protocols to
collect mail, they almost always use SMTP to send mail
• When checking the configuration of a mail client, verify that the SMTP and POP
or IMAP settings are correctly configured A good way to test if a mail server is
reachable is to Telnet to the SMTP port (25) or to the POP3 port (110).
Simple Network Management Protocol (SNMP)
The Simple Network
Management Protocol
(SNMP) is an application
layer protocol that
facilitates the exchange of
management information
between network devices
SNMP enables network
administrators to manage
network performance, find
and solve network
problems, and plan for
network growth.SNMP
uses UDP as its transport
layer protocol
Trang 17NIIT-ICT Hanoi info@niithanoi.vn
Key Component of SNMP
• Network management system (NMS) – NMS executes applications
that monitor and control managed devices The bulk of the processing
and memory resourcesrequired for network management are provided
by NMS One or more NMSsmust exist on any managed network
• Managed devices – Managed devices are network nodes that contain
an SNMP agentand that reside on a managed network Managed
devices collect and store management information and make this
information available to NMSs using SNMP Managed devices,
sometimes called network elements, can be routers, access servers,
switches, and bridges, hubs, computer hosts, or printers
• Agents – Agents are network-management software modulesthat
reside in managed devices An agent has local knowledge of
management information and translates that information into a form
compatible with SNMP
NIIT-ICT Hanoi info@niithanoi.vn
Telnet
Telnet client software provides the ability to login to a remote Internet host
that is running a Telnet server application and then to execute
commands from the command line
Trang 18NIIT-ICT Hanoi info@niithanoi.vn
Summary
• The functions of the TCP/IP transport layer
• Flow control
• The processes of establishing a connection between peer systems
• Windowing
• Acknowledgment
• Transport layer protocols
• TCP and UDP header formats
• TCP and UDP port numbers
• The processes and protocols at the TCP/IP application layer
• Domain Name Services, File Transfer Protocols, Simple Mail Transfer
Protocol
• Simple Network Management Protocol, Telnet