Computer Networking: Application Layer

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

Questions and Answers

Which of the following is a key aspect when creating a network application?

  • Developing software specifically for network-core devices.
  • Avoiding the use of browser software for communication.
  • Writing programs that communicate over the network and run on end systems. (correct)
  • Ensuring all devices on the network run user applications.

In a client-server paradigm, clients directly communicate with each other to exchange data and services.

False (B)

What is the primary characteristic that differentiates a peer-to-peer (P2P) architecture from a client-server architecture?

decentralized

In the context of network applications, a ______ acts as an interface through which a process sends and receives messages from the network.

<p>socket</p> Signup and view all the answers

What two components comprise the identifier needed for a process to receive messages over a network?

<p>IP address and port number (B)</p> Signup and view all the answers

Proprietary protocols, unlike open protocols, are publicly defined in RFCs, enabling anyone to access and implement them.

<p>False (B)</p> Signup and view all the answers

What term describes applications that can adjust their throughput needs based on available network resources, without requiring a minimum throughput guarantee?

<p>elastic apps</p> Signup and view all the answers

The TCP service provides a ______ transport between sending and receiving processes, ensuring that data is delivered reliably.

<p>reliable</p> Signup and view all the answers

Match each application with its typical transport protocol:

<p>File transfer/download = TCP E-mail = TCP Streaming audio/video = TCP Internet telephony = TCP or UDP</p> Signup and view all the answers

What security protocol is implemented at the application layer to provide encrypted TCP connections, ensuring data integrity and endpoint authentication?

<p>TLS (A)</p> Signup and view all the answers

A web page consists of multiple objects, all of which must be stored on the same web server.

<p>False (B)</p> Signup and view all the answers

In the context of HTTP, what term describes the role of a browser that requests, receives, and displays web objects?

<p>client</p> Signup and view all the answers

HTTP is considered a 'stateless' protocol because the server does not maintain information about ______.

<p>past client requests</p> Signup and view all the answers

What is a key difference between non-persistent HTTP and persistent HTTP?

<p>Persistent HTTP allows multiple objects to be sent over a single TCP connection, while non-persistent HTTP does not. (D)</p> Signup and view all the answers

In non-persistent HTTP, the total time to receive a file is primarily determined by the file size and is not significantly influenced by the Round Trip Time (RTT).

<p>False (B)</p> Signup and view all the answers

In an HTTP request message, what is the purpose of the GET method?

<p>request data</p> Signup and view all the answers

An HTTP response status code of '404' indicates that the requested document was ______ on the server.

<p>not found</p> Signup and view all the answers

What is the primary function of cookies in maintaining user/server state?

<p>Enabling servers to store and retrieve information about users. (D)</p> Signup and view all the answers

Enabling third-party cookies always enhances user privacy by preventing sites from tracking browsing behavior across multiple websites.

<p>False (B)</p> Signup and view all the answers

In the context of web caching, what is the main goal behind satisfying client requests from a local web cache?

<p>reduce origin server load</p> Signup and view all the answers

A conditional GET in browser caching includes the If-modified-since header, allowing the server to send the object only if it has been modified ______ the specified date.

<p>after</p> Signup and view all the answers

What key feature was introduced in HTTP/2 to decrease delay in multi-object HTTP requests compared to HTTP/1.1?

<p>The ability for the server to push unrequested objects to the client. (C)</p> Signup and view all the answers

HTTP/3 enhances security and congestion control compared to HTTP/2 by operating over TCP.

<p>False (B)</p> Signup and view all the answers

What is the primary function of SMTP in email communication?

<p>email transfer</p> Signup and view all the answers

In the context of email servers, a ______ contains incoming messages for a user.

<p>mailbox</p> Signup and view all the answers

Which of the following email components is responsible for allowing users to compose, edit, and read mail messages?

<p>User agent (B)</p> Signup and view all the answers

SMTP uses UDP to ensure reliable email message transfer between servers.

<p>False (B)</p> Signup and view all the answers

