Unit-IV, 2nd Half, Application Layer
Unit-IV, 2nd Half, Application Layer
2 types
Applications – Provide the human (user) interface. Relies on lower
layers to complete the communication process.
Client/server model
Advantages:
Centralized administration
Security is easier to enforce
Peer-to-peer networking and applications
Client/Server Model
Client –
device requesting information (initiates the data exchange)
Can also UPLOAD data to the servers
TCP
FTP – 20-21
Telnet – 23
SMTP – 25
DNS – 53 (Both TCP & UDP)
HTTP – 80
UDP
DHCP – 67 & 68
POP – 110
Domain Name System (DNS)
Each terminal in network has an unique IP address and a name (name space).
A name space that maps each address to a unique name can be organized in
two ways: flat or hierarchical
In a flat name space, a name is assigned to an address. A name in this space is
a sequence of characters without structure.
In a hierarchical name space, each name is made of several parts.
An example given below in which TCP/IP uses a DNS client and a DNS server to
map a name to an address. A user wants to use a file transfer client to access the
corresponding file transfer server running on a remote host. The user knows only
the file transfer server name, such as afilesource.com. However, the TCP/IP suite
needs the IP address of the file transfer server to make the connection. The
following six steps map the host name to an IP address:
The user passes the host name to the file transfer client.
The file transfer client passes the host name to the DNS client.
Each computer, after being booted, knows the address of one DNS server. The DNS client
sends a message to a DNS server with a query that gives the file transfer server name using
the known IP address of the DNS server.
The DNS server responds with the IP address of the desired file transfer server.
The DNS server passes the IP address to the file transfer client.
The file transfer client now uses the received IP address to access the file transfer Server.
Domain Name System (DNS)
DNS is used for designing hierarchical name space
Example of hierarchical name space: www.staffs.ac.uk, www.fcet.staffs.ac.uk,
gawains.staffs.ac.uk, blackboard.staffs.ac.uk
In this design the names are defined in an inverted-tree structure with the root at
the top. The tree can have only 128 levels: level 0 (root) to level 127
Domain Name and Label
Domain Name
Each node in the tree has a domain name. A full domain name is a
sequence of labels separated by dots (.). The domain names are always
read from the node up to the root. The last label is the label of the root
(null). This means that a full domain name always ends in a null label,
which means the last character is a dot because the null string is nothing.
If a label is terminated by a null string, it is called a fully qualified
domain name (FQDN).
DNS Server
Stores domain name space information within its domain/sub-
domain.
DSN Services and Protocol
The HyperText Transfer Protocol (HTTP) is used to define how the client-server
programs can be written to retrieve web pages from the Web. An HTTP client
sends a request; an HTTP server returns a response. The server uses the port
number 80.
HTTP uses the services of TCP. This means that, before any transaction between
the client and the server can take place, a connection needs to be established
between them. After the transaction, the connection should be terminated.
WWW Service and HTTP
Steps:
1) URL is typed in the address bar.
2) Browser checks with DNS server to convert it to an IP address
3) Connects to the server requested
4) Using HTTP or HTTPS protocol requirements, the browser sends a GET
request to the server to ask for the desired html document (usually
index.html)
5) The server sends the HTML code for the web page to the browser.
6) The browser interprets the HTML code and formats the page to fit the
browser window.
WWW Service and HTTP
HTTP/HTTPS are
some of the MOST
used application
protocols!
E-mail services and SMTP/POP protocols
E-mail is the most popular network service.
E-mail client (when people compose e-mail) is called Mail User Agent
(MUA)
MUA allows messages to be sent/retrieved to and from your mailbox
Requires several applications and services
POP or POP3 – deliver email from server to client (incoming messages)
SMTP – handles outbound messages from clients
E-mail services and SMTP/POP protocols
What do servers require?
1) Must be running SMTP!
2) Also operates
1) Mail Transfer Agent (MTA) – used to forward email
1)Receives email from the clients MUA
2)Uses SMTP to route email between SERVERS!
3)Passes email to the MDA for final delivery
2) Mail Delivery Agent (MDA) – receives messages from MUA
or from the MTA on another server
3) For two e-mail servers to talk – MUST run SMTP and MTA in
order to transfer mail between the 2 servers!
E-mail services and SMTP/POP protocols
FTP
Commonly used application layer protocol
Allows for the transfer of files between clients/servers.
Requires 2 connections to the server
1) Commands – uses TCP port 21
2) Actual data – uses TCP port 20
DHCP
Dynamic Host Configuration Protocol – enables devices to obtain IP
addresses, subnet masks, gateways, DNS server information, etc. from a
DHCP server.
An IP address that is not being used is assigned from a range of available
addresses
Not permanently assigned – only leased for a specific period of time
(usually 24 hours – 7 days)
If the host logs off or the power is lost, the IP address they were using is
returned to the pool to be re-assigned to another host when needed.
This is how you are able to use Wi-Fi at various places in the world!
Don’t use DHCP for devices such as servers, printers, routers, switches,
etc. These should be statically assigned.
Telnet
Developed in the early 1970’s – among the oldest of the application layer
protocols and services in the TCP/IP protocol suite.
Allows users to follow text-based terminal devices over the network using
software.
A connection is known as a ‘virtual terminal (vty)’ session.
Can be run from the command prompt on a PC.
You can use the device as if you were sitting there with all the rights and
priorities that you username will offer you.
TELNET requires a logging name and password, it is vulnerable to hacking
because it sends all data including the password in plaintext (not encrypted). A
hacker can eavesdrop and obtain the logging name and password. Because of
this security issue, the use of TELNET has diminished in favor of another
protocol, Secure Shell (SSH).
Telnet