Chapter 2 Flashcards

(87 cards)

1
Q

What are networked applications?

A

Networked applications are software programs that run on different devices and communicate over a network using protocols.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What layer of the Internet protocol stack do networked applications operate at?

A

The application layer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do networked applications communicate?

A

They communicate by exchanging messages using application-layer protocols.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an API in the context of networked applications?

A

An Application Programming Interface (API) defines how software applications interact with the network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the role of sockets in network communication?

A

A socket is an endpoint for sending and receiving messages between processes over a network.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How does a process send and receive messages in a networked application?

A

It uses sockets to send and receive data via transport-layer protocols like TCP or UDP.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the two main transport-layer protocols used by networked applications?

A

TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the key differences between TCP and UDP?

A

TCP: Reliable, connection-oriented, ensures ordered and complete data delivery.
UDP: Unreliable, connectionless, faster but no guarantees on delivery.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a port number, and why is it important?

A

A port number identifies specific processes within a device, allowing multiple applications to use the network simultaneously.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the difference between a client and a server in a networked application?

A

Client: Initiates the communication (e.g., web browser).
Server: Waits for client requests and responds (e.g., web server).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the purpose of a socket API?

A

The socket API provides a programming interface for applications to use network communication without managing lower-layer details.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What are the steps involved in socket communication?

A

Create a socket
Bind to an address/port (server-side only)
Listen and accept connections (server-side only, for TCP)
Send and receive data
Close the socket.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is an example of a well-known port number?

A

HTTP (Web) → Port 80
HTTPS (Secure Web) → Port 443
SMTP (Email) → Port 25
FTP (File Transfer) → Port 21.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the main types of application-layer protocols?

A

Request-response protocols (e.g., HTTP, DNS)
Persistent connection protocols (e.g., FTP)
Real-time streaming protocols (e.g., RTP).

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Why do applications use high-level protocols instead of directly accessing the network?

A

High-level protocols abstract low-level details, providing a standardized and simplified way for applications to communicate over networks.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the four dimensions of transport services?

A
  1. Reliable Data Transfer
  2. Throughput Guarantees
  3. Timing Guarantees
  4. Security Services
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

What is reliable data transfer, and which applications require it?

A

Ensures that all data is delivered without errors, loss, or duplication.

  • Required by: Email (SMTP), Web Browsing (HTTP), File Transfer (FTP)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

What is throughput, and which applications depend on it?

A

The rate at which data is transferred over the network.
- Bandwidth-sensitive applications need minimum throughput (e.g., video streaming, VoIP)

  • Elastic applications can adapt to varying throughput (e.g., email, file transfer).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

What is timing, and which applications require it?

A

Ensures data is delivered within a specific delay constraint.

  • Important for real-time applications like VoIP, online gaming, video conferencing.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is security, and how do transport services support it?

A

Includes encryption, authentication, and integrity.

  • Provided by TLS (used in HTTPS, secure email, VPNs, and banking apps).
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

Which transport services are provided by the Internet?

A

✔Reliable data transfer via TCP
✔ Connection-oriented communication (TCP)
✔ Best-effort delivery via UDP

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

Which transport services are NOT provided by the Internet?

A

✖ Guaranteed throughput
✖ Guaranteed timing (low delay/jitter)
✖ Built-in encryption (without TLS)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Which applications typically use TCP?

A

Web browsing (HTTP/HTTPS)

Email (SMTP, IMAP, POP3)

File transfers (FTP, SFTP)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

Which applications typically use UDP?

A

:Applications prioritizing speed over reliability:

VoIP (Skype, Zoom)

Online gaming

DNS (Domain Name System)

