Upload
amudheesan
View
212
Download
0
Embed Size (px)
DESCRIPTION
DNS_KSM
Citation preview
THE WORLD WIDE WEB &DOMAIN NAME SYSTEM
And HTTP (Hypertext Transfer Protocol)
World Wide Web (WWW)
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 web’s 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 Server
1. Initiate TCP connection to server
2. Accept the connection, notifying the client
3. Send http request message to server
4. Form response message with requested object(s) & send to client
Close the TCP connection
Receive the object
Repeat Steps 1 to 4 for each object
NON-PERSISTENT CONNECTIONPERSISTENT CONNECTION
Repeat steps 3 and 4 for each object WithoutPipelining
WithPipelining
containing details of all needed objects
HTTP message format: request
Method URL Version
GET http://www.iiitb.ac.in/student/a.html HTTP/1.0
Header field name: ValueUser-agent: Mozilla/4.0 Accept: text/html, image/gif,image/jpeg Accept-language: Eng
HTTP message format: request
Method URL Version
POST http://www.iiitb.ac.in/student/a.html HTTP/1.0
Header field name: ValueUser-agent: Mozilla/4.0 Accept: text/html, image/gif,image/jpeg Accept-language: Eng
Entity BodyName=Amu&favorite+flavor=Mango
HTTP message format: response
Version Status Code Phrase
HTTP/1.1 200 OK
Header field name: ValueDate: 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 kind2XX Success of some kind3XX Redirects the client to another URL4XX Indicates error on client’s part5XX Indicates error on server’s 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: Mon, 23 Jul 2012 22:00:00)
Domain Name System (DNS)
Convenience People are comfortable with Names
BATMANI’m
Batman
I am the guy living in WAYNE
MANOR, GOTHAM
CITY
Convenience Machines, on the other hand, are
comfortable with addresses (IP addresses) Hey
there, what’s ya
name babe?
I’m 192.168.11.200 dear
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 & easy-to-remember nameI forgot your
IP address.. How do I
connect with you?
*Chuckles*Sorry
mate !!! You can’t if you don’t remember
my address !!No fear
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 the site and it’s IP
How does DNS work?
requesting hostsurf.eurecom.fr
authorititive name serverdns.umass.edu
local name serverdns.eurecom.fr
1
23
45
6
root name server
The Root name Server may not know which authoritative name server to call (or forward the query to)
requesting hostsurf.eurecom.fr
root name server
local name serverdns.eurecom.fr
1
23
4 5
6
authoritative name serverdns.cs.umass.edu
intermediate name serverdns.umass.edu
7
8
It is hierarchical (easy to remember)
.
com
edu org
yahoo
www
web
mit
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/the-dns-protocol-explained/
Some useful videos – YouTube links DNS Explained:
http://www.youtube.com/watch?v=72snZctFFtA
How the internet works (in 5 minutes or less):http://www.youtube.com/watch?v=7_LPdttKXPc
World Wide Web (in plain English):
http://www.youtube.com/watch?v=1wUxWxYOdTE
WAKE UP.. IT’S OVER