UNIT2Application Layerppt 2021 12 28 22 50 09
UNIT2Application Layerppt 2021 12 28 22 50 09
UNIT2Application Layerppt 2021 12 28 22 50 09
Unit No:2
Application Layer
Computer
Networks(3150710)
Prof.Abhishek Tiwari
It should be clear that to use the Internet we need two
application programs to interact with each other:
one running on a computer somewhere in the world.
Figure :
Browser:
The URL http://www.mhhe.com/compsci/forouzan/
defines the web page related to one of the of the
computer in the McGraw-Hill company
(the three letters www are part of the host name and
Example are added to the commercial host).
User Agent
2.3.3
(continued) Sending Mail
Receiving Mail
Addresses
Mailing List or Group List
MIME(Multipurpose Internet Mail Extensions)
MIME Headers
MIME is a specification for formatting non-ASCII
messages so that they can be sent over the Internet.
MIME :
Many e-mail clients now support MIME, which enables
them to send and receive graphics, audio, and video
files via the Internet mail system.
Servers insert the MIME header at the beginning of any Web
transmission.
Clients use this header to select an appropriate "player"
application for the type of data the header indicates.
Some of these players are built into the Web client or browser (for
example, all browsers come with GIF and JPEG image players as
Figure 2.25: well as the ability to handle HTML files); other players may need
to be downloaded.
MIME :
Figure 2.26:
MIME header
Table 2.8:
Data Types
and Subtypes
in MIME
Table 2.9:
Methods for
Content-
Transfer-
Encoding
Figure 2.27:
Base64
conversion
Table 2.10:
Base64
Converting
Table
Post Office Protocol (POP3) Internet Message Access Protocol (IMAP)
The POP server listens on port 110, and the he IMAP server listens on port 143, and the
POP with SSL secure(POP3DS) server IMAP with SSL secure(IMAPDS) server listens
listens on port 995 on port 993.
In POP3 the mail can only be accessed from Messages can be accessed across multiple
a single device at a time. devices
To read the mail it has to be downloaded on The mail content can be read partially before
the local system. downloading.
The user can not organize mails in the The user can organize the emails directly on the
mailbox of the mail server. mail server.
The user can not create, delete or rename The user can create, delete or rename email on
email on the mail server. the mail server.
Figure 2.29:
Web-based e-
mail, cases I HTTP Protocol: This is not a dedicated protocol for email communications, but it can be used for accessing your
mailbox also called web based email, this can be used to compose or retrieve emails from an your account. Hotmail
and II is a good example of using HTTP as an email protocol.
• A server program can provide a specific service to its
corresponding client program.
• However, it is impossible to have a client/server pair for
each type of service we need.
• Another solution is to have a specific client/server
program for a set of common scenarios, but to have
2.3.4 TELNET some generic client/server programs that allow a user
on the client site to log into the computer at the server
site and use the services available there.
• We refer to these generic client/server pairs as remote
logging applications.
• One of the original remote logging protocols is
TELNET.
Local versus Remote Logging
User Interface
Figure 2.30:
Local versus
remote
logging
Figure 2.31:
Concept of
NVT
Table 2.11:
Examples of
interface
commands
Although Secure Shell (SSH) is a secure application
program that can be used today for several purposes
such as remote logging and file transfer, it was
originally designed to replace TELNET.
2.3.5 Secure
Shell (SSH) / There are two versions of SSH: SSH-1 and SSH-2, which
are totally incompatible. The first version, SSH-1, is
(SSh) now deprecated(not-approved) because of security
flaws in it.
Port Forwarding
Figure 2.33:
Port
Forwarding:
Figure 2.34:
SSH Packet
Format
Sockets
Two socket types for two transport services:
UDP: unreliable datagram
TCP: reliable, byte stream-oriented
Application Example:
1. Client reads a line of characters (data) from its
Socket keyboard and sends the data to the server.
programming 2. The server receives the data and converts characters
to uppercase.
3. The server sends the modified data to the client.
4. The client receives the modified data and displays the
line on its screen.
Client/server
socket
interaction:
UDP
Client/server
socket
interaction:
TCP
• To identify an entity, TCP/IP protocols use the IP
address, which uniquely identifies the connection of a
host to the Internet.
• However, people prefer to use names instead of
Domain numeric addresses.
• Therefore, the Internet needs to have a directory
Name System system that can map a name to an address.
(DNS): • This is analogous to the telephone network.
• A telephone network is designed to use
telephone numbers, not names.
• People can either keep a private file to map a
name to the corresponding telephone number or can call
the telephone directory to do so.
Name Space
Generic Domains
Country Domains
Resolution
Recursive Resolution
Iterative Resolution
Caching
2.3.1 Resource Records
(continued) DNS Messages
Encapsulation
Registrars
DDNS
Security of DNS
Figure 2.35:
Purpose of
DNS
Figure 2.36: Domain name space:
Domain namespace. Alternatively referred to as a namespace, a
domain namespace is a name service provided by the Internet for
Transmission Control Protocol and Networks/Internet Protocol
(TCP/IP).
DNS is broken up into domains, a logical organization of
computers that exist in a larger network.
Figure 2.36:
Domain name
space:
Figure 2.37:
Domain
names and
labels
Figure 2.38:
Domains
Figure 2.39:
Hierarchy of
name servers
For example, the Domain Microsoft.com may contain all of the
data for Microsoft.com, Marketing.microsoft.com and
Development.microsoft.com. However, the zone
Microsoft.com contains only information for Microsoft.com and
Figure 2.40: references to the authoritative name servers for the sub-domains.
Zone : A zone
is simply a
portion of a
domain
Figure 2.41:
Generic
domains
Table 2.12:
Generic
domain labels
Figure 2.42:
Country
domain
top-level domain (TLD) servers:
responsible for com, org, net, edu, aero,
jobs, museums, and all top-level country
domains, e.g.: uk, fr, ca, jp
Continue.. Network Solutions maintains servers
for .com TLD
Educause for .edu TLD
authoritative DNS servers:
organization’s own DNS server(s), providing
authoritative hostname to IP mappings for
Continue.. organization’s named hosts
Local DNS when host makes DNS query, query is sent to its local
DNS server
name server has local cache of recent name-to-address
translation pairs (but may be out of date!)
acts as proxy, forwards query into hierarchy
recursive
query:
iterated query:
DNS Records