Dark Mode
Image
  • Friday, 13 December 2024
Computer Network-2: Application Layer

Computer Network-2: Application Layer


Computer Network-1: Overview - Outline
  1. 2.1 Principles of Network Applications
  2. 2.2 The Web and HTTP
  3. 2.3 Electronic Mail on the Internet
  4. 2.4 DNS The Internet's Directory Service

2.1 Principles of Network Applications

2.1.1 Network Application Architectures

Client-server paradigm

The Client-server model is a distributed application structure that the client computer sends a request for data to the server through the internet, the server accepts the requested process and delivers the data packets requested back to the client.

Client requesting something and the
Server serving it as long as its present in the database.

A diagram of a cloud network  Description automatically generated A diagram of a computer program  Description automatically generated

How the browser interacts with the servers?

There are few steps to follow to interacts with the servers a client.

  • User enters the URL (Uniform Resource Locator) of the website or file. The Browser then requests the DNS (DOMAIN NAME SYSTEM) Server.
  • DNS Server lookup for the address of the WEB Server.
  • DNS Server responds with the IP address of the WEB Server.
  • Browser sends over an HTTP/HTTPS request to WEB Server’s IP (provided by DNS server).
  • Server sends over the necessary files of the website.
  • Browser then renders the files, and the website is displayed. This rendering is done with the help of DOM (Document Object Model) interpreter, CSS interpreter and JS Engine collectively known as the JIT or (Just in Time) Compilers.

P2P Architecture

Peer-to-peer (P2P) computing or networking is a distributed application architecture that partitions tasks or workloads between peers. Peers are equally privileged, equipotent participants in the network, forming a peer-to-peer network of nodes.

A diagram of a computer network  Description automatically generated P2P Network

Some of the popular P2P networks are Gnutella, BitTorrent, eDonkey, Kazaa, Napster, and Skype.

How Does P2P Network Work?

Let's understand the working of the Peer-to-Peer network through an example. Suppose, the user wants to download a file through the peer-to-peer network then the download will be handled in this way:

  • If the peer-to-peer software is not already installed, then the user first has to install the peer-to-peer software on his computer.
  • This creates a virtual network of peer-to-peer application users.
  • The user then downloads the file, which is received in bits that come from multiple computers in the network that have already that file.
  • The data is also sent from the user's computer to other computers in the network that ask for the data that exist on the user's computer.

Thus, it can be said that in the peer-to-peer network the file transfer load is distributed among the peer computers.

2.1.2 Processes Communicating

A process is an instance of a program running on a computer. within the same host, two processes communicate using inter-process communication. Processes can communicate with each other through both: Shared Memory and Message passing.

Client process: process that initiates communication.

Server process: process that waits to be contacted.

Addressing processes

To send postal mail to a particular destination, the destination needs to have an address. Similarly, in order for a process running on one host to send packets to a process running on another host, the receiving process needs to have an address.

Figure: Application processes, sockets, and underlying transport protocol

to receive messages, process must have identifier. Identifier includes both IP address and port numbers associated with process on host. host device has unique 32-bit IP address example port numbers: HTTP server: 80 & mail server: 25 to send HTTP message to gaia.cs.umass.edu web server:

  • IP address: 128.119.245.12
  • port number: 80

Q: does IP address of host on which process runs suffice for identifying the process?

A: no, many processes can be running on same host

Socket

A socket is one endpoint of a two-way communication link between two programs running on the network. A socket is bound to a port number so that the TCP layer can identify the application that data is destined to be sent to. An endpoint is a combination of an IP address and a port number.

A diagram of a computer  Description automatically generated

To receive messages, the process must have an identifier. The identifier includes both IP address and port numbers associated with process on host.

Question: does IP address of host on which process runs suffice for identifying the process?

Answer: no, many processes can be running on the same host.

2.1.3 Transport Services Available to Applications

