Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 19

Unit-V

Application layer
DNS--Domain Name System:
This is primarily used for mapping host and e-mail destinations to IP addresses but can
also be used other purposes. DNS is defined in RFCs 1034 and 1035.

Working:-
 To map a name onto an IP address, an application program calls a library
procedure called Resolver, passing it the name as a parameter.
 The resolver sends a UDP packet to a local DNS server, which then looks up the
name and returns the IP address to the resolver, which then returns it to the caller.
 Armed with the IP address, the program can then establish a TCP connection with
the destination, or send it UDP packets.
 The DNS name space.
 Resource Records.
 Name Servers.

The DNS name space:-


The Internet is divided into several hundred top level domains, where each
domain covers many hosts. Each domain is partitioned into sub domains, and these are
further partitioned as so on. All these domains can be represented by a tree, in which the
leaves represent domains that have no sub domains. A leaf domain may contain a single
host, or it may represent a company and contains thousands of hosts. Each domain is
named by the path upward from it to the root. The components are separated by
periods(pronounced “dot”)
Eg: Sun Microsystems Engg. Department = eng.sun.com.
The top domain comes in 2 flavours:-
 Generic: com(commercial), edu(educational instructions), mil(the U.S armed
forces, government), int (certain international organizations), net( network
providers), org(non profit organizations).
 Country: include 1 entry for every country.

Domain names can be either absolute (ends with a period e.g. eng.sum.com) or
relative (doesn’t end with a period). Domain names are case sensitive and the component
names can be up to 63 characters long and full path names must not exceed 255
characters.

Insertions of a domain into the tree can be done in 2 days:-


 Under a generic domain ( Eg: cs.yale.edu)
 Under the domain of their country (E.g: cs.yale.ct.us)
☼ Resource Records:
Every domain can have a sent of resource records associated with it. For a single
host, the most common resource record is just its IP address. When a resolver gives a
domain name to DNS, it gets both the resource records associated with that name i.e., the
real function of DNS is to map domain names into resource records.
A resource record is a 5-tuple and its format is as follows:

Domain _name : Tells the domain to which this record applies.


Time- to- live : Gives an identification of how stable the record is
(High Stable = 86400 i.e. no. of seconds /day)
( High Volatile = 1 min)
Type: Tells what kind of record this is.
Class: It is IN for the internet information and codes for non internet information
Value: This field can be a number a domain name or an ASCII string
Type Meaning Value
SOA Start Of Authority 32-bit integer
A IP address of host 32 bit integer
MX Mail Exchange Priority domain willing to accept
NS Name Server Name of server for this domain
CNAME Canonical Name Domain name
PTR Pointer Alias for an IP address
HINIF Host Description CPU and OS in a ASCII
TXT Text Un interpreted ASCII Text
Name Servers:
It contains the entire database and responds to all queries about it. DNS name
space is divided up into non-overlapping zones, in which each zone contains some part of
the tree and also contains name servers holding the authoritative information about that
zone.

When a resolver has a query about a domain name, it passes the query to one of the local
name servers:
1. If the domain being sought falls under the jurisdiction of name server, it returns the
authoritative resource records ( that comes from the authority that manages the
record, and is always correct).
2. If the domain is remote and no information about the requested domain is available
locally the name server sends a query message to the top level name server for the
domain requested.
Eg: A resolver of flits.cs.vle.nl wants to know the IP address of the host
Linda.cs.yale.edu

Step 1: Resolver sends a query containing domain name sought the type and the class to
local name server, cs.vu.nl.
Step 2: Suppose local name server knows nothing about it, it asks few others near by
name servers. If none of them know, it sends a UDP packet to the server for edu-
server.net.
Step 3: This server knows nothing about Linda.cs.yale.edu or cs.yale.edu and so it
forwards the request to the name server for yale.edu.
Step 4: This one forwards the request to cs.yale.edu which must have authoritative
Resource records.
Step 5 to 8: The resource record requested works its way back in steps 5-8. This
query method is known as Recursive Query
3. When a query cannot be satisfied locally, the query fails but the name of the next
server along the line to try is returned.
Simple Network Management Protocol
 SNMP - Version 1
 SNMP - Version 2
 SNMP - Version 3