What is the purpose of mail access protocols such as IMAP?

<p>retrieval from server</p> Signup and view all the answers

The primary role of DNS is to translate human-readable domain names into ______.

<p>IP addresses</p> Signup and view all the answers

Why is the Domain Name System (DNS) designed as a distributed database, rather than a centralized one?

<p>To improve scalability and avoid a single point of failure. (A)</p> Signup and view all the answers

Local DNS name servers strictly adhere to the hierarchical structure of the DNS system and do not maintain their own caches.

<p>False (B)</p> Signup and view all the answers

What is the primary action of a DNS name server when it encounters a query for a name it does not know in an iterated query?

<p>refer</p> Signup and view all the answers

DNS servers utilize ______ to improve response times and reduce the load on higher-level servers by storing recently resolved domain name mappings.

<p>caching</p> Signup and view all the answers

Which type of DNS record is used to map a hostname to its corresponding IP address?

<p>A (B)</p> Signup and view all the answers

DNS protocol messages include fields to distinguish between queries and replies, but they do not provide a mechanism to ensure the reply corresponds to the query.

<p>False (B)</p> Signup and view all the answers

When a new company registers a domain name, what type of server do they need to create to associate their public server IPs?

<p>authoritative</p> Signup and view all the answers

DDoS attacks that bombard DNS root servers aim to disrupt Internet services by overwhelming servers with ______.

<p>traffic</p> Signup and view all the answers

Match each DNS term with its description:

<p>Authoritative DNS Server = Provides hostname-to-IP mappings for an organization's named hosts. TLD Server = Responsible for .com, .org, .net, and other top-level domains (TLDs). Recursive Query = The contacted name uses that name to return the exact value Iterated Query = The contacted name, returns another name to query.</p> Signup and view all the answers

Which issue does HTTP/2 aim to resolve, leading to decreased latency in multi-object HTTP requests?

<p>Head-of-Line Blocking (HOL) (B)</p> Signup and view all the answers

DDoS is a high level DNS vulnerability that can be bypassed using advanced filtering.

<p>False (B)</p> Signup and view all the answers

Flashcards

Goals of Application Layer

Conceptual and implementation aspects of application-layer protocols, transport-layer service models, and client/peer paradigms.

Creating a Network App

A way programs run and communicate over a network.

Client-Server Paradigm

A network architecture where a dedicated server provides services to clients.

Peer-to-Peer (P2P) Architecture

A network where devices share resources directly without a central server.

Signup and view all the flashcards

Process

A running program within a host

Signup and view all the flashcards

Client Process

Process that initiates communication.

Signup and view all the flashcards

Server Process

Process that waits to be contacted.

Signup and view all the flashcards

Socket

An abstraction for communication between processes.

Signup and view all the flashcards

Process Identifier

A unique identifier for a process, including IP address and port number.

Signup and view all the flashcards

Application-Layer Protocol

Rules defining message exchange between applications.

Signup and view all the flashcards

Transport Service Needs

Data delivery, integrity, timing, and throughput.

Signup and view all the flashcards

TCP Service

Service with reliable transport and flow control.

Signup and view all the flashcards

UDP Service

Service with unreliable data transfer.

Signup and view all the flashcards

Transport Layer Security (TLS)

A protocol that provides encrypted TCP connections and data integrity.

Signup and view all the flashcards

HTTP

Protocol for web applications.

Signup and view all the flashcards

HTTP Client Request

A request from browser to server

Signup and view all the flashcards

HTTP Server Response

A response to a browser from a server

Signup and view all the flashcards

Stateless HTTP

Where the server doesn't remember past client requests.

Signup and view all the flashcards

Non-persistent HTTP

TCP connection opened and closed for each object.

Signup and view all the flashcards

Persistent HTTP

TCP connection stays open to send multiple objects.

Signup and view all the flashcards

HTTP Request Message

A message that has ASCII readable format.

Signup and view all the flashcards

HEAD Method

