Application Layer: Chapter 2
45 Questions
1 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

In the context of network applications, which task is considered a core element of development?

  • Designing network topologies for optimal data flow.
  • Managing network security to prevent unauthorized access.
  • Configuring network hardware to support various protocols.
  • Writing programs that run on end systems and communicate over the network. (correct)

In a client-server architecture, what is a key characteristic of the server?

  • It initiates communication with clients.
  • It is an 'always-on' host with a permanent IP address. (correct)
  • It has a dynamic IP address that changes frequently.
  • It communicates directly with other servers to balance the network load.

What is a defining feature of the peer-to-peer (P2P) architecture?

  • Exclusive use of permanent IP addresses for all participating nodes.
  • Direct communication and resource sharing between end systems. (correct)
  • Guaranteed high availability of services due to dedicated server infrastructure.
  • Reliance on a central server for coordination and resource sharing.

What role does the 'socket' play in network communication?

<p>It serves as an interface between an application process and the network. (C)</p> Signup and view all the answers

Why is it insufficient to only have the IP address of a host to identify a process for receiving messages?

<p>Multiple processes can run on the same host, each requiring a unique identifier. (A)</p> Signup and view all the answers

Which of the following is included in the identifier for a process to receive messages over a network?

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

An application requires 100% reliable data transfer. Which transport service characteristic is most important for this application?

<p>Data integrity. (D)</p> Signup and view all the answers

Which of the following applications would most benefit from a transport protocol that minimizes delay?

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

Which Internet transport protocol provides reliable, connection-oriented service?

<p>TCP (D)</p> Signup and view all the answers

What is a key reason for using UDP over TCP in certain applications?

<p>UDP's lower overhead can result in faster transmission speeds. (B)</p> Signup and view all the answers

Which of the following is an example of an application-layer protocol used for file transfer?

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

Which protocol is commonly used by web browsers to access web pages?

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

In the context of HTTP, what constitutes an 'object'?

<p>Any file (e.g., HTML file, image, audio file) that can be retrieved by a URL. (D)</p> Signup and view all the answers

What does it mean for HTTP to be a 'stateless' protocol?

<p>Each request is treated independently, without knowledge of previous requests. (D)</p> Signup and view all the answers

What happens after a TCP connection closes in non-persistent HTTP?

<p>The TCP connection closes, requiring a new connection for each subsequent request. (C)</p> Signup and view all the answers

How does persistent HTTP improve efficiency compared to non-persistent HTTP?

<p>By allowing multiple objects to be sent over a single TCP connection. (D)</p> Signup and view all the answers

What is the primary goal of web caches (proxy servers)?

<p>To satisfy client requests without involving the origin server. (B)</p> Signup and view all the answers

What is a key characteristic of the Simple Mail Transfer Protocol (SMTP)?

<p>It transfers mail between mail servers. (A)</p> Signup and view all the answers

Which protocol is used for retrieving email from a mail server?

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

What is the purpose of the Domain Name System (DNS)?

<p>To translate domain names to IP addresses. (C)</p> Signup and view all the answers

Which of the following is a function of DNS?

<p>Translating hostnames to IP addresses. (A)</p> Signup and view all the answers

Why is the DNS database designed as a distributed, hierarchical system?

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

What is the role of a recursive query in DNS resolution?

<p>To place the burden of name resolution on the contacted name server. (D)</p> Signup and view all the answers

What is 'DNS poisoning'?

<p>Introducing bogus data into a DNS server's cache. (D)</p> Signup and view all the answers

What is the purpose of a 'tracker' in BitTorrent?

<p>To maintain a list of peers participating in the torrent. (A)</p> Signup and view all the answers

What is 'churn' in the context of BitTorrent?

<p>The dynamic joining and leaving of peers in a torrent. (B)</p> Signup and view all the answers

How does the 'tit-for-tat' strategy function in BitTorrent?

<p>Peers prioritize uploading to those who upload to them at the highest rate. (D)</p> Signup and view all the answers

In video streaming, what is the role of the 'manifest file' in DASH?

<p>It provides URLs for different chunks of the video file. (A)</p> Signup and view all the answers

What is the primary advantage of using a Content Distribution Network (CDN) for video streaming?

<p>To improve streaming quality by reducing latency and bandwidth constraints. (B)</p> Signup and view all the answers

What is the purpose of using sockets?

<p>To build client/server applications that communicate (D)</p> Signup and view all the answers

What does UDP provide?

