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

Similar documents
Information Network I: The Application and Upper Layers

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

Computer Networks. Wenzhong Li. Nanjing University

Information Network Systems The application layer. Stephan Sigg

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

CS 3640: Introduction to Networks and Their Applications

2. Introduction to Internet Applications

Domain Name System (DNS) Session-1: Fundamentals. Joe Abley AfNOG Workshop, AIS 2017, Nairobi

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

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

FTP. Client Server Model. Kent State University Dept. of Computer Science. CS 4/55231 Internet Engineering. Server Models

ECE 435 Network Engineering Lecture 7

Application Layer Protocols

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

Internet Content Distribution

Networking Applications

Domain Name System (DNS) Session-1: Fundamentals. Computers use IP addresses. Why do we need names? hosts.txt does not scale

DNS Basics BUPT/QMUL

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

Application Layer Chapter 7

CSC358 Week 2. Adapted from slides by J.F. Kurose and K. W. Ross. All material copyright J.F Kurose and K.W. Ross, All Rights Reserved

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

Web, HTTP and Web Caching

CS 455/555 Spring 2011 Weigle

Review of Previous Lecture

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

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

CCNA 1 v3.11 Module 11 TCP/IP Transport and Application Layers

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

EEC-682/782 Computer Networks I

Produced by. Mobile Application Development. Higher Diploma in Science in Computer Science. Eamonn de Leastar

DATA COMMUNICATOIN NETWORKING

CMSC 332 Computer Networking Web and FTP

HyperText Transfer Protocol

Chapter 7. The Application Layer. DNS The Domain Name System. DNS Resource Records. The DNS Name Space Resource Records Name Servers

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?

Goal of this session

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

Chapter 2 Application Layer

Applications & Application-Layer Protocols: (SMTP) and DNS

CS 43: Computer Networks. HTTP September 10, 2018

Application Layer: HTTP

Layered Model. DoD Model. ISO/OSI Model

Computer Networks. More on Standards & Protocols Quality of Service. Week 10. College of Information Science and Engineering Ritsumeikan University

Review for Internet Introduction

Advanced Networking. Domain Name System

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

Protocol Classification

SOFTWARE ARCHITECTURE 9. NAME RESOLUTION.

EECS 3214: Computer Network Protocols and Applications

Domain Name System (DNS)

Networking. Layered Model. DoD Model. Application Layer. ISO/OSI Model

A DNS Tutorial

Chapter 2: outline. 2.6 P2P applications 2.7 socket programming with UDP and TCP

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

World-Wide Web Protocols CS 571 Fall Kenneth L. Calvert All rights reserved

CS 3640: Introduction to Networks and Their Applications

Domain Name System.

Chapter 2: Application Layer. Chapter 2 Application Layer. Some network apps. Application architectures. Chapter 2: Application layer

[Prof. Rupesh G Vaishnav] Page 1

Computer Networking: Applications George Blankenship. Applications George Blankenship 1

Chapter 10: Application Layer CCENT Routing and Switching Introduction to Networks v6.0

Lecture 04: Application Layer (Part 01) Principles and the World Wide Web (HTTP) Dr. Anis Koubaa

CSCE 463/612 Networks and Distributed Processing Spring 2018

PLEASE READ CAREFULLY BEFORE YOU START

Testing IPv6 address records in the DNS root

Application Layer Introduction; HTTP; FTP

Applications & Application-Layer Protocols: The Web & HTTP

INTERNET ENGINEERING. HTTP Protocol. Sadegh Aliakbary

DNS and SMTP. James Walden CIT 485: Advanced Cybersecurity. James WaldenCIT 485: Advanced Cybersecurity DNS and SMTP 1 / 31

Introduction to Network. Topics

Session 2. Background. Lecture Objectives

Data Communication & Computer Networks MCQ S

The Application Layer: Sockets, DNS

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

WEB TECHNOLOGIES CHAPTER 1

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

DNS & Iodine. Christian Grothoff.

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

CCNA Exploration1 Chapter 3: Application Layer Functionality and Protocols

SC/CSE 3213 Winter Sebastian Magierowski York University CSE 3213, W13 L8: TCP/IP. Outline. Forwarding over network and data link layers

Network Applications Principles of Network Applications

Application Level Protocols

Internet Technology. 06. Exam 1 Review Paul Krzyzanowski. Rutgers University. Spring 2016

Applications. Chong-kwon Kim. Running in end systems (hosts) over transport layer protocols Ex: , Web, FTP, instant messaging

CSCI 466 Midterm Networks Fall 2013

Computer Network 1 1

Naming. CS 475, Spring 2018 Concurrent & Distributed Systems. Slides by Luís Pina

Implementing DNSSEC with DynDNS and GoDaddy

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

