Internet Services I April 25, 2000Internet protocol stackHierarchical domain name spaceDNSZonesZone databasesZone transfersZone transfers (cont)Mapping domain names to IP addrsDNS CachingMapping IP addrs to domain namesWeb historyWeb history (cont)Internet Domain Survey (www.isc.org)Web serversWeb server statisticsStatic and dynamic contentURIs and URLsHTTP/1.1 messagesHTTP/1.1 requestsHTTP/1.1 responsesHow servers interpret Request-URIsExample HTTP/1.1 conversationOPTIONS methodOPTIONS (euro.ecom)Slide 26OPTIONS (microsoft.com)Slide 28OPTIONS (amazon.com)OPTIONS (etoys.com)Slide 31GET methodGET (euro.ecom.cmu.edu)GET request to euro.ecom (Internet Explorer browser)GET response from euro.ecomGET request to euro.ecom (Netscape browser)Slide 37HEAD methodHEAD (etrade.com)HEAD (espn.com)POST methodPOST requestPOST responseTRACE, PUT, and DELETE methodsInternet Services IApril 25, 2000 Topics•Domain Naming System (DNS)•World Wide Web–Web servers–HTTP (static content)15-213class27.pptCS 213 S’00– 2 –class27.pptInternet protocol stack Reliable byte streamdelivery(process-process)Unreliablebest effort datagramdelivery(host-host)Unreliablebest effortdatagramdelivery(process-process)Applications and services (DNS, WWW, email)User datagram protocol(UDP)Transmission control protocol (TCP)Internet Protocol (IP)Network interface (ethernet)hardwarePhysical connectionBerkeley sockets interfaceCS 213 S’00– 3 –class27.pptHierarchical domain name spaceUntil 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 gov milcmu berkeleymitcs ecesahara128.2.185.40gsiacmclunnamed rootlbwww128.2.209.79CS 213 S’00– 4 –class27.pptDNSWorldwide 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 interfacekittyhawk> nslookup bass.cmclServer: localhostAddress: 127.0.0.1Non-authoritative answer:Name: bass.cmcl.cs.cmu.eduAddress: 128.2.222.85CS 213 S’00– 5 –class27.pptZonesDomains are partitioned into zones.Each zone has multiple name servers that store info about names in that zone.•CS zone has 4 serversOne server is authoritative•the others get copies of the authoritative server’s datacom edu gov milcmu berkeleymitcs ecesahara128.2.185.40gsiacmclunnamed rootlbwww128.2.209.79other lb namesother cmclnamesother csnamesCS ZoneLB ZoneCS 213 S’00– 6 –class27.pptZone databasesEach 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)CS 213 S’00– 7 –class27.pptZone transfersClients 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 transfersExample: zone transfer of cs.cmu.edu (Types A & PTR)(note: this is the default for nslookup)...SAHARA.CMCL 128.2.185.40...LB server = ALMOND.SRV.CS.CMU.EDULB server = PECAN.SRV.CS.CMU.EDU...POSTOFFICE 128.2.181.62...CS 213 S’00– 8 –class27.pptZone transfers (cont)Example: zone transfer of cs.cmu.edu (Type HINFO)...SAHARA.CMCL DEC-600-5/333 UNIX...AMEFS.SRV INTEL-486 UNIX...Note: no HINFO for POSTOFFICE or LBCS 213 S’00– 9 –class27.pptMapping domain names to IP addrsclientroot name serveredu name servercmu.edu name servercs. cmu.edu name server(1) nslookup sahara.cmcl.cs.cmu.edu(2) R(3) PTR to edu name server (ns)(4) R(5) PTR to cmu.edu ns(6) R(7) PTR to cs.cmu.edu ns(8) R(9) 128.2.185.40(10) 128.2.185.40nameserverR = sahara.cmcl.cs.cmu.eduUsed by gethostbyname() and nslookupCS 213 S’00– 10 –class27.pptDNS CachingServers 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.clientnameserver1. nslookup sahara.cmcl.cs.cmu.edu10. 128.2.185.40CS 213 S’00– 11 –class27.pptMapping IP addrs to domain namesA separate hierarchy exists in the in-addr.arpa domain that maps IP addresses to domain names.Used by gethostbyaddr() and nslookupExample: •IP address: 128.2.185.40 •Corresponding domain name sahara.cmcl.cs.cmu.edu stored at 40.185.2.128.in-addr.arpa“ ”............0 2551280 2550 2550 255218540sahara.cmcl.cs.cmu.eduin-addrarpaCS 213 S’00– 12 –class27.pptWeb history1945: •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.CS 213 S’00– 13 –class27.pptWeb history (cont)1992•NCSA server released•26 WWW servers worldwide1993•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).CS 213 S’00– 14 –class27.pptInternet Domain Survey(www.isc.org)1001, 00010,000100,0001, 000,00010,000,000100,000,000Internet hostsMosaicandNetscapeCS 213 S’00– 15 –class27.pptWeb serverswebserverHTTP requestHTTP response(content)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
View Full Document