SlideShare a Scribd company logo
APPLICATION LAYER
PRINCIPLES OF NETW ORK APPLICATIONS
1
PRINCIPLES OF NETW ORK APPLICATIONS
2
Transport services availableto applications
▪ Reliable data transfer:Loss-tolerantapplications
▪ Throughput
▪ Bandwidth-sensitiveapplications
▪ Elastic applications
▪ Timing
▪ Security
Application architecture
▪ Client-Server
▪ Peer-to-Peer(P2P)
PRINCIPLES OF NETW ORK APPLICATIONS
3
Application-layer protocols
▪ The types of messagesexchanged, for example, request messagesand response messages.
▪ The syntaxof the various messagetypes,such as the fields in the messageand how the fields are delineated.
▪ The semanticsof the fields,that is,the meaning of the informationin the fields.
▪ Rules for determiningwhen and how a process sends messagesand responds to messages.
Transport services provided by Internet
▪ TCP
▪ Connection-oriented
▪ Reliabledatatransfer
▪ UDP
▪ Connectionless
▪ Unreliable datatransfer
PRINCIPLES OF NETW ORK APPLICATIONS
4
Processes communicating
▪ Exchangemessages: In the context of acommunication sessionbetweena pair of processes,the process that
initiates the communication(that is,initially contactstheother process atthe beginningof the session) is
labeled as the client.
▪ The process that waitsto be contactedto begin the session is the server
.
▪ Socket interface
▪ Application ProgrammingInterface (API)
▪ Addressing processes
▪ IP address
▪ Port number
SOME N ETW ORK APPS
5
▪ Email
▪ Web
▪ T
ext Messaging
▪ Remote Login
▪ P2p File Sharing
▪ Multi-user Network Games
▪ Streaming StoredVideo (Y
outube, Netflix, Amazon Prime)
▪ Voice Over Ip (Skype)
▪ Real-timeVideo Conferencing
▪ Social Networking
▪ Search
W ORLD WIDE WEB - W W W
◾ The World Wide Web (WWW) isa repository of information linkedtogether
frompoints allover the world.
◾ The W W W has a unique combination of flexibility
, portability
, and user-
friendly features that distinguishit from other services provided
by the Internet.
◾ The W W W project was initiated by CERN (European Laboratory for
Particle Physics) to create a
 systemto handle distributedresources necessaryfor scientific research.
