Professional Documents
Culture Documents
Based on slides from D. Choffnes Northeastern U. and P. Gill from StonyBrook University
Revised Autumn 2015 by S. Laki
DNS
Layer 8 (The Carbon-based nodes)
3
DNS Basics
DNS Security
DNS and Censorship
DNS at a High-Level
8
Root
com.172800 IN NS a.gtld-servers.net.
com.172800 IN NS b.gtld-servers.net.
com.172800 IN NS c.gtld-servers.net.
Administered by ICANN
13 root servers, labeled AM
6 are anycasted, i.e. they are globally replicated
Contacted when names cannot be resolved
In practice, most systems cache this information
Map of the Roots
13
Local Name Servers
14 Where is
google.com?
Northeastern
www.neu.edu =
Where is www.neu.edu
155.33.17.68
www.neu.edu?
Northeastern
Root edu neu
com
Root
Iterated DNS query
18
www.google.com
Where is www.google.com?
Root
DNS Propagation
19
Root com
asgard.ccs.neu.edu ns.godaddy.com
asgard.ccs.neu.edu
Root
Zone files may be cached com
for 1-72 hours
www.my-new-site.com ns.godaddy.com
DNS Resource Records
21
Type = A / AAAA
Query
Name: www.ccs.neu.edu
Name = domain name Type: A
Value = IP address
Name: www.ccs.neu.edu
Resp.
A is IPv4, AAAA is IPv6 Value: 129.10.116.81
Type = NS
Name = partial domain Query Name: ccs.neu.edu
Type: NS
Value = name of DNS server
for this domain Name: ccs.neu.edu
Resp.
Type = CNAME
Query
Name: foo.mysite.com
Name = hostname Type: CNAME
Value = canonical hostname
Name: foo.mysite.com
Resp.
Useful for aliasing Value: bar.mysite.com
CDNs use this
Query
Type = MX Name: ccs.neu.edu
Type: MX
Name = domain in email
address
Name: ccs.neu.edu
Resp.
ccs.neu.edu
DNS as Indirection Service
25
www.google.com
Content Delivery Networks
27
HTTP: hypertext
transfer protocol HT
TP
Web’s application layer req
ues
protocol PC running HT
TP
t
Firefox browser res
client/server model pon
se
client: browser that
requests, receives, u es
t
(using HTTP TP
req
nse
server
protocol) and HT
r es po running
Apache Web
“displays” Web HT
T P
server
objects
server: Web server iphone running
sends (using HTTP Safari browser
protocol) objects in
response to requests
Application Layer
HTTP overview (continued)
2-31
uses TCP:
HTTP is “stateless” (in
client initiates TCP theory…)
connection (creates socket) to server maintains no information
server, port 80 about past client requests
server accepts TCP aside
connection from client protocols that maintain
HTTP messages (application- “state” are complex!
past history (state) must be
layer protocol messages) maintained
exchanged between browser if server/client crashes, their
(HTTP client) and Web server views of “state” may be
(HTTP server) inconsistent, must be
reconciled
TCP connection closed
HTTP connections
2-32
objects required
multiple connections
Application Layer
Example Web Page
33
G
castle.gif
TCP FIN
34
Client Server Concurrent (parallel) TCP
TCP SYN connections can be used
to make things faster.
G C S C S
page.html
S
S
TCP FIN
G G
hpface.jpg castle.gif
F F
35
Persistent HTTP
2-36
Application Layer
Non-persistent HTTP: response time
2-37
Timeout
TCP FIN
38
Client Server
TCP SYN
G
page.html
GG The “pipelining” feature
hpface.jpg in HTTP/1.1 allows
requests to be issued
castle.gif asynchronously on a
persistent connection.
Requests must be
processed in proper order.
Can do clever packaging.
Timeout
TCP FIN
39
40 Outline
~
~ entity body ~
~ body
Application Layer
Uploading form input
2-43
POST method:
web page often includes
form input
input is uploaded to server
in entity body
URL method:
uses GET method
input is uploaded in URL
field of request line:
www.somesite.com/animalsearch?monkeys&banana
Application Layer
Method types
2-44
HTTP/1.0: HTTP/1.1:
GET GET, POST, HEAD
POST PUT
HEAD uploads file in entity
asks server to leave body to path specified
requested object out in URL field
of response DELETE
deletes file specified
in the URL field
Application Layer
HTTP response message
2-45
status line
(protocol
status code HTTP/1.1 200 OK\r\n
status phrase) Date: Sun, 26 Sep 2010 20:09:20 GMT\r\n
Server: Apache/2.0.52 (CentOS)\r\n
Last-Modified: Tue, 30 Oct 2007 17:00:02
GMT\r\n
header ETag: "17dc6-a5c-bf716880"\r\n
Accept-Ranges: bytes\r\n
lines Content-Length: 2652\r\n
Keep-Alive: timeout=10, max=100\r\n
Connection: Keep-Alive\r\n
Content-Type: text/html; charset=ISO-8859-
1\r\n
\r\n
data, e.g., data data data data data ...
requested
HTML file
Application Layer
HTTP response status codes
2-46
example:
many Web sites use cookies
Susan always access Internet
four components:
1) cookie header line of from PC
visits specific e-commerce
HTTP response
message site for first time
2) cookie header line in when initial HTTP requests
ebay 8734
usual http request msg Amazon server
cookie file creates ID
usual http response
1678 for user create backend
ebay 8734
set-cookie: 1678 entry database
amazon 1678
usual http request msg
cookie: 1678 cookie- access
specific
usual http response msg action
Application Layer
Cookies + Third Parties
52
Wired.com
GET article.html
GET sharebutton.gif
Cookie: FBCOOKIE