Question: What transport service does an app need?

  • data integrity: some apps (e.g., file transfer, web transactions) require 100% reliable data transfer. other apps (e.g., audio) can tolerate some loss
  • timing: some apps (e.g., Internet telephony, interactive games) require low delay to be "effective".
  • throughput: some apps (e.g., multimedia) require minimum amount of throughput to be "effective". other apps (elastic apps) make use of whatever throughput they get.
  • Security: encryption, data integrity.

2.1.5 Application-Layer Protocols

TCP service:

  • reliable transport between sending and receiving process.
  • flow control: sender won't overwhelm receiver.
  • congestion control: throttle sender when network overloaded
  • connection-oriented: setup required between client and server processes.
  • does not provide: timing, minimum throughput guarantee, security

UDP service:

  • unreliable data transfer between sending and receiving process.
  • does not provide: reliability, flow control, congestion control, timing, throughput guarantee, security, or connection setup.

Question: Why is there a UDP?

UDP (User Datagram Protocol) exists alongside TCP (Transmission Control Protocol) to offer a lightweight, connectionless alternative. While TCP ensures reliable, ordered, and error-checked delivery of data, UDP provides a faster, more efficient communication method that sacrifices some reliability for reduced overhead and latency. UDP is ideal for real-time applications like video streaming, online gaming, and VoIP, where speed and responsiveness are paramount over reliability.

Application Protocol in Layer Data Loss Throughput Time Sensitive
Application Transport
File Transfer/Download FTP TCP No loss Elastic No
Email SMTP TCP No loss Elastic No
Web Documents HTTP 1.1 TCP No loss Elastic No
Internet telephony SIP, RTP TCP/UDP Loss Tolerant   Yes, few
Real time Audio Video Real-Time Streaming Protocol (RTSP) Real-Time Transport Protocol(RTP) Loss Tolerant Audio 5Kbps-1Mbps Video 10Kbps-5Mbps Yes, 10 ms
Streaming Audio/Video HTTP TCP Loss Tolerant Audio 5Kbps-1Mbps Video 10Kbps-5Mbps Yes, 10 ms
Interactive game WOW, FPS TCP/UDP Loss Tolerant Kbps+ Yes, few
Text Messaging SMPP TCP No loss Elastic Yes/No

Secure TCP:

Vanilla TCP & UDP sockets:

  • no encryption
  • cleartext passwords sent into socket traverse Internet in cleartext (!)

Transport Layer Security (TLS)

  • provides encrypted TCP connections.
  • data integrity
  • end-point authentication

2.1.6 Network Applications Covered in This Book

Questions

R1. List five nonproprietary Internet applications and the application-layer protocols that they use.

Here are five nonproprietary Internet applications along with the application-layer protocols they use:

  1. Web browsing: Uses HTTP (Hypertext Transfer Protocol) or HTTPS (HTTP Secure) for secure browsing.
  2. Email: Utilizes SMTP (Simple Mail Transfer Protocol) for sending emails and IMAP (Internet Message Access Protocol) or POP3 (Post Office Protocol version 3) for receiving emails.
  3. File Transfer: Relies on FTP (File Transfer Protocol) for transferring files between a client and a server.
  4. Domain Name System (DNS): Uses DNS for translating domain names into IP addresses and vice versa.
  5. Voice over IP (VoIP): Utilizes SIP (Session Initiation Protocol) or H.323 for establishing and managing VoIP calls over the Internet.

R2. What is the difference between network architecture and application architecture?

Aspect Network Architecture Application Architecture
Scope Deals with the design and layout of network infrastructure, including hardware, protocols, and connectivity. Concerned with the structure and organization of software applications, including components, modules, and interactions.
Focus Primarily focuses on the transport of data between devices and networks, ensuring efficient and reliable communication. Concentrates on the functionality and behavior of software applications, addressing user requirements and business logic.
Components Includes elements like routers, switches, protocols (TCP/IP, Ethernet), and physical network topology. Comprises components such as user interfaces, databases, business logic, and communication protocols (HTTP, SMTP).
Communication Facilitates data exchange and routing across interconnected devices and networks, emphasizing data transmission efficiency and reliability. Facilitates interaction between users and software systems, emphasizing user experience, data processing, and application logic.
Examples Examples include OSI model, TCP/IP model, LAN/WAN architecture, network protocols (TCP, IP, UDP), and network topologies (star, mesh, bus). Examples include client-server architecture, peer-to-peer architecture, microservices architecture, application protocols (HTTP, FTP, SMTP), and software design patterns (MVC, MVVM).

