An overview of the application layer in computer networking. It discusses various network application architectures, including client-server, peer-to-peer, and hybrid. The document also covers essential protocols like dns, http, ftp, and smtp, and their roles in resolving domain names, transferring files, and sending emails. Furthermore, it explains the importance of socket programming in enabling applications to communicate over the network.
Download Network Application Layer: Architecture, Protocols, and Services and more Lecture notes Data Communication Systems and Computer Networks in PDF only on Docsity!
Chapter 4 – APPLICATION LAYER
4.1 – Principles of Network Applications
(^) The Application Layer:
(^) Enables the user to access the network
(^) It provides user interfaces and supports for services
(^) electronic mail, file access and transfer, access to system resources, surfing the World Wide Web, and network management
(^) At the core of network application development
is writing programs that run on different end
systems and communicate with each other over
the network
4.1 – Network Application Architecture (Cont’d)
(^) Messages are exchanged through sockets
(^) A socket, sometimes referred to as API (Application
Programmer’s Interface, is an interface b/n application and
transport layers
(^) Application programmer controls the application-layer side, but
not the transport-layer side of the socket except:
(^) the choice of transport protocol
(^) the ability to fix a few transport-layer parameters such as maximum buffer and maximum segment sizes
4.1 – Network Application Architecture (Cont’d)
Protocols at the application layer define:
(^) Types of messages exchanged (e.g., request, response )
(^) Message syntax (what fields exist in messages & how fields are delineated)
(^) Message semantics (meaning of information in fields)
Rules for when and how processes send & respond to messages
(^) An application’s service requirements are classifiedalong three dimensions - (^) Data loss – Audio is tolerant, file transfer is not - (^) Timing (delay) – Real-time application vs non-real-time applications - (^) Throughput – some minimum throughput, others are elastic
(^) TCP and UDP
The Domain Name Space
Root
(^) A max. of 128 levels: level 0 (root) to level 127
(^) Each node in the tree has a label (a string with a maximum of 63 characters) and the root label is a null string
(^) Children of a node (nodes that branch from the same node) have different labels
(^) Each node in the tree has a domain name. A full domain name is a sequence of labels separated by dots (.). The domain names are always read from the node up to the root. The last label is the label of the root (null).
Distribution of Name Space
(^) A complete domain name hierarchy is divided among many servers
(^) What a server is responsible for or has authority over is called a zone
(^) A server may delegate part of its authority to other servers while keeping some sort of reference to these lower-level servers - (^) Roots servers have their zones consisting of the whole tree. There are 13 root servers, each covering the whole domain name space - (^) Top-Level Domain (TLD) servers are responsible for the kinds of organization (e.g. com, org, edu) or all top-level country domains (e.g. uk, fr, jp, et). - (^) Authoritative DNS servers are an organization’s DNS servers, providing authoritative hostname to IP mappings for the organization’s servers (e.g., Web, mail). - (^) Local name server , also called “default name server”, is the DNS server to which a host makes its DNS query. The query is sent to its local DNS server which acts as proxy and forwards the query into the hierarchy of DNS servers
Name Resolution
(^) Two approaches to resolving names into IP
address.
(^) recursive query – the name resolution is done by the contacted name server
(^) iterative query – contacted server replies with IP address of server to contact Recursive Query Iterative Query
DNS Records
(^) Name servers store resource records (RR) for the
hostname-to-IP address mappings.
(^) RR has four fields: (Name, Value, Type,
TTL)
(^) TTL is the time to live of the resource record
(^) The value of Type determines the name and the value of a record. Thus: - (^) If Type=A, then Name is a hostname and Value is its IP address. For example, (relay1.bar.foo.com, 145.37.93.126, A) - (^) If Type=NS, then Name is a domain (e.g. foo.com) and Value is the hostname of an authoritative name server for that domain. For example, (foo.com, dns.foo.com, NS). - (^) If Type=CNAME, then Value is a canonical (real) hostname for the alias hostname Name. For example, (foo.com, relay1.bar.foo.com, CNAME). - (^) If Type=MX, then Value is the canonical hostname of a mail server that has an alias hostname Name. For example, (foo.com, mail.bar.foo.com, MX).
HTTP (Cont’d)
(^) HTTP is implemented in two programs:
(^) client : browser that requests, receives, “displays” Web objects (e.g. Internet Explorer, Mozilla Firefox)
(^) server : Web server sends objects in response to requests (e.g. Internet Information Services(IIS), Apache)
(^) HTTP was first ratified in the early 1990s and has been through three main phases: - (^) HTTP/0.9: only supported the option to get a Web page. - (^) HTTP/1.0: added many supplemental data fields, that allowed for other information passing between the client and server, on top of the request and consequent page. - (^) HTTP/1.1: allowed persistent TCP connections, pipelining, and cache control to improve performance within HTTP -based applications.
(^) Most browsers these days support both 1.0 and 1.1, with new browsers using 1.1 as a default but supporting the ability to fall back to earlier versions if required.
HTTP Page Retrieval
(^) A Web page typically consists of dozens of objects, ranging from
the base HTML through to the images on the page.
(^) Each object is addressable by a URL (Uniform Resource
Locator) which provides the complete address of the object.
(^) HTTP uses TCP for its transport layer.
(^) client initiates TCP connection to server, at port 80
(^) server accepts TCP connection from client
(^) HTTP messages are exchanged between browser (HTTP client) and Web server (HTTP server)
(^) Finally, TCP connection is closed
(^) HTTP is “stateless”, i.e. the server maintains no information about
past client requests.
HTTP Message Format
(^) Two types of Messages: Request and response
HTTP Message Format (Cont’d)
Web Caching
(^) Web caching is achieved using proxy
servers to conserve expensive bandwidth
4.4 – File Transfer Protocol: FTP
(^) FTP, defined in RFC 959, is used to transfer file to/from remote host
(^) Uses two parallel TCP connections:
(^) a control connection on port 21 (open throughout the entire FTPsession), and
(^) a d ata connection on port 20 (opened and then closed for each file transferred)
(^) Control connection is said to be “out of band” (^) more efficient