An HTTP request to only receive message headers.

Signup and view all the flashcards

Cookies

Small files to maintain state between transactions.

Signup and view all the flashcards

First-Party Cookies

Cookies from the site you visited.

Signup and view all the flashcards

Third-Party Cookies

Cookies from other websites for tracking.

Signup and view all the flashcards

Web Cache

A local storage of web content for quicker access.

Signup and view all the flashcards

Conditional GET

Saves transfer if browser has up-to-date version.

Signup and view all the flashcards

HTTP/2

A protocol to reduce delay in HTTP requests.

Signup and view all the flashcards

HTTP/3

Improved HTTP version with better security.

Signup and view all the flashcards

User Agent (Email)

An application for composing, editing, and reading mail messages.

Signup and view all the flashcards

Mailbox

Contains incoming messages for user.

Signup and view all the flashcards

Message Queue

Message queue of outgoing messages.

Signup and view all the flashcards

SMTP Protocol

Transfer protocol using TCP.

Signup and view all the flashcards

Email

An email message format using ASCII characters.

Signup and view all the flashcards

IMAP

An email access protocol to retreive emails.

Signup and view all the flashcards

Domain Name System (DNS)

A distributed database implemented in hierarchy of many name servers.

Signup and view all the flashcards

Root Name Servers

Official name servers that can resolve names.

Signup and view all the flashcards

Top-Level Domain (TLD) Servers

Servers responsible for all top-level domain/country lookups.

Signup and view all the flashcards

Authoritative DNS Servers

Provides hostname to IP mappings.

Signup and view all the flashcards

Local DNS Name Servers

Returns local or recursive answers from local cache.

Signup and view all the flashcards

Study Notes

Chapter 2: Application Layer

  • Slides provided are free for use by faculty, students, and readers for modification and adaptation.
  • If slides are used, credit the source.
  • If slides are posted, indicate adaptation and copyright of the original material.
  • Book name: Computer Networking: A Top-Down Approach
  • Authors: Jim Kurose, Keith Ross
  • Edition : 8th
  • Published: Pearson, 2020

Application Layer Overview

  • Key aspects of network applications
  • Focus on web and HTTP protocols
  • Includes mail protocols including SMTP and IMAP
  • Includes DNS protocol
  • Peer-to-peer application architectures
  • Video streaming and content distribution are analyzed
  • Focus on Socket programming with UDP and TCP

Goals

  • Focus on conceptual and implementation aspects of application layer
  • Look at transport layer service models
  • Including client-server and peer-to-peer models
  • Learn how protocols work by looking at popular app-layer protocols and infrastructure
  • Focus on HTTP, SMTP, IMAP, and DNS
  • Also video streaming systems and CDNs
  • Programming network applications are analysed including socket API

Network Applications

  • Examples of key network applications
  • Social networking, web, and text messaging.
  • Email, multiplayer network games, and streaming video
  • VoIP (Skype), video conferencing (Zoom), internet search, and remote login

Creating a Network App

  • Focus on creating programs for end systems
  • Enabling communication over a network
  • Web server software interacting with browser software is required
  • No need to write the core network devices
  • Network-core devices are therefore free to avoid running user applications
  • Facilitates rapid application development and propagation

Client-Server Paradigm

  • Server characteristics
  • Always-on host, with a permanent IP address
  • Often in data centers for scaling purposes
  • Client characteristics
  • Clients contact and communicate with the server
  • May connect intermittently
  • Can have dynamic IP addresses
  • Generally clients do NOT communicate with each other
  • Examples include HTTP, IMAP, and FTP

Peer-to-Peer Architecture

  • There is no always-on server
  • End systems can arbitratily communicate directly with each other
  • Peers request services from other peers
  • Provide services in return
  • Self-scaling property where each new peer brings new service capacity
  • Peers connect in intermittent fashion and the IP addresses change
  • Complex to manage such a network
  • P2P file sharing using BitTorrent is an example

