Download presentation
Presentation is loading. Please wait.
Published byJulian Mitchell Parker Modified over 7 years ago
1
Application Layer DNS Mail protocol (SMTP, POP, IMAP)
Web services (WWW, HTTP, HTTPS, FTP) telnet Client server and P2P application Relation between Application layer and Transport layer. Prepared By: Er. Bednidhi Rijal
2
Domain Name System (DNS)
There are two ways to identify a host Host name IP address People prefer the hostname identifier whereas routers prefer fixed-length, hierarchically structured IP address In order to reconcile these preferences, DNS translates hostnames to IP addresses. The DNS is A distributed database implemented in a hierarchy of DNS servers, and An application-layer protocol that allows hosts to query the distributed database. The DNS protocol runs over UDP and uses port 53 Different application layer protocols including HTTP, SMTP, and FTP use DNS to translate user supplied hostnames to IP addresses. Prepared By: Er. Bednidhi Rijal
3
How DNS Works? (How DNS translate hostname to IP address?)
Application program calls a library procedure called the resolver, passing it the name as a parameter The resolver sends a UDP packet to a local DNS server (at port 53) DNS server looks up the name and returns the IP address to the resolver Resolver returns it to the application Armed with the IP address, the program can then establish a TCP connection with the destination or send it UDP packets Prepared By: Er. Bednidhi Rijal
4
The same user machine runs the client side of the DNS application.
What happens when a browser running on some user’s host requests ? The same user machine runs the client side of the DNS application. The browser extracts the hostname, from the URL and passes the hostname to the client side of the DNS application. The DNS client sends a query containing the hostname to a DNS server. The DNS client eventually receives a reply, which includes the IP address for the hostname. Once the browser receives the IP address from DNS, it can initiate a TCP connection to the HTTP server process located at port 80 at that IP address. Prepared By: Er. Bednidhi Rijal
5
DNS Services Translating hostname to IP (Main services of DNS)
Host Aliasing A host with a complicated hostname can have one or more alias names Alias host-names are more mnemonic than canonical hostnames Eg. relay1.west-coast.enterprise.com (Canonical host names)enterprise.com (alias name) DNS can be invoked to obtain the canonical hostname for a supplied alias hostname as well as the IP address of the host Mail server aliasing DNS can be invoked by a mail application to obtain the canonical hostname for a supplied alias hostname as well as the IP address of the host Prepared By: Er. Bednidhi Rijal
6
Contd.. Load distribution
DNS is also used to perform load distribution among replicated servers, such as replicated Web servers. For replicated Web servers, a set of IP addresses is thus associated with one canonical hostname. The DNS database contains this set of IP addresses. When clients make a DNS query for a name mapped to a set of addresses, the server responds with the entire set of IP addresses, but rotates the ordering of the addresses within each reply. Prepared By: Er. Bednidhi Rijal
7
Name Space Maps each address to a unique name Can be categorized into:
Flat name space Name (sequence of character without structure) is assigned to an address E.g. Morgan, Kist college, tribhuvan university etc. Problem: cannot be used in a large system such as the Internet because it must be centrally controlled to avoid ambiguity and duplication Hierarchical name space Each name is of several parts. The first part can define nature of organization, second part can the name of an organization, third part can define departments in the organization and so on. E.g. etc. In this case, the authority to assign and control the name spaces can be decentralized Prepared By: Er. Bednidhi Rijal
8
Domain Name Each 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) Domain Names are case insensitive. Can be: Fully qualified domain name (FQDN) If a label is terminated by a null string, it is called FQDN E.g. , etc. Partially qualified domain name (PQDN) If a label is not terminated by a null string, it is called a PQDN E.g. , etc. Prepared By: Er. Bednidhi Rijal
9
Domain names and Labels
Prepared By: Er. Bednidhi Rijal
10
The Web and HTTP The World Wide Web (WWW) is a repository of information in which the documents (called web pages) are distributed all over the world and related documents are linked together. The WWW project was initiated by CERN (European Laboratory for Particle Physics) to create a system to handle distributed resources necessary for scientific research. Besides retrieving of linked documents, WWW can be used to provide electronic shopping, gamming, radio programs, or television program etc. HTTP is the protocol used to retrieve information from the Web. Prepared By: Er. Bednidhi Rijal
11
Overview of HTTP (HyperText Transfer Protocol)
HTTP is the Web’s application layer protocol and is used to retrieve the content from the web 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; the client uses a temporary port number HTTP uses the services of TCP HTTP is stateless protocol because it does not maintain any information about clients. Prepared By: Er. Bednidhi Rijal
12
HTTP request-response behavior
When user requests a Web page (for example, clicks on a hyperlink), the browser sends HTTP request messages for the objects in the page to the server. The server receives the requests and responds with HTTP response messages that contain the objects. Prepared By: Er. Bednidhi Rijal
13
Non-Persistent versus Persistent Connections
If multiple objects of the web page need to be retrieved are located at different server, than it requires to create multiple new connections However if some of the objects are located on the same server, than we have two choices To retrieve each object using a new TCP connection. This method is called non-persistent connections To make a (one) TCP connection and retrieve them all. This method is called persistent connections Prepared By: Er. Bednidhi Rijal
14
Web Caching (Proxy server)
A Web cache---also called a proxy server---is a network entity that satisfies HTTP requests on the behalf of an origin Web server. The Web cache has its own disk storage and keeps copies of recently requested objects in this storage. A user’s browser can be configured so that all of the user’s HTTP requests are first directed to the Web cache. Once a browser is configured, each browser request for an object is first directed to the Web cache Prepared By: Er. Bednidhi Rijal
15
Contd.. Advantage: Problem:
Highly reduce the response time for a client request Reduces the web traffic in the Internet as a whole, thereby improving performance for all applications Problem: The copy of an object residing in the cache may be stale Prepared By: Er. Bednidhi Rijal
16
Contd.. Prepared By: Er. Bednidhi Rijal
17
HTTPS (HyperText Transfer Protocol, secured)
HTTP does not provide security but HTTPS does. When HTTP run over the Secure Socket Layer (SSL) then it is called HTTPS It provides confidentiality, client and server authentication, and data integrity Prepared By: Er. Bednidhi Rijal
18
File Transfer: FTP (file transfer protocol)
FTP is an application layers protocol used to transfer files to or from a remote host FTP is better choice for transferring large files or to transfer files using different format. FTP uses TCP services The user interacts with FTP through an FTP user agent. The user first provides the hostname of the remote host, causing the FTP client process in the local host to establish a TCP connection with the FTP server process in the remote host. The user then provides the user identification and password, which are sent over the TCP connection as part of FTP commands. Prepared By: Er. Bednidhi Rijal
19
Contd.. Once the server has authorized the user, the user copies one or more files stored in the local file system into the remote file system (or vice versa) Prepared By: Er. Bednidhi Rijal
20
FTP connection FTP uses two parallel TCP connections to transfer a file: control connection, and used for sending control information between the two hosts—information such as user identification, password, commands to change remote directory, and commands to “put” and “get” files Use port number 21 data connection The data connection is used to actually send a file. Use port number 20. Because FTP uses a separate control connection, FTP is said to send its control information out-of-band. Prepared By: Er. Bednidhi Rijal
21
Contd.. Prepared By: Er. Bednidhi Rijal
22
How Data transfer takes place using FTP?
When a user starts an FTP session with a remote host, the client side of FTP (user) first initiates a control TCP connection with the server side (remote host) on server port number 21. The client side of FTP sends the user identification, password, commands to change the remote directory over this control connection. When the server side receives a command for a file transfer over the control connection (either to, or from, the remote host), the server side initiates a TCP data connection to the client side. Prepared By: Er. Bednidhi Rijal
23
Contd.. FTP sends exactly one file over the data connection and then closes the data connection. If, during the same session, the user wants to transfer another file, FTP opens another data connection. Thus, with FTP, the control connection remains open throughout the duration of the user session, but a new data connection is created for each file transferred within a session (i.e., the data connections are non-persistent) Prepared By: Er. Bednidhi Rijal
24
Electronic Mail (e-mail)
It allows user to exchange messages Architecture A simple consists of three components A user agent (UA) A message transfer agent (MTA) A message access agent (MAA) Prepared By: Er. Bednidhi Rijal
25
User agent (UA) UA is the first component of E-mail system
It provides service to the user to make the process of sending and receiving a message easier It is a software package that composes, reads, replies to, and forwards messages. It also handles local mailboxes on the user computers Two types: Command driven UA (e.g. mail, pine and elm) GUI-based UA (e.g. Eudora and Outlook) The user through the UA creates mail for sending Prepared By: Er. Bednidhi Rijal
26
Contd.. UA notifies the user of new receiving mail Mail address:
UA usually displayed a list of mail in which each line contains a summary of the information about a particular message in the mailbox Summary of information includes: sender mail address, the subject, and the time the mail was received or sent Mail address: Used to deliver to its destination Consists of two parts: local parts (defines the name of special file called the user mailbox where all mail received for the user is stored) and domain name (defines mail servers or exchangers) and is separated sign Eg. (morgan—local parts and gmail.com—domain name) Prepared By: Er. Bednidhi Rijal
27
Message Transfer Agent (MTA)
MTA is involved during transferring or sending mail. Formal protocol that defines the MTA in the internet is called SMTP Mail transfer phase: The process of transferring a message occurs in three phase Connection Establishment: After a client has made TCP connection 0n port 25, the SMTP server starts the connection phase Message Transfer: After connection has been established between the SMTP client and server, a single message between a sender and one or more recipients can be exchanged Connection Termination: After the message is transferred successfully, the client terminates the connection Prepared By: Er. Bednidhi Rijal
28
Message Access Agent (MAA)
MAA is used for pulling or retrieving mail from mail box Two protocols are available: Post Office Protocol (POP3) version 3, and Internet Mail Access Protocol version 4 (IMAP4) Prepared By: Er. Bednidhi Rijal
29
SMTP (Simple Mail Transfer Protocol)
SMTP is used for sending Mail SMTP accepts incoming connections and copies messages from them into the appropriate mailboxes. If a message cannot be delivered, an error report containing the first part of the undeliverable message is returned to the sender. SMTP is a simple ASCII protocol (i.e. cannot be used for sending image, video, Unicode etc.) Transferring of mail occurs in three phases (i.e. connection establishment, mail transfer, and connection termination) which is described below: Prepared By: Er. Bednidhi Rijal
30
Contd.. After establishing the TCP connection to port 25, the sending machine waits for the receiving machine to talk first. The server starts by sending its identity and telling whether it is prepared to receive mail. If it is not, the client releases the connection and tries again later. If the server is willing to accept , the client announces whom the is coming from and whom it is going to. If such a recipient exists at the destination, the server gives the client the go-ahead to send the message. Then the client sends the message and the server acknowledges it. When all the has been exchanged in both directions, the connection is released. Prepared By: Er. Bednidhi Rijal
31
MIME (Multipurpose Internet Extension)
This protocol is used along with SMTP and it extends the capability of SMTP hence called a supplementary protocol It allows non-ASCII data (image, audio, video, non-Latin alphabets, text in different language like newari, japnese, chinese etc.) to be sent through MIME transforms non ASCII data to standard ASCII data at the sender site and transforms back to the original data at the receiving site Prepared By: Er. Bednidhi Rijal
32
POP3 (Post Office Protocol version 3)
POP3 is simple but limited in functionality It is used to pull or retrieve messages from mail server The client POP3 software is installed on the recipient computer, the server POP3 software is installed on the mail server. Mail access starts with the clients when the user needs to download its form the mailbox on the mail server The client opens a connection to the server on TCP port 110 It then sends its user name and password to access to the mailbox Prepared By: Er. Bednidhi Rijal
33
Contd.. The user can then list and retrieve the mail messages, one by one POP3 has two modes: Delete mode: The mail is deleted from the mailbox after each retrieval Keep mode: The mail remains in the mailbox after retrieval Limitation It does not allow the user to organize mail on the server The user cannot have different folders on the server It does not allow the user to partially check the contents of the mail before downloading Prepared By: Er. Bednidhi Rijal
34
Internet Mail Access Protocol, version 4 (IMAP4)
IMAP4 is more powerful and more complex than POP3 It completely fulfill the deficiency exist in POP3 and provides additional functionality which are listed below: A user can check the prior to downloading A user can search the contents of the for a specific string of characters prior to downloading A user can partially download A user can create, delete or remove mailboxes on the mail server A user can create a hierarchy of mailboxes in a folder for storage Prepared By: Er. Bednidhi Rijal
35
TELNET (Terminal NETwork)
It allows a user on one computer to log into the remote computer and use the services available there Although it requires logging name and password, it is vulnerable to hacking because it sends all data including the password in plaintext (not encrypted) Prepared By: Er. Bednidhi Rijal
36
Secure Shell (SSH) It is also used for remote logging (alternative of TELNET and is used when security is concerned) and is more secured (i.e. less vulnerable to hacking) It sends all data including the password in encrypted form Prepared By: Er. Bednidhi Rijal
37
Network Application Architecture
Possible structure of applications: client-server Architecture peer-to-peer (P2P) Architecture Prepared By: Er. Bednidhi Rijal
38
Client-server architecture
always-on host Services requests from many other hosts, called clients permanent IP address data centers for scaling clients: communicate with server may be intermittently connected may have dynamic IP addresses do not communicate directly with each other Client server architecture are often infrastructure intensive, since they require service providers to purchase, install, and maintain server farms. Example of Client server architecture: Web application, FTP, Telenet, and . Prepared By: Er. Bednidhi Rijal
39
Peer-to-Peer (P2P) Architecture
Minimal or no reliance on always-on servers Arbitrary end systems directly communicate peers request service from other peers, provide service in return to other peers self-scalability – new peers bring new service capacity, as well as new service demands P2P architectures are cost effective, since they do not require power-full server. peers are intermittently connected and change IP addresses complex management P2P application includes: Bit Torrent, eMule and LimeWire, Internet Telephony (Eg. Skype), and IPTV (eg. PPLive) Prepared By: Er. Bednidhi Rijal
40
Relationship between Application layer and Transport layer
Transport layer distinguish each process running at application layer uniquely with port number. Transport layer encapsulate the data either in UDP datagram or TCP segment received from the Application layer and send it to the Network layer at the source and at the destination it generates the original data and send to the appropriate process at the application layer. Transport layer provides logical connection between processes. Prepared By: Er. Bednidhi Rijal
41
ASSIGNMENT Why HTTP is called stateless protocol?
What is web? How WWW works? What is DNS? Explain the importance of DNS. What are function of DNS? Explain how it works? What is ? Explain its merit and demerit. Explain the architecture of What is the difference between SMTP and MIME? What is the difference between POP3 and IMAP4? What is the difference between SSH and TELNET? What is FTP? Explain how data transfer takes place using FTP? Differentiate between persistence and non persistence connection. Write the standard port number for FTP, DNS, SMTP, POP3, IMAP4, SSH, TELNET, HTTP, HTTPS. Write one-one example of FQDNS and PQDNS. Prepared By: Er. Bednidhi Rijal
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.