Sie sind auf Seite 1von 24

THE WORLD WIDE

WEB &
DOMAIN NAME
SYSTEM

World Wide Web (WWW)


And HTTP (Hypertext Transfer
Protocol)

What is the internet?

It is a massive network of networks

Connects millions of computers globally

The information that travels over the


internet does so via a variety of
languages known as protocols

The World Wide Web


(WWW)

It is a way of accessing information over the


medium of internet

Client-Server model built over the internet for


information sharing

The Web speaks HTTP (Hypertext Transfer


Protocol)

It utilizes browsers to access Web pages that


are linked to each other via hyperlinks

Hypertext Transfer Protocol


(HTTP)

The webs application layer protocol

It is implemented in two programs: Client and


Server

The client and server programs talk to each other


by exchanging information HTTP messages

HTTP defines how the client requests web pages


from web servers and how web servers transfer
web pages to clients

Hypertext Transfer Protocol


(HTTP)

HTTP uses TCP as its underlying


transport protocol

Two versions:
HTTP/1.0 RFC 1945
HTTP/1.1 RFC 2616

HTTP is connectionless and stateless

How does it work? (briefly)


Client

NON-PERSISTENT CONNECTION

Server

PERSISTENT CONNECTION
1. Initiate TCP connection to server
2. Accept the connection, notifying the client
3. Send http request message to server
containing details of all needed objects
Receive
the object

4. Form response message


with requested object(s) &
send to client
Repeat steps 3 and 4 for each object
Repeat Steps 1 to 4 for each object

Close the
TCP
connection
Without
Pipelining
With
Pipelining

HTTP message format:


request
Method
GET

URL

Version

http://www.iiitb.ac.in/student/a.html

Header field name:

Value

User-agent:
Mozilla/4.0
Accept:
text/html, image/gif,image/jpeg
Accept-language:
Eng

HTTP/1.0

HTTP message format:


request
Method
POST

URL

Version

http://www.iiitb.ac.in/student/a.html

Header field name:

Value

User-agent:
Mozilla/4.0
Accept:
text/html, image/gif,image/jpeg
Accept-language:
Eng
Entity Body
Name=Amu&favorite+flavor=Mango

HTTP/1.0

HTTP message format:


response
Version

Status Code

HTTP/1.1

200

Header field name:

Phrase
OK
Value

Date:
Thu, 06 Aug 1998 12:00:15 GMT
Server:
Apache/1.3.0 (Unix)
Last-Modified:
Mon, 22 Jun 1998 ...
Content-Length: 6821
Content-Type:
text/html
Entity Body
(data data data data data data data . . .)

HTTP Status Codes

The status code is a 3 digit integer


The first digit identifies the general
category of response
1XX

Information message of some kind

2XX

Success of some kind

3XX

Redirects the client to another URL

4XX

Indicates error on clients part

5XX

Indicates error on servers part

HTTP Status codes examples


100 Continue

Only a part of the request has


been received by the server, but
as long as it has not been
rejected, the client should
continue with the request

200 OK

The request succeeded

301 Moved Permanently

Requested object has been


permanently moved. New URL
specified in the Location:
header of the response message

400 Bad Request

Request could not be understood


by the server

404 Not Found

Requested object does not exist


in server

505 HTTP Version Not Supported

HTTP version not supported by


the server

HTTP Other important


pieces

User-Server Interaction
Authentication
Cookies (Set-cookie: # and Cookie: #)

Web Caching (proxy server)

Conditional GET
(e.g., If-modified-since:
22:00:00)

Mon, 23 Jul 2012

Domain Name System


(DNS)

Convenience

People are comfortable with Names


BATMAN

Im
I am the guy
Batma
living in
n
WAYNE
MANOR,
GOTHAM
CITY

Convenience

Machines, on the other hand, are


comfortable with addresses (IP
Hey
addresses)
there,

Im
192.168.11.
200 dear

whats ya
name
babe?

Convenience

The Internet, just like every other


network, is made up of millions and
millions of computers (including Web
Servers)

It is tough to remember the IP addresses


of all the required web-servers in order
to connect to them

This is where DNS comes to the rescue

Convenience

DNS provides a map between IP


addresses and a real*Chuckles*
& easy-toI forgot your
Sorry
remember
name
IP address..
How do I
connect with
you?

mate !!!
You cant if
you dont
remember
my
No fear address !!
when I
am here,
dear

DNS

How does DNS work?

Say you enter


www.thedarkknightrises.com in your web
browser

First the browser and the OS will find out


whether they know the IP address of the
site already

The OS, if it has no clue about the IP


address, asks the Resolving Name
Server (or the local name server) about

How does DNS work?


root
name server
root name
server
The Root name Server
may not know which
authoritative name
server to call (or
forward the query to)

2
5

2
7

local name server authorititive name server


local name
server intermediate name server
dns.umass.edu
dns.eurecom.fr
dns.eurecom.fr

requesting host
surf.eurecom.fr

requesting host
surf.eurecom.fr

dns.umass.edu

authoritative name server


dns.cs.umass.edu

It is hierarchical (easy to
remember)
.
co
m

yahoo
www

ed
u

web
mit

org

Other aspects of DNS & name-servers

Recursive and Iterated queries

Caching and updating records

DNS records; message formats:


http://www.tech-juice.org/2011/06/22/th
e-dns-protocol-explained/

Some useful videos


YouTube links

DNS Explained:
http
://www.youtube.com/watch?v=72snZctFF
tA
How the internet works (in 5 minutes or
less):
http
://www.youtube.com/watch?v=7_LPdttKX
Pc
World Wide Web (in plain English):

WAKE UP.. ITS OVER

Das könnte Ihnen auch gefallen