Professional Documents
Culture Documents
Chapter 8
Chapter 8
2
Domain Name System
3
Domain Name System
4
Host file
◉ When the Internet was small, mapping was done by using a host file.
◉ The host file had only two columns: name and address.
◉ Every host could store the host file on its disk and update it
periodically from a master host file.
◉ When a program or a user wanted to map a name to an address, the
host consulted the host file and found the mapping.
◉ Today, however, it is impossible to have one single host file
5
Domain Name System
◉ This huge amount of information is divided into smaller parts and store
each part on a different computer
◉ Name space that maps each address to a unique name can be organized in
two ways: flat or hierarchical
◉ Flat Name Space : In a flat name space, a name is assigned to an address.
◉ A name in this space is a sequence of characters without structure. The
names may or may not have a common section.
6
Domain Name System
7
Domain Name Space
8
Domain Name Space
9
10
Domain Name Space
11
Domain Name System
◉ RESOLUTION
◉ Mapping a name to an address or an address to a name is called name-
address resolution
◉ A host that needs to map an address to a name or a name to an address calls
a DNS client called a resolver.
◉ The resolver accesses the closest DNS server with a mapping request. If the
server has the information, it satisfies the resolver
◉ otherwise, it either refers the resolver to other servers or asks other servers
to provide the information.
12
Domain Name System
13
Domain Name System
◉ Recursive Resolution:
◉ The client (resolver) can ask for a recursive answer from a name server.
◉ This means that the resolver expects the server to supply the final answer.
◉ If the server is the authority for the domain name, it checks its database and
responds.
◉ If the server is not the authority, it sends the request to another server (the
parent usually) and waits for the response.
◉ When the query is finally resolved the response travels back until it finally
reaches the requesting client.
14
Domain Name System
15
Domain Name System
◉ Iterative Resolution:
◉ If the client does not ask for a recursive answer the mapping can be done
iteratively.
◉ If the server is an authority for the name, it sends the answer. if it is not, it
returns the IP address of the server that it thinks can resolve the query.
◉ The client is responsible for repeating the query to this second server
◉ This process is called iterative because the client repeats the same query to
multiple servers.
16
17
Domain Name System
◉ Caching :
◉ Reduction of this search time would increase efficiency. DNS handles this
with a mechanism called caching.
◉ When a server asks for a mapping from another server and receives the
response, it stores this information in its cache memory before sending it to
the client.
◉ If the same or another client asks for the same mapping, it can check its
cache memory and solve the problem.
18
Electronic Mail
19
Electronic Mail
20
Architecture of Electronic Mail
21
Architecture of Electronic Mail
22
Architecture of Electronic Mail
◉ user agents:
◉ The user agent is a program that provides a graphical interface, or
sometimes a text- and command-based interface that lets users
interact with the email system.
◉ It includes a means to compose messages and replies to messages,
display incoming messages, and organize messages by filing,
searching, and discarding them
◉ A user agent runs on the same computer on which a user reads her
mail
23
Architecture of Electronic Mail
◉ The act of sending new messages into the mail system for delivery is
called mail submission.
◉ The message transfer agents are typically system processes
◉ They run in the background on mail server machines and are
intended to be always available.
◉ Their job is to automatically move email through the system from the
originator to the recipient with SMTP (Simple Mail Transfer
Protocol).
24
Architecture of Electronic Mail
◉ SMTP: It sends mail over connections and reports back the delivery
status and any errors.
◉ Feature of MTA
◉ Message transfer agents also implement mailing lists, in which an
identical copy of a message is delivered to everyone on a list of email
addresses.
◉ Other advanced features are carbon copies, blind carbon copies, high-
priority email, secret (i.e., encrypted) email, alternative recipients if
the primary one is not currently available etc.
25
Structure of Email
26
Structure of Email
27
Structure of Email
◉ The message inside the envelope consists of two separate parts: the
header and the body.
◉ The header contains control information for the user agents.
◉ The body is entirely for the human recipient
28
File Transfer Protocol(FTP)
29
File Transfer Protocol(FTP)
◉ It is an application layer protocol that moves files between local and remote
file systems.
◉ To transfer a file, 2 TCP connections are used by FTP in parallel: control
connection and data connection.
◉ Control connection : For sending control information like user identification,
password, commands to change the remote directory, commands to retrieve
and store files, etc.
◉ The control connection is initiated on port number 21
30
File Transfer Protocol(FTP)
31
File Transfer Protocol(FTP)
◉ data connection : For sending the actual file, FTP makes use of a
data connection. A data connection is initiated on port number 20.
32
File Transfer Protocol(FTP)
◉ Speed: One of the biggest advantages of FTP is speed. The FTP is one of the
fastest way to transfer the files from one computer to another computer.
◉ Efficient: It is more efficient as we do not need to complete all the operations to
get the entire file.
◉ Security: To access the FTP server, we need to login with the username and
password. Therefore, we can say that FTP is more secure.
◉ Back & forth movement: FTP allows us to transfer the files back and forth.
Suppose you are a manager of the company, you send some information to all
the employees, and they all send information back on the same server.
33
Disadvantages of FTP
◉ file size limit is the drawback of FTP only 2 GB size files can be
transferred.
◉ multiple receivers are not supported by the FTP.
◉ FTP does not encrypt the data this is one of the biggest drawbacks
of FTP.
34
World Wide Web (WWW)
35
World Wide Web (WWW)
◉ World Wide Web, which is also known as a Web, is a collection of websites or
web pages stored in web servers and connected to local computers through the
internet
◉ Pages are generally viewed with a program called a browser.
◉ Client/Browser
◉ The Client/Web browser is basically a program that is used to communicate with
the webserver on the Internet.
◉ Firefox, Internet Explorer, and Chrome are examples of popular browsers
◉ The browser fetches the page requested, interprets the content, and displays the
page, properly formatted, on the screen
◉ 36
◉ Architecture of WWW:
◉ The WWW is mainly a distributed client/server service where a client using
the browser can access the service using a server.
38
Components of Web
39
World Wide Web (WWW)
◉ URLs have three parts: the protocol (also known as the scheme), the DNS
name of the machine on which the page is located, and the path uniquely
indicating the specific page (a file to read or program to run on the machine).
◉ This URL consists of three parts: the protocol (http), the DNS name of the
host (www.cs.washington.edu), and the path name (index.html).
40
World Wide Web (WWW)
41
HTTP—The HyperText Transfer Protocol
42
HTTP—The Hyper Text Transfer Protocol
43
HTTP—The Hyper Text Transfer Protocol
◉ This protocol is used to transfer the data in the form of plain text,
hypertext, audio as well as video, and so on
◉ It is a stateless protocol: here is no connection among two requests
that are being consecutively carried out on the same connection.
◉ Client and the server know each other only during the current
requests
◉ The HTTP cookies provide in making use of stateful sessions
44
Working of HTTP
45
Format of request and response messages
46
Request Line and Status line
47
Request Type Name of Method Actions
This method is used to request a
GET
document from the server.
This method mainly requests
HEAD information about a document and not
the document itself
This method sends some information
POST
from the client to the server.
This method sends a document from
PUT
the server to the client.
This method echoes the incoming
TRACE
request.
CONNECT This method means reserved
In order to inquire about the available
OPTION
options.
48
HTTP—The Hyper Text Transfer Protocol
49
HTTP—The Hyper Text Transfer Protocol
◉ Header
◉ The header is used to exchange the additional information between the
client and the server. The header mainly consists of one or more header
lines. Each header line has a header name, a colon, space, and a header
value
◉ Body
◉ It can be present in the request message or in the response message. The
body part mainly contains the document to be sent or received.
50