SNMP was developed for use as a n/w management tool for N/W and internet
works operating TCP/IP. It includes the following key elements:
1. Management Station or Manager 3. Management Information Base
2. Agent 4. N/W Management Protocol
Management Station serves as interface for human N/W manager into network
Management system. It will have the following:
1. A set of management applications for data analysis fault recovery and so on.
2. An interface by which the n/w manager may monitor and control the n/w.
3. The capability of translation the n/w managers requirements into the actual
monitoring and control of remote elements in the n/w.
4. A data base of n/w management information extracted from the databases of
all the managed entities in the n/w.
Management Agent software equips key platforms such as hosts, Bridges, routers and
hubs so that they may be managed from a management station. The agent responds to
requests for information from a management station, responds to requests for actions
from management station, and may asynchronously provide management station with
important but unsolicited information.
To manage resources in the n/w, each resource is represented as an object (a data
variable that represents one aspect of managed agent). The collection of objects is
referred to as a Management Information Base (MIB). The MIB functions as a
collection of access points at the agent for management station. A management station
performs the monitoring function by retrieving the value of MIB objects.
The management station and agents are linked by a n/w management protocol.
The protocol used for the management of TCP/IP network is SNMP. Each of these
protocols includes the following key capabilities:
 GET: Enables the management station to retrieve the value of objects at the
agent
 SET: Enables the management station to set the value of objects at the agent
 NOTIFY: Enables an agent to send unsolicited notifications to management
station of Significant events
SNMP – V1 Configuration:

Role of SNMP-V2 :

From management station, 3 types of SNMP messages are issued or behalf of a


Management application: Get Request , Get Next Request and Set Request.
All these 3 messages are acknowledge by the agent in the form of Get Response
message which is passed up to management application.
In addition the agent may issue a type message in response to an event that effect
the MIB and the underlying managed resources. Management requests are sent to UDP
port 161 , while the agent sends traps to UDP port 162.
SNMP-V2: It provides a framework on which n/w management, performance,
monitoring, accounting and so on.

Each player in the N/w management system maintains a local database of


information relevant to N/W management, a known as MIB. The SNMPV 2 standard
defines the structure of this info and the allowable data types. This information is known
as Structure of Management Information (SMI).
One system is responsible for N/W management while the other systems art and
role of agent. An agent collects the information and stores it for later access by a
manager. The information includes data accounts the system it self and may also include
traffic information for N/W to which the agent attaches.
SMI: It defines the general framework with in which a MIB can be defined and
constructed. The SMI identifies the data types hat can be used in MIB, and how resources
with in MIB are represented and named. The MIB can store only simplify the task of
implementation and to enhance interoperability. There are 3 key elements in SMI
specification: -
1. At lowest level, the SMI specifies the data types that may be stored.
2. Then SMI specifies a formal technique for defining objects and tables of
objects.
3. Finally, SMI provides a scheme for associating a unique identifies with
each actual object in a system, so that a manager can reference data at an
agent.
Protocol operation:-
The protocol provides a straight forward, basic mechanism for the exchange of
management information between agent and manager. The basic unit of exchange is
message, which consists of an outer message wrapper and an inter protocol data unit .The
outer message header deals with security. 7 types of PDU s may be carried in an SNMP
message.

(a).Get-Request-PDU, Get-Next-Request-PDU, Set-Request-PDU, SNMPV2-TrapPDU,


Inform-Request-PDU:

PDU type Req -id 10 Variable-bindings

(b). Response-PDU:
PDU type Req-id Error-status Error-index Variable-bindings

(c). Get-Bulk-Request-PDU:

