Hello!
My name is Roman
In today’s presentation I will be going over the
different concepts that make up DNS and HTTP.
DNS or Domain Name System
• A globally distributed, scalable, reliable database made up of large networks of interconnected
computers.
• One of the most important parts of the internet.
• Most basic form: translated webiste names into 10101100s
• Make networks human friendly
• No Internet without DNS
• Comprised of three components
• A “name space”
• Servers making that name space available
• Resolvers (clients) which query the servers about the name space
Primary Server:
-holds the master copy of the data for a zone,
-notifies secondary server of changes –notify request
-responds to queries from Secondary Servers
Secondary Server:
-have copies of the primary DNS data synchronized through zone tranfers
-when prompted, or at intervals query Primary Servers for DNS record changes (redundancy)
-any changes done to Primary Server is copied through zone transfers
com net au info biz
com net
org
org
Other
ccTLDs
id
internal prosrs
google yahoo theagemicrosoftausregistry
“root” zone
TLDs & ccTLDs
2LD
3LD
4LD
DNS Resolution
The process of website name’s name into an IP address, or vice versa.
Root server is asked about the domain name that needs to be resolved. If the server doesn’t
know it will contact another name server until it finds the authoritative server resposible for the
domain. Authoritative server responds with a cachable info for browser to process.
DNS Delegation
Process of distibuting the namespace into more zones. Used traffic distribution; DNS
performanance resolution; fault tolerance; adding new branches, locations;
DNS server make up:
Client Server
pc
Recursive
Servers
DNS info from
resolvers; queries
multiple servers
Root Server
Top level domain
hierarchy; contacts
others;
Authoritative Servers
Server in charge of a given zone; has
domain registration records;
DNS Delegation
Process of distributing the namespace into more zones. Used traffic
distribution; DNS performanance resolution; fault tolerance; adding new
branches, locations;
Forward & Reverse DNS resolutions
Name into IP = Forward Resolution
IP into Name = Reverse Resolution
DNS record – single entry that gives the ZONE instructions
DNS Record consists of:
Record name
Record value
Time to live (TTL)
DNS Zone
A container of all the DNS records for a specific domain.
Example: visit.krakow.com
www.visit.krakow.com
blog.visit.krakow.com DNS records that make up DNS ZONE
mail.visit.krakow.com
Blank Name
Record that has nothing in the name slot.
Ex. Visitkrakow.com vs www.visitkrakow.com
No data for record type has www as it’s record name
A Record
• Used to point a domain or a subdomain to an IP address.
• Point one domain to multiple IP addresses (redundancy/load balancing/performnce)
C NAME (Canonical Name )
• DNS entry used to point a host name to a host name
• Allows changes to the IP address of a server, or cluster of servers without making DNS changes
• Docs.example.com and documents.example.com acess the same files
MX Records (Mail Exchange)
• Used to route email according to owner’s preferences
• Allows you to specify multiple mail servers to be used
documents.example.com to docs.example.com
documents.example.com to docs.example.com
SPF Records (Sender Policy Framework)
• Open standard created to prevent Address forgery
• Current versions SPFv1/SPF Classic protect sender
• Domain owner publishes SPF info in domain’s DNS Zone
• Receiving server can check if the message complies with the domain’s stated policy. If the message comes
from an inkown sender it will be considered fake, and discarded.
• The receiving server needs to keep of SPF information.
• NS (name server)
• Name Server (NS) records identify the name servers that are authoritative for
the DNS zone.
• TTL (Time to LIve)
• Total value in seconds how the DNS record will be cached before it needs to be refreshed. A queried
Name Server will check TTL to see how ling before it has to refresh, and if the DNS record was delivered
on time.
Record Value
The data that tells DNS record where you want it to point.
Uniform Resource Locator (URL)
A URL is the web address of a resource on the Internet. This is the address you type in a browser to visit a particular web site.
For example www.visitkrakow.com
.
HTTP
Hypertransfer Text & Protocol
Communication protocol used to send data from one program to another over the Internet. Most significatnt
protocol on the internet.
port80
HTTP communication between a client
and a server.
• Server listens
• Server accepts and records request
• Server can continue to accept other requests
• Server writes responses of requests
• Server ends response
• Business Applications
• Database Server
Client connects
Web Application Components
Web Browser: presents the user interface
Web Server: processes HTTP requests
Business Application: processes requests at the application level by providing a service
Database Server: maintains the database by processing query and update requests from the application
HTTP is the language that web clients and web servers use to talk to each other
HTTP is largely “under the hood,” but a basic understanding can be helpful.
Web Browser Responsibilities
• User Interface Presentation
• Client-Server Communication (HTTP)
• Cache Control
• Cookie Management
• Handling Embedded Objects
• Script Interpretation
• User Interface Presentation
• Parse HTML and CSS code
• handle errors
• Format and present a graphical display
• Handle user interactions
• scroll, mouse movement, click, etc.
The Client sends a message to the Server at a particular port (80 is the default)
The first part of the message is the request line, containing:
A method (HTTP command) such as GET or POST
A document address, and
An HTTP version number
Example:
GET /index.html HTTP/1.0
When a user submits a browser request to a web server, it
sends two categories of data:
Form Data: Data that the user explicitly typed into an HTML form.
For example: registration information.
HTTP Request Header Data: Data that is automatically appended
to the HTTP Request from the client.
For example: cookies, browser type, etc,
Other methods beside GET and POST are:
HEAD: Like GET, but ask that only a header be returned
PUT: Request to store the entity-body at the URI
DELETE: Request removal of data at the URI
LINK: Request header information be associated with a document on the server
UNLINK: Request to undo a LINK request
OPTIONS: Request information about communications options on the server
TRACE: Request that the entity-body be returned as received (used for debugging)
The second part of a request is optional header information, such as:
What the client software is
What formats it can accept
All information is in the form Name: Value
Example:
User-Agent: Mozilla/2.02Gold (WinNT; I)
Accept: image/gif, image/jpeg, */*
A blank line ends the header
Accept: type/subtype, type/subtype, ...
Specifies media types that the client prefers to accept
Accept-Language: en, fr, de
Preferred language (For example: English, French, German)
User-Agent: string
The browser or other client program sending the request
From: dave@acm.org
Email address of user of client program
Cookie: name=value
Information about a cookie for that URL
Multiple cookies can be separated by commas
In this example, the client wants to send data to the server. We
use the POST method. The request line shows the method
(POST), URL, and HTTP version (1.1). There are four lines of
headers. The request body contains the input information. The
response message contains the status line and four lines of
headers. The created document, which is a CGI document, is
included as the body.
Response headers:
Server: NCSA/1.3
Name and version of the server
Content-Type: type/subtype
Should be of a type and subtype specified by the client’s Accept header
Set-Cookie: name=value; options
Requests the client to store a cookie with the given name and value
http-equiv and content typically have the same kinds of values as in the HTTP header
This tag asks the client to pretend that the information actually occurred in the header
The information is not really in the header
This tag is available because you have little direct control over what is in the header (unless you write your own
server)
As usual, not all browsers handle this information the same way
Example:
<meta http-equiv="Set-Cookie"
content="value=n;expires=date; path=url
Summary
▹ HTTP is a fairly straightforward protocol with a lot of possible kinds of predefined header
information
▸ More kinds can be added, so long as client and server agree
▹ A request from the client consists of three parts:
1. A header line
2. A block of header information, ending with a blank line
3. The (optional) entity body, containing data
▹ A response from the server consists of the same three parts
▹ HTTP headers are “under the hood” information, not normally displayed to the user