Ch6.A CN Application Layer
Ch6.A CN Application Layer
Ch6.A CN Application Layer
(CT 702)
Sharad Kumar Ghimire
Department of Electronics and Computer Engineering
Pulchowk Campus
Institute of Engineering
Tribhuvan University
Nepal
Chapter 6
Application Layer
S. K. Ghimire
Chapter #6: Application Layer
Web: HTTP & HTTPS
File Transfer: FTP, PuTTY, WinSCP
Electronic Mail: SMTP, POP3, IMAP
DNS
P2P Applications
Socket Programming
Application server concept: proxy caching, Web/Mail/DNS server optimization
Concept of traffic analyzer: MRTG, PRTG, SNMP, Packet tracer, Wireshark
- S. K. Ghimire
Contents
Application Layer
DNS
- S. K. Ghimire
Application Layer
Application Layer
Closest to the end user
Protocols at this layer help to exchange data between programs running on the
source and destination hosts
TCP/IP application layer performs the functions defined at upper three layers of
the OSI model
Application Layer
Presentation and Session Layer
TCP/IP Application Layer Protocols
HTTP & HTTPS
Hypertext Transfer Protocol HTTP
A web address or URL is a reference to a web server
Using DNS, the server name portion of the URL is translated to the corresponding
IP address before the server can be contacted
HTTP
Client/server protocol
An extension of the Hypertext Transfer Protocol (HTTP), that is used for secure
communication over a computer network, and is widely used on the Internet
The protocol is therefore also often referred to as HTTP over TLS, or HTTP over
SSL
Why HTTPS? HTTP + SSL ⇒ HTTPS
While clicking online shopping merchant the browser address bar says HTTPS
instead of HTTP
The information is safe, because the website we are working with has made sure
that no one can steal the information
Establishes two connections between the hosts - one is for data transfer, the other
for control information (i.e., commands and responses)
The data transfer connection also transfers data in plaintext, which is insecure
To be secure, we can add a Secure Socket Layer between the FTP application
layer and the TCP layer and in this case the FTP is called SSL-FTP
For secure transmission that protects the username and password, and encrypts
the content, FTP is often secured with SSL/TLS (FTPS) or replaced with SSH File
Transfer Protocol (SFTP)
PuTTY
A free and open-source terminal emulator, serial console and network file transfer
application
Supports network protocols and network file transfer application including SCP,
SSH, Telnet, rlogin, serial console and so on
Supports many variations on the secure remote terminal, and provides user
control over the SSH (Secure Shell) encryption key and protocol version
Originally written for Microsoft Windows, but it has been ported to various other
operating systems
WinSCP (Windows Secure Copy)
A free and open-source SFTP, FTP etc. client for Microsoft Windows for secure
file transfer between a local and a remote computer
WinSCP also offers basic file manager and file synchronization functionality
For secure transfers, it uses Secure Shell (SSH) and supports the SCP protocol in
addition to SFTP
Based on the implementation of the SSH protocol from PuTTY and FTP protocol
HTTP and FTP protocols request specific files from remote computers, but not to
actually be logged on as a user of that computer but with Telnet, we can log on as
a regular user with whatever privileges may have been granted
Electronic Mail
SMTP, POP3, IMAP
Electronic Mail (E-mail)
Store-and-forward method of sending, storing, and
retrieving electronic messages
Different protocols:
● SMTP (sending)
● POP (retrieving)
● IMAP (retrieving)
SMTP Operation
SMTP requires a message header and body
The header must have a properly formatted recipient email address and a sender
address
The server receives the message and stores the message in a local mailbox or
relays the message to another mail server
SMTP Operation
Email clients are used to retrieve messages stored on the server
● IMAP and
● POP
POP Operation
Messages are downloaded from the server to the client
Email clients direct their POP requests to mail servers on port TCP 110
The POP client and server exchange commands and responses until the
connection is closed or aborted
POP allows for email messages to be downloaded to the client’s device (computer
or phone) and removed from the server
POP Operation
No centralized location to store
messages after read
The original messages reside on the server until manually deleted by the user
Users can create a folder hierarchy on the server to organize and store mail
IMAP Operation
DNS
DNS: The Internet Directory Service
Domain Name Service (DNS) provides mapping between host name & IP address
Domain refers to a group of hosts that are under the administrative control of a
single entity, such as a company or government agency
At very top level, a small number of domains that encompass the entire Internet
Domain Names
DNS Database
DNS is based on a hierarchical database containing resource records (RRs)
RRs (resource records) include the name, IP address, and other information about
hosts
DNS Database
Provides name-to-address directory service for network applications that need to
locate specific servers, e.g. every time a Web page is accessed, there must be a
DNS name lookup to determine the IP address of the Web server
A resolver module in the local host or local ISP formulates a query for a local
name server in the same domain as the resolver
The local name server checks to see if the name is in its local database or cache,
and, if so, returns the IP address to the requestor; otherwise, the name server
queries other available name servers, starting down from the root of the DNS tree
or as high up the tree as possible
When a response is received at the local name server, it stores the name/address
mapping in its local cache and may maintain this entry for the amount of time
specified in the time to live field of the retrieved RR
DNS Hierarchy
The DNS protocol uses a hierarchical system, with the root at the top and
branches below. The naming structure is broken down into small, manageable
zones
Requests for zone not stored in a specific DNS server are forwarded to other
servers for translation
Top-level domains represent either the type of domain or the country of origin,
examples of top-level domains are:
● .com - a business or industry
● .org - a non-profit organization
● .au - Australia
13 root name servers at top of hierarchy share responsibility for top level zones
DNS Hierarchy
List of Root Servers
Name Resolution
Query begins with name resolver on host
Not all name servers support recursion, especially critical servers near the top of
the hierarchy
Registrar must also be provided with the names and IP addresses of authoritative
DNS servers in the new domain to make web-pages and e-mails in the new
domain ‘visible’ from outside
http://www.icann.org/registrars/accredited-list.html