PDU type Req-id Non-repeaters Max-repetitions Variable-bindings


(
d). Variable bindings:
Name 1 Value 1 Name 2 Value 2 …………… Name n Value n
 GET REQUEST-PDU: Includes a list of one (or) more object names for which
values are requested .If the get operation is successful, and then the responding
agent will send a Response-PDU
 GET NEXT REQUEST-PDU: Includes a list of one (or) more objects .For each
object named in variable-bindings field, a value is to be returned for the object
that is next in lexographic order
 GET BULK REQUEST-PDU: The purpose is to minimize the number of
protocol exchanges required to retrieve a large amount of management
information .It allows manager to request that the response be as large as possible
given the constraints or message size
 SET REQUEST-PDU: Used to request that the values of one (or) more objects
be altered .The operation is atomic
 SNMPV2-TRAP-PDU: It is generated when an unusual event occurs and is used
to provide management station with asynchronous notification of some significant
event .It is an unconfirmed message
 INFORM REQUEST-PDU: It is sent on behalf of an application to provide
management information to an application using it
 VARIABLE BINDINGS: Used to convey the associated information

SNMP-V3: This defines an over all SNMP architecture and a set of security
capabilities .It provides 3 important services:
 Authentication
 Privacy Part of User-Based Security Model (USM)
 Access Control Defined in View-Based Access Control Model (VACM)

The Authentication mechanism in USM assures that a received message was


transmitted by the principal whose identifier appears as the source in message header .It
also assumes that the message has not been altered in transit and has not been artificially
delayed (or) replayed .The sending principal provides authentication by including a
message authentication code with SNMP message it is sending .The code is a function of
the message contents, the identity of sending and receiving parities, the time of
transmission and a secret key that should be known only to sender and receiver .
The configuration/network manager distributes the secret keys and so they are
kept outside of USM .When the receiving principal gets the message, it uses the same
secret key to calculate the message authentication code once again and if it is matched
with the appended value of incoming message, the receiver confirms that the sender is the
authorized one. The authentication code is called HMAC. The privacy facility of USM
enables managers and agents to encrypt messages, by sharing a secret key between them.
If they are configured to use the privacy facility, all traffic between them is encrypted
using DES. The access control facility makes it possible to configure agents to provide
different levels of access to the agents Management Information Base (MIB) to different
managers.
An agent principal can restrict access to its MIB for a particular manager principal in
2ways:-
 It can restrict access to a certain portion of its MIB
 It can limit the operations that a manager can use on that portion of
MIB
E-MAIL
1. Architecture and Services:
E-mail systems consist of two subsystems. They are:-
 (a). User Agents, which allow people to read and send e-mail
 (b). Message Transfer Agents, which move messages from source to
destination
E-mail systems support 5 basic functions:-
 Composition
 Transfer
 Reporting
 Displaying
 Disposition
