CN Unit 5
CN Unit 5
COMPUTER NETWORKS
1
UNIT-V
Application Layer
Contents:
Domain name system:
The DNS Name Space,
Domain Resource Records,
Name Servers,
Electronic Mail:
Architecture Services,
SMTP, SNMP
the World Wide Web:
Architectural Overview,
HTTP,
Streaming audio and video:
Digital audio,
Digital video,
Streaming stored media,
Streaming live media, 2
3
Domain Name System
DNS is a TCP/IP protocol used on different platforms. The domain
name space is divided into three different sections: Generic domains,
country domains, and inverse domain.
4
Domain name system
1.Genericdomain:.com:
(commercial).edu(educational) .mil(military) .org(non profit
organization) .net(similar to commercial) all these are generic domain.
2. Country domain: .in (India) .us(united states) .uk
3. Inverse domain: if we want to know what is the domain name of the
website. Ip to domain name mapping. So DNS can provide both the
mapping for example to find the ip addresses of geeksforgeeks.org
then we have to type nslookup www.geeksforgeeks.org
5
Domain name system
6
Domain name system
Hierarchy of Name Servers
Root name servers – It is contacted by name servers that can not resolve the name. It
contacts authoritative name server if name mapping is not known. It then gets the mapping
and return the IP address to the host.
Top level server – It is responsible for com, org, edu etc and all top level country domains
like uk, fr, ca, in etc. They have info about authoritative domain servers and know names and
IP addresses of each authoritative name server for the second level domains.
Authoritative name servers This is organization’s DNS server, providing authoritative
hostName to IP mapping for organization servers. It can be maintained by organization or
service provider. In order to reach cse.dtu.in we have to ask the root DNS server, then it will
point out to the top level domain server and then to authoritative domain name server which
actually contains the IP address. So the authoritative domain server will return the associative
ip address.
7
Domain name system
Each node in the tree has a domain name. A full domain name is a
sequence of labels separated by dots (.). The domain names are always
read from the node up to the root. The last label is the label of the root
(null). This means that a full domain name always ends in a null label,
which means the last character is a dot because the null string is
nothing.
8
9
Name Servers
10
11
Electronic Mail
12
Electronic Mail
• Architecture and services
• The user agent
• Message formats
• Message transfer
• Final delivery
13
Architecture of the email system
14
15
16
The User Agent
17
The User Agent
18
Message Formats
19
Message Formats
20
SMTP
21
SMTP
23
SMTP
24
SMTP
25
MIME(Multipurpose Internet Mail
Extensions).
The MIME protocol allows the users to exchange various types of digital
content such as pictures, audio, video, and various types of documents and
files in the e-mail.
26
1. MIME-Version – Defines the version of the MIME protocol. It
must have the parameter Value 1.0, which indicates that
message is formatted using MIME.
27
MIME content types and example
subtypes
28
IMAP (Internet Message Access
Protocol).
IMAP—The Internet Message Access Protocol One of the main protocols
that is used for final delivery is IMAP (Internet Message Access
Protocol).
To use IMAP, the mail server runs an IMAP server that listens to port
143. The user agent runs an IMAP client.
29
30
SNMP(Simple Network Management
Protocol)
the indexes of the entries, then it will not be able to retrieve the values. In
such situations, GetNextRequest message is used to define an object.
GetResponse: The GetResponse message is sent from an agent to the
manager in response to the GetRequest and GetNextRequest message. This
message contains the value of a variable requested by the manager.
Trap: The Trap message is sent from an agent to the manager to report an
event. For example, if the agent is rebooted, then it informs the manager as
well as sends the time of rebooting.
33
World Wide Web
34
World Wide Web
• Architectural overview
• Static web pages
• Dynamic web pages, web applications
• The hypertext transfer protocol
35
World Wide Web
The WWW 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 locations called sites.
Client (Browser) A variety of vendors offer commercial browsers that
interpret and display a Web document, and all use nearly the same
architecture. Each browser usually consists of three parts: a controller,
client protocol, and interpreters.
36
Architecture of WWW
37
World Wide Web
The Web page is stored at the server. Each time a client request
arrives, the corresponding 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.
38
39
Client Side
40
Server Side
41
These steps occur after the TCP connection and any secure transport
mechanism have been established.
4. Fetch the requested page from disk or run a program to build it.
5. Determine the rest of the response (e.g., the MIME type to send).
42
Cookies
Cookies Navigating the Web as we have described it so far involves a
series of independent page fetches.
Then the server forgets that it has ever seen that particular client.
This model is perfectly adequate for retrieving publicly available
documents, and it worked well when the Web was first created.
43
Static Web Pages
Static web pages are just files sitting on some server that
present themselves in the same way each time they are fetched
and viewed.
The term ‘‘markup’’ comes from the old days when copyeditors
actually marked up documents to tell the printer— in those days,
a human being—which fonts to use, and so on. Markup
languages thus contain explicit commands for formatting.
44
<html>
<head> <title> AMALGAMATED WIDGET, INC. </title> </head>
<body> <h1> Welcome to AWI’s Home Page </h1>
<img src="http://www.widget.com/images/logo.gif" ALT="AWI Logo"> <br>
We are so happy that you have chosen to visit <b> Amalgamated Widget’s</b>
home page. We hope <i> you </i> will find all the information you need here.
<p>Below we have links to information about our many fine products.
You can order electronically (by WWW), by telephone, or by email. </p>
<hr>
<h2> Product information </h2>
<ul>
<li> <a href="http://widget.com/products/big"> Big widgets </a> </li>
<li> <a href="http://widget.com/products/little"> Little widgets </a> </li>
</ul>
<h2> Contact information </h2>
<ul>
<li> By telephone: 1-800-WIDGETS </li>
<li> By email: [email protected] </li>
45
</ul>
</body>
46
Dynamic Web Pages
Dynamic Web Pages are written in languages such as CGI, AJAX, ASP,
ASP.NET, etc. In dynamic web pages, the Content of pages is different for
different visitors. It takes more time to load than the static web page.
Dynamic web pages are used where the information is changed frequently,
for example, stock prices, weather information, etc.
47
HTTP—The Hyper Text Transfer Protocol
HTTP is a simple request-response protocol that normally runs over
TCP. It specifies what messages clients may send to servers and what
responses they get back in return. The request and response headers
are given in ASCII, just like in SMTP. The contents are given in a
MIME-like format, also like in SMTP. This simple model was partly
responsible for the early success of the Web because it made
development and deployment straightforward.
48
Connections
49
HTTP—The Hyper Text Transfer Protocol
50
HTTP—The Hyper Text Transfer Protocol
51
HTTP—The Hyper Text Transfer Protocol
52
HTTP—The Hyper Text Transfer Protocol
53
HTTP—The Hyper Text Transfer Protocol
54
HTTP—The Hyper Text Transfer Protocol
55
HTTP Caching
56
Streaming Audio and Video
• Digital audio
• Digital video
• Streaming stored media
• Streaming live media
• Real-time conferencing
57
Digital audio
58
Digital audio
59
Digital audio
60
Digital audio
61
Digital audio
62
Digital video
63
Digital video
64
Digital video
65
Digital video
66
Digital video
67
Digital video
68
Streaming Stored Media
Streaming means a user can listen (or watch) the file after the
downloading has started. In the first category, streaming
stored audio/video, the files are compressed and stored on
server. A client downloads the files through the Internet. This
is sometimes referred to as on-demand audio/vide
Major tasks of the media player:
1.Manage the user interface.
2Handle transmission errors.
3.Decompress the content.
4.Eliminate jitter
69
Streaming Stored Media
First Approach: Using a Web Server
A compressed audio/video file can be downloaded as a text
file. The client (browser) can use the services of HTTP and send a GET
message to download the file. The Web server can send the compressed file
to the browser. The browser can then use a help application, normally called
a media player, to play the file. The file needs to download completely
before it can be played.
70
Second Approach: Using a Web Server with
Metafile
In another approach, the media player is
directly connected to the Web server for downloading
the audio/video file. The Web server stores two files:
the actual audio/video file and a metafile that holds
information about the audio/video file.
71
Third Approach: Using a Media Server :
The problem with the second approach is that the browser
and the media player both use the services of HTTP. HTTP is designed to run
over TCP. This is appropriate for retrieving the metafile, but not for
retrieving the audio/video file. The reason is that TCP retransmits a lost or
damaged segment, which is counter to the philosophy of streaming. We
need to dismiss TCP and its error control; we need to use UDP. However,
HTTP, which accesses the Web server, and the Web server itself are
designed for TCP; we need another server, a media server.
72
Fourth Approach: Using a Media Server and RTSP :
73
Streaming Live Media
Livestreaming refers to online streaming media simultaneously
recorded and broadcast in real-time. It is often referred to simply
as streaming, but this abbreviated term is ambiguous because
"streaming" may refer to any media delivered and played back
simultaneously without requiring a completely downloaded file.
Non-live media such as video-on-demand, vlogs, and YouTube
videos are technically streamed, but not live-streame
74
Real-Time Conferencing
Real-time communications (RTC) is any mode of
telecommunications in which all users can exchange
information instantly or with negligible latency or
transmission delays. In this context, the term real-
time is synonymous with live.
75
Real-Time Conferencing