<p>Unreliable transfer of groups of bytes data between client and server (B)</p> Signup and view all the answers

When does a transport layer create a new socket?

<p>When client transport layer contacts a server transport layer (C)</p> Signup and view all the answers

In the client server model, serveral functions must occur. Put the following functions in the correct order: 1. Server must have created socket, 2. Client contacts server, 3. Server process must first be running

<p>3, 1, 2 (A)</p> Signup and view all the answers

What is the purpose of identifying the proper socket when sending to a specific process?

<p>To ensure proper delivery of messages between hosts and processes on hosts (D)</p> Signup and view all the answers

How can new peers enter a peer-to-peer system?

<p>By scalability or using the same self scalability practices to bring new peers in (D)</p> Signup and view all the answers

What best describes DNS?

<p>Application-layer protocol (B)</p> Signup and view all the answers

What are two reasons to not centralize DNS?

<p>Traffic volume and single point of failure (A)</p> Signup and view all the answers

Is TCP a reliable transport service?

<p>Yes, TCP is reliable (A)</p> Signup and view all the answers

Which of the following is NOT a phase of transfer?

<p>handsetting (D)</p> Signup and view all the answers

What are name servers officially?

<p>official, contact-of-last-resort by name servers that can not resolve names (A)</p> Signup and view all the answers

What is important for the server-to-client bandwidth?

<p>Server-to-client bandwidth will vary over time (B)</p> Signup and view all the answers

What is a commonality between TCP and UDP sockets?

<p>They both send to a created socket to setup the parameters (A)</p> Signup and view all the answers

How does multi-media affect video?

<p>spatial, temporal and coding changes have varying amounts with different MPEG changes (B)</p> Signup and view all the answers

Are applications automatically given specific network requirements?

<p>No (C)</p> Signup and view all the answers

In terms of requesting chunks, where does Alice request them from in a peer-to-peer system?

<p>All peers have list of chunks that they have (A)</p> Signup and view all the answers

Flashcards

Network application development

Writing programs that run on different end systems and communicate with each other over the network.

Application Architecture

The way network applications are structured, either client-server or peer-to-peer.

Client-server

Architecture where clients contact and communicate with an always-on server

Peer-to-peer (P2P)

Architecture where end systems communicate directly without an always-on server.

Signup and view all the flashcards

Process in Networking

A program running within an end system.

Signup and view all the flashcards

Client Process

A process that initiates communication in a client/server model.

Signup and view all the flashcards

Server Process

A process that waits to be contacted.

Signup and view all the flashcards

Socket

The interface between the process and the computer network.

Signup and view all the flashcards

Process Identifier

A unique identifier for a process to receive messages.

Signup and view all the flashcards

Identifier (Addressing Processes)

Includes both IP address and port numbers associated with a process on the host.

Signup and view all the flashcards

Data Integrity

Requirement of transferring data completely, without loss or modification.

Signup and view all the flashcards

Timing (Transport Service)

Requirement relating to timing in network communications.

Signup and view all the flashcards

Throughput

The amount of data that can be transmitted in a given amount of time; speed.

Signup and view all the flashcards

Security (Transport)

Protecting data with encryption and ensuring data integrity.

Signup and view all the flashcards

TCP Service

Provides reliable transport between sending and receiving process.

Signup and view all the flashcards

UDP Service

Provides unreliable data transfer between sending and receiving process.

Signup and view all the flashcards

HTTP

Web's application layer protocol.

Signup and view all the flashcards

Web Page

Consists of base HTML-file and several referenced objects.

Signup and view all the flashcards

Object on the Web

HTML file, JPEG image, audio file, etc.

Signup and view all the flashcards

Each Object

Addressable by a Uniform Resource Locator.

Signup and view all the flashcards

HTTP and TCP

Client initiates TCP connection (creates socket) to server, port 80.

Signup and view all the flashcards

HTTP: Stateless

No information about past client requests.

Signup and view all the flashcards

Persistent HTTP

TCP connection opened to server.

Signup and view all the flashcards

Persistent HTTP Behavior

Server leaves connection open after sending response.

Signup and view all the flashcards

browser requests

Browser sends all HTTP requests to cache

Signup and view all the flashcards

Web cache

a system in your computer used to store objects (versions of website components, documents, images, etc.) for reuse

Signup and view all the flashcards

Email SMTP

SMTP protocol with delivery/storage of e-mail messages to receiver's server.

Signup and view all the flashcards

mail access