◾ In this chapter we first discuss issues related to the Web. We then discuss a
protocol, HTTP
,that is usedto retrieveinformationfrom theWeb. 6
WEB
◾ A Web service is a method of communicationbetweentwo electronicdevicesover a network.
◾ It is asoftwarefunctionprovided at a network address over the Web with the service always on as in the concept
of utility computing.
◾ The term Web services describes a standardized way of integrating Web-based applications using the
XML(extensible Markup Language, SOAP(Simple Object Access Protocol), WSDL(Web Services Description
Language) and UDDI (Universal Description Discovery and Integration) open standards over an Internet protocol
backbone.
◾ XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available
and UDDI is used for listingwhatservices are available.
◾ Web services allow different applications from different sources to communicate with each other without time-
consuming custom coding, and because allcommunicationis in XML,
◾ Web services are not tied to any one operating system or programming language.For example, Javacan talk with
Perl,Windows applicationscan talk with UNIX applications. 7
ARCHITECTURE
◾ The W WW today is a distributed client-server service,in
which a client using a browser can access a service using
a server. However
, the service provided is distributed
over many locationscalled sites,as shown in Figure.
◾ Each site holds one or more documents,referred to as
Web pages.
◾ Each Web page can contain a link to other pages in the
same siteor atother sites.
◾ The pages can be retrieved and viewed by using
browsers.
◾ The client needs to see some information that it knows
belongs to siteA.
◾ It sends a request through its browser
,a program that is
designedto fetchWeb documents. 8
ARCHITECTURE
◾ The request, among other information, includes the
address of the siteand theWeb page,called the URL.
◾ The server at site A finds the document and sends it to
the client.
◾ When the user views the document, she finds some
references to other documents, including a Web page at
siteB.The reference has the URL for the new site.
◾ The user is also interested in seeing this document. The
client sends another request to the new site, and the
new page is retrieved.
9
CLIENT
◾ A varietyof venders offer commercialbrowsers that interpret and display a web document,and all use nearly the
same architecture.
◾ Eachbrowser usually consistsof three parts:acontroller,client protocol,and interpreters.
◾ The controller receives input from the keyboard or the mouse and uses the client programs to access the
document.
◾ After the document has been accessed, the controller uses one of the interpreters to display the document on
the screen.The client protocol can be one of the protocols described previously such as FTP
.
◾ The interpreter can be HTML, Java,or JavaScript,dependingon thetype of document as shown
10
SERVER
11
◾ The web page is stored at the server
.
◾ Eachtime a client request arrives,thecorresponding document is sent to the client.
◾ To improve efficiency
,servers normally store requested files in a cache in memory;memory is faster to access
than disk.
◾ A server can also become more efficient through multithreading or multiprocessing.In this case, a server can
answer more than one request ata time.
UNIFORM RESOURCE LOCATOR
12
◾ The uniform resource locator (URL) is a standardfor specifying any kind of informationon the Internet.
◾ The URL defines four things: protocol,host computer
, port,and path
◾ The protocol is the client/server program used to retrievethe document.
◾ The host is the computer on which the information is located, although the name of the computer can be an
alias. Web pages are usually stored in computers, and computers are given alias names that usually begin with
the characters"www".
◾ The URL can optionally contain the port number of the server
. If the port is included, it is inserted between
the host and the path,and it is separatedfrom the host by a colon.
◾ Path is the pathname of the file where the information is located. Note that the path can itself contain slashes
that,in the UNIX operatingsystem,separatethedirectories from the subdirectories and files.
UNIFORM RESOURCE LOCATOR
13
◾ Method:The method is the protocol used to retrievethe document from a server
. For example, HTTP
.
◾ Host: The host is the computer where the information is stored, and the computer is given an alias name. Web
pages are mainly stored in the computers and the computers are given an alias name that begins with the
characters"www".This field is not mandatory
.
◾ Port: The URL can also contain the port number of the server, but it's an optional field. If the port number is
included, then it must come betweenthe host and path and it should be separatedfrom the host by a colon.
◾ Path: Path is the pathname of the file where the information is stored. The path itself contain slashes that
separate thedirectories from the subdirectories and files.
COOKIES
14
◾ The World Wide Web was originally designedasa statelessentity
.
◾ A client sends a request;aserver responds.Their relationshipis over
.
◾ The originaldesign ofWWW, retrieving publicly available documents,exactlyfits this purpose.
◾ T
oday theWeb has other functions;some are listedhere.
◾ Some websitesneed to allowaccessto registered clientsonly
.
◾ Websites are being used as electronic stores that allow users to browse through the store,selectwanted
items,put them in an electroniccart,and pay at the end with acredit card.
◾ Some websitesare used as portals:theuser selectstheWeb pages he wantsto see.
◾ Some websitesare just advertising. For these purposes,the cookie mechanismwas devised.
WEB DOCUMENT
15
◾ The documents in theWWW can be grouped into broad categories:
◾ Static,
◾ Dynamic,and
◾ Active.
◾ The categoryis basedon the time at which the contents of the document are determined.
STATIC DOCUMENTS
16
◾ Static documents are fixed-content documentsthat are createdand stored in a server
.
◾ The client can get only a copy of the document.
◾ In other words,the contents of the file are determined when the file is created, not when it is used.
◾ Of course, the contents in the server can be changed, but the user cannot change them. When a client accesses
the document,acopy of the document is sent.
◾ The user can then use a browsing program to display the document.
EXAMPLE FOR STATIC DOCUMENTS
17
Hypertext Markup Language (HTML)
◾ HTML is a language for creatingWeb pages.
◾ The term markup language comes from the book publishingindustry
.
◾ Before a book is typeset and printed, a copy editor reads the manuscriptand puts marks on it.
◾ These marks tell the compositor how to formatthe text.
◾ For ex.,if the copy editor wants part of a line to be printed in boldface, the user draws a wavy line under that
part. In the sameway
,data for a web page are formattedfor interpretationby abrowser.
DYNAMIC DOCUMENTS
◾ A dynamic document is createdby aWeb server whenever abrowser requests the document.
◾ When arequest arrives,theWeb server runs an application program or ascript that createsthe dynamic
document.
◾ The server returns theoutput of theprogram or script as a response to the browser that requested the
document.
◾ Because a fresh document is created for each request, the contents of a dynamic document can vary from one
request to another
.
◾ A very simple example of a dynamic document is the retrieval
of the timeand date from aserver
.
◾ Time and date are kinds of informationthat are dynamic in that
they change from moment to moment.
◾ The client can ask the server to run aprogram such as the
date program in UNIX and send the result of the program to
the client
18
EXAMPLE FOR DYNAMIC DOCUMENTS
19
Common Gateway Interface (CGI)
◾ The Common Gateway Interface (CGI) is a technology that
creates and handles dynamicdocuments.
◾ CGI is a set of standards that defines how a dynamic document is
written, how data are input to the program, and how the output
result is used.
◾ CGI is not a new language; instead, it allows programmers to use
any of several languages such as C, C++, Bourne Shell, C Shell, or
Perl.
◾ The only thingthat CGI defines is a set of rules and terms that the
programmermust follow
.
ACTIVE DOCUMENTS
20
◾ For many applications, we need a program or a script to be run at the client site.
◾ These are called active documents. For example, suppose we want to run a program that creates animated
graphicson the screen or a program that interacts withthe user
.
◾ The program definitely needs to be run at the client site where the animation or interactiontakes pace.
◾ When a browser requests an active document,theserver sends a copy of the document or a script.
◾ The document is then run atthe client (browser) site.
EXAMPLE FOR ACTIVE DOCUMENTS
 JavaApplets
◾ One way to create an active document is to use Java applets. Java is a combination of a
high-level programming language, a run-time environment, and a browser to run it. It can
also be astand-aloneprogram that doesn’tusea browser.
◾ An applet is a program written in Java on the server
. It is compiled and ready to be run.
The document is in byte- code (binary) format.
◾ The client process (browser) createsan instanceof this applet and runs it.
◾ A java applet can be run by the browser in
two ways. In the first method, the browser
can directly request the Java applet program
in the URL and receive the applet in binary
form.
◾ In the second method,thebrowser can retrieve and run an HTML file
 that hasembedded the address of the applet as a tag.
21
similarbut needs two transactions
HYPERTEXT TRANSFER PROTOCOL
◾ The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia
informationsystems.
◾ HTTP is the foundationof data communicationfor theWorldWide Web.
◾ The HTTP protocol can be used to transferthe data in the form of plain text,hypertext,audio,video, and so on.
◾ Hypertext is structured text that uses logical links (hyperlinks) betweennodes containing text.
◾ HTTP is the protocol to exchangeor transferhypertext.
◾ HTTP is an application layer protocol designedwithinthe framework of the Internet Protocol Suite.
◾ Its definition presumes an underlying and reliable transport layer protocol, and Transmission Control Protocol
(TCP) is commonly used.
◾ However HTTP can use unreliable protocols such as the User DatagramProtocol (UDP).
◾ HTTP resources are identified and locatedon the network by Uniform Resource Locators (URLs). 22
HYPERTEXT TRANSFER PROTOCOL
23
◾ This protocol is known as HyperTextTransferProtocol becauseof its efficiency that allowsus to use in a
hypertext environmentwhere there are rapid jumps from one document to another document.
◾ HTTP is similarto the FTP as it also transfersthe files from one host to another host.But,HTTP is simpler than
FTP as HTTP uses only one connection,i.e.,no control connection to transferthe files.
◾ HTTP is used to carry the data in the form of MIME-like format.
◾ HTTP is similarto SMTP as the data is transferred betweenclient and server.The HTTP differs from the SMTP in
the way the messagesare sent from the client to the server and from server to the client.SMTP messagesare
stored and forwarded while HTTP messagesaredeliveredimmediately
.
FEATURES OF HTTP
◾ Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a
request and waits for a response from the server
. When the server receives the request,
the server processes the request and sends back the response to the HTTP client after
which the client disconnects the connection. The connection between client and server
exist only during the current request and response time only
.
◾ Media independent: HTTP protocol is a media independent as data can be sent as long
as both the client and server know how to handle the datacontent. It is required for both
theclient and server to specify thecontent type in MIME-type header
.
◾ Stateless: HTTP is a stateless protocol as both the client and server know each other
only during the current request. Due to this nature of the protocol, both the client and
server do not retaintheinformationbetween variousrequests of the web pages.
24
HTTP CONNECTIONS
◾ Non-Persistent Connection: It requires connection setupagain and again for each object to send.
◾ Persistent connection: It does not require connection setup again and again. Multiple objects can use
connection.
◾ The built-inHTTP request methods.
HTTP Transactions
25
WEB AND HTTP
26
First,a review
◾ web page consists of objects
◾ object can be HTML file,JPEG image,Javaapplet,audio file,…
◾ web page consists of base HTML-file which includesseveralreferencedobjects
◾ each object is addressable by a URL,e.g.,
HTTP
27
OVERVIEW
HTTP:HypertextTransfer Protocol
◾ Web’
s applicationlayer protocol
◾ Client/Server Model
◾ Client: browser that requests,receives, (usingHTTP
protocol) and“displays”Web objects
◾ Server: Web server sends (using HTTP protocol)
objects in response to requests
HTTP MESSAGES
28
◾ HTTP messages are of two types: request and
response. Both the message types follow the same
message format.
◾ Request Message: The request message is sent by
the client that consists of a request line, headers, and
sometimes a body
.
◾ Response Message: The response message is sent
by the server to the client that consists of a status
line,headers, and sometimesabody
.
HTTP Messages
Request Response
HTTP REQUEST MESSAGE
29
Two types of HTTP messages: request,response
◾ HTTP request message: ASCII (human-readable format), therequest messageis sent by the client that
consists of a request line,headers, and sometimesa body
.
HTTP RESPONSE MESSAGE
◾ HTTP response message
◾ A response messageconsists of a status line, a
header
,andsometimesabody
.
◾ Status Line: The status line defines the status of
the response message. It consists of the HTTP
version, a space, a status code, a space, and a status
phrase.•
◾ HTTP version: This field is the same as the
correspondingfieldintherequestline.
◾ Status code: The status code field is similar to
those in the FTP and the SMTP protocols. It
consists of threedigits.
◾ Other most common codes are listedinT
able
◾ Status Phrase:This fieldexplains the codein text
form. 30
STATUS CODES
31
HTTP RESPONSE STATUS CODES
◾ Status code appearsin 1st line in server-to-clientresponse message.
Some sample codes:
◾ 200 OK
◾ request succeeded,requested object later in this message
◾ 301 Moved Permanently
◾ requested object moved,new location specified later in this message (Location:)
◾ 400 Bad Request
◾ request message not understood by server
◾ 404 Not Found
◾ requested document not found on this server
◾ 505 HTTP Version Not Supported 32
UPLOADING FORM INPUT
◾ POST method:
◾ web page often includes form input
◾ input is uploaded to server in entity body
◾ URL method:
◾ uses GET method
◾ input is uploadedin URL field of request line:
33
METHOD TYPES
◾ deletes file specifiedin the URL field
HTTP/1.0:
◾ GET
◾ POST
◾ HEAD
◾ asks server to leave requested object out of response
HTTP/1.1:
◾ GET
,
◾ POST
,
◾ HEAD
◾ PUT
◾ uploads file in entitybody to path specifiedin URL field
◾ DELETE
34
WEB CACHES (PROXY SERVER)
35
GOAL: satisfy client request without involving origin server
◾ User Sets Browser:
◾ Web accesses via cache
◾ browser sends all HTTP requests to cache
◾ object in cache:
◾ cache returns object
◾ else cache requests object from origin server, then returns
object to client
MORE ABOUT WEB CACHING
36
◾ Cache acts as both client and server
◾ Server for originalrequesting client
◾ Client to origin server
◾ T
ypically cache is installed by ISP (university
, company
,residentialISP)
W hyW eb caching?
◾ Reduce response time for client request
◾ Reduce traffic on an institution’s accesslink
◾ Internet dense with caches: enables “poor” content providers to effectively deliver content (so too does P2P
file sharing)
ELECTRONIC MAIL
37
◾ The earliestand the most common application of the Internet is electronicmail or email.
◾ Email is a store-and-forward application.
◾ This means amessagecan be sent to someone not currently connectedto the Internet.
◾ The messagecan remainin the systemuntilthe recipientretrievesit.
◾ The email application allowsa user to send messagesover a private network or the globalInternet.
◾ Email supports:
◾ Sendinga singlemessage to one or more recipients.
◾ Sendingmessagesthat includetext,voice, video, or graphics.
◾ Organization of message-basedcriteria suchas priority
FIRST SCENARIO IN ELECTRONIC MAIL
38
When the sender and the receiver of an e-mail are on the samesystem, we need only two user agents.
SECOND SCENARIO IN ELECTRONIC MAIL
39
◾ When the sender and the receiver of an e-mail are on different systems,we need two UA’s and a pair of MTA’s
(CLIENTAND SERVER)
THIRD SCENARIO IN ELECTRONIC MAIL
40
◾ When thesender is connectedto the mail server via aLAN or aWAN, we need two UA’s and two pairs ofMTA’s
(clientand server).
FOURTH SCENARIO IN ELECTRONIC MAIL
41
◾ When both sender and receiver are
connected to the mail server via a LAN or a
WAN we need two a LAN or a WAN, we
need two UA’
s, two pairs of MTA’
s and a pair
of MAA’
s and apair of MAAs.
◾ This is the most common situationtoday
PUSH VERSUS PULL IN ELECTRONIC EMAIL
42
SERVICES OF USER AGENT
43
◾ Some examplesof command-drivenuser agents are mail,pine,and elm.
◾ Some examplesof GUI-based user agents are Eudora,Outlook ,and Netscape.
FORMAT OF AN E-MAIL AND E-MAIL ADDRESS
44
E-mail address
Format of an e-mail
E-MAIL
Architecture and Services
◾ The sendingof electronicmail in the Internet requires these components:
◾ user agents (UAs),
◾ Mail/ Message transferagents (MTAs),
◾ Mail/ MessageAccessagents (MAAs),and
◾ the protocol that controls mail delivery
Typically
,e-mail systems support five basic functions:
1.Composition
2.Transfer
3.Reporting
4.Displaying
5.Disposition 45
RFC 822
 Message Formats RFC 822
◾ Messages consist of a primitiveenvelope (described in RFC 821),some number of
header fields,a blank line, and then the message body
.
◾ Eachheaderfield (logically)consistsof asingleline ofASCII textcontainingthefieldname,
acolon,and,for most fields,a value.
◾ RFC 822 was designeddecadesago and does not clearly distinguishthe envelopefields
from the header fields.
◾ Some fieldsused in the RFC 822 message header
.
46
MULTIPURPOSE INTERNET MAIL EXTENSION
47
◾ MIME IS now widely used.
◾ The basic idea of MIME is to continue to use the
RFC 822 format, but to add structure to the
message body and define encoding rules for
non-ASCII messages.
◾ By not deviating from RFC 822, MIME messages
can be sent using the existing mail programs and
protocols.
MIME HEADER
48
◾ MIME defines five new messageheaders, as shown in Fig.Thefirstof these simplytells theuser agent receivingthe
messagethatit is dealing with a MIME message, and which version of MIME it uses.
FILE TRANSFER PROTOCOL - FTP
◾ File Transfer Protocol (FTP) is the standard mechanism for one of the most common tasks on the Internet,
copyinga file from one computer to another
.
◾ FTP differs from other client-server applications inthat it establishes twoconnections betweenthe hosts.
◾ One connection is used for data transfer
,the other for control information(commandsand responses).
◾ Separationof commands and data transfermakesFTP more efficient.
◾ The control connection uses very simplerules of communication.
◾ The data connection, on the other hand, needs more complex rules due to the variety of data types
transferred.
◾ FTP is the Internet standard for moving or transferring files from one computer to another using TCP or IP
networks.FileT
ransfer Protocol is also known as RFC 959.
◾ File Transfer Protocol (FTP) is a client/server protocol used for transferringfiles to or from a host computer
. FTP
may be authenticated withuser names and passwords.
◾ Publicly available files are oftenfound in aspecified directory and can be easily transferred to a user’s computer
. 49
HISTORY OF FTP
◾ The original FTP specification was written by Abhay Bhushan and published as RFC 114 on April 16, 1971. This
was later replacedby RFC 765 (June 1980).
◾ The first FTP client applications used the DOS command prompt with standardized commands and syntax. Since
then, many graphical user interface (GUI) clients have been developed within operating systems, making it easier
for the user to upload and download files.
◾ There are various typesof FTP and differentuse cases:
◾ An FTP siteis a web site where users can easily upload or download specific files.
◾ FTP by mail allows users without access to the Internet to access and copy files using anonymous FTP by
sending an email message to ftpmail@decwrl.dec.com and putting theword help in the body of the text.
◾ FTP Explorer is an FTP client based onWindows 95 file manager (Windows 95 Explorer).
◾ An FTP server is a dedicated computer which provides an FTP service.This invites hackers and necessitates
security hardware or softwaresuch as utilizing usernames,passwords and file accesscontrol.
◾ An FTP client is acomputer application which accessesanFTP server
. While doing so,users should bloc5
k0
incomingFTP connection attemptsusingpassivemode and should check for viruses on all downloaded files.
OBJECTIVES OF FTP
51
◾ It provides the sharing of files.
◾ It is used to encourage the use of remote computers.
◾ It transfersthe data more reliably and efficiently
.
WHY FTP?
52
◾ Although transferringfiles from one systemto another is very simpleand straightforward,butsometimesit can
causeproblems.
◾ For example,
◾ T
wo systems may have differentfile conventions.
◾ T
wo systems may have differentways to represent text and data.
◾ T
wo systems may have differentdirectory structures.
◾ FTP protocol overcomes theseproblems by establishing twoconnections betweenhosts.
◾ One connection is used for data transfer
,and another connection is used for the control connection.
THE BASIC MODEL OF FTP
53
Following figure shows the basic model of FTP.
◾ The client has three components:
◾ the user interface,
◾ the client control process,and
◾ the client data transfer process.
◾ The server has two components:
◾ the server control process and
◾ the server data transfer process.
◾ The control connection is made between the
control processes.
◾ The data connection is made between the
data transferprocesses.
TYPES OF CONNECTIONS IN FTP
◾ Control Connection: The control connection uses very simple rules for
communication. Through control connection, we can transfer a line of command or line
of response at a time. The control connection is made between the control processes.
The control connection remainsconnectedduring theentireinteractive FTP session.
◾ Data Connection: The Data Connection uses very complex rules as data types may
vary
. The data connection is made between data transfer processes. The data connection
opens when a command comes for transferring the files and closes when the file is
transferred.
 T
ypes of connections
54
Control connection Data connection
TRANSMISSION MODES FOLLOWED IN FTP
55
◾ FTP can transfera file across the data connection by using one of the followingthree transmission modes:
◾ Stream mode,
◾ Block mode,and
◾ Compressed mode.
◾ The stream mode is the default mode.Data are delivered from FTP to TCP as a continuous stream of bytes.
TCP is responsible for chopping data into segmentsof appropriatesize.
◾ In block mode,datacan be delivered from FTP toTCP in blocks.
◾ In the compressed mode, ifthe fileis big,thedata can be compressed.The compression methodnormallyused
is run-length encoding
FTP CLIENTS
◾ FTP client is a program that implementsa file transfer protocol which allows you to
transfer files between two
 hosts on the internet.
◾ It allows a user to connect to aremote host and upload or download the files.
◾ It has a set of commands that we can use to connect to a host,transfer the files
between you and your host and close the connection.
◾ The FTP program is also available as a built-incomponent in a Web browser.This GUI
based FTP client makesthe file transfervery easyand also does not require to remember
the FTP commands.
56
ADVANTAGES OF FTP
57
◾ Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest way to transferthefiles from
one computer to another computer
.
◾ Efficient: It is more efficient as we do not need to completeall the operations to get the entire file.
◾ Security: To accesstheFTP server
, we need to login with the username and password.Therefore,wecan say that
FTP is more secure.
◾ Back & forth movement: FTP allows us to transferthe files back and forth.Suppose you are a manager of the
company
,you send some informationto all the employees, and they all send informationbackon the sameserver
.
DISADVANTAGES OF FTP
◾ The standard requirement of the industry is that all the FTP transmissions should be
encrypted. However, not all the FTP providers are equal and not all the providers offer
encryption.So,we willhaveto look out for theFTP providers that provides encryption.
◾ FTP serves two operations, i.e., to send and receive large files on a network. However
,
the size limit of the file is
 2GB that can be sent. It also doesn't allow you to run simultaneous transfers to multiple
receivers.
◾ Passwords and file contents are sent in clear text that allows unwanted eavesdropping. So,
it is quite possible that attackers can carry out the brute force attack by trying to guess
the FTP password.
◾ It is not compatible with every system.
58
SIMPLE MAIL TRANSFER PROTOCOL - SMTP
◾ Store - and - forward method
◾ Email is emergingas one of the most valuable services on the internettoday
.
◾ Most of the internetsystemsuse SMTP as a method to transfermail from one user to another
.
◾ SMTP is a push protocol and is used to send the mail whereas
◾ POP (post office protocol) or IMAP (internet messageaccess protocol) are used to retrieve those mails at the
receiver’s side.
◾ It provides a mail exchangebetweenusers on the sameor different computers,and it also supports:
◾ It can send a singlemessage to one or more recipients.
◾ Sendingmessagecan includetext,voice, video or graphics.
◾ It can also send the messageson networks outside the internet.
◾ The SMTPmodel is of two type :
◾ End - to - end method
59
SMTP COMMANDS
60
Some SMTP Commands:
◾ HELO – Identifiesthe client to the server
, fully qualified domain name,only sent once per session
◾ MAIL – Initiate amessagetransfer
,fully qualified domainof originator
◾ RCPT – Follows MAIL, identifies an addressee,typically the fully qualified name of the addresseeand for multiple
addresseesuse one RCPT for each addressee
◾ DATA – send datalineby line.
The main purpose of SMTP is used to set up communication rules between servers. The servers have a way of
identifying themselves and announcing what kind of communication they are trying to perform. They also have a way
of handling the errors such as incorrect email address.
For example,ifthe recipientaddress is wrong,then receivingserver reply with an error messageof some kind.
COMPONENTS OF SMTP
61
◾ First,we will break the SMTP client and SMTP server into two components such as user agent (UA) and mail
transferagent (MTA).
◾ The user agent (UA) prepares the message, createstheenvelopeand then puts the messagein the envelope.
◾ The mail transferagent (MTA) transfersthis mail across the internet.
COMPONENTS OF SMTP
62
◾ SMTP allows amore complex system by adding a relaying system.
◾ Insteadof just having one MTA at sending side and one at receiving side, more MTAs can be added, acting either
as a client or server to relay theemail.
COMPONENTS OF SMTP
63
◾ The relaying system withoutTCP/IP protocol can also be used to send the emails to users,and this is achieved by
the use of the mail gateway
.
◾ The mail gateway is a relay MTA that can be used to receivean email.
WORKING OF SMTP
◾ Composition of Mail: A user sends an e-mail by composing an electronic mail message using a Mail User Agent
(MUA). Mail User Agent is a program which is used to send and receive mail. The message contains two parts: body and
header
. The body is the main part of the message while the header includes information such as the sender and recipient
address. The header also includes descriptive information such as the subject of the message. In this case, the message
body is like a letterand headeris like an envelope that containstherecipient'saddress.
◾ Submission of Mail: After composing an email, the mail client then submits the completed e-mail to the SMTP server
by using SMTP onTCP port 25.
◾ Delivery of Mail: E-mail addresses contain two parts: username of the recipient and domain name. For example,
vivek@gmail.com, where "vivek" is the username of the recipient and "gmail.com" is the domain name.
If the domain name of the recipient's email address is different from the sender's domain name, then MSA will send the
mail to the Mail Transfer Agent (MTA). To relay the email, the MTA will find the target domain. It checks the MX record
from Domain Name System to obtain the target domain. The MX record contains the domain name and IP address of
the recipient'sdomain. Once the record is located, MTA connects to theexchangeserver to relay the message.
◾ Receipt and Processing of Mail: Once the incoming message is received, the exchange server delivers it to the
incoming server (Mail DeliveryAgent) which stores the e-mail whereit waitsfor the user to retrieveit.
◾ Access and Retrieval of Mail: The stored email in MDA can be retrieved by using MUA (Mail User Agent). MUA ca6
n4
be accessedby usingloginandpassword.
DELIVERY PROTOCOLS - MESSAGE ACCESS
AGENTS
◾ The first and the second stagesof mail delivery use SMTP
.
◾ However,SMTP is not involvedin the third stage because SMTP is a push protocol;
◾ it pushes the message fromthe client to the server
.
◾ On the other hand,the third stage needs a pull protocol;the client must pull messagesfrom the server
.
◾ The direction of the bulk data is from the server to the client.
◾ The third stageuses a message access agent.
◾ Currently three messageaccess protocols are available:
◾ Post Office Protocol,version 3 (POP3)
◾ Internet MessageAccess Protocol,version 4 (IMAP4)
◾ Distributive Mail SystemProtocol (DMSP) 65
MESSAGE ACCESS PROTOCOLS
66
POP3 (Post Office Protocol): Here the mail person accesses the mail box from say aPC and the mail gets
accumulated on a server
.
◾ So in POP3 the mail is downloaded to the PC at a time intervalwhich can be specified by the user
.
◾ POP3 is used when the mail is always read from the same machine, so it helps to download the mail to it in
advance.
IMAP (Internet Message Access Protocol): IMAP is a standard email protocol that stores email messages on a
mail server, but allows end user to view and manipulate the messages as though they were stored locally on the end
user’s device.
DMSP(Distributive Mail System Protocol): There are multiple mailboxes on different servers.To read the mail
I connect to them from time to time and whenever I do so the mail willbe downloaded.
◾ When a reply is sent then it willput the message inaqueue.Thus DMSP is like a pseudo MTA.
SIMPLE NETWORK MANAGEMENT PROTOCOL -
SNMP
67
◾ SNMP is an application layer protocol which uses UDP port number161/162.
◾ SNMP is a framework used for managing devices on the internet.
◾ SNMP is used to monitor the network, detect network faults and sometimes even used to configure remote
devices.
SNMP components –There are 3 components of SNMP:
◾ SNMP Manager – It is acentralizedsystemusedto monitor network.It is also known as Network Management
Station(NMS)
◾ SNMP Agent – It is a software management software module installed on a managed device. Managed devices
can be network devices like PC,router
,switches,servers etc.
◾ Management Information Base – MIB consists of information of resources that are to be managed. These
informationis organized hierarchically
. It consists of objectsinstanceswhich are essentiallyvariables.
SNMP COMPONENT
68
somethinggoes wrong,the agent sends awarning messageto the manager
.
SNMP Manager:
◾ The manager is ahost that controls and monitors a set of agents such asrouters.
◾ It is an application layer protocol in which a few manager stationscan handle a set of agents.
◾ The protocol designed at the application level can monitor the devices made by different manufacturers and
installed on different physical networks.
◾ It is used in a heterogeneous network made of different LANs andWANs connectedby routers or gateways.
SNMP Agent:
◾ The agent is used to keep the information in a database while the manager is used to access the values in the
database. For example, a router can store the appropriate variables such as a number of packets received and
forwarded while the manager can compare these variablesto determinewhether the router is congestedor not.
◾ Agents can also contribute to the management process.A server program on the agent checks the environment,if
SNMP COMPONENT
Management with SNMP has threebasic ideas:
◾ Managementof the internetis achieved through simpleinteractionbetweena manager and agent.
◾ A manager checks the agent by requestingthe informationthat reflects the behavior of the agent.
◾ A manager also forces the agent to perform a certainfunctionby resettingvaluesin the agent database.
◾ An agent also contributes to the management process by warning the manager regardingan unusual condition.
Management Information Base:
◾ MIB consists of information of resources that are to be
managed. These information is organized hierarchically. It
consists of objects instances which are essentially
variables.
◾ Each agent has its own MIB,which is a collection of all the
objects that the manager can manage.
◾ MIB is categorized into eight groups: system, interface,
addresstranslation,ip,icmp,tcp,udp,and egp.
69
SNMP MESSAGES
Message Description
1. Get_Request Request the value for a variable .
2. Get_Response Returns the value of the variable asked for
.
3. Get_Next_Request Request a variable next to the previous
one.
4. Set_Request Set the value of an Object.
5.T
rap Agent to managerT
rap report.
6. Get_bulk_request Request a set of variable of same type.
7. Inform_Request Exchangeof MIB amongManagementstations.
70
TERMINAL NETW ORK -TELNET
◾ Remote login
◾ The main task of the internetis to provide services to users.
◾ For example, users want to run different application programs at the remote site and transfers a result to the
local site. This requires a client-server program such as FTP
, SMTP
. But this would not allow us to create a specific
program for each demand.
◾ The better solution is to provide a general client-server program that lets the user access any application
program on a remote computer
. Therefore, a program that allows a user to log on to a remote computer
. A
popular client-serverprogramTELNET is used to meet such demands.
◾ TELNET is an abbreviationfor Terminal Network.
◾ T
elnet provides a connection to the remote computer in such a way that a local terminal appears to be at the
remote side.
◾ There are two types of login:
◾ Local Login
71
LOCAL LOGIN
72
◾ When a user logs into alocalcomputer
, then it is known aslocallogin.
◾ When the workstation running terminal emulator
, the keystrokes entered
by the user are accepted by the terminal driver
. The terminal driver then
passes these characters to the operating system which in turn, invokes
the desired applicationprogram.
◾ However,theoperatingsystemhas special meaning to special characters.
◾ For example, in UNIX some combination of characters have special
meanings such as control character with "z" means suspend. Such
situations do not create any problem as the terminal driver knows the
meaning of such characters. But, it can cause the problems in remote
login.
REMOTE LOGIN
73
◾ When the user wants to accessan application program on a remote computer
, then the user must perform
remote login.
HOW REMOTE LOGIN OCCURS
74
◾ AT THE LOCAL SITE
The user sends the keystrokes to the terminal driver
, the characters are then sent to the TELNET client. The TELNET
client which in turn, transforms the characters to a universal character set known as network virtual terminal
charactersand delivers them to the localTCP/IP stack.
◾ AT THE REMOTE SITE
The commands in NVT forms are transmitted to the TCP/IP at the remote machine. Here, the characters are
delivered to the operating system and then pass to the TELNET server
. The TELNET server transforms the
characters which can be understandable by a remote computer
. However
, the characters cannot be directly passed to
the operating system as a remote operating system does not receive the characters from the TELNET server.
Therefore it requires some piece of software that can accept the characters from the TELNET server
. The operating
systemthen passes these charactersto the appropriateapplication program.
NETW ORK VIRTUAL TERMINAL - NVT
75
◾ The network virtualterminalis an interface that defines how data and commands are sent across the network.
◾ In today's world,systems are heterogeneous.
◾ For example, the operating system accepts aspecial combination of characters such as end-of-file token
running aDOS operatingsystem ctrl+z whilethe token running a UNIX operatingsystemis ctrl+d.
◾ TELNET solves this issue by defining a universal
interface known as network virtual interface.
◾ The TELNET client translates the characters that
come from the local terminal into NVT form and
then delivers them to the network. The Telnet
server then translates the data from NVT form
into a form which can be understandable by a
remote computer
.
DOMAIN NAME SYSTEM - DNS
76
◾ An applicationlayerprotocol defineshow the applicationprocesses runningon differentsystems,pass the messages to
each other
.
◾ DNS is a directory service that provides a mapping betweenthe name of a host on the network andits numericaladdress.
DNS is required forthefunctioningof theinternet.
◾ Eachnode ina treehas a domain name,anda fulldomainname is a sequenceof symbols specifiedbydots.
◾ DNS is aservice that translates the domain name into IP addresses.This allows the users of networks to utilize user-
friendlynameswhen lookingfor other hosts insteadof rememberingthe IP addresses.
◾ For example, suppose the FTP site at EduSoft had an IP address of 132.147.165.50,most people would reach this site by
specifying ftp.EduSoft.com.Therefore,thedomain name is more reliablethanIP address.
DOMAIN NAME SYSTEM
◾ The Internet uses an address to identify an entity
. Each computer connected to the
Internet needs to be uniquely identified. The Domain Name System (DNS) translates
Internet domain and host namesto IP addresses and viceversa.
◾ To preventduplication, a hierarchicalor tree name space was proposed in which each
name has severalparts.
◾ The first part can definethe nature of the organization,
◾ the second part can definethe name of an organization,and
◾ the third part can define departments in the organization, and so on. In this way
,assignment
and control of the name space can be decentralized.
◾ Each node in the tree has a label. A full domain name is a sequence of labels separated
by dots.
◾ For example, challenger
.atc.fhda.edu is a domain name that defines a computer at
De Anza College. Each label in the domain may define an entity in the organization;
the level of detail increasesfrom right to left.
77
DOMAIN NAME SYSTEM
◾ DNS is aTCP/IP protocol used on different platforms.
◾ The domainname spaceis dividedinto three different sections:
◾ Generic domains,
◾ Country domains, and
◾ Inverse domain.
78
GENERIC DOMAINS
LABEL DESCRIPTION
aero Airlines and aerospace companies
biz Businesses or firms
◾ It defines the registered hosts according to their
generic behavior
.
◾ Each node in a tree defines the domain name, which is an index
to the DNS database.
◾ It uses three-character labels, and these
labels describe the organization type.
9
com Commercial Organizations
coop Cooperative business
Organizations
edu Educational institutions
gov Government institutions
info Information service providers
int International Organizations
mil Military groups
museum Museum & other
nonprofit organizations
name Personal names
net Network Support centers
org
7
Nonprofit Organizations
COUNTRY DOMAIN
◾ The format of country domain is same as a generic
domain, but it uses two-character country abbreviations
(e.g., us for the United States) in place of three
character organizational abbreviations.
D O M AIN NAM E M EANING
80
au Australia
in India
cl Chile
fr France
us United States
za South Africa
uk United Kingdom
es Spain
jp Japan
de Germany
ca Canada
ee Estonia
hk Hong Kong
INVERSE DOMAIN
81
◾ The inverse domain is used for mapping an address to a name.When the server has receiveda request from the
client,and the server containsthe files of only authorizedclients.
◾ To determine whether the client is on the authorized list or not,it sends a query to the DNS server and ask for
mappingan address to the name.
WORKING OF DNS
82
◾ DNS is aclient/server network communication protocol. DNS clients send requests to the server while DNS
servers send responses to the client.
◾ Client requests contain a name which is converted into an IP address known as a forward DNS lookups while
requests containingan IP address which is converted into a name known as reverse DNS lookups.
◾ DNS implementsadistributeddatabase to store the name of all the hosts available on the internet.
◾ DNS is a global system for translating IP addresses to human-readable domain names. When a user tries to access
a web address like “example.com”, their web browser or application performs a DN S Query against a DNS
server
, supplying the hostname. The DNS server takes the hostname and resolves it into a numeric IP address,
which the web browser can connect to.
◾ A component called a DNS Resolver is responsible for checking if the hostname is available in local cache, andif
not, contacts a series of DNS Name Servers, until eventually it receives the IP of the service the user is trying to
reach,and returns it to the browser or application.Thisusually takeslessthan asecond.
DNS RECORDS
83
◾ DNS RECORDS are stored in zone files and are used for translatingdomain names to IP addresses.They also
containother data,including thedomainname's name server and mail server information.
◾ Two types of records are used in DNS.
◾ The question records are used in the question section of the query and response messages.
◾ The resource records are used in the answer, authoritative,and additional information sections of the response message.
◾ Question Record: A question record is used by the client to get information from a server
. This contains the
domain name.
◾ Resource Record: Each domain name (each node on the tree) is associated with a record called the resource
record. The server database consists of resource records. Resource records are also what is returned by the
server to the client.
◾ Note: Domain Name System basically translates those domain names into IP addresses and points your device in the
rightdirection.A domain name and its matching IP address is calleda“DNS record”.
DNS QUERY
There are three types of queries in the DNS system:
◾ Recursive Query: In a recursive query
, a DNS client provides a hostname, and the DNS Resolver “must”
provide an answer—it responds with either a relevant resource record, or an error message if it can't be found.
The resolver starts a recursive query process, starting from the DNS Root Server
, until it finds the Authoritative
Name Server (for more on Authoritative Name Servers see DNS Server T
ypes below) that holds the IP address
and other information for the requestedhostname.
◾ Iterative Query: In an iterative query
, a DNS client provides a hostname, and the DNS Resolver returns the
best answer it can. If the DNS resolver has the relevant DNS records in its cache, it returns them. If not, it refers
the DNS client to the Root Server
, or another Authoritative Name Server which is nearest to the required DNS
zone.The DNS client mustthen repeat the query directlyagainst the DNS server it was referred to.
◾ Non-Recursive Query: A non-recursive query is a query in which the DNS Resolver already knows the answer
.
It either immediately returns a DNS record because it already stores it in local cache, or queries a DNS Name
Server which is authoritative for the record, meaning it definitely holds the correct IP for that hostname. In both
cases, there is no need for additional rounds of queries (like in recursive or iterative queries). Rather
, a respons8
e4
is immediately returned to the client.
DNS SERVERS
The followingare the most common DNS server typesthat are used to resolve hostnamesinto IP addresses.
◾ DNS Resolver:A DNS resolver (recursive resolver),is designed to receiveDNS queries,which include a human-
readable hostname such as“www
.example.com”, and is responsible for trackingthe IP address for that hostname.
◾ DNS Root Server: The root server is the first step in the journey from hostnameto IP address.
The DNS Root Server extracts the Top Level Domain (TLD) from the
user’s query - for example, www
.example.com - provides details for the
.com TLD Name Server
. In turn,that server will provide details for domains
with the .com DNS zone,including“example.com”.
◾ Authoritative DNS Server: Higher level servers in the DNS
hierarchy define which DNS server is the “authoritative” name server
for a specific hostname, meaning that it holds the up-to-date information
for that hostname.
The Authoritative Name Server is the last stop in the name server query-it
takes the hostname and returns the correct IP address to the DNS
Resolver (or if it cannot find the domain, returns the message
NXDOMAIN).
85
DNS SERVERS
86
The followingare the most common DNS server typesthat are used to resolve hostnamesinto IP addresses.
◾ DN S Resolver: A DNS resolver (recursive resolver), is designed to receive DNS queries, which include a human-
readable hostname such as“www
.example.com”, and is responsible for trackingthe IP address for that hostname.
◾ DN S Root Server: The root server is the first step in the journey from hostname to IP address. The DNS Root
Server extracts the Top Level Domain (TLD) from the user’s query - for example, www.example.com - provides
details for the .com TLD Name Server. In turn, that server will provide details for domains with the .com DNS
zone,including“example.com”.
◾ Authoritative DN S Server: Higher level servers in the DNS hierarchy define which DNS server is the
“authoritative” name server for a specific hostname, meaning that it holds the up-to-date information for that
hostname.
◾ The AuthoritativeName Server is the last stop in the name server query - it takes the hostnameand returns the
correct IP address to the DNS Resolver (or if it cannot find the domain, returns the messageNXDOMAIN).
DNS TYPES
87
◾ DNS servers create a DNS record to provide important informationabout a domain or hostname,particularlyits
current IP address.
◾ The most common DNS record types are:
NAME SERVERS
88
and the name server may also choose to restrict the clientswhich can use recursive mode.
◾ Name servers are the repositories of informationthat make up the domain database.
◾ The database is dividedup into sections called zones,which are distributedamong the name servers.
◾ Name servers can answer queries in a simple manner; the response can always be generated using only local data,
and either contains the answer to the question or a referral to other name servers "closer" to the desired
information.
◾ The way that the name server answers the query depends upon whether it is operating in recursive mode or
iterative mode:
◾ The simplest mode for the server is non-recursive, since it can answer queries using only local information:
the response contains an error, the answer
, or a referral to some other server "closer" to the answer
. All name
servers must implement non-recursive queries.
◾ The simplest mode for the client is recursive, since in this mode the name server acts in the role of a
resolver and returns either an error or the answer
, but never referrals. This service is optional in a name server
,

More Related Content

Similar to Application_layer.pdf

Introduction to web technology
Introduction to web technologyIntroduction to web technology
Introduction to web technology
VARSHAKUMARI49
 
Unit 5 Application Layer
Unit 5 Application LayerUnit 5 Application Layer
Unit 5 Application Layer
KalpanaC14
 
computer network introduction. psc notes . Assisant professor in cse.
computer network introduction. psc notes . Assisant professor in cse.computer network introduction. psc notes . Assisant professor in cse.
computer network introduction. psc notes . Assisant professor in cse.
bushraphd2022
 
E - BUSINESS AND ACCOUNTING.
E - BUSINESS AND ACCOUNTING.E - BUSINESS AND ACCOUNTING.
E - BUSINESS AND ACCOUNTING.
Abhishek Kulkarni
 
introduction to Web system
introduction to Web systemintroduction to Web system
introduction to Web system
hashim102
 
Www and http
Www and httpWww and http
Www and http
SanthiNivas
 
Web Fundamentals differentprotoclos used in transmission of data .pptx
Web Fundamentals differentprotoclos used in transmission of data .pptxWeb Fundamentals differentprotoclos used in transmission of data .pptx
Web Fundamentals differentprotoclos used in transmission of data .pptx
AsifMehmood240435
 
nptl cc video.pptx
nptl cc video.pptxnptl cc video.pptx
nptl cc video.pptx
MunmunSaha7
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT V
pkaviya
 
Web application development ( basics )
Web application development ( basics )Web application development ( basics )
Web application development ( basics )
Chirag Nag
 
Restful webservices
Restful webservicesRestful webservices
Restful webservices
Luqman Shareef
 
0130225347
01302253470130225347
0130225347
Dharmendra Gupta
 
Web server
Web serverWeb server
Web server
Alieska Waye
 
MODULE-5_CCN.pptx
MODULE-5_CCN.pptxMODULE-5_CCN.pptx
MODULE-5_CCN.pptx
Dr. Shivashankar
 
web course focus on main informantion of bukifing websitech1.pptx
web course focus on main informantion of bukifing websitech1.pptxweb course focus on main informantion of bukifing websitech1.pptx
web course focus on main informantion of bukifing websitech1.pptx
burasyacob012
 
CN UNIT V.pptx
CN UNIT V.pptxCN UNIT V.pptx
CN UNIT V.pptx
VISWANATHAN R V
 
Week2 cloud computing week2
Week2 cloud computing week2Week2 cloud computing week2
Week2 cloud computing week2
Ankit Gupta
 
introduction to web application development
introduction to web application developmentintroduction to web application development
introduction to web application development
FLYMAN TECHNOLOGY LIMITED
 
ch01-Internet & Web Basics &.ppt
ch01-Internet & Web Basics &.pptch01-Internet & Web Basics &.ppt
ch01-Internet & Web Basics &.ppt
GmachImen
 
Edi
EdiEdi

Similar to Application_layer.pdf (20)

Introduction to web technology
Introduction to web technologyIntroduction to web technology
Introduction to web technology
 
Unit 5 Application Layer
Unit 5 Application LayerUnit 5 Application Layer
Unit 5 Application Layer
 
computer network introduction. psc notes . Assisant professor in cse.
computer network introduction. psc notes . Assisant professor in cse.computer network introduction. psc notes . Assisant professor in cse.
computer network introduction. psc notes . Assisant professor in cse.
 
E - BUSINESS AND ACCOUNTING.
E - BUSINESS AND ACCOUNTING.E - BUSINESS AND ACCOUNTING.
E - BUSINESS AND ACCOUNTING.
 
introduction to Web system
introduction to Web systemintroduction to Web system
introduction to Web system
 
Www and http
Www and httpWww and http
Www and http
 
Web Fundamentals differentprotoclos used in transmission of data .pptx
Web Fundamentals differentprotoclos used in transmission of data .pptxWeb Fundamentals differentprotoclos used in transmission of data .pptx
Web Fundamentals differentprotoclos used in transmission of data .pptx
 
nptl cc video.pptx
nptl cc video.pptxnptl cc video.pptx
nptl cc video.pptx
 
Cs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT VCs8591 Computer Networks - UNIT V
Cs8591 Computer Networks - UNIT V
 
Web application development ( basics )
Web application development ( basics )Web application development ( basics )
Web application development ( basics )
 
Restful webservices
Restful webservicesRestful webservices
Restful webservices
 
0130225347
01302253470130225347
0130225347
 
Web server
Web serverWeb server
Web server
 
MODULE-5_CCN.pptx
MODULE-5_CCN.pptxMODULE-5_CCN.pptx
MODULE-5_CCN.pptx
 
web course focus on main informantion of bukifing websitech1.pptx
web course focus on main informantion of bukifing websitech1.pptxweb course focus on main informantion of bukifing websitech1.pptx
web course focus on main informantion of bukifing websitech1.pptx
 
CN UNIT V.pptx
CN UNIT V.pptxCN UNIT V.pptx
CN UNIT V.pptx
 
Week2 cloud computing week2
Week2 cloud computing week2Week2 cloud computing week2
Week2 cloud computing week2
 
introduction to web application development
introduction to web application developmentintroduction to web application development
introduction to web application development
 
ch01-Internet & Web Basics &.ppt
ch01-Internet & Web Basics &.pptch01-Internet & Web Basics &.ppt
ch01-Internet & Web Basics &.ppt
 
Edi
EdiEdi
Edi
 

Recently uploaded

一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
xuqdabu
 
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
zpc0z12
 
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalRBuilding a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR
Peter Gallagher
 
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
8db3cz8x
 
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
yizxn4sx
 
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
uyesp1a
 
一比一原版(TheAuckland毕业证书)新西兰奥克兰大学毕业证如何办理
一比一原版(TheAuckland毕业证书)新西兰奥克兰大学毕业证如何办理一比一原版(TheAuckland毕业证书)新西兰奥克兰大学毕业证如何办理
一比一原版(TheAuckland毕业证书)新西兰奥克兰大学毕业证如何办理
xuqdabu
 
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
6oo02s6l
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
nudduv
 
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
1jtj7yul
 
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
2g3om49r
 
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
terpt4iu
 
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
yizxn4sx
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
xuqdabu
 
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
uwoso
 
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
eydeofo
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
terpt4iu
 
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
nudduv
 
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
snfdnzl7
 
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
nvoyobt
 

Recently uploaded (20)

一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
一比一原版(UQ文凭证书)昆士兰大学毕业证如何办理
 
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
按照学校原版(UST文凭证书)圣托马斯大学毕业证快速办理
 
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalRBuilding a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR
Building a Raspberry Pi Robot with Dot NET 8, Blazor and SignalR
 
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理按照学校原版(QU文凭证书)皇后大学毕业证快速办理
按照学校原版(QU文凭证书)皇后大学毕业证快速办理
 
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
按照学校原版(UAL文凭证书)伦敦艺术大学毕业证快速办理
 
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
按照学校原版(Columbia文凭证书)哥伦比亚大学毕业证快速办理
 
一比一原版(TheAuckland毕业证书)新西兰奥克兰大学毕业证如何办理
一比一原版(TheAuckland毕业证书)新西兰奥克兰大学毕业证如何办理一比一原版(TheAuckland毕业证书)新西兰奥克兰大学毕业证如何办理
一比一原版(TheAuckland毕业证书)新西兰奥克兰大学毕业证如何办理
 
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
按照学校原版(Birmingham文凭证书)伯明翰大学|学院毕业证快速办理
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
 
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
按照学校原版(SUT文凭证书)斯威本科技大学毕业证快速办理
 
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
1比1复刻澳洲皇家墨尔本理工大学毕业证本科学位原版一模一样
 
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
按照学校原版(KCL文凭证书)伦敦国王学院毕业证快速办理
 
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
按照学校原版(Greenwich文凭证书)格林威治大学毕业证快速办理
 
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide文凭证书)阿德莱德大学毕业证如何办理
 
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
按照学校原版(UPenn文凭证书)宾夕法尼亚大学毕业证快速办理
 
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
一比一原版(UOL文凭证书)利物浦大学毕业证如何办理
 
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
按照学校原版(UOL文凭证书)利物浦大学毕业证快速办理
 
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
一比一原版(ANU文凭证书)澳大利亚国立大学毕业证如何办理
 
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
按照学校原版(USD文凭证书)圣地亚哥大学毕业证快速办理
 
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
买(usyd毕业证书)澳洲悉尼大学毕业证研究生文凭证书原版一模一样
 

