DNS and HTTP. A High-Level Overview of how the Internet works

Similar documents
CS4/MSc Computer Networking. Lecture 3: The Application Layer

CSEN 404 Introduction to Networks. Mervat AbuElkheir Mohamed Abdelrazik. ** Slides are attributed to J. F. Kurose

Lecture 6 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Networking Applications

Application Layer Protocols

The Application Layer: Sockets, DNS

Domain Name System.

DNS Basics BUPT/QMUL

Electronic Mail. Three Components: SMTP SMTP. SMTP mail server. 1. User Agents. 2. Mail Servers. 3. SMTP protocol

Information Network Systems The application layer. Stephan Sigg

DNS Concepts. Acknowledgements July 2005, Thimphu, Bhutan. In conjunction with SANOG VI. Bill Manning Ed Lewis Joe Abley Olaf M.

Lecture 05: Application Layer (Part 02) Domain Name System. Dr. Anis Koubaa

Domain Name Service. DNS Overview. October 2009 Computer Networking 1

Web, HTTP and Web Caching

Chapter II: Application Layer

Protocol Classification

CSCE 463/612 Networks and Distributed Processing Spring 2018

Q U E S T I O N 3 In the current version of IP (IPv4), the use of TCP and UDP headers differ in which of the following ways?

Advanced Networking. Domain Name System

Advanced Networking. Domain Name System. Purpose of DNS servers. Purpose of DNS servers. Purpose of DNS servers

A DNS Tutorial

Chapter 2 Application Layer. Lecture 5 DNS. Computer Networking: A Top Down Approach. 6 th edition Jim Kurose, Keith Ross Addison-Wesley March 2012

Chapter 2 part B: outline

Chapter 2: Application layer

Application Layer. Applications and application-layer protocols. Goals:

CMSC 332 Computer Networking Web and FTP

Application Layer: The Web and HTTP Sec 2.2 Prof Lina Battestilli Fall 2017

Lecture 7 Application Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

EECS 122: Introduction to Computer Networks DNS and WWW. Internet Names & Addresses

Lecture 7b: HTTP. Feb. 24, Internet and Intranet Protocols and Applications

Application Layer. Goals: Service models. Conceptual aspects of network application protocols Client server paradigm

Review for Internet Introduction

Computer Networking Introduction

CSEN 503 Introduction to Communication Networks

Application Layer: , DNS

Lecture 7: Application Layer Domain Name System

Computer Networks. Wenzhong Li. Nanjing University

FTP. Mail. File Transfer Protocol (FTP) FTP commands, responses. Electronic Mail. TDTS06: Computer Networks

DNS & Iodine. Christian Grothoff.

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

This time. Digging into. Networking. Protocols. Naming DNS & DHCP

DNS/DNSSEC Workshop. In Collaboration with APNIC and HKIRC Hong Kong. Champika Wijayatunga Regional Security Engagement Manager Asia Pacific

Computer Networks. Domain Name System. Jianping Pan Spring /25/17 CSC361 1

CS 3640: Introduction to Networks and Their Applications

Information Network I: The Application Layer. Doudou Fall Internet Engineering Laboratory Nara Institute of Science and Technique

ECE 650 Systems Programming & Engineering. Spring 2018

0 0& Basic Background. Now let s get into how things really work!

Networks, WWW, HTTP. Web Technologies I. Zsolt Tóth. University of Miskolc. Zsolt Tóth (University of Miskolc) Networks, WWW, HTTP / 35

Review of Previous Lecture

page 1 Plain Old DNS WACREN, DNS/DNSSEC Regional Workshop Ouagadougou, October 2016

Chapter 2 Application Layer

Domain Name System (DNS) 김현철 ( 화 ) 정보통신융합서울대학교컴퓨터공학부

CS 43: Computer Networks. 10: Naming and DNS September 24, 2018

ECE 435 Network Engineering Lecture 7

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

phoenixnap Client Portal

Domain Name System (DNS)

CSC 4900 Computer Networks:

Applications Layer Protocols. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

APNIC elearning: DNS Concepts

1-1. Switching Networks (Fall 2010) EE 586 Communication and. September Lecture 10

2. Introduction to Internet Applications

CSc 450/550 Computer Networks Domain Name System

DNS. A Massively Distributed Database. Justin Scott December 12, 2018

DATA COMMUNICATOIN NETWORKING

Network Applications Principles of Network Applications

Application Protocols and HTTP

DNS Management with Blue Cat Networks at PSU

Web Portal User Manual for

IP Addresses. An IPv4 address looks like this

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 5

Computer Systems and Networks

Application Layer. Pure P2P architecture. Client-server architecture. Processes communicating. Hybrid of client-server and P2P. Creating a network app

Fixing URL-based Redirect Errors for AWS Route 53 and S3

DNS Review Quiz. Match the term to the description: A. Transfer of authority for/to a subdomain. Domain name DNS zone Delegation C B A

Domain Name System (DNS) DNS Fundamentals. Computers use IP addresses. Why do we need names? hosts.txt does not scale. The old solution: HOSTS.

Allows a user to copy files to/from remote hosts Usage:

Introduction to Internet, Web, and TCP/IP Protocols SEEM

Computer Networking: Applications George Blankenship. Applications George Blankenship 1

Chapter 2 Application Layer

Internet Content Distribution

Manual Configuration Stateful Address Configuration (i.e. from servers) Stateless Autoconfiguration : IPv6

S Computer Networks - Spring What and why? Structure of DNS Management of Domain Names Name Service in Practice

Application layer. Some network apps. Client-server architecture. Hybrid of client-server and P2P. Pure P2P architecture. Creating a network app

Computer Network 2015 Mid-Term Exam.

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

Computer Network 1 1

Chapter 2 Application Layer

The Domain Name System

HyperText Transfer Protocol

The Domain Name System

Computer Security CS 426

Traditional Internet Applications

Oversimplified DNS. ... or, even a rocket scientist can understand DNS. Step 1 - Verify WHOIS information

CSCD 330 Network Programming Winter 2015

Welcome! Acknowledgements. Introduction to DNS. cctld DNS Workshop October 2004, Bangkok, Thailand

Communications Software. CSE 123b. CSE 123b. Spring Lecture 11: Domain Name System (DNS) Stefan Savage. Some pictures courtesy David Wetherall

CSE 123b Communications Software. Overview for today. Names and Addresses. Goals for a naming system. Internet Hostnames

CC451 Computer Networks

Applications & Application-Layer Protocols: The Domain Name System and Peerto-Peer

Transcription:

DNS and HTTP A High-Level Overview of how the Internet works Adam Portier Fall 2017

How do I Google? Smaller problems you need to solve 1. Where is Google? 2. How do I access the Google webpage? 3. How do I ask Google a question?

Real World Problem Problem I want to visit Villanova University, but I don t know the address. Solution Use a phone book (Or Yelp, etc.) Translates the name of a place (Villanova University) into a location identifier (street address) Internet Equivalent Problem I want to visit Google, but I don t know the address. Solution DNS Translates the name of a service (www.google.com) into a location identifier (IP address) Where is Google?

DNS Domain Name System Proposed in 1983 by Paul Mockapetris (RFC 1034 and 1035) Breaks up the Internet s name space into Domains and Subdomains Provides a mapping of FQDN (fully qualified domain name) to IP address, as well as other records of interest Hierarchical Child domains are a subset of all domains that share a common parent Parent domains are domains that have one or more children Distributed Each owner of a subdomain maintains their own DNS records

DNS History Before the Internet, there was ARPANET Only a few hundred networked computers, almost all Education or Government owned Mapping of service name to IP address was available in a text file (HOSTS.TXT) Problem of scale; too many services to centrally manage a hosts file

Domain Hierarchy Most to Least Specific, Left to Right All domains start with. (Root) www.google.com is actually www.google.com. Each label between a dot is a Subdomain of the domain to it s right, and the leftmost label is the record com is a subdomain of. (root) google is a subdomain of com www is a record in the domain google.com The process of splitting a Domain into a Subdomain is called delegation

Domain Hierarchy Example Root DNS Servers com DNS servers org DNS servers edu DNS servers yahoo.com DNS servers amazon.com DNS servers pbs.org DNS servers villanova.edu DNS servers umass.edu DNS servers villanova.edu is a subdomain of edu; the DNS servers for edu reference Villanova s DNS servers edu is a subdomain of root; the DNS servers for Root reference edu s DNS servers

TLD and Authoritative Servers Authoritative DNS servers: operated by organizations owning a subdomain name space Can be maintained by organization directly or by service provider Hosts DNS records for that subdomain only Top-level domain (TLD) servers: responsible for immediate subdomains of Root (com, org, net, edu, etc and all toplevel country codes)

DNS Record Types All DNS records have a Name, Value, Type and TTL NS Name Server record Maps a subdomain to the A record of another DNS server How delegation is accomplished SOA Start of Authority All subdomains have exactly one Sets up default settings for the domain, identifies contact information, etc. A Maps an FQDN to an IPv4 address Most common record type

DNS Record Types CNAME Alias for one FQDN to another FQDN Maps namespace to another, does not have to be in the same domain MX Identifies the location of an Email server Contains the FQDN of the email server and a priority Email clients try the server with the lowest priority first TXT can contain up to 255 characters of ASCII text

DNS Protocol and Messages Query and Reply messages use the same format identification: 16 bit # for query, reply to query uses same # flags: query or reply recursion desired recursion available reply is authoritative

DNS Protocol and Messages questions: name and type of DNS queries answers: resource records in response to query authority: contains the DNS servers that are authoritative for the queried FQDN additional info: extra records to assist with DNS function Resolved CNAMES Glue NS records

Authoritative Contains a set of all the records for a single domain Referenced using NS records from other Authoritative DNS servers (delegation) Will not answer questions about records outside it s domain Must be centrally located and publicly visible Recursive Contains no DNS records of it s own Will answer questions about records anywhere in the DNS hierarchy using recursion Can be centrally located or located directly on the client DNS Server Types