protocol with retrieval of e-mail messages from a e-mail server

Signup and view all the flashcards

DNS

Mapping between IP address and name

Signup and view all the flashcards

Main DNS Service

Translating hostname to IP address.

Signup and view all the flashcards

Host aliasing

DNS alias - also called nickname

Signup and view all the flashcards

Load Distribution on DNS

Multiple Servers with IP match the same name

Signup and view all the flashcards

Root name server

Servers that can not resolve name

Signup and view all the flashcards

DNS

A distributed database storing resource records

Signup and view all the flashcards

DDoS attacks

Bombarding root servers with traffic.

Signup and view all the flashcards

P2P architecture

Arbitrary end systems directly communicate

Signup and view all the flashcards

P2P file sharing

File sharing through decentralization

Signup and view all the flashcards

tracker

tracks peers participating in torrents.

Signup and view all the flashcards

peer joining

Peer joining in torrents to distribute files

Signup and view all the flashcards

Study Notes

  • Chapter 2 is about the Application Layer
  • The goal includes conceptual and implementational aspects of the application layer, transport-layer service models, and client/server/peer-to-peer paradigms.

Core of Network Application Development

  • It involves writing programs on different end systems to communicate with each other over networks

Example in Web Applications

  • Web apps use 2 distinct programs that communicate, browser programs on user hosts, and web server programs on web server hosts.

NW Application Examples

  • Examples include e-mail, the web, instant messaging, remote login, P2P file sharing, and multi-user network games.

Application Programs

  • These run-in end systems (hosts), communicate over a network, and exchange messages to implement applications like e-mail, the web, P2P file sharing and instant messaging.
  • No software is required for network-core devices

Network-Core devices

  • These don't run user applications

Application-Layer Protocols

  • These protocols define messages exchanged by apps and actions that are taken
  • Communication services are provided by lower-layer protocols like TCP and UDP

Network Applications

  • Network applications follow the client-server or peer-to-peer (P2P) architecture

Server

  • An always-on host, has a permanent IP address and is often in data centers for scaling.

Clients

  • Clients contact and communicate with the server intermittently, and may have dynamic IP addresses
  • Clients do not communicate directly with each other
  • Examples include HTTP, IMAP, and FTP

Peer-to-peer architecture

  • This architecture has no always-on server
  • Arbitrary end systems communicate directly
  • Peers can request a service from other peers and provide the service in return
  • New peers offer service and scalability
  • Peers are intermittently connected and change IP addresses
  • Management is complex
  • P2p filesharing is an example

Server Architecture

  • Servers are always-on hosts with permanent IP addresses
  • Provides requested services to clients, such as web pages or email

Client Architecture

  • Clients initiate contact with the server
  • Clients may have dynamic IP Addresses
  • Clients don't communicate directly with each other

Client/Server Processes

  • Client processes initiate the communication
  • Server processes wait to be contacted
  • Browser processes initialize contact with a Web server process on the Web

Processes

  • This is a program that is running within a host
  • Communicate by exchanging messages

Socket

  • Serves as the interface between the process and the computer network
  • Sockets are also known as Service Access Points (SAP)
  • Messaging process and the transport are key

API

  • Sockets can also be referred to as Application Programming Interfaces through port-based transport protocols

Process Receiving Messages

  • Needs an identifier
  • Every host has an unique 32-bit IP address
  • Multiple processes can run on the same host
  • Identifier includes both IP addresses and host associated port numbers

Example Port Numbers

  • Web-HTTP protocol uses an identifier port number of 80
  • Mail-SMTP protocol uses an identifier port number of 25
  • HTTP messages to google.com connects to IP address (216.58.216.164) on port number 80

Application Transport Needs

Data Integrity

  • Some applications (file transfer, web transactions) require 100% reliability
  • Some applications (audio) tolerate loss

Timing

  • Some applications (Internet telephony, interactive games) require low delay to be "effective"

Throughput

  • Some apps (multimedia) require minimum bandwidth to be "effective"
  • Other apps ("elastic apps") make use of whatever throughput they get

Security

  • Requires security encryption, data integrity, etc

Transport Services of Common Apps

File transfer

  • File transfer requires no loss and elastic throughputs and timing isn't an issue

Email

  • Email also requires no loss and elastic throughput and timing isn't an issue

Web documents

  • Timing isn't an issue, but there's no loss, and it uses elastic throughput