CS615 - Aspects of System Administration

Chapter 2 Application Layer

CPSC 441 COMPUTER COMMUNICATIONS MIDTERM EXAM SOLUTION

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

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

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

CompSci 356: Computer Network Architectures. Lecture 20: Domain Name System (DNS) and Content distribution networks Chapter 9.3.1

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

CCNA Exploration Network Fundamentals. Chapter 03 Application Functionality and Protocols

CSC 4900 Computer Networks:

Transcription:

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

Outline Domain Name System World Wide Web and HTTP Content Delivery Networks 2

OSI vs. TCP/IP Layers Application Presentation Application Session Transport Transport Network Internet Data Link Physical Network Access 3

Applications Application Programs that make use of the Internet: DNS, HTTP, SMTP, FTP, etc. Transport Network Data Link Physical 4

Domain Name System 5

Domain Name System (DNS) Addresses are hard for human beings to remember Never ending updates in case a machine changes its IP address The organization's web server will be known as www.naist.jp regardless of the IP address Mechanisms to map names into numerical address Host.txt; not scalable Domain Name System (DNS) to the rescue, 1983 6

Initial problem Every device connected to the Internet has a unique Internet Protocol address How to resolve human-friendly machine names into IP addresses 7

Initial Solution /etc/hosts Periodical downloads from Network Information Center (NIC) at the Stanford Research Institute (SRI) Not sustainable with millions of host in the Internet Does not scale 8

DNS: RFCs 1034, 1035, 2181 Hierarchical, domain-based naming Distributed database system Name onto IP address mapping procedure: A program calls the resolver by passing the name as a parameter The resolver sends a query containing the name to a local DNS server The later retrieves the name and return a response containing the IP address to the resolver The resolver forwards the response to the caller 9

DNS Name Space Hierarchical system borrowed from postal services ICANN (Internet Corporation for Assigned Names and Numbers) Generic Countries com org net gov edu jp th ro us sn ac co 10

Top Level Domains cctld: country-code domains e.g.,.jp,.sn, IDN cctld: internationalized country-code domains e.g., 中国, gtld: generic top-level domains E.g.,.org,.com,.edu, Internet Assigned Numbers Authority (IANA) 1,239 top-level domains 11

Shared Registration Domain name registry: database Keeps track of all domain names registered in a top-level domain Domain name registry operator: organization that runs the DB Network information Center (NIC) Keeps the DB of domain names Domain name registrar: Company used for domain name registration 12

Domain Resource Records Format: Domain_name Time_to_live Class Type Value Type Meaning Value SOA Start of Authority Parameters for this zone A IPv4 address of a host 32-bit integer AAAA IPv6 address of a host 128-Bit integer MX Mail exchange Priority, domain willing to accept email NS Name server Name of a server for this domain CNAME Canonical name Domain name PTR Pointer Alias for an IP address SPF Sender policy framework Text encoding of mail sending policy SRV Service Host that provides it TXT Text Descriptive ASCII text 13

Name Servers Problems with a centralized approach Single point of failure Hard to maintain Does not scale Problems with a distributed approach Partial mapping for each server Multiple servers may handle queries Hard to update 14

Types of DNS Servers Authoritative Name Servers Sure to be able to perform a name-address translation for a particular zone Root Name Servers Caching Name Servers Ask queries and keep them in cache for later use Non authoritative 15

Root Servers https://www.iana.org/domains/root/servers 16

DNS Queries Finding the IP address for a given hostname is called resolution and is done with the DNS protocol. Resolution computer request local name server to resolve Local name server asks the root name server Root returns the name server for a lower zone Continue down zones until name server can answer DNS protocol Runs on UDP port 53, retransmits lost messages Caches name server answers for better performance 17

DNS Queries 2 3 Root DNS Server 1 4 8 5 Requesting host Local DNS Server 6 TLD DNS Server 7 Authoritative DNS Server 18

DNS Protocol 12 bytes Identification No. of Questions No. of Authority RRs Flags No. of Answer RRs No. of Additional RRs Name, type fields for a query RRs in response to query Records for authoritative servers Additional helpful info that may be used Questions (variable number of answers) Answers (variable number of resource records) Authority (variable number of resource records) Additional Info (variable number of resource records) 19

Hands-on dig naist.jp ; <<>> DiG 9.8.3-P1 <<>> naist.jp ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7644 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0 ;; QUESTION SECTION: ;naist.jp. IN A ;; AUTHORITY SECTION: naist.jp. 3600 IN SOA ns.naist.jp. noc.itc.naist.jp. 2016051902 10800 3600 604800 86400 ;; Query time: 2 msec ;; SERVER: 163.221.8.11#53(163.221.8.11) ;; WHEN: Mon May 23 16:29:11 2016 ;; MSG SIZE rcvd: 73 20