Recursion Example Host at cis.poly.edu wants the IP address of gaia.cs.umass.edu 1. Host asks the recursive resolver for the A record for gaia.cs.umass.edu 2. The resolver (dns.poly.edu) does not have the answer, so it asks Root for the location of edu 3. Root returns the location of an edu server 4. Resolver asks the edu Authoritative DNS server for the location of umass.edu

Recursion Example 5. The edu DNS server returns the location of the umass.edu DNS server 6. Resolver asks the umass.edu DNS server for the location of cs.dns.umass.edu DNS server (for the purposes of this example, it s the same server) 7. Resolver asks for the record gaia.cs.umass.edu, which is returned 8. Resolver returns the answer to the client (cis.poly.edu)

Caching Recursion is computationally expensive Recursive DNS servers get asked the same question a lot The TTL (Time to Live) of a DNS record specifies in seconds how long a recursive resolver can hold on to an answer Queries made for the same record within the TTL are answered from cache Queries made for a record after it s TTL has expired and handled with normal recursion

DNS Cache Poisoning

Where is Google? Your web browser asks it s recursive resolver for the A record at www.google.com The recursive resolver locates DNS servers for Root, com, and google The DNS server for google.com returns the A record requested The web browser accesses the webpage at that IP address over HTTP

DNS Activity Use dig to see Google s DNS records Use dig +trace to see a full recursion to get Google s DNS records https://www.ultratools.com/tools/dnsloo kup Perform the same steps for your favorite website

How do I Google? 1. Where is Google? 2. How do I access the Google webpage? 3. How do I ask Google a question?

Web Pages A webpage is a collection of objects Objects can be text or multimedia HTML is the most common language used in webpages Base HTML page references other objects A URL is a combination of a host name and a path Each object has it s own URL

How do I access Google? HTTP: Hypertext Transfer Protocol Application layer protocol for the Internet Client / Server Client: a browser that sends requests and organizes objects into a page Server: a web server that stores objects and responds to clients

HTTP Overview Uses TCP port 80 HTTP is stateless, so each request / response is resolved independent of any previous communication Connection can be persistent or non-persistent Non-persistent: HTTP 1.0 TCP connection is opened and closed for every object request Persistent: HTTP 1.1 TCP connection is opened once on the first request and used for all subsequent reqests 1. Creates a TCP socket connection with server 2. Server accepts TCP connection from client 3. HTTP messages are exchanged between the client and the server 4. TCP connection is closed

Non-persistent HTTP Example www.someschool.edu/somedepartment/home.index Client 1. Client initiates HTTP port 80 request to www.someschool.edu 2. Client sends an HTTP request to retrieve object somedepartment/home.i ndex Server 1. HTTP server at www.someschool.edu accepts connection and notifies client 2. HTTP server receives request message, forms a response message containing the requested object and sends it back through the socket

Non-persistent HTTP Example www.someschool.edu/somedepartment/home.index Client 3. HTTP client closes connection with the server 4. HTTP client parses the object retrieves, locates 10 other.jpeg objects it needs to retrieve 5. Repeat steps 1-4 for each object Server 3. HTTP server closes the connection to the client

Persistent HTTP Problems with Non-persistent HTTP Requires 2 RTTs per object TCP connections are expensive (lots of overhead setting up and tearing down) Client may open several connections to the same server in parallel Persistent HTTP Server leaves connection open after the itial object retrieval Subsequent HTTP messages use the open connection for a set amount of time

Persistent HTTP Pipelining With pipelining Default in HTTP 1.1 Client sends request for object as soon as it is referenced in another object As little as one RTT for all objects on a page Without pipelining Client issues a new request only after previous request is complete One RTT for each referenced object, minus the overhead of setting up a new connection

HTTP Methods HTTP 1.0 GET Basic object retrieval request POST Basic form submission request HEAD Do not retrieve object, only return header information HTTP 1.1 PUT Uploads a file to server DELETE Deletes a file from the server

HTTP Messages (Request)

HTTP Messages (Response)

Response Status Codes Indicate to client if the server was able to fulfill the request 200 OK Request succeeded, object requested is in this message 301 / 302 Object has moved (permanently / temporarily) Requested object was not found at the requested location, new location in message 400 Bad Request HTTP request message not understood by server 404 Not Found Object requested does not exist 500 Server Error Something went wrong when processing the request 505 HTTP version not supported

How do I access Google? Make an HTTP GET request to the server at www.google.com Make additional HTTP GET requests for all images on the page

How do I ask Google a question? HTTP POST HTTP request to the server with POST data POST data is the result of a web form submission In Google example, this is your search term

Manual HTTP Request telnet www.csc.villanova.edu 80 Opens a TCP port 80 (HTTP) socket to www.csc.villanova.edu Type in HTTP request GET /~carterh/ HTTP/1.1 Host: www.csc.villanova.edu Enter on blank line Look at response You can submit POST data using telnet, but formatting it is hard

HTTP Activity Retrieve www.google.com using telnet Retrieve www.google.com using curl curl i to include protocol headers in response View www.google.com in a browser debugger Firefox: Tools > Web Developer > Inspector Chrome: View > Developer > Developer Tools > Elements Repeat with your favorite website