Real time audio video

  • Is loss-tolerant, the audio uses 5Kbps-1Mbps, video uses 10kbps-5Mbps, and the timing is 10's of msec

Stored audio video

  • Uses the same configurations but the timing is in few secs

Interactive Games

  • Needs very lossless tolerant conditions and timing is 10's of msec

TCP Service

  • Functions with reliable transport between sending and receiving processes
  • Has flow control such that the sender won't overwhelm the receiver
  • Throttles sender when overloaded
  • TCP is reliable, no timing, and is connection-oriented

UDP Service

  • Works with unreliable transfer between sending and receiving
  • Provides no reliability or security
  • There's no flow or congestion control, no guaranteed timing throughput and no set up connections.

Application Layer Protocols

  • FTP [RFC 959] uses TCP
  • SMTP [RFC 5321] uses TCP
  • HTTP 1.1 [RFC 7320] uses TCP
  • SIP [RFC 3261] uses TCP or UDP
  • Proprietary HTTP [RFC 7320], DASH uses TCP
  • WOW,FPS (proprietary) uses either UDP or TCP

Web/HTTP Terminology

  • Web pages consist of objects, such as HTML, JPEG and audio files
  • Most web pages consist of a base HTML-file and includes several referenced objects
  • Web objects are addressable by URLs

HTTP Protocol Overview

  • HTTP stands for Hypertext Transfer Protocol
  • Functions on The Web's application layer
  • This protocol uses the client/server model
  • Clients request, receive and display (using HTTP protocol) Web objects
  • The server sends (using HTTP protocol) objects in response to requests

HTTP/TCP Use

  • This protocol uses a TCP port to initiate and create connections
  • In this case, HTTP has a server that approves TCP connections
  • HTTP translates exchanged application-layer protocols

HTTP

  • Is stateless
  • The server maintains no information on the client

HTTP Connections

  • Non Persistent: using TCP connections, at most one object sent over TCP connection and the connection closes Downloading multiple objects requires multiple connections
  • Persistent: Use ongoing TCP connections, multiple objects can be sent over a single TCP connection between a client/server, and closes with the connection

Non-Persistent HTTP

  • The client initiates a TCP connection and the server accepts
  • Next, the client sends a request to retrieve the object
  • Then the server sends the object, and closes the connection
  • The server receives and displays the object

Response time, rtt

  • RTT (definition): Time for a small packet to travel from client to server and back
  • Formula: 2RTT + file transmission time

HTTP and RTT

  • Persistent protocol is the preferred and faster
  • HTTP persistent connection: allows to send multiple objects reducing the RTT to more than half

Web Cache

  • The goal is to satisfy client requests without involving an origin server
  • The user can configure the browser to point to a web cache
  • The HTTP requests the cache
  • The cache returns to the client and caches a copy from the server
  • Caches act as both sides of client server relationship

Web Caching

  • Can lead to the reduction of response time and overall access time
  • It helps reduce traffic across institutions using the same connections
  • It enables content for slow networks

Email

  • Involves user agents, mail servers, and SMTP protocol
  • User agents = mail readers
  • Includes composing and editing features

Mail Servers

  • These contain incoming messages for users
  • Also contains a "message queue" of outgoing messages
  • Uses SMTP to send emails

SMTP functions

  • This uses TCP to reliably transfer messages from client's to the server's port 25.
  • This transfers directly, which means SMTP protocol interacts directly from the sending server to the receiving.
  • This contains 3 steps: Handshaking, Transferring, and Closing.
  • All messages are in ASCII

Alice Sends an Email

  • Alice uses a user agent to create the email message
  • The user agent relays the message toward the mailbox
  • The SMTP opens a TCP connection and sends the email
  • Lastly, Bob the receiver uses a user agent to see the email

Protocols

  • SMTP delivers messages to a designated Mailbox
  • Other applications can provide access to that location depending on the type, (HTTP, IMAP)

DNS: Domain Name System

  • This maps a hostname to it's IP
  • Every device on every network has one Internet Hosts, Routers:
  • IP addresses use 32 bits for addressing
  • The "name" of each device uses a alphanumeric naming convention
  • The DNS maps between these address types

DNS: Functions

  • Manages names and addresses
  • is a database implemented as a hierarchy containing info regarding name servers.
  • Its a set of app layers for the distributed databases allowing names and addresses to be resolved by it

Centralized DNS

  • Is non scalable
  • Can be a single failure point
  • Traffic volume could overwhelm single server
  • Can't be "close" to every client (causing significant delays)
  • Maintenance: DNS would need to keep a record of every Internet host