R3. For a communication session between a pair of processes, which process is the client and which is the server?

In a communication session between a pair of processes, the process that initiates the communication and requests services is typically referred to as the client, while the process that waits for incoming requests and provides services is known as the server.

R4. For a P2P file-sharing application, do you agree with the statement, There is no notion of client and server sides of a communication session? Why or why not?

For a P2P file-sharing application, the statement "There is no notion of client and server sides of a communication session" is not entirely accurate. While P2P networks distribute responsibilities among peers, distinguishing between clients and servers can still be relevant. In such systems, peers both request and provide resources, blurring the traditional client-server distinction. However, peers may still assume roles akin to clients when requesting files and servers when responding to requests, albeit in a decentralized manner. Thus, while the client-server paradigm is less pronounced in P2P networks, elements of it may still exist depending on the specific architecture and interactions among peers.

R5. What information is used by a process running on one host to identify a process running on another host?

The information used by a process running on one host to identify a process running on another host includes the following:

  1. IP Address: The IP address of the remote host, which uniquely identifies it on the network.
  2. Port Number: The port number associated with the process on the remote host, allowing the sender to address a specific service or application.
  3. Transport Protocol: The transport protocol (e.g., TCP, UDP) used for communication, ensuring reliable or best-effort delivery based on the application's requirements.
  4. Socket Address: The combination of the remote host's IP address and port number, forming a unique endpoint for communication.
  5. Network Layer Addressing: Additional addressing information at the network layer, such as MAC addresses in the case of Ethernet networks, may also be used in some contexts for local network communication.

R6. Suppose you wanted to do a transaction from a remote client to a server as fast as possible. Would you use UDP or TCP? Why?

For a transaction requiring speed, UDP (User Datagram Protocol) would be preferred over TCP (Transmission Control Protocol). UDP offers faster transmission speeds due to its connectionless nature and lack of built-in error correction mechanisms. While TCP ensures reliable delivery and error recovery through features like acknowledgment and retransmission, it introduces additional overhead, resulting in slightly slower transmission speeds compared to UDP. Therefore, for scenarios prioritizing speed over reliability, such as real-time communication or streaming, UDP is the preferred choice.

2.2 The Web and HTTP

2.2.1 Overview of HTTP

The HyperText Transfer Protocol (HTTP), the Web's application-layer protocol that implemented in two programs: a client program and a server program. The client program and server program, executing on different end systems, talk to each other by exchanging HTTP messages. HTTP defines the structure of these messages and how the client and server exchange the messages.

  • Client: browser that requests, receives, (using HTTP protocol) and "displays" Web objects.
  • Server: Web server sends (using HTTP protocol) objects in response to requests.

A diagram of a computer and a computer  Description automatically generated

A Web page (also called a document) consists of objects that are simply a file such as an HTML file, a JPEG image, a Java applet, or a video clip that is addressable by a single URL. Most Web pages consist of a base HTML file and several referenced objects.

Each URL has two components: the hostname of the server that houses the object and the object's path name. For example, the URL www.someSchool.edu/someDepartment/picture.gif

has www.someSchool.edu for a hostname and /someDepartment/picture.gif for a path name.

HTTP uses TCP: HTTP uses TCP as its underlying transport.

  • The HTTP client first initiates a TCP connection with the server by port 80.
  • Once the connection is established, the browser and the server processes access TCP through their socket interfaces.
  • Server accepts TCP connection from client.
  • HTTP messages (application-layer protocol messages) exchanged between browser (HTTP client) and Web server (HTTP server).
  • TCP connection closed.

HTTP is stateless:

  • Server maintains no information about past client requests.

2.2.2 Non-Persistent and Persistent Connections

HTTP connections: two types

