15 213 Internet Services I April 25 2000 Topics Domain Naming System DNS World Wide Web Web servers HTTP static content class27 ppt Internet protocol stack Berkeley sockets interface Applications and services DNS WWW email Unreliable best effort datagram delivery processprocess Unreliabl e best effort datagram delivery hosthost User datagram protocol Transmission control UDP protocol TCP class27 ppt Internet Protocol IP Reliable byte stream delivery processprocess Network interface ethernet hardware 2 Physical connecti on CS 213 S 00 Hierarchical domain name space unnamed root Until 198x domain name IP address mapping maintained in HOSTS TXT file at SRI Each new host manually entered and copied to backbone routers Explosive growth rendered HOSTS TXT approach impractical Replaced by Domain Name System in 198x com edu mit cmu gsia cs gov berkeley ece cmcl lb sahara www 128 2 185 40 128 2 209 79 class27 ppt 3 CS 213 S 00 mil DNS Worldwide distributed system for mapping domain names to IP addresses and vice versa Implemented as a collection of cooperating servers called name servers Name servers perform lookups for DNS clients user programs gethostbyname gethostbyaddr nslookup stand alone client with command line interface kittyhawk nslookup bass cmcl Server localhost Address 127 0 0 1 Non authoritative answer Name bass cmcl cs cmu edu Address 128 2 222 85 class27 ppt 4 CS 213 S 00 Zone s com edu mit cmu gsia cs Domains are partitioned into zones Each zone has multiple name servers that store info about names in that zone unnamed root gov mil berkeley ece CS zone has 4 servers One server is authoritative cmcl lb the others get copies of the authoritative server s data other cs names other cmcl sahara www other lb names 128 2 185 40 128 2 209 79names CS Zone class27 ppt 5 LB Zone CS 213 S 00 Zone databases Each name server keeps a database with information about each name in its zone Examples of info type description A IP address NS name servers for zone SOA start of authority indicates authoritative server WKS well known services running on that host HINFO host info OS and machine type PTR domain name ptr if this subdomain has its own server class27 ppt 6 CS 213 S 00 Zone transfers Clients can inspect the contents of a zone database via a copy operation called a zone transfer all info of a particular type or types A NS etc of info for each domain name in the entire zone is copied from server to client Servers can control which client machines are allowed to perform zone transfers Example zone transfer of cs cmu edu Types A PTR note this is the default for nslookup SAHARA CMCL LB LB POSTOFFICE class27 ppt 128 2 185 40 server ALMOND SRV CS CMU EDU server PECAN SRV CS CMU EDU 128 2 181 62 7 CS 213 S 00 Zone transfers cont Example zone transfer of cs cmu edu Type HINFO SAHARA CMCL AMEFS SRV DEC 600 5 333 UNIX INTEL 486 UNIX Note no HINFO for POSTOFFICE or LB class27 ppt 8 CS 213 S 00 Mapping domain names to IP addrs Used by gethostbyname and nslookup 2 R 3 PTR to edu name server ns 1 nslookup sahara cmcl cs cmu edu 4 R client root name server name server edu name server 5 PTR to cmu edu ns 6 R 10 128 2 185 40 7 PTR to cs cmu edu ns cmu edu name server 8 R 9 128 2 185 40 cs cmu edu name serve R sahara cmcl cs cmu edu class27 ppt 9 CS 213 S 00 DNS Caching Servers cache keep a copy of of information they receive from other servers as part of the name resolution process This greatly reduces the number of queries Example In our previous example the next query for sahara cmcl can be answered immediately because the server kept a copy of the address 1 nslookup sahara cmcl cs cmu edu name server client 10 128 2 185 40 class27 ppt 10 CS 213 S 00 Mapping IP addrs to domain names arpa in addr 128 255 0 255 0 0 2 40 0 185 255 255 sahara cmcl cs cmu edu class27 ppt 11 A separate hierarchy exists in the inaddr arpa domain that maps IP addresses to domain names Used by gethostbyaddr and nslookup Example IP address 128 2 185 40 Corresponding domain name sahara cmcl cs cmu edu stored at 40 185 2 128 inaddr arpa CS 213 S 00 Web history 1945 Vannevar Bush As we may think Atlantic Monthly July 1945 Describes the idea of a distributed hypertext system a memex that mimics the web of trails in our minds 1989 Tim Berners Lee CERN writes internal proposal to develop a distributed hypertext system connects a web of notes with links intended to help CERN physicists in large projects share and manage information 1990 Tim BL writes graphical browser for Next machines class27 ppt 12 CS 213 S 00 Web history cont 1992 NCSA server released 26 WWW servers worldwide 1993 Marc Andreessen releases first version of NCSA Mosaic Feb Mosaic version released for Windows Mac Unix Web port 80 traffic at 1 of NSFNET backbone traffic Over 200 WWW servers worldwide 1994 Andreessen and colleagues leave NCSA to form Mosaic Communications Corp now Netscape class27 ppt 13 CS 213 S 00 Internet Domain Survey www isc org 100 000 000 Internet hosts 10 000 000 1 000 000 100 000 Mosaic and Netscape 10 000 1 000 100 class27 ppt 14 CS 213 S 00 Web servers Clients and servers communicate using the HyperText Transfer Protocol HTTP client and server establish TCP connection Client requests content Server responds with requested content client and server close connection usually HTTP request web client browser web server HTTP response content Current version is HTTP 1 1 RFC 2616 June 1999 class27 ppt 15 CS 213 S 00 Web server statistics Figure showing that Apache is now the dominant web server has been deleted because it was too large see either the Powerpoint source file or a hardcopy handout class27 ppt source Netcraft Web Survey www netcraft com survey 16 CS 213 S 00 Static and dynamic content The content returned in HTTP responses can be either static or dynamic Static content content stored in files and retrieved in response to an HTTP request HTML files images audio clips Dynamic content content produced on the fly in response to an HTTP request Example content produced by a CGI process executed by the server on behalf of the client class27 ppt 17 CS 213 S 00 URIs and URLs network resources are identified by Universal Resource Indicators URIs The most familiar is the absolute URI known as the HTTP URL http url http host port abs path port defaults to 80 abs path defaults to abs path ending in defaults to index html Examples http euro ecom cmu edu 80 index html http euro ecom cmu edu index html http euro ecom cmu edu class27 ppt 18 CS 213 S
View Full Document