1 / 72

Computer Networks with Internet Technology William Stallings

This chapter discusses the Hypertext Transfer Protocol (HTTP), which is the underlying protocol of the World Wide Web. It explains how HTTP is used for transmitting information with the efficiency necessary for hypertext jumps. The chapter covers the various elements of HTTP, including requests, responses, header fields, and entity bodies. It also explores the role of DNS in mapping between domain names and numerical addresses.

pendelton
Download Presentation

Computer Networks with Internet Technology William Stallings

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Computer Networks with Internet TechnologyWilliam Stallings Chapter 04 Modern Applications

  2. Hypertext Transfer ProtocolHTTP • Underlying protocol of the World Wide Web • Not a protocol for transferring hypertext • For transmitting information with efficiency necessary for hypertext jumps • Can transfer plain text, hypertext, audio, images, and Internet accessible information

  3. HTTP Overview • Transaction oriented client/server protocol • Usually between Web browser (clinet) and Web server • Uses TCP connections • Stateless • Each transaction treated independently • Each new TCP connection for each transaction • Terminate connection when transaction complete

  4. Key Terms • Cache • Client • Connection • Entity • Gateway • Message • Origin server • Proxy • Resource • Server • Tunnel • User agent

  5. Table 4.1 Key Terms Related to HTTP

  6. Figure 4.1Examples of HTTP Operation

  7. Figure 4.2Intermediate HTTP Systems

  8. HTTP Messages • Requests • Client to server • Responses • Server to client • Request line • Response line • General header • Request header • Response header • Entity header • Entity body

  9. Figure 4.3HTTP Message Structure

  10. Table 4.2 Augmented BNF Notation Used in URL and HTTP Specification

  11. General Header Fields • Cache control • Connection • Data • Forwarded • Keep alive • MIME version • Pragma • Upgrade

  12. Table 4.3HTTP Elements

  13. Request Methods • Request-Line = Method <SP> Request_URL <SP> HTTP-Version <CRLF> • Methods: • Options • Get • Head • Post • Put • Patch • Copy • Move • Delete • Link • Unlink • Trace • Wrapped • Extension-method

  14. Request Header Field • Accept • Accept charset • Accept encoding • Accept language • Authorization • From • Host • If modified since • Proxy authentication • Range • Referrer • Unless • User agent

  15. Response Messages • Status line followed by one or more general, response and entity headers, followed by optional entity body • Status-Line = HTTP-Version <SP> Status-Code <SP> Reason-Phrase <CRLF>

  16. Status Codes • Informational • Successful • Redirection • Client error • Server error

  17. Table 4.4 HTTP Status Codes (1/2)

  18. Table 4.4 HTTP Status Codes (2/2)

  19. Response Header Fields • Location • Proxy authentication • Public • Retry after • Server • WWW-Authenticate

  20. Allow Content encoding Content language Content length Content MD5 Content range Content type Content version Derived from Expires Last modified Link Title Transfer encoding URL header Extension header Entity Header Fields

  21. Entity Body • Arbitrary sequence of octets • HTTP transfers any type of data including: • text • binary data • audio • images • video • Interpretation of data determined by header fields • Content encoding, content type, transfer encoding

  22. Internet Directory Services DNS • Directory lookup service • Provides mapping between host name and numerical address • Essential to functioning of Internet • RFCs 1034 and 1035. • Four elements • Domain name space • Tree-structured • DNS database • Each node and leaf in name space tree structure names set of information (e.g., IP address, type of resource) in resource record • Name servers • Servers that hold information about portion of tree • Resolvers • Programs that extract information from name servers

  23. Domain Names • 32-bit IP address uniquely identifies devices • Two components • Network number • Host address • Problems • Routers devise routes based on network number • Can’t hold table of every network and path • Networks group to simplify routing • 32-bit address usually written as four decimal numbers • Effective for computer processing • Not convenient for users • Problems are addressed by concept of domain • Group of networks are under control of single entity • Organized hierarchically • Names assigned reflect organization

  24. Domain Name Example • edu is college-level U.S. educational institutions • mit.edu is M.I.T. • lcs.mit.edu is Laboratory for Computer Science at M.I.T. • Eventually get to leaf nodes • Identify specific hosts • Hosts assigned Internet (IP) addresses • Internet-wide organization assigns domain names • Delegated down the hierarchy • mit.edu, has four IP addresses: 18.7.21.77, 18.7.21.69, 18.7.21.70, and 18.7.21.110 • Subordinate domain lcs.mit.edu has IP address 18.26.0.36

  25. Figure 4.4Portion of Internet Domain Tree

  26. DNS Database • Variable-depth unlimited levels hierarchy for names • Delimited by period (.) • Distributed database • Distribution controlled by database • Thousands of separately managed zones • DNS servers provide name-to-address directory service for network applications

  27. Table 4.5 Top-Level Internet Domains

  28. Resource Record • Domain name • Human readable form • Series of labels of alphanumeric characters or hyphens • Each pair separated by period • Type • E.g. A = Host address, MX = Mail exchange • Class • Usually IN, for Internet • Time to live • How long to hold result in local cache • Zero means don’t cache • Rdata field length • Rdata • Description of resource • For A type, Rdata is 32-bit IP address

  29. Figure 4.5DNS Resource Record Format

  30. Table 4.6 Resource Record Types

  31. DNS Operation • User program requests IP address for domain name • Resolver module in local host or local ISP formulates query for local name server • In same domain as resolver • Local name server checks for name in local database or cache • If so, returns IP address to requestor • Otherwise, query other available name servers • Starting down from root of DNS tree or as high up as possible • Local name server caches reply • Depending on Time to live field • User program given IP address or error message • DNS name servers automatically send out updates to other relevant name servers as conditions warrant

  32. Figure 4.6DNS Name Resolution

  33. Server Hierarchy • Name servers operated by any organization that has domain • Each name server holds subset of name space (a zone) • One or more (or all) subdomains within domain • Authoritative • This name server maintains accurate data for this portion hierarchy • Can extend to any depth • 13 root name servers share responsibility for top level zones • Replication prevents root server bottleneck • Individual root servers are busy • Internet Software Consortium server (F) answers almost 300 million DNS requests daily (www.isc.org/services/public/F-root-server.html) • Typically, single queries carried over UDP • Queries for group of names carried over TCP

  34. Table 4.7 Internet Root Servers

  35. Name Resolution • Resolver knows name and address of local DNS server • If resolver does not have name in cache, it sends DNS query to local server • Either returns address or after querying one or more other servers • Server (A) forwards request to server (B) • If B has name in cache or database, it can return result • If not, B can • Query another name server and send result back to A • Recursive • Tell A address of next server (C) to ask • A then asks to C • Iterative •  Server exchanges use can either • Name resolvers use recursive

  36. Figure 4.7DNS Message Format

  37. DNS Message Fields - Header • Header always present  • Identifier to match queries and responses. • Query Response: is message query or response • Opcode: Standard, inverse query (address to name), or server status request • Authoritative Answer • Truncated: was response truncated • Requestor will use TCP to resend query • Recursion Desired • Recursion Available • Response Code: e.g. no error, format error, refused • QDcount: entries in question section (zero or more) • ANcount: RRs in answer section (zero or more) • NScount: RRs in authority section (zero or more) • ARcount: RRs in additional records section (zero or more)

  38. DNS Message Fields – Question and Answer • If present, question typically contains only one entry • Domain Name • Sequence of labels • Length octet followed by that number of octets • Terminates with the zero length octet for null label of root • Query Type • Values include all values valid for Type field in RR format plus general codes that match more than one type of RR • Query Class: typically Internet. • Answer section contains RRs that answer question • Authority section contains RRs that point toward an authoritative name server • Additional records section contains RRs that relate to query but not strictly answers

  39. Session Initiation ProtocolOverview • RFC 3261 • Application-level control protocol • Setting up, modifying, and terminating real-time sessions • Enable Internet telephony,(voice over IP, VoIP • Supports single or multimedia session, including teleconferencing • Facets of SIP • User location: Users can access application features from remote locations • User availability: Willingness of called party to communicate • User capabilities: Media and parameters to be used • Session setup: Point-to-point and multiparty calls • Session management: Transfer and termination, modifying session parameters, and invoking services

  40. Session Initiation ProtocolFeatures • Based on HTTP-like request/response transaction model • Client request invokes function on server • At least one response • Uses most HTTP header fields, encoding rules, and status codes • Readable format for displaying information • Uses concepts similar to recursive and iterative searches of DNS • Incorporates Session Description Protocol (SDP) • Defines session content using types similar to MIME

  41. Components and Protocols (1) • Client • Sends requests and receives responses • User agent clients and proxies are clients • Server • Receives requests and sends back responses • Proxies, user agent servers, redirect servers, and registrars • User Agent • In every SIP end station • User agent client (UAC): Issues requests • User agent server (UAS): Receives requests and reponds • Redirect Server • Determines address of called device • Like iterative searches in DNS

  42. Components and Protocols (2) • Proxy Server • Server and client • Makes requests for other clients • Routing • Enforcing policy • Like recursive searches in DNS • Registrar • Server that accepts REGISTER requests • Places information it receives in requests inlocation service for domain • SIP address, associated IP address of device • Location Service • Used by redirect or proxy server to obtain information about a callee's possible location(s) • Maintains database of SIP-address/IP-address mappings

  43. Components and Protocols (3) • Servers defined (RFC 3261) as logical devices • Implemented as separate servers or combined into single application • Proxy servers may act as redirect servers • Need to consult location service database • May be on proxy server or not • Communication between proxy server and location service beyond scope of SIP standard • Proxy consults DNS server to find target domain proxy • SIP typically runs on UDP for performance • Own reliability mechanisms • May also use TCP • May use Transport Layer Security (TLS) protocol for secure connection

  44. Session Description ProtocolSDP • RFC 2327 • SIP invites participants to session • SDP-encoded body of SIP message contains information about what media encodings (e.g., voice, video) parties can and will use • Then data transmission begins, using appropriate transport protocol • Real-Time Transport Protocol (RTP) • Participants can make changes to session parameters using SIP

  45. Figure 4.8 SIP Components and Protocols

  46. Uniform Resource Identifier URI • Identifies SIP resource • User of online service • Appearance on multiline phone • Mailbox on messaging system • Telephone number at gateway service • Group (such as "sales" or "helpdesk") in an organization • Format based on email address formats • user@domain • sip:bob@biloxi.com •  May also include password, port number, and related parameters • If secure transmission required, use "sips:“ • SIP messages are transported over TLS • URI is generic identifier for resource on Internet • URL, for Web addresses is type of URI

  47. Figure 4.9 SIP Call Setup Attempt Scenario

  48. Figure 4.10 SIP Presence Example

  49. Figure 4.11 SIP Registration and Notification Example

  50. Figure 4.12 SIP Successful Call Setup

More Related