Processes Communicating

  • In terms of networking a process is a program running on a host
  • Within the same host, two processes can communicate using inter-process communication as defined by the OS
  • Processes in different hosts communicate by exchanging messages
  • Terminology of clients and servers
  • The client process initiates communication
  • The server process waits to be contacted

Sockets

  • A process sends and receives messages through a socket
  • Analogy, a socket behaves like a door
  • The sending process sends message out the door, relying on the transport infrastructure
  • The receiving process also has a socket
  • Two sockets are used, one at each end

Addressing, Identifiers and Port Numbers

  • To receive a message a process must have an identifier
  • This identifier is made of
  • The unique 32-bit IP address of the host machine that the process is running on
  • The port number associated with the process
  • Example port numbers
  • HTTP server: 80
  • Mail server: 25
  • To connect to any web server at gaia.cs.umass.edu:
  • IP address: 128.119.245.12
  • port number: 80

Application-Layer Protocols

  • Includes what message types are exchanged e.g. request, and response
  • Message syntax defining the fields and how they are delineated
  • Message semantics define information meaning
  • Rules for when and how messages are sent and processed
  • Open Protocols are defined in RFCs, accessible to everyone and interoperable
  • HTTP and SMTP are examples of open protocols
  • Proprietary Protocols are not open e.g. Skype and Zoom

App Transport Service Requirements

  • Data integrity requirements
  • Web browsing, file transfer require 100% reliable data transfer
  • Other applications like audio can tolerate some loss
  • Timing
  • Internet telephony and interactive games require low delay
  • Throughput
  • Some apps require minimum throughput e.g. multimedia file streaming
  • Other apps do not require a minimum like elastic apps
  • Security
  • All apps should encrypt data and ensure data integrity

Common App Transport Requirements

  • File transfer and e-mail are not time-sensitive and allow no data loss
  • Web documents not time-sensitive and allow no loss
  • Audio and video are loss-tolerant and time-sensitive
  • Interactive games are loss-tolerant and also time-sensitive
  • Text messaging allows no loss and is time-sensitive

Internet Transport Protocols

  • TCP service
  • Provides reliable transport between sending and receiving process
  • Employs flow and congestion controls
  • Provides connection-oriented setup
  • Does not provide timing, minimum throughput or security
  • UDP service
  • Provides unreliable data transfer
  • Lacks reliability, flow and congestion control
  • Does not guarantee timing, security, or connection setup
  • One may ask why use UDP if TCP is superior in most aspects

Internet Apps and Protocols

  • FTP uses TCP
  • Email uses SMTP and TCP
  • Web documents uses HTTP and TCP
  • Internet telephony uses SIP and RTP with either TCP or UDP

Securing TCP

  • Vanilla TCP and UDP sockets
  • Do not use encryption
  • Send passwords without encryption
  • Transport Layer Security (TLS) provides encrypted TCP connections with data integrity and end-point authentication
  • Apps can use TLS libraries, build on TCP
  • With the result of sending cleartext messages across the Internet in the encrypted form

Web And Http Overview

  • Web pages consist of objects
  • Objects can be on different web servers
  • Objects are HTML file, JPEG image, Java applet, audio files
  • A web page consists of a base HTML file which further references objects, and each of which is addressable by a URL

HTTP

  • HTTP is hypertext transfer protocol
  • Used by the web applications
  • It is client-server type i.e. browser that requests, gets and finally displays web objects
  • The web server sends with HTTP the requested objects in response
  • Hypertext Transfer Protocol (HTTP) is the web’s application-layer protocol

HTTP Uses TCP

  • The client always initiates a TCP connection
  • Server accepts TCP connection from client
  • The HTTP messages are exchanged between browser (HTTP client) and Web server (HTTP server)
  • After a certain time, the TCP connection gets closed

HTTP Is Stateless

  • Statless means the server maintains no information about past client requests protocols that maintain
  • “state” are complex
  • past history (state) must be maintained
  • Server/client crashes, their views of “state” may be inconsistent, must be reconciled

