Unit 9 Application Layer
Unit 9 Application Layer
9.1 Application layer and its function: The SMTP model is of two type:
1. End-to- end method
Application Layer
2. Store-and- forward method
The application layer is the top most layer of OSI Model. Manipulation of
data(information) in various ways is done in this layer which enables user or software to get The end to end model is used to communicate between different organizations whereas the
store and forward method are used within an organization. A SMTP client who wants to
access to the network. Some services provided by this layer includes: E-Mail, transferring
send the mail will contact the destination’s host SMTP directly in order to send the mail to
files, distributing the results to user, directory services, network resources, etc.
the destination. The SMTP server will keep the mail to itself until it is successfully copied
The Application Layer contains a variety of protocols that are commonly needed by users.
to the receiver’s SMTP.
One widely-used application protocol is HTTP (Hypertext Transfer Protocol), which is
The client SMTP is the one which initiates the session let us call it as the client- SMTP and
the basis for the World Wide Web. When a browser wants a web page, it sends the name of
the server SMTP is the one which responds to the session request and let us call it as
the page it wants to the server using HTTP. The server then sends the page back.
Other Application protocols that are used are: File Transfer Protocol (FTP), Trivial File receiver-SMTP. The client- SMTP will start the session and the receiver-SMTP will
respond to the request.
Transfer Protocol (TFTP), Simple Mail Transfer Protocol
(SMTP), TELNET, Domain Name System (DNS) etc.
Functions of Application Layer:
1. Mail Services: This layer provides the basis for E-mail forwarding and storage.
2. Network Virtual Terminal: It allows a user to log on to a remote host. The
application creates software emulation of a terminal at the remote host. User's
computer talks to the software terminal which in turn talks to the host and vice
versa. Then the remote host believes it is communicating with one of its own
terminals and allows user to log on.
3. Directory Services: This layer provides access for global information about
various services.
4. File Transfer, Access and Management (FTAM): It is a standard mechanism to Both the SMTP-client and MSTP-server should have 2 components:
access files and manages it. Users can access files in a remote computer and 1. User agent (UA)
manage it. They can also retrieve files from a remote computer. 2. Local MTA
Communication between sender and the receiver:
The senders, user agent prepares the message and send it to the MTA. The MTA
functioning is to transfer the mail across the network to the receivers MTA. To send mail, a
system must have the client MTA, and to receive mail, a system must have a server MTA.
Sending email:
Mail is sent by a series of request and response messages between the client and a server.
The message which is sent across consists of a header and the body. A null line is used to
terminate the mail header. Everything which is after the null line is considered as the body
9.2 Electronic mail: SMTP of the message which is a sequence of ASCII characters. The message body contains the
Email is emerging as one of the most valuable services on the internet today. Most of the actual information read by the receipt.
internet systems use SMTP as a method to transfer mail from one user to another. SMTP is Receiving email:
a push protocol and is used to send the mail whereas POP (post office protocol) or IMAP The user agent at the server side checks the mailboxes at a particular time of intervals. If
(internet message access protocol) are used to retrieve those mails at the receiver’s side. any information is received it informs the user about the mail. When the user tries to read
SMTP: the mail, it displays a list of mails with a short description of each mail in the mailbox. By
SMTP is an application layer protocol. The client who wants to send the mail opens a TCP selecting any of the mail user can view its contents on the terminal.
connection to the SMTP server and then sends the mail across the connection. The SMTP
server is always on listening mode. As soon as it listens for a TCP connection from any
client, the SMTP process initiates a connection on that port (25). After successfully
establishing the TCP connection the client process sends the mail instantly.
9.3 File transfer: FTP Efficient: It is more efficient as we do not need to complete all the operations to get the
o FTP stands for File transfer protocol. entire file.
o FTP is a standard internet protocol provided by TCP/IP used for transmitting the files Security: To access the FTP server, we need to login with the username and password.
from one host to another. Therefore, we can say that FTP is more secure.
o It is mainly used for transferring the web page files from their creator to the computer Back & forth movement: FTP allows us to transfer the files back and forth. Suppose
that acts as a server for other computers on the internet. you are a manager of the company, you send some information to all the employees,
o It is also used for downloading the files to computer from other servers. and they all send information back on the same server.
Objectives of FTP Disadvantages of FTP:
o It provides the sharing of files. FTP Lacks Security
o It is used to encourage the use of remote computers. Not All Vendors Are Created Equal
o It transfers the data more reliably and efficiently. Encryption isn’t a Given
Mechanism of FTP FTP can be Vulnerable to Attack
Compliance is an Issue
It’s Difficult to Monitor Activity
9.4 Dynamic Host Configuration Protocol (DHCP):
It is an application layer protocol which is used to provide:
1. Subnet Mask (Option 1 – e.g., 255.255.255.0)
2. Router Address (Option 3 – e.g., 192.168.1.1)
3. DNS Address (Option 6 – e.g., 8.8.8.8)
4. Vendor Class Identifier (Option 43 – e.g., ‘Unifi’ = 192.168.1.9 ##where Unifi =
controller)
The above figure shows the basic model of the FTP. The FTP client has three components DHCP is based on a client-server model and based on discovery, offer, request, and ACK.
the user interface, control process, and data transfer process. The server has two DHCP port number for server is 67 and for the client is 68. It is a Client server protocol
components: the server control process and the server data transfer process. which uses UDP services. IP address is assigned from a pool of addresses.
There are two types of connections in FTP: Advantages:
centralized management of IP addresses
ease of adding new clients to a network
reuse of IP addresses reducing the total number of IP addresses that are required
simple reconfiguration of the IP address space on the DHCP server without needing
to reconfigure each client
The DHCP protocol gives the network administrator a method to configure the network
from a centralized area.
o Control Connection: The control connection uses very simple rules for With the help of DHCP, easy handling of new users and reuse of IP address can be
communication. Through control connection, we can transfer a line of command or line achieved.
of response at a time. The control connection is made between the control processes. Disadvantages:
The control connection remains connected during the entire interactive FTP session. IP conflict can occur
o Data Connection: The Data Connection uses very complex rules as data types may 9.5 DNS, HTTP, WWW
vary. The data connection is made between data transfer processes. The data DNS:
connection opens when a command comes for transferring the files and closes when the DNS is a host name to IP address translation service. DNS is a distributed database
file is transferred. implemented in a hierarchy of name servers. It is an application layer protocol for message
Advantages of FTP: exchange between clients and servers.
Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest There are various kinds of DOMAIN:
ways to transfer the files from one computer to another computer. Generic domain: .com(commercial) .edu(educational) .mil(military) .org (nonprofit
organization) .net (similar to commercial) all these are generic domain.
Country domain .in (india) .us .uk HTTP:
Inverse domain if we want to know what is the domain name of the website. Ip to Hypertext Transfer Protocol (HTTP) is an application-layer protocol for transmitting
domain name mapping. So, DNS can provide both the mapping for example to find the hypermedia documents, such as HTML. It was designed for communication between web
IP addresses of geeksforgeeks.org then we have to type ns lookup browsers and web servers, but it can also be used for other purposes. HTTP is a stateless
www.geeksforgeeks.org. protocol, meaning that the server does not keep any data (state) between two requests.
Organization of Domain HyperText Transfer Protocol is the communications protocol used to connect to Web
servers on the Internet or on a local network (intranet). Its primary function is to establish a
connection with the server and send HTML pages back to the user's browser. It is also used
to download files from the server either to the browser or to any other requesting
application that uses HTTP.
Addresses of websites begin with an http:// prefix; however, Web browsers typically
default to the HTTP protocol. For example, typing www.yahoo.com is the same as
typing http://www.yahoo.com. In fact, only yahoo.com has to be typed in. The browser
adds the rest.
WWW:
WWW stands for World Wide Web. A technical definition of the World Wide Web is:
It is very difficult to find out the IP address associated to a website because there are all the resources and users on the Internet that are using the Hypertext Transfer Protocol
millions of websites and with all those websites we should be able to generate the IP (HTTP). A broader definition comes from the organization that Web inventor Tim
address immediately, there should not be a lot of delay for that to happen organization of Berners-Lee helped found, the World Wide Web Consortium (W3C). The World Wide
database is very important. Web is the universe of network-accessible information, an embodiment of human
DNS record – Domain name, IP address what is the validity?? what is the time to live ?? knowledge.
and all the information related to that domain name. These records are stored in tree like In simple terms, The World Wide Web is a way of exchanging information between
structure. computers on the Internet, tying them together into a vast collection of interactive
Namespace – Set of possible names, flat or hierarchical. Naming system maintains a multimedia resources.
collection of bindings of names to values – given a name, a resolution mechanism returns Internet and Web is not the same thing: Web uses internet to pass over the information.
the corresponding value –
Name server – It is an implementation of the resolution mechanism. DNS (Domain Name
System) = Name service in Internet – Zone is an administrative unit; domain is a subtree.
Name to Address Resolution
WWW Architecture
WWW architecture is divided into several layers as shown in the following diagram:
The host request the DNS name server to resolve the domain name. And the name server
returns the IP address corresponding to that domain name to the host so that the host can
future connect to that IP address.