Non-persistent HTTP: In non-persistent HTTP, each request/response pair is sent over a separate TCP connection.

  1. TCP connection opened.
  2. At most one object is sent over TCP connection.
  3. TCP connection closed.

N.B: Downloading multiple objects requires multiple connections.

For example, for the below url containing text, references to 10 jpeg images. www.someSchool.edu/someDepartment/home.index

A close-up of a computer  Description automatically generated

Response Time

RTT: time for a small packet to travel from client to server and back.

HTTP response time (per object):

  • One RTT to initiate TCP connection
  • One RTT for HTTP request and first few bytes of HTTP response to return
  • Object/file transmission time.

Non-persistent HTTP response time = 2RTT+ file transmission time

Persistent HTTP: In persistent HTTP, multiple HTTP requests and responses can be sent over the same TCP connection.

  1. TCP connection opened to a server.
  2. Multiple objects can be sent over single TCP connection between client, and that server
  3. TCP connection closed.
Feature Non-persistent HTTP Persistent HTTP
Connection Reuse Each request/response has its own TCP connection, which is closed after the response is received. Multiple requests/responses can be sent over the same TCP connection, which remains open for subsequent requests.
Performance Impact Increased latency and potential performance degradation Improved performance due to reduced connection overhead, faster response times, and decreased latency for subsequent requests.
Resource Utilization Higher resource utilization on the server side due to the frequent opening and closing of TCP connections. More efficient resource utilization on the server side as connections are reused.
Protocol Version Typically associated with HTTP/1.0. Introduced in HTTP/1.1.
Browser Compatibility Compatible with older web browsers and legacy systems. Widely supported by modern web browsers and web servers, recommended for most web applications.

R10. What is meant by a handshaking protocol?

A handshaking protocol refers to a process where two communicating entities initiate communication by exchanging control packets to establish a connection or synchronize communication parameters. It ensures that both parties are ready to send and receive data, verifies their identities, and negotiates the parameters of the communication session. Handshaking protocols are commonly used in networking, including TCP/IP, where a handshake occurs during the establishment of a TCP connection.

R11. Why do HTTP, SMTP, and POP3 run on top of TCP rather than on UDP?

HTTP, SMTP, and POP3 run on top of TCP rather than UDP because they require reliable, connection-oriented communication with features such as acknowledgment of data receipt, retransmission of lost packets, and in-order delivery. TCP provides these capabilities, ensuring that data sent over these protocols arrives intact and in the correct order, which is essential for web browsing, email communication, and other applications that rely on accurate data transmission.

2.2.3 HTTP Message Format

An HTTP message is a fundamental component of the HTTP protocol used for communication between clients and servers. Each HTTP message consists of a request message sent by the client and a response message sent by the server. Here's a breakdown of the structure of each type of HTTP message:

HTTP Request Message

  1. Request Line:
    • Method: Specifies the action to be performed (e.g., GET, POST, PUT, DELETE).
    • Request-URI: The resource identifier (e.g., /index.html).
    • HTTP Version: The version of the HTTP protocol (e.g., HTTP/1.1).

    Example: GET /index.html HTTP/1.1

  2. Headers:

    Key-value pairs providing additional information about the request. Common headers include Host, User-Agent, Accept, Authorization, etc.

    Example: Host: www.example.com User-Agent: Mozilla/5.0 Accept: text/html,application/xhtml+xml

  3. Blank Line:

    A blank line separating headers from the body. It signifies the end of the header section.

  4. Body (Optional):

    The message body contains data sent to the server. This is typically included with methods like POST and PUT but is often empty for methods like GET.

    Example: username=user&password=pass

HTTP Response Message

  1. Status Line:
    • HTTP Version: The version of the HTTP protocol (e.g., HTTP/1.1).
    • Status Code: A three-digit number indicating the result of the request (e.g., 200, 404, 500).
    • Reason Phrase: A textual description of the status code (e.g., OK, Not Found, Internal Server Error).

    Example: HTTP/1.1 200 OK

  2. Headers:

    Key-value pairs providing additional information about the response. Common headers include Content-Type, Content-Length, Set-Cookie, etc. Example,

    Content-Type: text/html; charset=UTF-8

    Content-Length: 1234

  3. Blank Line:

    A blank line separating headers from the body.

  4. Body (Optional):

    The message body contains the data being sent back to the client, such as HTML content, images, JSON data, etc.

