Chapter 10 Accessible - Application Layer - N
Chapter 10 Accessible - Application Layer - N
Chapter 10
Application Layer
Data Communications and
Networking, With TCP/IP
protocol suite
Sixth Edition
Behrouz A. Forouzan
© 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom.
No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC.
Chapter 10: Outline
10.1 Introduction
The idea of the Web was first proposed by Tim Berners-Lee in 1989
at CERN, the European Organization for Nuclear Research, to
allow several researchers at different locations throughout Europe
to access each others’ researches. The commercial Web started in
the early 1990s.
HTTP per se does not provide security. However, HTTP can be run
over the Secure Socket Layer (SSL). In this case, HTTP is referred
to as HTTPS. HTTPS provides confidentiality, client and server
authentication, and data integrity.
The data connection uses the well-known port 20 at the server site.
However, the creation of a data connection is different from the
control connection. The following shows the steps:
2. Using the PORT command the client sends the port number to
the server..
3. The server receives the port number and issues an active open
using the well-known port 20 and the received ephemeral port
number.
The FTP protocol was designed when security was not a big issue.
Although FTP requires a password, the password is sent in
plaintext (unencrypted), which means it can be intercepted and
used by an attacker. The data transfer connection also transfers
data in plaintext, which is insecure. To be secure, one can add a
Secure Socket Layer between the FTP application layer and the
TCP layer. In this case FTP is called SSL-FTP. We also explore
some secure file transfer applications when we discuss SSH later in
the chapter.
Based on the common scenario (Figure 10.19), we can say that the
e-mail is one of those applications that needs three uses of client-
server paradigms to accomplish its task. It is important that we
distinguish these three when we are dealing with e-mail. Figure
10.22 shows these three client-server applications. We refer to the
first and the second as Message Transfer Agents (MTAs), the third
as Message Access Agent (MAA).
To show the three mail transfer phases, we show all of the steps
described above using the information depicted in Figure 10.23. In
the figure, we have separated the messages related to the envelope,
header, and body in the data transfer section. Note that the steps in
this figure are repeated two times in each e-mail transfer: once from
the e-mail sender to the local mail server and once from the local
mail server to the remote mail server. The local mail server, after
receiving the whole e-mail message, may spool it and send it to the
remote mail server at another time.
The first and second stages of mail delivery use SMTP. However,
SMTP is not involved in the third stage because SMTP is a push
protocol; it pushes the message from the client to the server. In
other words, the direction of the bulk data (messages) is from the
client to the server. On the other hand, the third stage needs a pull
protocol; the client must pull messages from the server. The
direction of the bulk data is from the server to the client. The third
stage uses a message access agent.
$nslookup www.forouzan.biz
Name: www.forouzan.biz
Address: 198.170.240.179
DNS can use either UDP or TCP. In both cases the well-known port
used by the server is port 53. UDP is used when the size of the
response message is less than 512 bytes because most UDP
packages have a 512-byte packet size limit. If the size of the
response message is more than 512 bytes, a TCP connection is
used. In that case, one of two scenarios can occur.
When the DNS was designed, no one predicted that there would be
so many address changes. In DNS, when there is a change, such as
adding a new host, removing a host, or changing an IP address, the
change must be made to the DNS master file. These types of
changes involve a lot of manual updating. The size of today’s
Internet does not allow for this kind of manual operation.
Internet users that are ready to share their resources become peers
and form a network. When a peer in the network has a file) to
share, it makes it available to the rest of the peers. An interested
peer can connect itself to the computer where the file is stored and
download it. After a peer downloads a file, it can make it available
for other peers to download. As more peers join and download that
file, more copies of the file become available to the group.
www.mheducation.com
© 2022 McGraw Hill, LLC. All rights reserved. Authorized only for instructor use in the classroom.
No reproduction or further distribution permitted without the prior written consent of McGraw Hill, LLC.