(Composition: It refers to the process of creating messages and answers. Any text editor
is used for body of the message. While the system itself can provide assistance with
addressing and numerous header fields attached to each message
(b).Reporting: It has to do with telling the originator what happened to the message that
is, whether it was delivered, rejected (or) lost.
(c).Transfer: It refers to moving messages from originator to the recipient
(d).Displaying: Incoming messages are to be displayed so that people can read their
email.
(e).Disposition: It concerns what the recipient dose with the message after receiving it.
Possibilities include throwing it away before reading (or) after reading, saving it and so
on

(2). The User Agent: It is normally a program that accepts a variety of commands
for composing, receiving and replying to messages as well as for
manipulating mail boxes.
 Sending E-mail: To do so, User must provide the messages, the destination address
and possibly some other parameters (Eg: the priority (or) security level). The message
can be produced with a free-standing text editor, a word processing program or
possibly with a text editor built into the user agent. The destination address must be in
a format that the user agent can deal with. Many user agents expect DNS address of
the form mailbox @ location.
 Reading E-mail : When a user agent is started up, it will look at the user’s mailbox
for incoming mail before displaying anything on the screen. Then it may announce
the no. of messages in the mailbox or display a one-line summary of each one and
wait for a command. Each display line contains several fields(extracted from the
header of the corresponding message) like……..

Eg:
# Flags Bytes Sender Subject

1 K 1030 ASW changes to MIN-MAX


2 KA 6348 SAM RC: Hai

1st field(#) : Message Number.

2nd field(flags) : K- Message is not new but already read.


KA - Message has already been answered.
3rd field(Bytes) : Tells how long the message is.

4th field(sender) : Tells who sent the message.


5th field(subject) : Gives brief summary of what the message is
about.
After the headers have been displayed, the user can perform any of the commands
available.

Message Formats :
 RFC 822 (SMTP)
 RFC 1551 (MIME)
(1). RFC 822 :
Messages consist of a primitive envelope, some no. of header fields, a blank
line and then the message body. Each header field consists of a single line of ASCII text
containing the fieldname, a colon and a value. The principal header fields related to
message transport one :
After the headers, comes the message body. Users can put whatever they want
here.

(outgoing-mail)

(Incoming-mail)

Each Queued message has 2 parts :


 The message text, consisting of RFC 822 header and body of message.
 A list of mail destinations.
The SMTP Sender takes messages from the outgoing mail queue and transmits them
to proper destination host via SMTP transactions over one or more TCP connections to
port 25 on target hosts.
Multimedia Networking:-

 Multimedia is media and content that uses a combination of different content


forms.
 Integration of multiple forms of media, including text, graphics, audio, video, etc.
 The term can be used as a noun (a medium with multiple content forms) or as an
adjective describing a medium as having multiple content forms.
 The term is used in contrast to media which only use traditional forms of printed
or hand-produced material.
 Multimedia includes a combination of text, audio, still images, animation, video,
and interactivity content forms.
 Multimedia is usually recorded and played, displayed or accessed by information
content processing devices, such as computerized and electronic devices, but can
also be part of a live performance.
 Multimedia (as an adjective) also describes electronic media devices used to store
and experience multimedia content.
 Multimedia is distinguished from mixed media in fine art; by including audio, for
example, it has a broader scope.
 The term "rich media" is synonymous for interactive multimedia.
 Hypermedia can be considered one particular multimedia application.
 Streaming media are multimedia that are constantly received by, and normally
presented to, an end-user while being delivered by a streaming provider (the term
"presented" is used in this article in a general sense that includes audio or video
playback). The name refers to the delivery method of the medium rather than to
the medium itself. The distinction is usually applied to media that are distributed
over telecommunications networks, as most other delivery systems are either
inherently streaming (e.g., radio, television) or inherently non-streaming (e.g.,
books, video cassettes, audio CDs). The verb 'to stream' is also derived from this
term, meaning to deliver media in this manner.
 Continuous Media: An uninterrupted roll or box of label or tag stock media that
contains no gap, notch, or sensor mark to separate individual labels or tags. The
media is one long piece of material similar to a fax roll.
Introduction to digital audio:-
Audio: - recording or transmitting of sound or music.
 An audio wave is a one- dimensional pressure wave.
 When a pressure wave enters the ear, the eardrum vibrates, causing the tiny bones
of the inner ear to vibrate along with it, sending nerve pulses to the brain.
 These pulses are perceived as sound by the listener.
 When a pressure wave strikes a microphone, the micro phone generates an
electrical signal, representing the sound amplitude as a function of time.
 The representation, processing, storage, & transmission of such audio signals are
a major part of the study of multimedia systems.
 The frequency range of the human ear runs from 20Hz to 20000 Hz.
 Audio waves can be converted to digital form by an ADC( Analog digital
converter)
 An ADC takes an electrical voltage as input and generates a binary number as
output.
 The error introduced by the finite number of bits per sample is called the
quantization noise. If it is too large, the ear detects it.
 Two well-known examples where sampled sound is used are the telephone &
audio compact discs.
 Digitized sound can be easily processed by computers in software. Dozens of
programs exist for personal computers to allow users to record, display, edit, mix,
and store sound waves from multiple sources.
 Music is a special case of general audio, but an important one.
 Another important special case is speech
 Human speech tends to be in the 600Hz to 6000Hz range.
 Speech is made up of vowels & consonants, which have different properties.
 Vowels are produced when the vocal tract is unobstructed; producing resonances
whose fundamental frequency depends on the size & shape of the vocal system &
the position of the speaker’s tongue & jaw.
 These sounds are almost periodic for intervals of about 30msec.
 Constants are produced when the vocal tract is partially blocked. These sounds
are less regular than vowels.

Compression:

 Compression is needed to send video over the internet.


 Compression is of 2 types
(1). Audio compression
(2). Video compression
 Audio compression can be used for speech or music. For speech, we need to
compress a 64 KHz digitized signal; for music, we need to compress a 1.411-
MHz signal. Two categories of techniques are used for audio compression:
predictive encoding & perceptual encoding.
 In Predictive encoding, the differences between the samples are encoded
instead of encoding all the sampled values. This type of compression is
normally used for speech.
 The most common compression technique that is used to create CD- quality
audio is based on the perceptual encoding technique.
 Some sounds can mask other sounds. Masking can happen in frequency and
time.
 In frequency masking, a loud sound in a frequency range can partially or
totally mask a softer sound in another frequency range.
 In temporal masking, a loud sound can numb our ears for a short time even
after the sound has stopped.
 MP3 uses these 2 phenomena, frequency & temporal masking, to compress
audio signals.
 Video compression: video is composed of multiple frames. Each frame is
one image. We can compress video by first compressing images.
 Two standards are prevalent in the market.
 JPEG (joint photographic experts group) is used to compress
images. It involves blocking, the discrete cosine transform,
quantization, and lossless compression.
 Moving picture experts group (MPEG) is used to compress video. It
involves spatial compression and temporal compression. Spatial
compression is similar to JPEG. Temporal compression removes the
redundant frames.

The World WEB:

HTTP:
o HTTP stands for Hyper Text Transfer Protocol.
o It is a protocol used to access the data on the World Wide Web (www).
o The HTTP protocol can be used to transfer the data in the form of plain
text, hypertext, audio, video, and so on.
o This protocol is known as HyperText Transfer Protocol because of its
efficiency that allows us to use in a hypertext environment where there are
rapid jumps from one document to another document.
o HTTP is similar to the FTP as it also transfers the 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 transfer the files.
o HTTP is used to carry the data in the form of MIME-like format.
o HTTP is similar to SMTP as the data is transferred between client and
server. The HTTP differs from the SMTP in the way the messages are sent
from the client to the server and from server to the client. SMTP messages
are stored and forwarded while HTTP messages are delivered immediately.

Features of HTTP:
o 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.
o 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 data
content. It is required for both the client and server to specify the content
type in MIME-type header.
o 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 retain the information between
various requests of the web pages.

HTTP Transactions

The above figure shows the HTTP transaction between client and server. The
client initiates a transaction by sending a request message to the server. The
server replies to the request message by sending a response message.

Messages
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 sometimes a body.
Uniform Resource Locator (URL)
o A client that wants to access the document in an internet needs an address
and to facilitate the access of documents, the HTTP uses the concept of
Uniform Resource Locator (URL).
o The Uniform Resource Locator (URL) is a standard way of specifying any
kind of information on the internet.
o The URL defines four parts: method, host computer, port, and path.

o Method: The method is the protocol used to retrieve the document from


a server. For example, HTTP.
o 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.
o 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 between
the host and path and it should be separated from the host by a colon.
o Path: Path is the pathname of the file where the information is stored. The
path itself contain slashes that separate the directories from the
subdirectories and files.

Streaming audio and video:

You might also like