HTTP Connections

  • There are two types of connections
  • Non-persistent HTTP
  • Persistent HTTP (HTTP 1.1)

Non-Persistent HTTP

  1. The TCP connection opened for each object file
  2. At most one object gets sent over TCP connection
  3. The TCP connection gets closed
  • Therefore, downloading multiple objects requires multiple connections

Persistent HTTP (HTTP 1.1)

  • The TCP connection opened to get a server
  • The client can transfer multiple objects through the same TCP connection
  • And finally the TCP connection gets closed

Non-Persistent HTTP Example

1a. HTTP client initiates TCP connection to HTTP server (process) on port 80 2. HTTP client sends HTTP request message (containing URL) into TCP connection socket 3. HTTP server receives request message and forms response message containing requested object, and sends message into its socket 4. HTTP server closes TCP 5. HTTP client receives response message containing html documents, and displays html file of requested directory etc

  • Then the steps 1. to 5. are executed for another objects

HTTP Response Time

  • RTT is time for delivery of packet to server and back
  • For object
  • One RTT for client
  • One RTT for HTTP
  • Total response time equals 2RTT+ file transmission time

Persistent HTTP

  • Requres 2 RTTs per object
  • TCP overhead for all conections
  • Browsers often open TCP connections to get the requested objects

Persistent HTTP

  • HTTP leaves server connection open
  • Subesquent HTTP messages sent over connection open
  • Client requests are available at refernced objects
  • HTTP 1.1 can give the entire requested objects

HTTP Message Types

  • Uses requests like request and response messages
  • Uses ASCII for coding text (human readable formatting)
  • Uses carriage return character
  • Request uses commands (GET, POST, HEAD)

HTTP Request Message

  • Uses method, URL and version
  • The first header line defines
  • Value, cr and If
  • Can use entity bodies to describe a body

Other Request Types

  • POST:
  • includes forms
  • user input
  • entity body
  • GET
  • includes urls and data input www.somesite.com/animalsearch?monkeys&banana
  • HEAD
  • Retrurns headers if specified URL used by HTTP GET
  • PUT
  • Uploads object to server
  • replaces content
  • includes entity body and content

HTTP Response Message:

  • Status line (http - phrase)
  • Date of reply
  • Apache response
  • last modified
  • content message
  • data in HTML request form

HTTP Response Static Codes

  • Status code appears in 1st line in server-to-client message.
  • Some example codes:
  • 200 OK
    • request succeeded, requested object later in this message
  • 301 Moved Permanently
    • requested object moved, new location specified later in this message (in
    • Location: field)
  • 400 Bad Request
    • request msg not understood by server
  • 404 Not Found
    • requested document not found on this server
  • 505 HTTP Version Not Supported

NetCat Server

  • To test the HTTP request can send request with:
  • % nc -c -v gaia.cs.umass.edu 80 (for Mac) ▪ opens TCP connection to port 80 (default HTTP - server port) at gaia.cs.umass.edu.
  •            >ncat –C gaia.cs.umass.edu 80 (for Windows) ▪ anything typed in will be sent to port 80 at
                             -   gaia.cs.umass.edu
    
  • request format:
  • GET /kurose_ross/interactive/index.php HTTP/1.1
  • Host: gaia.cs.umass.edu
  • You send the data to browser
  • How do you implement it?
  • Use some stateful protocol to interact
  • HTTP stateless protocol without notion of message interaction
  • No exchange of multi-point transaction

How Cookies Maintain User States

  • the Web sites and the client browser that uses cookies to maintain information from all transaction in the state
  1. use HTTP response messages
  2. next HTTP request
  3. file host user is using
  4. back-end web data
  • You can implement data on lapto of client by tracking states in website
  • Susan uses browser
  • For the first time sites create
  • Cookie IDs
  • Add backed databases
  • Sites can track info by finding and storing this cookie (such as knowing that it is really Susan sending a request)