DNS and Hierarchy

  • When looking for a name and IP address, first query the root, then queries for the domain, then queries for the name

Root DNS Servers

  • "Official", contact of last resort to find resource records from the names that can resolve
  • There are 13 logical root name "servers"
  • ICANN manages all Root domains

TLD: Top-Level Domain

  • Responsible for .com, .org, .net, .edu, .aero, .jobs, .museums, and all top-level country domains, e.g.: .cn, .uk, .fr, .ca, .jp etc
  • Networking solutions include networking TLD etc

Local DNS Names

  • These are set by the ISP
  • Also called a default name server
  • It will remember names for future queries as a result.
  • It can act as a form of proxy server, forwarding queries

Iterated Queries

  • Contacted servers reply with the name of a server to contract
  • The phrase " I don't know this name, but ask this server" is generally used
  • These tend to query recursively

Reclusive Queries

  • These add the burden of name resolution of the contacted name server heavy query load on higher levels of hierarchy

DNS Records

  • Learns mappings
  • Can be not up to date (Outdated Best Efforts)
  • Update/Notify: Internet Engineering Task Force proposed a system to notify a server to update it's records

DNS message header includes

  • Indentification for the query
  • Flags: whether it's a query or reply
  • Sections for questions, answers, authority, and information for a DNS server to use.

DNS Security

  • Concerns include the security, integrity, and availability of the service as a whole.
  • DDoS attacks bombard the DNS servers in an attempt to negatively impact the reliability of the service.
  • Redirect attacks occur from intercepted queries and DNS poisoning.

P2P Architecture

  • Arbitrary system with one server acting as the main transfer point
  • Peers request services and give in return
  • Peers may be intermittent and dynamic addresses
  • Sharing over Bittorrent and Kankan

Bittorrent

  • The protocol used to fileshare
  • Distributes files in a torrent with the help of peers

Bittorrent and Torrenting

  • Peers are uploading and downloading to each other, sending parts of a singular file
  • A program will seek out other peers and transfer file chunks to reassemble
  • These are transferred while others are transferred to a given system
  • Churn causes a peer to find another resource stream

Constant Bit Rate

  • CBR is a video encoding rate that is fixed

Variable Bit Rate

  • VBR is an encoding rate that changes depending on spacial conditions

Video Example Qualities and Speeds

  • Qualities such as DVD versus Streaming VOD determines speed and bitrate

Streaming Stored Video

  • Server to Client bandwidth will vary over time on bandwidth, and video qualities.
  • Network conditions can ruin a video stream experience.

Dynamic Adaptive Streaming over HTTP

  • Dynamic transfers stream data along with HTTP
  • Files are encoded, encoded at different bit rates.
  • Then clients consult these manifests which give bandwidth and sustained rates. Clients have encoding rate points through points.

Content distribution networks

  • Netflix uses CDN to stream multiple copies of a video at multiple geographical sites (stores/serves)
  • These are deployed to servers that are "deep" within access networks.
  • Servers are deployed to countries across the planet.
  • Examples include Akamai and Limelight

CDN

  • Stores copies of content at CDN nodes
  • Subscribers request content and can directed to it
  • Can change copy it its congested

Netflix

  • Relies on Amazon cloud and its own CDN to deliver content

Socket Programming

  • This builds client and server applications to communicate through sockets
  • Sockets acts as doors between applications

UDP Socket Programming

  • Has no defined handshakes

UDP Server

  • The application viewpoint is that the transfer will be delivered by UDP
  • Is not reliable

Client/Server Socket Interaction: UDP transfer

  • Requires a socket connection
  • Must send a destination IP to send its information

TCP

  • Creates a new socket for each user/ client upon contacting it and sets up a pipe to talk on
  • Sets up a viewpoint for application

Client/Server Socket Interaction: TCP transfer

  • TCP connections require host ID
  • Connections use code commands like: connect, send, read and close

Studying That Suits You

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

Quiz Team

Related Documents

Description

This chapter explores the conceptual and implementational aspects of the application layer. Topics covered include transport-layer service models and client/server/peer-to-peer paradigms. It also covers application programs that run in end systems.

More Like This

Network Applications: 3yad
32 questions
Unit 3: Application Layer
40 questions
Computer Networks: Chapter 2 - Application Layer
24 questions
Servicios en Red y Capa de Aplicación
16 questions
Use Quizgecko on...
Browser
Browser