Streaming video (YouTube, Netflix uses UDP for low-latency streaming)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the purpose of application-layer protocols?
Define how network applications communicate, including message format, syntax, and rules.
26
What are some examples of application-layer protocols?
HTTP (Web Browsing) SMTP (Email Sending) DNS (Domain Name Lookup) FTP (File Transfer) VoIP Protocols (SIP, RTP)
27
28
What is the relationship between an application and its application-layer protocol?
An application uses an application-layer protocol to communicate with another application over a network (e.g., a web browser uses HTTP to communicate with a web server).
29
What is the difference between public and proprietary application-layer protocols?
Public protocols: Defined by RFCs, open to all (e.g., HTTP, SMTP, DNS). Proprietary protocols: Owned by companies, not publicly available (e.g., Skype’s protocol).
30
What is HTTP?
HTTP (Hypertext Transfer Protocol) is a stateless, request-response protocol used for communication between web clients (browsers) and servers.
31
What application architecture does HTTP use?
HTTP follows a client-server architecture, where a client (browser) sends requests, and a server processes and responds with data.
32
What transport protocol does HTTP use?
TCP (Transmission Control Protocol)
33
Why is HTTP considered a stateless protocol?
Each HTTP request is independent—the server does not retain information about previous requests unless cookies or sessions are used.
34
How does a browser request a web page? (Basic Steps)
- DNS Lookup – Resolves the domain name to an IP address. - TCP Handshake – Establishes a connection with the server. - HTTP Request – Browser sends an HTTP request. - Server Response – Server sends the requested HTML page. - Rendering – Browser processes and displays the content.
35
What are the key elements of an HTTP request?
- Request Line – Contains the method, URL, and HTTP version. - Headers – Metadata (e.g., Host, User-Agent, Accept). - Body (optional) – Sent with methods like POST and PUT.
36
What are the key elements of an HTTP response?
- Status Line – Contains protocol version, status code, and message. - Headers – Metadata (e.g., Content-Type, Set-Cookie). - Body – The requested content (HTML, JSON, images).
37
What are some common HTTP methods?
- GET – Retrieve a resource. - POST – Submit data to a server. - PUT – Update an existing resource. - DELETE – Remove a resource.
38
What is the purpose of HTTP status codes?
They indicate the result of the request. Examples: - 200 OK – Successful request. - 301 Moved Permanently – Resource moved. - 404 Not Found – Requested resource does not exist. - 500 Internal Server Error – Server encountered an issue.
39
What is a non-persistent HTTP connection?
Each request opens a new TCP connection, leading to higher latency due to repeated handshakes. (Used in HTTP/1.0)
40
What is a persistent HTTP connection?
A single TCP connection is reused for multiple requests, reducing latency and improving efficiency. (Used in HTTP/1.1)
41
Why are HTTP cookies needed?
Since HTTP is stateless, cookies store user data across requests to enable authentication, session tracking, and personalization.
42
How do HTTP cookies work?
- Server sends a Set-Cookie header in response. - Browser stores the cookie and includes it in subsequent requests. - Server uses the cookie data for authentication or tracking.
43
What were the goals of HTTP/2?
- Reduce latency. - Improve efficiency with multiplexing. - Fix HTTP/1.1 head-of-line (HOL) blocking.
44
What is multiplexing in HTTP/2?
The ability to send multiple requests over a single TCP connection, improving speed and efficiency.
45
How does HTTP/2 solve head-of-line (HOL) blocking?
By multiplexing streams, allowing multiple requests to be processed simultaneously instead of sequentially.
46
What is server push in HTTP/2?
A feature where the server preemptively sends resources (e.g., CSS, JavaScript) before the client requests them, reducing load times.
47
What are the three main components that enable email communication?
- User Agents (UA) - Mail Servers - Simple Mail Transfer Protocol (SMTP)
48
What is the role of a User Agent (UA) in email?
It allows users to compose, send, read, reply to, forward, and organize emails.
49
What is the role of a mail server in the email system?
It stores incoming emails in users' mailboxes and forwards outgoing emails using SMTP.
49
What does SMTP (Simple Mail Transfer Protocol) do?
It transfers emails from the sender’s mail server to the recipient’s mail server using TCP.
50
What transport protocol does SMTP use?
TCP (Transmission Control Protocol) on port 25.
51
What are the steps for Alice to send an email to Bob on a different mail server?
- Alice composes an email in her User Agent (e.g., Gmail). - Alice’s UA sends the email to Alice’s Mail Server, placing it in the outgoing queue. - Alice’s Mail Server (SMTP client) opens a TCP connection (port 25) to Bob’s Mail Server (SMTP server). - After SMTP handshaking, Alice’s mail server sends the email to Bob’s mail server. - Bob’s Mail Server stores the email in Bob’s mailbox. - When Bob wants to read the email, his User Agent (e.g., Outlook, Apple Mail) retrieves it via IMAP or HTTP.
52
What happens if Bob’s mail server is down when Alice sends an email?
Alice’s mail server holds the message in a queue and retries periodically (e.g., every 30 minutes). If it fails after several days, Alice is notified.
53
How does an SMTP client communicate with an SMTP server?
- TCP Connection Establishment (port 25). - SMTP Handshaking (client introduces itself using HELO). - Email Transfer using MAIL FROM, RCPT TO, and DATA commands. - Closing Connection (QUIT command).
54
What are the five key SMTP commands used in an email transfer?
HELO – Client introduces itself to the server. MAIL FROM – Specifies the sender’s email address. RCPT TO – Specifies the recipient’s email address. DATA – Begins the email content transfer. QUIT – Ends the session.
55
What is the difference between SMTP, IMAP, and HTTP in email communication?
SMTP – Pushes email from sender’s mail server to recipient’s mail server. IMAP – Pulls email from recipient’s mail server to their device. HTTP – Used by webmail interfaces to retrieve emails.
56
Why is the Domain Name System (DNS) necessary?
DNS is needed to translate human-readable domain names (e.g., example.com) into IP addresses (e.g., 192.168.1.1), allowing users to access websites without memorizing numeric addresses.
57
Why is DNS considered an application-layer protocol even though it is not used as a standalone application?
DNS operates at the application layer to resolve domain names but is used as a service by other applications (e.g., web browsers, email clients) rather than being directly accessed by users.
58
Describe how another protocol interacts with DNS step by step.
- A user enters www.example.com in their browser. - The browser checks the local cache for the corresponding IP address. - If not found, the browser sends a DNS query to the local DNS resolver. - The resolver queries a root DNS server if necessary. - The root server directs it to a top-level domain (TLD) server (e.g., .com). - The TLD server provides the address of the authoritative name server for example.com. - The authoritative server returns the IP address. - The resolver caches the response and returns the IP to the browser. - The browser initiates a TCP connection to the IP address and loads the webpage.
59
List and describe four services provided by DNS.
- Hostname to IP address resolution – Converts domain names into IP addresses. - Load distribution – Distributes traffic among multiple IPs for a domain (e.g., CDNs). - Alias support (CNAME records) – Allows domains to point to another domain (e.g., www -> example.com). - Reverse DNS lookup – Resolves IP addresses back to domain names.
60
Describe the DNS hierarchy and its components.
- Root Servers – Direct queries to the correct TLD server. - Top-Level Domain (TLD) Servers – Manage domains within a specific TLD (e.g., .com, .org). - Authoritative Name Servers – Store the IP address records for specific domains. - Local DNS Resolver – Caches DNS responses and queries higher-level servers if necessary.
61
What is the role of a local DNS server in the hierarchy?
The local DNS server acts as an intermediary between client devices and the global DNS hierarchy, caching frequently requested domain resolutions to improve efficiency.
62
Explain the steps involved in a DNS lookup.
- The client sends a DNS query to the local DNS resolver. - If the answer is cached, the resolver returns it. - If not cached, the resolver queries a root server. - The root server directs the resolver to the appropriate TLD server. - The TLD server provides the authoritative name server’s address. - The authoritative server returns the IP address. - The resolver caches and forwards the response to the client.
63
What tools can be used to analyze DNS queries?
nslookup, dig
64
What does nslookup example.com do?
It queries the DNS for the IP address of example.com.
65
What does dig example.com return?
It provides detailed information about the DNS query, including response time, authoritative server information, and TTL values.
66
How is a new domain name registered and entered into DNS?
- A domain is registered through a registrar. - The registrar submits the domain to the appropriate TLD registry. - The registry updates its database to include the authoritative name server for the domain. - DNS propagation occurs as servers update their caches with the new record.
67
Name some common DNS vulnerabilities (excluding flooding attacks).
- Cache Poisoning – Injecting false DNS responses to redirect users. - Man-in-the-Middle (MITM) Attacks – Intercepting DNS queries to alter responses. - Registrar Hijacking – Gaining unauthorized control over domain registration. - Typosquatting – Registering domains similar to popular ones to mislead users.
68
What is the inherent scalability benefit of Peer-to-Peer (P2P) networks under ideal conditions?
In P2P networks, each additional peer contributes resources (bandwidth, storage, processing power), which helps the system scale efficiently. Unlike client-server models, where the server can become a bottleneck, P2P networks distribute load across all participating peers.
69
How does the scalability of P2P compare to client-server architecture?
In client-server models, as more clients join, the server experiences increasing load, which can lead to congestion and slower response times. In P2P networks, each new peer both consumes and provides resources, reducing the risk of bottlenecks and improving scalability.
70
What are Equations 2.1 and 2.2 in the context of P2P scalability?
These equations describe how the system scales as more peers join. - Equation 2.1: Represents the total upload capacity of the system, which increases as new peers join. - Equation 2.2: Describes how download rates improve because peers distribute content among themselves.
71
How does BitTorrent improve file distribution efficiency?
BitTorrent splits large files into smaller pieces, allowing peers to download different parts from multiple sources simultaneously, reducing server strain and increasing download speeds.
72
What are the key components of the BitTorrent protocol?
- Torrent File – Contains metadata about the shared file and the tracker’s address. - Tracker – Coordinates peers and helps them find each other. - Seeder – A peer that has the full file and uploads to others. - Leecher – A peer that downloads file pieces from other peers. - Piece Swapping – Peers exchange different pieces of the file to optimize speed. - Choking/Unchoking – Determines which peers get priority in receiving data.
73
What is DASH streaming?
Dynamic Adaptive Streaming over HTTP (DASH) is a streaming method where video is broken into small chunks, allowing clients to adapt to changing network conditions.
74
How does DASH improve upon regular HTTP GET for streaming?
Unlike regular HTTP GET, which downloads an entire video file at a fixed quality, DASH dynamically selects video chunks at different bitrates based on available bandwidth, reducing buffering and improving user experience.
75
Why is DASH more efficient for mobile users?
It allows seamless switching between different quality levels, adapting to fluctuating network conditions as a user moves.
76
What role does a manifest file play in DASH streaming?
The manifest file lists available video versions with different bitrates, allowing the client to choose the best option dynamically.
77
What is a CDN?
A Content Delivery Network (CDN) is a distributed system of servers that caches and delivers content (e.g., videos, images) closer to users to reduce latency and improve load times.
78
Why are CDNs used?
They improve performance by reducing latency, enhance scalability to handle high traffic, and lower bandwidth costs by caching content at multiple locations.
79
How does a CDN function?
A CDN replicates content across multiple geographically distributed servers and directs users to the closest or best-performing server.
80
What are the two main CDN placement strategies?
1. Enter Deep – CDNs deploy many small servers inside ISPs to reduce latency. 2. Bring Home – CDNs deploy large clusters at fewer locations (e.g., Internet Exchange Points) for easier management.
81
How does DNS-based redirection help CDNs operate?
When a user requests content, the CDN redirects them to the nearest or best-performing server using DNS.
82
Why is DNS-based redirection beneficial?
It optimizes content delivery by balancing load, reducing network congestion, and improving user experience.
83
How does Netflix deliver video to users?
- Netflix stores and processes content on Amazon Web Services (AWS). - Netflix distributes content using its own private CDN (Netflix Open Connect), placing servers inside ISPs and IXPs. - Users are directed to the nearest or most efficient CDN server for streaming. - Netflix uses adaptive streaming (DASH) to optimize quality based on available bandwidth.
84
How does YouTube deliver video to users?
- YouTube stores and processes videos in Google’s data centers. - It distributes content via Google’s private CDN, using caching to reduce bandwidth use. - Users are redirected via DNS-based load balancing to the best-performing YouTube server. - YouTube does not use DASH but instead allows users to manually select video quality.
85
What is Head-of-Line blocking?
A packet at the front of the queue prevents other packets behind it from being transmitted or processed.
86
What is Simple Mail Transfer Protocol (SMTP) ?
Protocol that transfers emails between mail servers using TCP.