1 / 84

Networking

Networking. Application Layer. Networking – Application Layer. The Application Layer is the top-most layer in the OSI model, and the Internet Protocol Stack The Application Layer defines how to exchange messages between distributed systems. Networking – Application Layer.

meena
Download Presentation

Networking

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. Networking Application Layer

  2. Networking – Application Layer • The Application Layer is the top-most layer in the OSI model, and the Internet Protocol Stack • The Application Layer defines how to exchange messages between distributed systems

  3. Networking – Application Layer • In terms of the Internet Protocol Stack, the OSI Application Layer, Presentation Layer and Session Layer are considered one layer; the Application Layer

  4. Networking – Application Layer • The principal protocols in the (Internet) Application layer are • HTTP • SMTP • FTP • Sockets is a technology for inter-process communication across a network (could be considered a Session Layer protocol)

  5. Networking – Application Layer • An Application Layer protocol defines • The types of messages exchanged, e.g., request messages and response messages; • The syntax of the various message types, i.e., the fields in the message • The semantics of the fields, i.e., the meaning of the information in the fields • Rules for determining when and how a process sends messages and responds to messages

  6. Networking – Application Layer Application Layer Transport Layer

  7. Networking – Application Layer • A protocol like HTTP depends on sockets • Sockets form the API for the application • API – Application Programmers Interface • The actual transport protocol used ”beneath” sockets is of no concern to HTTP

  8. Networking – Application Layer • What can HTTP specifically do…? • HTTP defines how a client can request Web pages from a server, and how the server transfers Web pages back to the client • The client could be a Web browser • The server could be a Web server • What is a Web page actually…?

  9. Networking – Application Layer • A Web page is a ”document” consisting of several objects • An object is just a file, like • A HTML file (.html) • An image (.jpg, .gif,…) • An audio file (.mp3,…) • …

  10. Networking – Application Layer • Typical Web page consists of • A base HTML file • Several additional file objects • All objects can be referred to by their URL • URL – Uniform Resource Locator

  11. Networking – Application Layer • Basic browser operation • User clicks on a hyperlink • Browser sends HTTP request messages to the server • Server receives request messages • Server responds with HTTP response messages, containing the requested objects • All communication done via sockets

  12. Networking – Application Layer • A HTTP request (example)

  13. Networking – Application Layer This is a GET command

  14. Networking – Application Layer This is the object we want

  15. Networking – Application Layer The HTTP version used by the client

  16. Networking – Application Layer The server should close the connection after responding

  17. Networking – Application Layer The type of the client

  18. Networking – Application Layer The type of objects the client will accept in response

  19. Networking – Application Layer The preferred version of the returned object

  20. Networking – Application Layer

  21. Networking – Application Layer • Note that • Request message is just a string, in plain ASCII text • Message does not have a fixed length • Specific request method can be GET, POST, HEAD • Entity body used if user e.g. has filled out a form • Additional types of header lines exist, e.g. to enable caching of objects

  22. Networking – Application Layer • A HTTP response (example)

  23. Networking – Application Layer The HTTP version used by the server

  24. Networking – Application Layer Status code (200: Everything went fine)

  25. Networking – Application Layer Status text

  26. Networking – Application Layer The server will close the connection after responding

  27. Networking – Application Layer When was the response created and sent

  28. Networking – Application Layer The type of the server

  29. Networking – Application Layer When was the requested object last modified

  30. Networking – Application Layer How large (in bytes) is the returned object

  31. Networking – Application Layer What type is the returned object

  32. Networking – Application Layer The returned object itself

  33. Networking – Application Layer

  34. Networking – Application Layer • Note that • Response message is a string, in plain ASCII text, followed by the object as ”raw” bytes • Message does not have a fixed length • Additional types of header lines exist

  35. Networking – Application Layer • Examples of status codes Seen that before…? 

  36. Networking – Application Layer • Before the client and server start to communicate, two questions must be considered • What specific transport protocol should be used? • Should persistent or non-persistent connections be used?

  37. Networking – Application Layer • The choice of transport protocol is essentially a choice between TCP and UDP • The main TCP properties • Guaranteed data delivery • Error-free data delivery • Ordered data delivery • Adaptive transmission speed • Congestion control

  38. Networking – Application Layer • UDP offers none of these properties, BUT • Can potentially be much faster • No ”pausing” • Any sort of error-correction, etc becomes the responsi-bility of the application

  39. Networking – Application Layer • In the context of the World Wide Web, the TCP protocol is the preferred choice • Unacceptable (and complicated) for a Web browser to reply on an error-prone protocol like UDP • A different story for e.g. the client of a multiplayer online game…

  40. Networking – Application Layer • HTTP also offers the choice between so-called persistent and non-persistent connections • HTTP 1.0 default: Non-persistent • HTTP 1.1 default: Persistent

  41. Networking – Application Layer • Communication using non-persistent connection • HTTP client connects to server • Client sends HTTP request message • Server sends HTTP response to client • Server closes its connection • Client receives response, and closes connection • If more communication needed, repeat 1-5

  42. Networking – Application Layer • Communication using persistent connection • HTTP client connects to server • Client sends HTTP request message • Server sends HTTP response to client • Client receives response • If more communication needed, repeat 2-4 • Server closes connection after a certain idle time

  43. Networking – Application Layer

  44. Networking – Application Layer • Using persistent connections does use more resources on the server side • However, network traffic is reduced • Today, persistent connection with pipelining is the preferred choice

  45. Networking – Application Layer • Pipelining – allowing the client to issue requests without waiting for repsonse to previous reuqests • Fewer ”round-trips” between client and server, speeding up the resulting transmission rate significantly • Basic protocol properties are preserved!

  46. Networking – Application Layer

  47. Networking – Application Layer • How does a client application ”connect” to a server application? • Two pieces of information are needed • The IP address of the host machine (the machine on which the server application runs) • An identifier that specifies the server application we wish to communicate with. This is often called the port number

  48. Networking – Application Layer • How is an IP address obtained…? • Might be known directly, or… • …using a DNS (Domain Name Server) • A DNS is capable of ”translating” human-friendly host names (www.cnn.com) to IP addresses (157.166.226.26)

  49. Networking – Application Layer • DNS is like a gigantic ”Internet phonebook” • Many applications – inclu-ding browsers – will use DNS to translate host names to IP addresses, before sending HTTP requests • Where is this phonebook…?

  50. Networking – Application Layer • Maybe one single gigantic database…? • Single point-of-failure • Response time • Traffic volume • Maintenance • Not feasible…

More Related