Hands-on dig +norecurse @m.root-servers.net ANY naist.jp ;; QUESTION SECTION: ;naist.jp. IN ANY ;; AUTHORITY SECTION: jp. 172800 IN NS e.dns.jp. jp. 172800 IN NS g.dns.jp. jp. 172800 IN NS c.dns.jp. jp. 172800 IN NS d.dns.jp. jp. 172800 IN NS a.dns.jp. jp. 172800 IN NS f.dns.jp. jp. 172800 IN NS b.dns.jp. 21

Hands-on dig +norecurse @e.dns.jp ANY naist.jp ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 60809 ;; flags: qr; QUERY: 1, ANSWER: 0, AUTHORITY: 3, ADDITIONAL: 3 ;; QUESTION SECTION: ;naist.jp. IN ANY ;; AUTHORITY SECTION: naist.jp. 86400 IN NS naistdns.oist.jp. naist.jp. 86400 IN NS ns.naist.jp. naist.jp. 86400 IN NS ns.tokyo.wide.ad.jp. 22

Hands-on dig +norecurse @ns.tokyo.wide.ad.jp ANY naist.jp ;; ANSWER SECTION: naist.jp. 3600 IN SOA 2016051902 10800 3600 604800 86400 ns.naist.jp. noc.itc.naist.jp. naist.jp. 3600 IN ip6:2001:200:16a::/48 ~all" SPF "v=spf1 ip4:163.221.0.0/16 naist.jp. 3600 IN ip6:2001:200:16a::/48 ~all" TXT "v=spf1 ip4:163.221.0.0/16 naist.jp. 3600 IN MX 20 mailgate22.naist.jp. naist.jp. 3600 IN MX 10 mailgate21.naist.jp. naist.jp. 3600 IN NS ns.tokyo.wide.ad.jp. naist.jp. 3600 IN NS ns.naist.jp. naist.jp. 3600 IN NS naistdns.oist.jp. 23

Web and HTTP 24

World Wide Web 1989, CERN: Conseil Européen pour la Recherche Nucléaire W3C: World Wide Web Consortium, 1994 Collection of content in the form of webpages Hypertext: one page points to another page 25

Communication in the Internet Copyright 2015 Pearson Education 26

Client/server architecture Client (browser) Determine the protocol Ask DNS for the IP address of server Make a TCP connection to server Send request for the page; server sends it back Fetch other URLs as needed to display the page Close idle TCP connections 27

Client/server architecture Server Accepts a TCP connection from client Get page request and map it to a resource Get the resource Send contents of the resource to the client Release idle TCP connections 28

Dynamic Pages Web Applications Pages generated by programs running at the server and the client E.g., PHP at server, JavaScript at client Pages vary each time Web applications; set of technologies that work together: AJAX HTML: presnet information as pages DOM: change parts of the page while they are viewed XML: let programs exchange data with the server JavaScript as a language to bind all this together 29

HTTP Basics HyperText Transfer Protocol (RFC 2616) Application layer protocol of the web Client-server model TCP-based protocol Client connects to port 80 on the server HTTP messages are exchanged Client closes the connection HTTP is stateless Server does not store state on previous requests Design simplification: easier failure recovery, load balancing 30

Evolution of HTML Item HTML 1.0 HTML 2.0 HTML 3.0 HTML 4.0 HTML 5.0 Hyperlinks Images Lists Active maps & images Forms Equations Toolbars Tables Accessibility features Object embedding Style sheets Scripting Video and audio Inline vector graphics XML representation Background threats Browser storage Drawing canvas 31

Uniform Resource Locator (URL) RFC 1738 Requests for objects are URLs http://domain_name:port/path/path/object protocol server Port # Path to object object http https ftp file mailto rtsp sip about hypertext With security File transfer protocol Local file Sending email Streaming media Multimedia calls Browser information 32

Types of connections Non-persistent HTTP (HTTP 1.0) At most one object is sent over a TCP connection Request/response Persistent HTTP (HTTP 1.1) Multiple objects can be sent over a single connection 33

Non-persistent HTTP: response time Round-trip time (RTT) Time for a small packet to travel from the client to the server and back to the client Response time One RTT to initiate the connection One RTT for request and start of response File transmission time Total time = #objects*(2*rtt + transit_time) 34

Persistent HTTP: response time Server leaves connection open after sending response Subsequent HTTP messages are sent over the same open connection One RTT for each referenced object once the connection is setup Response time One RTT to initiate the connection One RTT for request and start of response per object File transmission time per object Total time = RTT + #objects*(rtt + transit_time) 35