Application_layer.pdf

  • 1. APPLICATION LAYER PRINCIPLES OF NETW ORK APPLICATIONS 1
  • 2. PRINCIPLES OF NETW ORK APPLICATIONS 2 Transport services availableto applications ▪ Reliable data transfer:Loss-tolerantapplications ▪ Throughput ▪ Bandwidth-sensitiveapplications ▪ Elastic applications ▪ Timing ▪ Security Application architecture ▪ Client-Server ▪ Peer-to-Peer(P2P)
  • 3. PRINCIPLES OF NETW ORK APPLICATIONS 3 Application-layer protocols ▪ The types of messagesexchanged, for example, request messagesand response messages. ▪ The syntaxof the various messagetypes,such as the fields in the messageand how the fields are delineated. ▪ The semanticsof the fields,that is,the meaning of the informationin the fields. ▪ Rules for determiningwhen and how a process sends messagesand responds to messages. Transport services provided by Internet ▪ TCP ▪ Connection-oriented ▪ Reliabledatatransfer ▪ UDP ▪ Connectionless ▪ Unreliable datatransfer
  • 4. PRINCIPLES OF NETW ORK APPLICATIONS 4 Processes communicating ▪ Exchangemessages: In the context of acommunication sessionbetweena pair of processes,the process that initiates the communication(that is,initially contactstheother process atthe beginningof the session) is labeled as the client. ▪ The process that waitsto be contactedto begin the session is the server . ▪ Socket interface ▪ Application ProgrammingInterface (API) ▪ Addressing processes ▪ IP address ▪ Port number
  • 5. SOME N ETW ORK APPS 5 ▪ Email ▪ Web ▪ T ext Messaging ▪ Remote Login ▪ P2p File Sharing ▪ Multi-user Network Games ▪ Streaming StoredVideo (Y outube, Netflix, Amazon Prime) ▪ Voice Over Ip (Skype) ▪ Real-timeVideo Conferencing ▪ Social Networking ▪ Search
  • 6. W ORLD WIDE WEB - W W W ◾ The World Wide Web (WWW) isa repository of information linkedtogether frompoints allover the world. ◾ The W W W has a unique combination of flexibility , portability , and user- friendly features that distinguishit from other services provided by the Internet. ◾ The W W W project was initiated by CERN (European Laboratory for Particle Physics) to create a  systemto handle distributedresources necessaryfor scientific research. ◾ In this chapter we first discuss issues related to the Web. We then discuss a protocol, HTTP ,that is usedto retrieveinformationfrom theWeb. 6
  • 7. WEB ◾ A Web service is a method of communicationbetweentwo electronicdevicesover a network. ◾ It is asoftwarefunctionprovided at a network address over the Web with the service always on as in the concept of utility computing. ◾ The term Web services describes a standardized way of integrating Web-based applications using the XML(extensible Markup Language, SOAP(Simple Object Access Protocol), WSDL(Web Services Description Language) and UDDI (Universal Description Discovery and Integration) open standards over an Internet protocol backbone. ◾ XML is used to tag the data, SOAP is used to transfer the data, WSDL is used for describing the services available and UDDI is used for listingwhatservices are available. ◾ Web services allow different applications from different sources to communicate with each other without time- consuming custom coding, and because allcommunicationis in XML, ◾ Web services are not tied to any one operating system or programming language.For example, Javacan talk with Perl,Windows applicationscan talk with UNIX applications. 7
  • 8. ARCHITECTURE ◾ The W WW today is a distributed client-server service,in which a client using a browser can access a service using a server. However , the service provided is distributed over many locationscalled sites,as shown in Figure. ◾ Each site holds one or more documents,referred to as Web pages. ◾ Each Web page can contain a link to other pages in the same siteor atother sites. ◾ The pages can be retrieved and viewed by using browsers. ◾ The client needs to see some information that it knows belongs to siteA. ◾ It sends a request through its browser ,a program that is designedto fetchWeb documents. 8
  • 9. ARCHITECTURE ◾ The request, among other information, includes the address of the siteand theWeb page,called the URL. ◾ The server at site A finds the document and sends it to the client. ◾ When the user views the document, she finds some references to other documents, including a Web page at siteB.The reference has the URL for the new site. ◾ The user is also interested in seeing this document. The client sends another request to the new site, and the new page is retrieved. 9
  • 10. CLIENT ◾ A varietyof venders offer commercialbrowsers that interpret and display a web document,and all use nearly the same architecture. ◾ Eachbrowser usually consistsof three parts:acontroller,client protocol,and interpreters. ◾ The controller receives input from the keyboard or the mouse and uses the client programs to access the document. ◾ After the document has been accessed, the controller uses one of the interpreters to display the document on the screen.The client protocol can be one of the protocols described previously such as FTP . ◾ The interpreter can be HTML, Java,or JavaScript,dependingon thetype of document as shown 10
  • 11. SERVER 11 ◾ The web page is stored at the server . ◾ Eachtime a client request arrives,thecorresponding document is sent to the client. ◾ To improve efficiency ,servers normally store requested files in a cache in memory;memory is faster to access than disk. ◾ A server can also become more efficient through multithreading or multiprocessing.In this case, a server can answer more than one request ata time.
  • 12. UNIFORM RESOURCE LOCATOR 12 ◾ The uniform resource locator (URL) is a standardfor specifying any kind of informationon the Internet. ◾ The URL defines four things: protocol,host computer , port,and path ◾ The protocol is the client/server program used to retrievethe document. ◾ The host is the computer on which the information is located, although the name of the computer can be an alias. Web pages are usually stored in computers, and computers are given alias names that usually begin with the characters"www". ◾ The URL can optionally contain the port number of the server . If the port is included, it is inserted between the host and the path,and it is separatedfrom the host by a colon. ◾ Path is the pathname of the file where the information is located. Note that the path can itself contain slashes that,in the UNIX operatingsystem,separatethedirectories from the subdirectories and files.
  • 13. UNIFORM RESOURCE LOCATOR 13 ◾ Method:The method is the protocol used to retrievethe document from a server . For example, HTTP . ◾ Host: The host is the computer where the information is stored, and the computer is given an alias name. Web pages are mainly stored in the computers and the computers are given an alias name that begins with the characters"www".This field is not mandatory . ◾ Port: The URL can also contain the port number of the server, but it's an optional field. If the port number is included, then it must come betweenthe host and path and it should be separatedfrom the host by a colon. ◾ Path: Path is the pathname of the file where the information is stored. The path itself contain slashes that separate thedirectories from the subdirectories and files.
  • 14. COOKIES 14 ◾ The World Wide Web was originally designedasa statelessentity . ◾ A client sends a request;aserver responds.Their relationshipis over . ◾ The originaldesign ofWWW, retrieving publicly available documents,exactlyfits this purpose. ◾ T oday theWeb has other functions;some are listedhere. ◾ Some websitesneed to allowaccessto registered clientsonly . ◾ Websites are being used as electronic stores that allow users to browse through the store,selectwanted items,put them in an electroniccart,and pay at the end with acredit card. ◾ Some websitesare used as portals:theuser selectstheWeb pages he wantsto see. ◾ Some websitesare just advertising. For these purposes,the cookie mechanismwas devised.
  • 15. WEB DOCUMENT 15 ◾ The documents in theWWW can be grouped into broad categories: ◾ Static, ◾ Dynamic,and ◾ Active. ◾ The categoryis basedon the time at which the contents of the document are determined.
  • 16. STATIC DOCUMENTS 16 ◾ Static documents are fixed-content documentsthat are createdand stored in a server . ◾ The client can get only a copy of the document. ◾ In other words,the contents of the file are determined when the file is created, not when it is used. ◾ Of course, the contents in the server can be changed, but the user cannot change them. When a client accesses the document,acopy of the document is sent. ◾ The user can then use a browsing program to display the document.
  • 17. EXAMPLE FOR STATIC DOCUMENTS 17 Hypertext Markup Language (HTML) ◾ HTML is a language for creatingWeb pages. ◾ The term markup language comes from the book publishingindustry . ◾ Before a book is typeset and printed, a copy editor reads the manuscriptand puts marks on it. ◾ These marks tell the compositor how to formatthe text. ◾ For ex.,if the copy editor wants part of a line to be printed in boldface, the user draws a wavy line under that part. In the sameway ,data for a web page are formattedfor interpretationby abrowser.
  • 18. DYNAMIC DOCUMENTS ◾ A dynamic document is createdby aWeb server whenever abrowser requests the document. ◾ When arequest arrives,theWeb server runs an application program or ascript that createsthe dynamic document. ◾ The server returns theoutput of theprogram or script as a response to the browser that requested the document. ◾ Because a fresh document is created for each request, the contents of a dynamic document can vary from one request to another . ◾ A very simple example of a dynamic document is the retrieval of the timeand date from aserver . ◾ Time and date are kinds of informationthat are dynamic in that they change from moment to moment. ◾ The client can ask the server to run aprogram such as the date program in UNIX and send the result of the program to the client 18
  • 19. EXAMPLE FOR DYNAMIC DOCUMENTS 19 Common Gateway Interface (CGI) ◾ The Common Gateway Interface (CGI) is a technology that creates and handles dynamicdocuments. ◾ CGI is a set of standards that defines how a dynamic document is written, how data are input to the program, and how the output result is used. ◾ CGI is not a new language; instead, it allows programmers to use any of several languages such as C, C++, Bourne Shell, C Shell, or Perl. ◾ The only thingthat CGI defines is a set of rules and terms that the programmermust follow .
  • 20. ACTIVE DOCUMENTS 20 ◾ For many applications, we need a program or a script to be run at the client site. ◾ These are called active documents. For example, suppose we want to run a program that creates animated graphicson the screen or a program that interacts withthe user . ◾ The program definitely needs to be run at the client site where the animation or interactiontakes pace. ◾ When a browser requests an active document,theserver sends a copy of the document or a script. ◾ The document is then run atthe client (browser) site.
  • 21. EXAMPLE FOR ACTIVE DOCUMENTS  JavaApplets ◾ One way to create an active document is to use Java applets. Java is a combination of a high-level programming language, a run-time environment, and a browser to run it. It can also be astand-aloneprogram that doesn’tusea browser. ◾ An applet is a program written in Java on the server . It is compiled and ready to be run. The document is in byte- code (binary) format. ◾ The client process (browser) createsan instanceof this applet and runs it. ◾ A java applet can be run by the browser in two ways. In the first method, the browser can directly request the Java applet program in the URL and receive the applet in binary form. ◾ In the second method,thebrowser can retrieve and run an HTML file  that hasembedded the address of the applet as a tag. 21 similarbut needs two transactions
  • 22. HYPERTEXT TRANSFER PROTOCOL ◾ The Hypertext Transfer Protocol (HTTP) is an application protocol for distributed, collaborative, hypermedia informationsystems. ◾ HTTP is the foundationof data communicationfor theWorldWide Web. ◾ The HTTP protocol can be used to transferthe data in the form of plain text,hypertext,audio,video, and so on. ◾ Hypertext is structured text that uses logical links (hyperlinks) betweennodes containing text. ◾ HTTP is the protocol to exchangeor transferhypertext. ◾ HTTP is an application layer protocol designedwithinthe framework of the Internet Protocol Suite. ◾ Its definition presumes an underlying and reliable transport layer protocol, and Transmission Control Protocol (TCP) is commonly used. ◾ However HTTP can use unreliable protocols such as the User DatagramProtocol (UDP). ◾ HTTP resources are identified and locatedon the network by Uniform Resource Locators (URLs). 22
  • 23. HYPERTEXT TRANSFER PROTOCOL 23 ◾ This protocol is known as HyperTextTransferProtocol becauseof its efficiency that allowsus to use in a hypertext environmentwhere there are rapid jumps from one document to another document. ◾ HTTP is similarto the FTP as it also transfersthe files from one host to another host.But,HTTP is simpler than FTP as HTTP uses only one connection,i.e.,no control connection to transferthe files. ◾ HTTP is used to carry the data in the form of MIME-like format. ◾ HTTP is similarto SMTP as the data is transferred betweenclient and server.The HTTP differs from the SMTP in the way the messagesare sent from the client to the server and from server to the client.SMTP messagesare stored and forwarded while HTTP messagesaredeliveredimmediately .
  • 24. FEATURES OF HTTP ◾ Connectionless protocol: HTTP is a connectionless protocol. HTTP client initiates a request and waits for a response from the server . When the server receives the request, the server processes the request and sends back the response to the HTTP client after which the client disconnects the connection. The connection between client and server exist only during the current request and response time only . ◾ Media independent: HTTP protocol is a media independent as data can be sent as long as both the client and server know how to handle the datacontent. It is required for both theclient and server to specify thecontent type in MIME-type header . ◾ Stateless: HTTP is a stateless protocol as both the client and server know each other only during the current request. Due to this nature of the protocol, both the client and server do not retaintheinformationbetween variousrequests of the web pages. 24
  • 25. HTTP CONNECTIONS ◾ Non-Persistent Connection: It requires connection setupagain and again for each object to send. ◾ Persistent connection: It does not require connection setup again and again. Multiple objects can use connection. ◾ The built-inHTTP request methods. HTTP Transactions 25
  • 26. WEB AND HTTP 26 First,a review ◾ web page consists of objects ◾ object can be HTML file,JPEG image,Javaapplet,audio file,… ◾ web page consists of base HTML-file which includesseveralreferencedobjects ◾ each object is addressable by a URL,e.g.,
  • 27. HTTP 27 OVERVIEW HTTP:HypertextTransfer Protocol ◾ Web’ s applicationlayer protocol ◾ Client/Server Model ◾ Client: browser that requests,receives, (usingHTTP protocol) and“displays”Web objects ◾ Server: Web server sends (using HTTP protocol) objects in response to requests
  • 28. HTTP MESSAGES 28 ◾ HTTP messages are of two types: request and response. Both the message types follow the same message format. ◾ Request Message: The request message is sent by the client that consists of a request line, headers, and sometimes a body . ◾ Response Message: The response message is sent by the server to the client that consists of a status line,headers, and sometimesabody . HTTP Messages Request Response
  • 29. HTTP REQUEST MESSAGE 29 Two types of HTTP messages: request,response ◾ HTTP request message: ASCII (human-readable format), therequest messageis sent by the client that consists of a request line,headers, and sometimesa body .
  • 30. HTTP RESPONSE MESSAGE ◾ HTTP response message ◾ A response messageconsists of a status line, a header ,andsometimesabody . ◾ Status Line: The status line defines the status of the response message. It consists of the HTTP version, a space, a status code, a space, and a status phrase.• ◾ HTTP version: This field is the same as the correspondingfieldintherequestline. ◾ Status code: The status code field is similar to those in the FTP and the SMTP protocols. It consists of threedigits. ◾ Other most common codes are listedinT able ◾ Status Phrase:This fieldexplains the codein text form. 30
  • 32. HTTP RESPONSE STATUS CODES ◾ Status code appearsin 1st line in server-to-clientresponse message. Some sample codes: ◾ 200 OK ◾ request succeeded,requested object later in this message ◾ 301 Moved Permanently ◾ requested object moved,new location specified later in this message (Location:) ◾ 400 Bad Request ◾ request message not understood by server ◾ 404 Not Found ◾ requested document not found on this server ◾ 505 HTTP Version Not Supported 32
  • 33. UPLOADING FORM INPUT ◾ POST method: ◾ web page often includes form input ◾ input is uploaded to server in entity body ◾ URL method: ◾ uses GET method ◾ input is uploadedin URL field of request line: 33
  • 34. METHOD TYPES ◾ deletes file specifiedin the URL field HTTP/1.0: ◾ GET ◾ POST ◾ HEAD ◾ asks server to leave requested object out of response HTTP/1.1: ◾ GET , ◾ POST , ◾ HEAD ◾ PUT ◾ uploads file in entitybody to path specifiedin URL field ◾ DELETE 34
  • 35. WEB CACHES (PROXY SERVER) 35 GOAL: satisfy client request without involving origin server ◾ User Sets Browser: ◾ Web accesses via cache ◾ browser sends all HTTP requests to cache ◾ object in cache: ◾ cache returns object ◾ else cache requests object from origin server, then returns object to client
  • 36. MORE ABOUT WEB CACHING 36 ◾ Cache acts as both client and server ◾ Server for originalrequesting client ◾ Client to origin server ◾ T ypically cache is installed by ISP (university , company ,residentialISP) W hyW eb caching? ◾ Reduce response time for client request ◾ Reduce traffic on an institution’s accesslink ◾ Internet dense with caches: enables “poor” content providers to effectively deliver content (so too does P2P file sharing)
  • 37. ELECTRONIC MAIL 37 ◾ The earliestand the most common application of the Internet is electronicmail or email. ◾ Email is a store-and-forward application. ◾ This means amessagecan be sent to someone not currently connectedto the Internet. ◾ The messagecan remainin the systemuntilthe recipientretrievesit. ◾ The email application allowsa user to send messagesover a private network or the globalInternet. ◾ Email supports: ◾ Sendinga singlemessage to one or more recipients. ◾ Sendingmessagesthat includetext,voice, video, or graphics. ◾ Organization of message-basedcriteria suchas priority
  • 38. FIRST SCENARIO IN ELECTRONIC MAIL 38 When the sender and the receiver of an e-mail are on the samesystem, we need only two user agents.
  • 39. SECOND SCENARIO IN ELECTRONIC MAIL 39 ◾ When the sender and the receiver of an e-mail are on different systems,we need two UA’s and a pair of MTA’s (CLIENTAND SERVER)
  • 40. THIRD SCENARIO IN ELECTRONIC MAIL 40 ◾ When thesender is connectedto the mail server via aLAN or aWAN, we need two UA’s and two pairs ofMTA’s (clientand server).
  • 41. FOURTH SCENARIO IN ELECTRONIC MAIL 41 ◾ When both sender and receiver are connected to the mail server via a LAN or a WAN we need two a LAN or a WAN, we need two UA’ s, two pairs of MTA’ s and a pair of MAA’ s and apair of MAAs. ◾ This is the most common situationtoday
  • 42. PUSH VERSUS PULL IN ELECTRONIC EMAIL 42
  • 43. SERVICES OF USER AGENT 43 ◾ Some examplesof command-drivenuser agents are mail,pine,and elm. ◾ Some examplesof GUI-based user agents are Eudora,Outlook ,and Netscape.
  • 44. FORMAT OF AN E-MAIL AND E-MAIL ADDRESS 44 E-mail address Format of an e-mail
  • 45. E-MAIL Architecture and Services ◾ The sendingof electronicmail in the Internet requires these components: ◾ user agents (UAs), ◾ Mail/ Message transferagents (MTAs), ◾ Mail/ MessageAccessagents (MAAs),and ◾ the protocol that controls mail delivery Typically ,e-mail systems support five basic functions: 1.Composition 2.Transfer 3.Reporting 4.Displaying 5.Disposition 45
  • 46. RFC 822  Message Formats RFC 822 ◾ Messages consist of a primitiveenvelope (described in RFC 821),some number of header fields,a blank line, and then the message body . ◾ Eachheaderfield (logically)consistsof asingleline ofASCII textcontainingthefieldname, acolon,and,for most fields,a value. ◾ RFC 822 was designeddecadesago and does not clearly distinguishthe envelopefields from the header fields. ◾ Some fieldsused in the RFC 822 message header . 46
  • 47. MULTIPURPOSE INTERNET MAIL EXTENSION 47 ◾ MIME IS now widely used. ◾ The basic idea of MIME is to continue to use the RFC 822 format, but to add structure to the message body and define encoding rules for non-ASCII messages. ◾ By not deviating from RFC 822, MIME messages can be sent using the existing mail programs and protocols.
  • 48. MIME HEADER 48 ◾ MIME defines five new messageheaders, as shown in Fig.Thefirstof these simplytells theuser agent receivingthe messagethatit is dealing with a MIME message, and which version of MIME it uses.
  • 49. FILE TRANSFER PROTOCOL - FTP ◾ File Transfer Protocol (FTP) is the standard mechanism for one of the most common tasks on the Internet, copyinga file from one computer to another . ◾ FTP differs from other client-server applications inthat it establishes twoconnections betweenthe hosts. ◾ One connection is used for data transfer ,the other for control information(commandsand responses). ◾ Separationof commands and data transfermakesFTP more efficient. ◾ The control connection uses very simplerules of communication. ◾ The data connection, on the other hand, needs more complex rules due to the variety of data types transferred. ◾ FTP is the Internet standard for moving or transferring files from one computer to another using TCP or IP networks.FileT ransfer Protocol is also known as RFC 959. ◾ File Transfer Protocol (FTP) is a client/server protocol used for transferringfiles to or from a host computer . FTP may be authenticated withuser names and passwords. ◾ Publicly available files are oftenfound in aspecified directory and can be easily transferred to a user’s computer . 49
  • 50. HISTORY OF FTP ◾ The original FTP specification was written by Abhay Bhushan and published as RFC 114 on April 16, 1971. This was later replacedby RFC 765 (June 1980). ◾ The first FTP client applications used the DOS command prompt with standardized commands and syntax. Since then, many graphical user interface (GUI) clients have been developed within operating systems, making it easier for the user to upload and download files. ◾ There are various typesof FTP and differentuse cases: ◾ An FTP siteis a web site where users can easily upload or download specific files. ◾ FTP by mail allows users without access to the Internet to access and copy files using anonymous FTP by sending an email message to ftpmail@decwrl.dec.com and putting theword help in the body of the text. ◾ FTP Explorer is an FTP client based onWindows 95 file manager (Windows 95 Explorer). ◾ An FTP server is a dedicated computer which provides an FTP service.This invites hackers and necessitates security hardware or softwaresuch as utilizing usernames,passwords and file accesscontrol. ◾ An FTP client is acomputer application which accessesanFTP server . While doing so,users should bloc5 k0 incomingFTP connection attemptsusingpassivemode and should check for viruses on all downloaded files.
  • 51. OBJECTIVES OF FTP 51 ◾ It provides the sharing of files. ◾ It is used to encourage the use of remote computers. ◾ It transfersthe data more reliably and efficiently .
  • 52. WHY FTP? 52 ◾ Although transferringfiles from one systemto another is very simpleand straightforward,butsometimesit can causeproblems. ◾ For example, ◾ T wo systems may have differentfile conventions. ◾ T wo systems may have differentways to represent text and data. ◾ T wo systems may have differentdirectory structures. ◾ FTP protocol overcomes theseproblems by establishing twoconnections betweenhosts. ◾ One connection is used for data transfer ,and another connection is used for the control connection.
  • 53. THE BASIC MODEL OF FTP 53 Following figure shows the basic model of FTP. ◾ The client has three components: ◾ the user interface, ◾ the client control process,and ◾ the client data transfer process. ◾ The server has two components: ◾ the server control process and ◾ the server data transfer process. ◾ The control connection is made between the control processes. ◾ The data connection is made between the data transferprocesses.
  • 54. TYPES OF CONNECTIONS IN FTP ◾ Control Connection: The control connection uses very simple rules for communication. Through control connection, we can transfer a line of command or line of response at a time. The control connection is made between the control processes. The control connection remainsconnectedduring theentireinteractive FTP session. ◾ Data Connection: The Data Connection uses very complex rules as data types may vary . The data connection is made between data transfer processes. The data connection opens when a command comes for transferring the files and closes when the file is transferred.  T ypes of connections 54 Control connection Data connection
  • 55. TRANSMISSION MODES FOLLOWED IN FTP 55 ◾ FTP can transfera file across the data connection by using one of the followingthree transmission modes: ◾ Stream mode, ◾ Block mode,and ◾ Compressed mode. ◾ The stream mode is the default mode.Data are delivered from FTP to TCP as a continuous stream of bytes. TCP is responsible for chopping data into segmentsof appropriatesize. ◾ In block mode,datacan be delivered from FTP toTCP in blocks. ◾ In the compressed mode, ifthe fileis big,thedata can be compressed.The compression methodnormallyused is run-length encoding
  • 56. FTP CLIENTS ◾ FTP client is a program that implementsa file transfer protocol which allows you to transfer files between two  hosts on the internet. ◾ It allows a user to connect to aremote host and upload or download the files. ◾ It has a set of commands that we can use to connect to a host,transfer the files between you and your host and close the connection. ◾ The FTP program is also available as a built-incomponent in a Web browser.This GUI based FTP client makesthe file transfervery easyand also does not require to remember the FTP commands. 56
  • 57. ADVANTAGES OF FTP 57 ◾ Speed: One of the biggest advantages of FTP is speed. The FTP is one of the fastest way to transferthefiles from one computer to another computer . ◾ Efficient: It is more efficient as we do not need to completeall the operations to get the entire file. ◾ Security: To accesstheFTP server , we need to login with the username and password.Therefore,wecan say that FTP is more secure. ◾ Back & forth movement: FTP allows us to transferthe files back and forth.Suppose you are a manager of the company ,you send some informationto all the employees, and they all send informationbackon the sameserver .
  • 58. DISADVANTAGES OF FTP ◾ The standard requirement of the industry is that all the FTP transmissions should be encrypted. However, not all the FTP providers are equal and not all the providers offer encryption.So,we willhaveto look out for theFTP providers that provides encryption. ◾ FTP serves two operations, i.e., to send and receive large files on a network. However , the size limit of the file is  2GB that can be sent. It also doesn't allow you to run simultaneous transfers to multiple receivers. ◾ Passwords and file contents are sent in clear text that allows unwanted eavesdropping. So, it is quite possible that attackers can carry out the brute force attack by trying to guess the FTP password. ◾ It is not compatible with every system. 58
  • 59. SIMPLE MAIL TRANSFER PROTOCOL - SMTP ◾ Store - and - forward method ◾ Email is emergingas one of the most valuable services on the internettoday . ◾ Most of the internetsystemsuse SMTP as a method to transfermail from one user to another . ◾ SMTP is a push protocol and is used to send the mail whereas ◾ POP (post office protocol) or IMAP (internet messageaccess protocol) are used to retrieve those mails at the receiver’s side. ◾ It provides a mail exchangebetweenusers on the sameor different computers,and it also supports: ◾ It can send a singlemessage to one or more recipients. ◾ Sendingmessagecan includetext,voice, video or graphics. ◾ It can also send the messageson networks outside the internet. ◾ The SMTPmodel is of two type : ◾ End - to - end method 59
  • 60. SMTP COMMANDS 60 Some SMTP Commands: ◾ HELO – Identifiesthe client to the server , fully qualified domain name,only sent once per session ◾ MAIL – Initiate amessagetransfer ,fully qualified domainof originator ◾ RCPT – Follows MAIL, identifies an addressee,typically the fully qualified name of the addresseeand for multiple addresseesuse one RCPT for each addressee ◾ DATA – send datalineby line. The main purpose of SMTP is used to set up communication rules between servers. The servers have a way of identifying themselves and announcing what kind of communication they are trying to perform. They also have a way of handling the errors such as incorrect email address. For example,ifthe recipientaddress is wrong,then receivingserver reply with an error messageof some kind.
  • 61. COMPONENTS OF SMTP 61 ◾ First,we will break the SMTP client and SMTP server into two components such as user agent (UA) and mail transferagent (MTA). ◾ The user agent (UA) prepares the message, createstheenvelopeand then puts the messagein the envelope. ◾ The mail transferagent (MTA) transfersthis mail across the internet.
  • 62. COMPONENTS OF SMTP 62 ◾ SMTP allows amore complex system by adding a relaying system. ◾ Insteadof just having one MTA at sending side and one at receiving side, more MTAs can be added, acting either as a client or server to relay theemail.
  • 63. COMPONENTS OF SMTP 63 ◾ The relaying system withoutTCP/IP protocol can also be used to send the emails to users,and this is achieved by the use of the mail gateway . ◾ The mail gateway is a relay MTA that can be used to receivean email.
  • 64. WORKING OF SMTP ◾ Composition of Mail: A user sends an e-mail by composing an electronic mail message using a Mail User Agent (MUA). Mail User Agent is a program which is used to send and receive mail. The message contains two parts: body and header . The body is the main part of the message while the header includes information such as the sender and recipient address. The header also includes descriptive information such as the subject of the message. In this case, the message body is like a letterand headeris like an envelope that containstherecipient'saddress. ◾ Submission of Mail: After composing an email, the mail client then submits the completed e-mail to the SMTP server by using SMTP onTCP port 25. ◾ Delivery of Mail: E-mail addresses contain two parts: username of the recipient and domain name. For example, vivek@gmail.com, where "vivek" is the username of the recipient and "gmail.com" is the domain name. If the domain name of the recipient's email address is different from the sender's domain name, then MSA will send the mail to the Mail Transfer Agent (MTA). To relay the email, the MTA will find the target domain. It checks the MX record from Domain Name System to obtain the target domain. The MX record contains the domain name and IP address of the recipient'sdomain. Once the record is located, MTA connects to theexchangeserver to relay the message. ◾ Receipt and Processing of Mail: Once the incoming message is received, the exchange server delivers it to the incoming server (Mail DeliveryAgent) which stores the e-mail whereit waitsfor the user to retrieveit. ◾ Access and Retrieval of Mail: The stored email in MDA can be retrieved by using MUA (Mail User Agent). MUA ca6 n4 be accessedby usingloginandpassword.
  • 65. DELIVERY PROTOCOLS - MESSAGE ACCESS AGENTS ◾ The first and the second stagesof mail delivery use SMTP . ◾ However,SMTP is not involvedin the third stage because SMTP is a push protocol; ◾ it pushes the message fromthe client to the server . ◾ On the other hand,the third stage needs a pull protocol;the client must pull messagesfrom the server . ◾ The direction of the bulk data is from the server to the client. ◾ The third stageuses a message access agent. ◾ Currently three messageaccess protocols are available: ◾ Post Office Protocol,version 3 (POP3) ◾ Internet MessageAccess Protocol,version 4 (IMAP4) ◾ Distributive Mail SystemProtocol (DMSP) 65
  • 66. MESSAGE ACCESS PROTOCOLS 66 POP3 (Post Office Protocol): Here the mail person accesses the mail box from say aPC and the mail gets accumulated on a server . ◾ So in POP3 the mail is downloaded to the PC at a time intervalwhich can be specified by the user . ◾ POP3 is used when the mail is always read from the same machine, so it helps to download the mail to it in advance. IMAP (Internet Message Access Protocol): IMAP is a standard email protocol that stores email messages on a mail server, but allows end user to view and manipulate the messages as though they were stored locally on the end user’s device. DMSP(Distributive Mail System Protocol): There are multiple mailboxes on different servers.To read the mail I connect to them from time to time and whenever I do so the mail willbe downloaded. ◾ When a reply is sent then it willput the message inaqueue.Thus DMSP is like a pseudo MTA.
  • 67. SIMPLE NETWORK MANAGEMENT PROTOCOL - SNMP 67 ◾ SNMP is an application layer protocol which uses UDP port number161/162. ◾ SNMP is a framework used for managing devices on the internet. ◾ SNMP is used to monitor the network, detect network faults and sometimes even used to configure remote devices. SNMP components –There are 3 components of SNMP: ◾ SNMP Manager – It is acentralizedsystemusedto monitor network.It is also known as Network Management Station(NMS) ◾ SNMP Agent – It is a software management software module installed on a managed device. Managed devices can be network devices like PC,router ,switches,servers etc. ◾ Management Information Base – MIB consists of information of resources that are to be managed. These informationis organized hierarchically . It consists of objectsinstanceswhich are essentiallyvariables.
  • 68. SNMP COMPONENT 68 somethinggoes wrong,the agent sends awarning messageto the manager . SNMP Manager: ◾ The manager is ahost that controls and monitors a set of agents such asrouters. ◾ It is an application layer protocol in which a few manager stationscan handle a set of agents. ◾ The protocol designed at the application level can monitor the devices made by different manufacturers and installed on different physical networks. ◾ It is used in a heterogeneous network made of different LANs andWANs connectedby routers or gateways. SNMP Agent: ◾ The agent is used to keep the information in a database while the manager is used to access the values in the database. For example, a router can store the appropriate variables such as a number of packets received and forwarded while the manager can compare these variablesto determinewhether the router is congestedor not. ◾ Agents can also contribute to the management process.A server program on the agent checks the environment,if
  • 69. SNMP COMPONENT Management with SNMP has threebasic ideas: ◾ Managementof the internetis achieved through simpleinteractionbetweena manager and agent. ◾ A manager checks the agent by requestingthe informationthat reflects the behavior of the agent. ◾ A manager also forces the agent to perform a certainfunctionby resettingvaluesin the agent database. ◾ An agent also contributes to the management process by warning the manager regardingan unusual condition. Management Information Base: ◾ MIB consists of information of resources that are to be managed. These information is organized hierarchically. It consists of objects instances which are essentially variables. ◾ Each agent has its own MIB,which is a collection of all the objects that the manager can manage. ◾ MIB is categorized into eight groups: system, interface, addresstranslation,ip,icmp,tcp,udp,and egp. 69
  • 70. SNMP MESSAGES Message Description 1. Get_Request Request the value for a variable . 2. Get_Response Returns the value of the variable asked for . 3. Get_Next_Request Request a variable next to the previous one. 4. Set_Request Set the value of an Object. 5.T rap Agent to managerT rap report. 6. Get_bulk_request Request a set of variable of same type. 7. Inform_Request Exchangeof MIB amongManagementstations. 70
  • 71. TERMINAL NETW ORK -TELNET ◾ Remote login ◾ The main task of the internetis to provide services to users. ◾ For example, users want to run different application programs at the remote site and transfers a result to the local site. This requires a client-server program such as FTP , SMTP . But this would not allow us to create a specific program for each demand. ◾ The better solution is to provide a general client-server program that lets the user access any application program on a remote computer . Therefore, a program that allows a user to log on to a remote computer . A popular client-serverprogramTELNET is used to meet such demands. ◾ TELNET is an abbreviationfor Terminal Network. ◾ T elnet provides a connection to the remote computer in such a way that a local terminal appears to be at the remote side. ◾ There are two types of login: ◾ Local Login 71
  • 72. LOCAL LOGIN 72 ◾ When a user logs into alocalcomputer , then it is known aslocallogin. ◾ When the workstation running terminal emulator , the keystrokes entered by the user are accepted by the terminal driver . The terminal driver then passes these characters to the operating system which in turn, invokes the desired applicationprogram. ◾ However,theoperatingsystemhas special meaning to special characters. ◾ For example, in UNIX some combination of characters have special meanings such as control character with "z" means suspend. Such situations do not create any problem as the terminal driver knows the meaning of such characters. But, it can cause the problems in remote login.
  • 73. REMOTE LOGIN 73 ◾ When the user wants to accessan application program on a remote computer , then the user must perform remote login.
  • 74. HOW REMOTE LOGIN OCCURS 74 ◾ AT THE LOCAL SITE The user sends the keystrokes to the terminal driver , the characters are then sent to the TELNET client. The TELNET client which in turn, transforms the characters to a universal character set known as network virtual terminal charactersand delivers them to the localTCP/IP stack. ◾ AT THE REMOTE SITE The commands in NVT forms are transmitted to the TCP/IP at the remote machine. Here, the characters are delivered to the operating system and then pass to the TELNET server . The TELNET server transforms the characters which can be understandable by a remote computer . However , the characters cannot be directly passed to the operating system as a remote operating system does not receive the characters from the TELNET server. Therefore it requires some piece of software that can accept the characters from the TELNET server . The operating systemthen passes these charactersto the appropriateapplication program.
  • 75. NETW ORK VIRTUAL TERMINAL - NVT 75 ◾ The network virtualterminalis an interface that defines how data and commands are sent across the network. ◾ In today's world,systems are heterogeneous. ◾ For example, the operating system accepts aspecial combination of characters such as end-of-file token running aDOS operatingsystem ctrl+z whilethe token running a UNIX operatingsystemis ctrl+d. ◾ TELNET solves this issue by defining a universal interface known as network virtual interface. ◾ The TELNET client translates the characters that come from the local terminal into NVT form and then delivers them to the network. The Telnet server then translates the data from NVT form into a form which can be understandable by a remote computer .
  • 76. DOMAIN NAME SYSTEM - DNS 76 ◾ An applicationlayerprotocol defineshow the applicationprocesses runningon differentsystems,pass the messages to each other . ◾ DNS is a directory service that provides a mapping betweenthe name of a host on the network andits numericaladdress. DNS is required forthefunctioningof theinternet. ◾ Eachnode ina treehas a domain name,anda fulldomainname is a sequenceof symbols specifiedbydots. ◾ DNS is aservice that translates the domain name into IP addresses.This allows the users of networks to utilize user- friendlynameswhen lookingfor other hosts insteadof rememberingthe IP addresses. ◾ For example, suppose the FTP site at EduSoft had an IP address of 132.147.165.50,most people would reach this site by specifying ftp.EduSoft.com.Therefore,thedomain name is more reliablethanIP address.
  • 77. DOMAIN NAME SYSTEM ◾ The Internet uses an address to identify an entity . Each computer connected to the Internet needs to be uniquely identified. The Domain Name System (DNS) translates Internet domain and host namesto IP addresses and viceversa. ◾ To preventduplication, a hierarchicalor tree name space was proposed in which each name has severalparts. ◾ The first part can definethe nature of the organization, ◾ the second part can definethe name of an organization,and ◾ the third part can define departments in the organization, and so on. In this way ,assignment and control of the name space can be decentralized. ◾ Each node in the tree has a label. A full domain name is a sequence of labels separated by dots. ◾ For example, challenger .atc.fhda.edu is a domain name that defines a computer at De Anza College. Each label in the domain may define an entity in the organization; the level of detail increasesfrom right to left. 77
  • 78. DOMAIN NAME SYSTEM ◾ DNS is aTCP/IP protocol used on different platforms. ◾ The domainname spaceis dividedinto three different sections: ◾ Generic domains, ◾ Country domains, and ◾ Inverse domain. 78
  • 79. GENERIC DOMAINS LABEL DESCRIPTION aero Airlines and aerospace companies biz Businesses or firms ◾ It defines the registered hosts according to their generic behavior . ◾ Each node in a tree defines the domain name, which is an index to the DNS database. ◾ It uses three-character labels, and these labels describe the organization type. 9 com Commercial Organizations coop Cooperative business Organizations edu Educational institutions gov Government institutions info Information service providers int International Organizations mil Military groups museum Museum & other nonprofit organizations name Personal names net Network Support centers org 7 Nonprofit Organizations
  • 80. COUNTRY DOMAIN ◾ The format of country domain is same as a generic domain, but it uses two-character country abbreviations (e.g., us for the United States) in place of three character organizational abbreviations. D O M AIN NAM E M EANING 80 au Australia in India cl Chile fr France us United States za South Africa uk United Kingdom es Spain jp Japan de Germany ca Canada ee Estonia hk Hong Kong
  • 81. INVERSE DOMAIN 81 ◾ The inverse domain is used for mapping an address to a name.When the server has receiveda request from the client,and the server containsthe files of only authorizedclients. ◾ To determine whether the client is on the authorized list or not,it sends a query to the DNS server and ask for mappingan address to the name.
  • 82. WORKING OF DNS 82 ◾ DNS is aclient/server network communication protocol. DNS clients send requests to the server while DNS servers send responses to the client. ◾ Client requests contain a name which is converted into an IP address known as a forward DNS lookups while requests containingan IP address which is converted into a name known as reverse DNS lookups. ◾ DNS implementsadistributeddatabase to store the name of all the hosts available on the internet. ◾ DNS is a global system for translating IP addresses to human-readable domain names. When a user tries to access a web address like “example.com”, their web browser or application performs a DN S Query against a DNS server , supplying the hostname. The DNS server takes the hostname and resolves it into a numeric IP address, which the web browser can connect to. ◾ A component called a DNS Resolver is responsible for checking if the hostname is available in local cache, andif not, contacts a series of DNS Name Servers, until eventually it receives the IP of the service the user is trying to reach,and returns it to the browser or application.Thisusually takeslessthan asecond.
  • 83. DNS RECORDS 83 ◾ DNS RECORDS are stored in zone files and are used for translatingdomain names to IP addresses.They also containother data,including thedomainname's name server and mail server information. ◾ Two types of records are used in DNS. ◾ The question records are used in the question section of the query and response messages. ◾ The resource records are used in the answer, authoritative,and additional information sections of the response message. ◾ Question Record: A question record is used by the client to get information from a server . This contains the domain name. ◾ Resource Record: Each domain name (each node on the tree) is associated with a record called the resource record. The server database consists of resource records. Resource records are also what is returned by the server to the client. ◾ Note: Domain Name System basically translates those domain names into IP addresses and points your device in the rightdirection.A domain name and its matching IP address is calleda“DNS record”.
  • 84. DNS QUERY There are three types of queries in the DNS system: ◾ Recursive Query: In a recursive query , a DNS client provides a hostname, and the DNS Resolver “must” provide an answer—it responds with either a relevant resource record, or an error message if it can't be found. The resolver starts a recursive query process, starting from the DNS Root Server , until it finds the Authoritative Name Server (for more on Authoritative Name Servers see DNS Server T ypes below) that holds the IP address and other information for the requestedhostname. ◾ Iterative Query: In an iterative query , a DNS client provides a hostname, and the DNS Resolver returns the best answer it can. If the DNS resolver has the relevant DNS records in its cache, it returns them. If not, it refers the DNS client to the Root Server , or another Authoritative Name Server which is nearest to the required DNS zone.The DNS client mustthen repeat the query directlyagainst the DNS server it was referred to. ◾ Non-Recursive Query: A non-recursive query is a query in which the DNS Resolver already knows the answer . It either immediately returns a DNS record because it already stores it in local cache, or queries a DNS Name Server which is authoritative for the record, meaning it definitely holds the correct IP for that hostname. In both cases, there is no need for additional rounds of queries (like in recursive or iterative queries). Rather , a respons8 e4 is immediately returned to the client.
  • 85. DNS SERVERS The followingare the most common DNS server typesthat are used to resolve hostnamesinto IP addresses. ◾ DNS Resolver:A DNS resolver (recursive resolver),is designed to receiveDNS queries,which include a human- readable hostname such as“www .example.com”, and is responsible for trackingthe IP address for that hostname. ◾ DNS Root Server: The root server is the first step in the journey from hostnameto IP address. The DNS Root Server extracts the Top Level Domain (TLD) from the user’s query - for example, www .example.com - provides details for the .com TLD Name Server . In turn,that server will provide details for domains with the .com DNS zone,including“example.com”. ◾ Authoritative DNS Server: Higher level servers in the DNS hierarchy define which DNS server is the “authoritative” name server for a specific hostname, meaning that it holds the up-to-date information for that hostname. The Authoritative Name Server is the last stop in the name server query-it takes the hostname and returns the correct IP address to the DNS Resolver (or if it cannot find the domain, returns the message NXDOMAIN). 85
  • 86. DNS SERVERS 86 The followingare the most common DNS server typesthat are used to resolve hostnamesinto IP addresses. ◾ DN S Resolver: A DNS resolver (recursive resolver), is designed to receive DNS queries, which include a human- readable hostname such as“www .example.com”, and is responsible for trackingthe IP address for that hostname. ◾ DN S Root Server: The root server is the first step in the journey from hostname to IP address. The DNS Root Server extracts the Top Level Domain (TLD) from the user’s query - for example, www.example.com - provides details for the .com TLD Name Server. In turn, that server will provide details for domains with the .com DNS zone,including“example.com”. ◾ Authoritative DN S Server: Higher level servers in the DNS hierarchy define which DNS server is the “authoritative” name server for a specific hostname, meaning that it holds the up-to-date information for that hostname. ◾ The AuthoritativeName Server is the last stop in the name server query - it takes the hostnameand returns the correct IP address to the DNS Resolver (or if it cannot find the domain, returns the messageNXDOMAIN).
  • 87. DNS TYPES 87 ◾ DNS servers create a DNS record to provide important informationabout a domain or hostname,particularlyits current IP address. ◾ The most common DNS record types are:
  • 88. NAME SERVERS 88 and the name server may also choose to restrict the clientswhich can use recursive mode. ◾ Name servers are the repositories of informationthat make up the domain database. ◾ The database is dividedup into sections called zones,which are distributedamong the name servers. ◾ Name servers can answer queries in a simple manner; the response can always be generated using only local data, and either contains the answer to the question or a referral to other name servers "closer" to the desired information. ◾ The way that the name server answers the query depends upon whether it is operating in recursive mode or iterative mode: ◾ The simplest mode for the server is non-recursive, since it can answer queries using only local information: the response contains an error, the answer , or a referral to some other server "closer" to the answer . All name servers must implement non-recursive queries. ◾ The simplest mode for the client is recursive, since in this mode the name server acts in the role of a resolver and returns either an error or the answer , but never referrals. This service is optional in a name server ,