Server Requests and Actions for Cookies

  • Browser can add http to a request file
  • Amazon sites store data for tracking.
  • For a first time login can add a state by set-cookie to a file and to a database

HTTP Security

  • How To use Authorization
  • track shopping carts
  • Recommends
  • Allow users to do e-mail
  • Can track users Can not track by cookies:
  • HTTP requests Third party cookies
  • Disables data by tracking codes
  • Cookies in the Google Chrome

GDPR Tracking Methods

  • Informs if site uses cookies
  • Users can allow cookies on site or not
  • Cookies can protect info

Web Caching

  • Goal to satify request with origin to server with browser cache
  • Use local web client browsers - HTTP
  • In cache: cache returns object to user
  • No cache: object obtained from server cached and delivered to client

Cache Acting

  • The cache acts as client and user
  • Reduces time with a closer client
  • enables poor providers to quickly deliver object code

HTTP Caching Example

  • If network fast average request may be long e.g. in seconds
  • High utilization causes issues queue size issue
  • The network can limit bandwith use

Improving Caching

  • With slow or fast speed improve the local site
  • Buy and create a fast cache cheap and easy
  • For hit of 0.4 reduce queue in local area, lower average overall by 154MB

Browser Caching Conditional

  • Can respond without object in a new system
  • It avoids transmittiom delays for code transmission
  • Gets info with dates specified
  • It allows response whether is changed

HTTP 2

  • Goal decrease for multi objects
  • Introduces multiple TCP pipelining
  • Server responses order
  • Lossy can stall
  • It uses HOL for the protocol

HOL Blocking

  • Objects devided into frames
  • Multiple server
  • Slow if more objects
  • Quick with a bit load

HTTP3 Transfers

  • New versions increase transmission speed
  • New protocols include security control

eMail Overview

  • It uses SMTP. IMAPS, POP3
  • It use message distribution

E-mail Components

  • Components
  • User
  • Server Three Parts
  • Agents transport and simple message protocol

E-mail Servers

  • Mailboxes
  • Agents used SMTP

SMTP Functions

  • Transmission of reliable messages with ports
  • Command transfers
  • Asc II status
  • Handshakes hello requests

eMail Message Handling

  • How to compose an E-mail
  • SMTP protocol to do transfer
  • Reading the text
  • Server protocol to perform reads

SMTP Samples

  • Messages are sent using:
  • codes
  • actions
  • texts

Retreiving eMails

  • To use and retrieve the Emails the IMAPS transport can be implemented
  • The HTTP transport uses this
  • Transports need to implement servers for requests

DNS Overview

  • Can map between 10's of addresses
  • Need server host to map
  • How to translate

DNS Network Protocol

  • Is a distributed Data base
  • Host to serve is a layer
  • Transports can not solve the problems

DNs Structures

  • The services add to the network IP protocol
  • Alias hosts
  • Can set for many IP addresses

DNS Hierachy

  • Data is managed by each one
  • Many trillons access it a day with milisecods counts
  • It requires easy simple managment

Names in DNS

  • Root contains everything and a to data base
  • top level is com or org
  • Can transfer IPs

DNS Root Names

  • Official last message transfers
  • Names can not can access if does respond

Top Level servers

  • Reponosbile for top levels like com and net
  • Has servers for organization

Authorative Servers

  • Organizations set domain and IP hosts
  • Data to maintain service

Local Name Servers

  • A host has IP for finding all servers to resolve
  • Protocols to resolve
  • Mac to DNS

DNS Name Servers • Request the name with host • Asks to server for the server • Asks for what to request

DNS Protocol Data

  • Data includes
  • Queury
  • Replay
  • Has a specific format
  • Authentication
  • Uses replay codes

Protocol Types

  • Query of data
  • Can access data with questions
  • Authentication

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Client/Server Model in Web Engineering
30 questions
HTTP Request Methods and Structure
16 questions
Application Layer Protocols: HTTP, SMTP, DNS
15 questions
Use Quizgecko on...
Browser
Browser