HTTP Request Methods Method GET HEAD POST PUT DELETE TRACE CONNECT OPTIONS Function Read a Web page Read a Web page s header Append to a Web page Store a Web page Remove the Web page Echo the incoming request Connect through a proxy Query options for a page Human-readable ASCII text 36

HTTP Response Codes 200 OK Request succeeded; request object is in the message 301 Moved Permanently Requested object moved; new location specified in a location: header in the list of headers 400 Bad Request The server could not understand the request 404 Not Found The requested content is not found on the server 505 HTTP Version Not Supported Unsupported version 37

Hands-on Run telnet www.naist.jp 80 Type in a basic GET request GET /index.html HTTP/1.1 Look at the response 38

Cookies in HTTP HTTP is stateless Cookies provide a mechanism for Web servers to store Four components Cookie header line in the HTTP response message Cookie header line in subsequent HTTP request messages Cookie file stored on user s host and managed by browser Back-end database at the web server host 39

How to cookie rakuten.co.jp: 1984 Client HTTP request HTTP response Set-cookie: 1984 server rakuten.co.jp Creates an ID 1984 For the request HTTP request Cookie: 1984 Cookie-specific action DB Future session rakuten.co.jp: 1984 HTTP request Cookie: 1984 Cookie-specific action 40

Maintaining state with cookies Cookies help servers store: Shopping cart info Login name, authorization credentials Preferences Session state History of web pages First-party cookies Third-party cookies 41

Web Caches (proxy servers) User sets browser: web access via cache Browser sends all HTTP requests to cache Advantages: Reduce response time if proxy is closer/faster Reduce traffic on the web server Reduce traffic on the organization s link 42

HTTP Headers Function Browser capabilities (client -> server) Caching related (mixed directions) Browser context (client -> server) Content delivery (server -> client) Example Headers User-Agent, Accept, Accept-Charset, Accept-Encoding Accept-Language If-Modified-Since, If-None-Match, Date, Last-Modified, Expires, Cache-Control, ETag Cookie, Referer, Authorization, Host Content-Encoding, Content-Length, Content-Type, Content- Language, Content-Range, Set-Cookie 43

HTTP Conditional GET Request an object but do not send it if the cache has an up-to-date version HTTP Request GET /index.html HTTP/1.1 Host: somesite.sn HTTP Response HTTP/1.1 200 OK Date: Wed, 25 May 2016 11:05:15 JST Server: Apache/2.4 (CentOS) Last-Modified: Mon, 23 May 2016 09:36:49 JST ETag: 4d1658-28eg-5e59c778g4e11 Accept-Ranges: bytes Content-Length: 6111 Vary: Accept-Encoding Content-Type: text/html 44

Content Delivery Networks Miscellaneous 45

Content Delivery Delivery of content (video, image, audio, etc.) to users is a major component of Internet traffic. Content and Internet traffic Server farms Content delivery networks 46

Server Farms Server Farms enable large-scale Web servers Front-end load-balances requests over servers Server access the same backend database Internet Load balancer Front end Backend DB servers 47

Content Delivery Networks (CDNs) (1/3) CDNs scale Web servers by having clients get content from a nearby CDN node (cache) CDN origin server Distribution of content Beijing Tokyo Dakar Page fetch Clients 48

Content Delivery Networks (CDNs) (2/3) Directing clients to nearby nodes with DNS: Client query returns local CDN node as response Local CDN node caches content for nearby clients and reduces load on the origin server Tokyo CDN node 1: distribute content CDN origin server Dakar CDN node 4: fetch page 2: query DNS CDN DNS server Tokyo client 3: Contact Tokyo contact Dakar Dakar client 49

Content Delivery Networks (CDNs) (3/3) Origin server rewrites pages to serve content via CDN Traditional web page CDN configured page <html> <head> <title> Viral Videos </title> </head> <body> <h1> List of the videos </h1> <p> Click below for free samples </p> <a href= dancingcat.mpg > Cool cats </a> <a href= roflbaby.mpg > Baby laughing out loud </a> <a href= shootingmonkey.mpg > Monkey with AK47 </a> </body> </html> <html> <head> <title> Viral Videos </title> </head> <body> <h1> List of the videos </h1> <p> Click below for free samples </p> <a href= http://www.cdn.com/viralvideos/dancingcat.mpg >...</a> <a href= http://www.cdn.com/viralvideos/roflbaby.mpg > </a> <a href= http://www.cdn.com/viralvideos/shootingmonkey.mpg ></a> </body> </html> 50

More Applications Electronic Mail: SMTP Streaming audio and video Peer-to-peer applications IoT applications Al-Fuqaha, Ala, et al. "Internet of things: A survey on enabling technologies, protocols, and applications." Communications Surveys & Tutorials, IEEE 17.4 (2015): 2347-2376. 51

The End 52