2.2.4 User-Server Interaction: Cookies

Cookies play a crucial role in the interaction between users and servers in web applications. They are small pieces of data stored on the client side (in the user's browser) and sent to the server with each HTTP request. Here's a detailed overview of how cookies facilitate user-server interaction:

What is a Cookie?

A cookie is a small text file that is stored on the user's device by the web browser. It contains data that can be used by the server to recognize the user or store information between requests.

How Cookies Work

    1. Setting a Cookie:
      • Server-Side Setting: The server sets a cookie by including a Set-Cookie header in the HTTP response. The cookie will then be stored by the browser.
      • Client-Side Setting: Cookies can also be set using JavaScript through the document.cookie property.

      Example of a Set-Cookie header: Set-Cookie: sessionId=abc123; Expires=Wed, 21 Aug 2024 07:28:00 GMT; Path=/; Secure; HttpOnly

    2. Sending a Cookie:
      • Each time the user makes a request to the server, the browser sends cookies that match the request's domain and path using the Cookie header.

Example of a Cookie header in a request: Cookie: sessionId=abc123

Cookie Attributes

  • Name=Value: The basic format of a cookie. For example, sessionId=abc123.
  • Expires: Defines when the cookie should expire. If not set, the cookie is a session cookie and will be deleted when the browser is closed.
  • Max-Age: Specifies the maximum age of the cookie in seconds. After this period, the cookie will expire.
  • Domain: Indicates the domain for which the cookie is valid. Defaults to the domain of the request.
  • Path: Limits the cookie to a specific path on the server. For example, Path=/app makes the cookie available only for /app and its subdirectories.
  • Secure: Indicates that the cookie should only be sent over secure (HTTPS) connections.
  • HttpOnly: Prevents JavaScript from accessing the cookie. This helps to mitigate cross-site scripting (XSS) attacks.
  • SameSite: Controls whether cookies are sent with cross-site requests. Options include Strict, Lax, and None.

Use Cases for Cookies

  1. Session Management: Cookies are commonly used to maintain user sessions, storing session identifiers that help the server recognize the user across multiple requests.
  2. Personalization: Cookies can store user preferences, themes, or settings to personalize the user experience.
  3. Tracking and Analytics: Cookies track user behavior, enabling web analytics services to measure site usage and user interactions.
  4. Authentication: Cookies are used to manage authentication tokens or credentials, allowing users to stay logged in between sessions.

2.2.5 Web Caching

Cookies: Cookies are small pieces of data that are sent from a website and stored on the user's device by the user's web browser while the user is browsing. They are commonly used to remember user preferences, login credentials, and other browsing information to enhance the user experience or track user behavior.

HTTP cookies can be used for various purposes, including:

  1. Session Management: Cookies can be used to track user sessions, allowing websites to maintain stateful interactions with users across multiple requests.
  2. Authentication: They can store authentication tokens or session identifiers to identify authenticated users and grant access to restricted areas of a website.
  3. Tracking and Analytics: Cookies can be used to track user behavior and gather analytics data, such as page views, click-through rates, and conversion rates. This data helps website owners understand user interactions and improve their websites' performance and usability.
  4. Security: Cookies can also be used for security purposes, such as preventing cross-site request forgery (CSRF) attacks or implementing security policies, such as same-origin policy or secure flag, to protect against unauthorized access or data breaches.

Challenge: How to keep state?

  • At protocol endpoints: maintain state at sender/receiver over multiple transactions.
  • In messages: cookies in HTTP messages carry state.

R12. Consider an e-commerce site that wants to keep a purchase record for each of its customers. Describe how this can be done with cookies.

An e-commerce site can use cookies to keep a purchase record for each customer by storing relevant information, such as items purchased, transaction details, and customer preferences, in cookies on the user's browser. When a user makes a purchase, the site can create a unique identifier for the transaction and store it in a cookie along with associated data. Subsequently, when the user visits the site again, the site can read the cookie to retrieve the purchase history and customize the user experience based on past transactions. This allows the e-commerce site to personalize content, recommend products, and streamline the shopping experience for returning customers.

Web caches: Web caches, also known as HTTP caches or proxy caches, are intermediary servers that store copies of web resources such as HTML pages, images, CSS files, JavaScript files, and other content fetched from web servers. These caches sit between clients (such as web browsers) and origin servers (where the content is hosted), intercepting requests and responses to improve performance and reduce bandwidth usage.

A Web cachealso called a proxy serveris a network entity that satisfies HTTP requests on the behalf of an origin Web server. user configures browser to point to a (local) Web cache browser sends all HTTP requests to cache

  • If object in cache: cache returns object to client.
  • Otherwise, cache requests object from origin server, caches received object, then returns object to client.
A screenshot of a computer  Description automatically generated

How does a web cache act as both client and server?

Yes, a web cache acts as both a client and a server. As a client, it retrieves content from origin servers on behalf of users. As a server, it stores copies of this content locally and serves them to clients upon subsequent requests, thereby reducing latency, bandwidth usage, and server load.

Why Web caching?

  • Reduce response time for client request because cache is closer to client.
  • Reduce traffic on an institutions access link.
  • The Internet is dense with caches that enables poor content providers to more effectively deliver content.

R13. Describe how Web caching can reduce the delay in receiving a requested object. Will Web caching reduce the delay for all objects requested by a user or for only some of the objects? Why?

Web caching can reduce the delay in receiving a requested object by storing a copy of the object in a cache closer to the user, typically on a proxy server or the user's device. When the user requests the same object again, it can be served directly from the cache instead of fetching it from the original server, thereby reducing latency. However, web caching will only reduce the delay for objects that have been previously requested and stored in the cache. Objects that are not cached or have expired in the cache will still incur the full delay of fetching them from the original server.

HTTP/1.1: Introduced multiple, pipelined GETs over single TCP connection.

  • Server responds in-order (FCFS: first-come-first-served scheduling) to GET requests.
  • With FCFS, small object may have to wait for transmission (head-ofline (HOL) blocking) behind large object(s)
  • loss recovery (retransmitting lost TCP segments) stalls object transmission

HTTP/2: Increased flexibility at server in sending objects to client.

Key goal: decreased delay in multi-object HTTP requests.

  • methods, status codes, most header fields unchanged from HTTP 1.1
  • Transmission order of requested objects based on client-specified object priority (not necessarily FCFS)
  • Push unrequested objects to client
  • Divide objects into frames, schedule frames to mitigate HOL blocking

2.3 Electronic Mail on the Internet

Three major components:

  • User agents: mail reader composing, editing, reading mail messages using Outlook, iPhone mail client.
  • Mail servers:
    • mailbox contains incoming messages for user.
    • message queue of outgoing (to be sent) mail messages
  • Simple mail transfer protocol (SMTP): SMTP protocol between mail servers to send email messages where client sending mail server and server receiving mail server

2.3.1 SMTP

  • Uses TCP to reliably transfer email message from client (mail server initiating connection) to server, port 25
  • Three phases of transfer
    1. SMTP handshaking (greeting)
    2. SMTP transfer of messages
    3. SMTP closure
  • command/response interaction (like HTTP)
    1. commands: ASCII text
    2. response: status code and phrase

Scenario: Alice sends e-mail to Bob

  1. Alice uses UA to compose e-mail message to bob@someschool.edu
  2. Alice's UA sends message to her mail server using SMTP; message placed in message queue
  3. client side of SMTP at mail server opens TCP connection with Bob's mail server.
  4. SMTP client sends Alice's message over the TCP connection.
  5. Bob's mail server places the message in Bob's mailbox.
  6. Bob invokes his user agent to read the message.

2.3.3 Mail Message Formats

2.3.4 Mail Access Protocols

  • SMTP: delivery/storage of e-mail messages to receiver's server
  • Mail access protocol: retrieval from server
  • IMAP: Internet Mail Access Protocol [RFC 3501]: messages stored on server, IMAP provides retrieval, deletion, folders of stored messages on server
  • HTTP: gmail, Hotmail, Yahoo!Mail, etc. provides web-based interface on top of STMP (to send), IMAP (or POP) to retrieve e-mail messages

R14. Telnet into a Web server and send a multiline request message. Include in the request message the If-modified-since: header line to force a response message with the 304 Not Modified status code.

Telnet can be used to connect to a web server and manually send HTTP requests. To send a multiline request message, first establish a connection using Telnet, then type out the HTTP request headers, including the "If-modified-since" header line to specify a timestamp. By providing a timestamp in this header, the client can check if the requested resource has been modified since that time. If the resource has not been modified, the server responds with the status code 304 Not Modified, indicating that the client's cached copy is still valid.

R15. List several popular messaging apps. Do they use the same protocols as SMS?

Several popular messaging apps include WhatsApp, Facebook Messenger, Signal, Telegram, and WeChat. While they offer similar functionalities to SMS, they typically use different protocols such as XMPP (Extensible Messaging and Presence Protocol), MQTT (Message Queuing Telemetry Transport), or proprietary protocols developed by the respective companies. SMS, on the other hand, uses protocols like SMPP (Short Message Peer-to-Peer) for communication between mobile devices.

R16. Suppose Alice, with a Web-based e-mail account (such as Hotmail or Gmail), sends a message to Bob, who accesses his mail from his mail server using POP3. Discuss how the message gets from Alice's host to Bob's host. Be sure to list the series of application-layer protocols that are used to move the message between the two hosts.

When Alice sends an email to Bob, the message travels through several application-layer protocols. First, Alice's email client (e.g., Gmail) uses SMTP (Simple Mail Transfer Protocol) to send the message to her outgoing mail server. Then, Bob's incoming mail server uses POP3 (Post Office Protocol version 3) or IMAP (Internet Message Access Protocol) to retrieve the message from his mail server. Along this journey, the message might also pass through other protocols such as DNS (Domain Name System) for domain resolution and TCP/IP for data transmission.

R17. Print out the header of an e-mail message you have recently received. How many Received: header lines are there? Analyze each of the header lines in the message.

The number of "Received:" header lines in an email message varies depending on the email routing. Generally, each "Received:" header line indicates a point in the email's journey from the sender to the recipient. These header lines typically include information about the servers that handled the message, timestamps, and IP addresses. Analyzing these lines can reveal details about the email's path and help identify any intermediate servers or relays it passed through.

R19. Is it possible for an organization's Web server and mail server to have exactly the same alias for a hostname (for example, foo.com)? What would be the type for the RR that contains the hostname of the mail server?

Yes, it's possible for an organization's Web server and mail server to share the same hostname alias (e.g., foo.com). In this case, the DNS (Domain Name System) would differentiate between the services using different types of resource records (RR). For the Web server, it would typically use an A (Address) record pointing to the Web server's IP address. For the mail server, it would use an MX (Mail Exchange) record specifying the hostname of the mail server.

2.4 DNS The Internet's Directory Service

2.4.1 Services Provided by DNS

The Domain Name System (DNS) is a decentralized naming system for computers, services, or any resource connected to the Internet or a private network. It translates domain names (e.g., www.example.com) into IP addresses (e.g., 192.0.2.1), facilitating the location of resources by users and applications. DNS plays a crucial role in the functioning of the Internet by providing a distributed database and a hierarchical naming system for mapping human-readable names to numerical IP addresses.

DNS services:

  • hostname-to-IP-address translation
  • host aliasing- canonical, alias names
  • mail server aliasing
  • load distribution- replicated Web servers: many IP addresses correspond to one name

Why not centralize DNS?

  • Single point of failure
  • Traffic volume
  • Distant centralized database
  • Maintenance

Comment / Reply From