solution - Computer Network : Application Layer (Test 1)

Question : Which of the following best explains scalability in client-server architecture?

Solution :
745520260403102158 Correct Answer : Server can handle multiple clients simultaneously

Description -

The correct option is Server can handle multiple clients simultaneously.

Explanation of the Options:

  • Server can handle multiple clients simultaneously: This is correct. In a client-server architecture, scalability refers to the system's ability to handle an increasing workload—such as a growing number of user requests or concurrent clients—by adding resources (like upgrading server hardware or adding more servers) without sacrificing performance.
  • Only one client can connect: This describes a strict single-user system, which is the exact opposite of a scalable network architecture.
  • Clients cannot communicate: While it is true that clients in this architecture typically communicate with the server rather than directly with each other, this isolation is a structural design characteristic, not the definition of scalability.
  • No data sharing possible: The central purpose of a client-server architecture is to facilitate centralized data sharing, storage, and management among connected clients.

Question : Which of the following is a real-world example of the client-server model?

Solution :
139020260403102112 Correct Answer : Web browsing using a browser

Description -

The correct option is Web browsing using a browser.

Explanation of the Options:

  • Web browsing using a browser: This is correct. When you visit a website, your web browser acts as the client, sending a request across the internet for a specific page. A remote computer (the web server) receives this request, processes it, and serves the website files back to your browser to render. This is the most common real-world example of a centralized client-server architecture.
  • Bluetooth file sharing: Bluetooth data transfers typically use a peer-to-peer (P2P) architecture. Both devices share equal capabilities and responsibilities, communicating directly with each other without relying on a centralized server.
  • Offline word processing: Running a local application like Notepad or an offline version of Microsoft Word is a standalone process. It runs entirely within your computer's local memory and operating system without making network requests.
  • Standalone calculator: A basic calculator application operates locally on a single machine. It does not require any network connectivity or a server to process its mathematical operations.

Question : In comparison to peer-to-peer networks, client-server networks are:

Solution :
955120260403102033 Correct Answer : Centrally managed

Description -

The correct option is Centrally managed.

Explanation of the Options:

  • Centrally managed: This is correct. In a client-server network, all critical resources, security policies, data access permissions, and applications are hosted and managed on centralized servers. This makes it much easier for network administrators to back up data, roll out security updates, and manage user accounts from a single point of control compared to peer-to-peer (P2P) networks.
  • Fully decentralized: Peer-to-peer networks are decentralized because every device (peer) on the network shares equal responsibilities and functions as both a client and a server. Client-server networks are inherently centralized around the server.
  • Slower always: Client-server networks are typically much faster and more efficient at handling high volumes of traffic than P2P networks because dedicated, high-performance server hardware is optimized to process and respond to massive numbers of requests simultaneously.
  • Limited to small networks: Peer-to-peer networks become difficult to manage, secure, and navigate as they grow large, making them better suited for small environments. Client-server networks scale incredibly well and are the standard foundation for massive enterprise networks and the global internet.

Question : Which of the following is an advantage of client-server architecture?

Solution :
20320260403101947 Correct Answer : Centralized data management

Description -

The correct option is Centralized data management.

Explanation of the Options

  • Centralized data management: This is correct. In a client-server architecture, files, databases, and critical applications are stored on dedicated servers. This centralization makes it incredibly easy for administrators to perform regular backups, update data, maintain consistency, and ensure all clients access the most up-to-date information from a single point of control.
  • No central control: Centralized control is the defining characteristic of this model. Peer-to-peer (P2P) networks are the ones that operate without a central authority.
  • Limited scalability: Client-server systems are highly scalable. You can easily scale vertically (by upgrading the server's hardware components) or horizontally (by adding more servers to distribute the network load).
  • No security: Security is a massive advantage of this setup. Because data and access policies are managed centrally on the server, administrators can enforce strict user authentication, access control lists (ACLs), and firewall rules to protect resources effectively.

Question : Which architecture introduces a middleware layer between client and server?

Solution :
484820260403101852 Correct Answer : 3-Tier

Description -

The correct option is 3-Tier.

Explanation of the Options:

  • 3-Tier: This is correct. A 3-tier architecture divides the application into three distinct logical layers: the Presentation Layer (Client), the Application Layer (Middleware/Business Logic), and the Data Layer (Database Server). The middle layer acts as an intermediary that processes commands, enforces business rules, and manages data transfer between the user interface and the database.
  • 1-Tier: In a 1-tier architecture, the user interface, business logic, and database all reside on the same single device or software package (like a standalone desktop calculator or an offline text editor).
  • 2-Tier: This is a classic client-server model where the client interface communicates directly with the server database. There is no independent middleware layer separating them.
  • Peer-to-peer: Peer-to-peer (P2P) is a decentralized network model where every device shares equal responsibilities as both a client and a server, completely eliminating the traditional tiered hierarchy.

Question : What happens immediately after a client sends a request?

Solution :
915620260403101817 Correct Answer : Server processes the request

Description -

The correct option is Server processes the request.

Explanation of the Options:

  • Server processes the request: This is correct. In a standard client-server model, once the client transmits a request across the network, the server immediately receives it, parses the incoming data, evaluates any necessary business logic or database queries, and prepares the appropriate response.
  • Client stores data: The client does not store data immediately after sending a request; it enters a waiting state, listening for the server's incoming response. It will only process or store data once that response arrives.
  • Server ignores request: Under normal operation, a server is explicitly designed to listen for and respond to client requests. Ignoring requests would mean the system is down, misconfigured, or experiencing a Denial of Service (DoS) condition.
  • Network disconnects: The network connection must remain open and stable so that the server can send the data back to the client once processing is complete.

Question : Which protocol is commonly used in the client-server model for web communication?

Solution :
598120260403101723 Correct Answer : HTTP

Description -

The correct option is HTTP (Hypertext Transfer Protocol).

Explanation of the Options:

  • HTTP: This is correct. HTTP is the foundation of data communication for the World Wide Web. It operates explicitly on a client-server model: a web browser (the client) sends an HTTP request to a remote web server, and the server returns the requested web page, text, or media assets as an HTTP response.
  • FTP only: FTP (File Transfer Protocol) is used specifically for transferring files between a client and a server. It is not the protocol used for general web browsing or loading everyday websites.
  • ARP (Address Resolution Protocol): ARP operates at the Network/Data Link layers to map a known IP address to a local physical MAC address. It handles local hardware addressing, not application-level web communication.
  • ICMP (Internet Control Message Protocol): ICMP is a Network Layer network diagnostic and error-reporting protocol (used by tools like ping). It does not transport web application data or handle client-server web queries.

Question : Which of the following is a key feature of a server?

Solution :
905320260403101638 Correct Answer : Stores and processes data for clients

Description -

The correct option is Stores and processes data for clients.

Explanation of the Options

  • Stores and processes data for clients: This is correct. The primary function of a server is to act as a centralized resource that listens for, stores, manages, and processes data on behalf of connected clients. It delivers files, application services, or web pages back to the client upon request.
  • Provides user interface: Providing the user interface (UI) is the responsibility of the client application (like a web browser or a mobile app) so that users can interact with the system.
  • Only sends requests: Clients are the entities that initiate communication by sending requests. Servers receive requests and send back responses.
  • Works without protocols: Servers rely heavily on standardized network protocols (like TCP, HTTP, or FTP) to communicate, format, and transfer data accurately to clients over the network.

Question : What is the primary role of a client in a client-server architecture?

Solution :
144220260403101559 Correct Answer : Initiate requests for services or data

Description -

The correct option is Initiate requests for services or data.

Explanation of the Options:

  • Initiate requests for services or data: This is correct. In a client-server architecture, the client is the active entity that triggers communication. It formats and sends requests over the network to a central server whenever it needs information, a file, or a specific service (like loading a webpage or logging into an account).
  • Store and manage databases: This is a core responsibility of the server (specifically a database server), which centrally houses, secures, and updates data for all connected users.
  • Process all network traffic: No single client processes all network traffic. Network traffic routing and forwarding are handled by network infrastructure devices like routers and switches.
  • Control network protocols: Protocols are standardized sets of rules built into operating systems and software that both clients and servers must follow to communicate. Neither side unilaterally controls them.

Question : Which of the following best defines the client-server model?

Solution :
140120260403101346 Correct Answer : Tasks are divided between requesters and providers

Description -

The correct option is Tasks are divided between requesters and providers.

Explanation of the Options:

  • Tasks are divided between requesters and providers: This is correct. The client-server model is a distributed application structure that partitions workloads between resource or service providers (called servers) and service requesters (called clients). The client initiates a request, and the server fulfills it.
  • All devices act equally and share resources: This describes a peer-to-peer (P2P) architecture, where there is no central authority and all nodes function as both clients and servers.
  • Only servers send requests: In this model, clients are the active entities that initiate communication by sending requests. Servers listen for these requests and send back responses.
  • Only clients store data: The central purpose of a server is to store, manage, and process data (such as files, websites, or databases) centrally for all connected clients to access.

Question : Which of the following best describes P2P architecture advantage?

Solution :
69020260403101108 Correct Answer : Self-scalability and cost-effectiveness

Description -

The correct option is Self-scalability and cost-effectiveness.

Explanation of the Options:

  • Self-scalability and cost-effectiveness: This is correct. In a peer-to-peer (P2P) architecture, every new device (peer) that joins the network contributes its own resources—such as bandwidth, processing power, and storage space—to the collective pool. As a result, the network automatically scales up its capacity as more users join, eliminating the need to purchase expensive, high-performance central servers.
  • Requires expensive server infrastructure: This is actually a major disadvantage of the client-server model, which relies on costly, high-end server hardware to handle user traffic. P2P eliminates this centralized requirement.
  • Centralized control: P2P networks are completely decentralized. There is no central authority, server, or administrator managing the nodes; every peer operates independently and holds equal status.
  • Fixed server dependency: P2P networks explicitly remove any dependency on a fixed central server. If one node or peer goes offline, the rest of the network continues to function perfectly without interruption.

Question : Which of the following protocols is used for file transfer between systems?

Solution :
956920260403100913 Correct Answer : FTP

Description -

The correct option is FTP (File Transfer Protocol).

Explanation of the Options:

  • FTP: This is correct. FTP is a standard Application Layer protocol designed explicitly for transferring computer files from one host to another over a TCP-based network (like the Internet). It typically uses two separate TCP connections: port 21 for commands/control and port 20 for the actual file data transfer.
  • SMTP (Simple Mail Transfer Protocol): SMTP is used specifically for sending and routing electronic mail (email) messages between servers, not for general file sharing.
  • DNS (Domain Name System): DNS acts as the phonebook of the Internet. Its primary job is translating human-readable domain names (like google.com) into computer-readable IP addresses (like 142.250.190.46).
  • HTTP (Hypertext Transfer Protocol): While HTTP can be used to download files from web pages, its primary purpose is distributing and rendering hypermedia documents (like HTML websites). FTP remains the dedicated protocol built from the ground up for raw file system management and batch transfers.

Question : Which protocol is used for automatic IP address assignment?

Solution :
489820260403100830 Correct Answer : DHCP

Description -

The correct answer is DHCP.

Protocol Breakdown

  • DHCP (Dynamic Host Configuration Protocol): Automatically assigns IP addresses, subnet masks, default gateways, and DNS server details to devices when they connect to a network. This eliminates the need for manual configuration.
  • FTP (File Transfer Protocol): Used strictly for transferring files between a client and a server over a network.
  • DNS (Domain Name System): Resolves human-readable domain names (like com) into machine-readable IP addresses.
  • HTTP (Hypertext Transfer Protocol): Used for transmitting web pages and data over the World Wide Web.

The DHCP DORA Process

To understand how automatic IP assignment works, it helps to look at the DORA process. This is the 4-step handshake a device uses to discover a DHCP server and secure an IP address when it joins a network.

Because a new device does not have an IP address yet, it communicates using network broadcasts.

[ New Device ]                                     [ DHCP Server ]

 

      |                                                   |

      | -------- 1. DISCOVER (Broadcast) ---------------> |

      | <------- 2. OFFER (Unicast/Broadcast) ----------- |

      | -------- 3. REQUEST (Broadcast) ----------------> |

      | <------- 4. ACKNOWLEDGE (Unicast/Broadcast) ----- |

      v                                                   v

  1. Discover: The client device sends a broadcast message out to the entire local network saying, "I am new here and need an IP address. Is there a DHCP server out there?"
  2. Offer: The DHCP server hears the request, reserves an available IP address from its pool, and responds with an offer saying, "I am here. You can use this specific IP address."
  3. Request: The client accepts the offer by broadcasting back, "Thank you! I would like to officially take that IP address you offered." (This is broadcasted so any other DHCP servers on the network know their offers were declined).
  4. Acknowledge (ACK): The DHCP server sends a final confirmation saying, "Perfect. The IP is yours for a set amount of time. Here are your subnet mask, gateway, and DNS settings."

DHCP Leases and Allocation Pools

DHCP servers do not give out IP addresses permanently. Instead, they operate on a temporary rental system.

  • Address Pools (Scopes): A defined range of IP addresses (e.g., 168.1.50 to 192.168.1.150) that the server is allowed to distribute to clients.
  • Lease Time: The duration a device is allowed to keep an assigned IP address. This can range from a few hours (common in public Wi-Fi networks) to several days (common in home or office networks).
  • Lease Renewal: To prevent losing its connection, a device will automatically attempt to renew its lease when it reaches 50% of the lease duration. If successful, the timer resets. If a device leaves the network permanently, the lease expires, and the IP goes back into the pool for other devices to use.

Static vs. Dynamic IP Addressing

Networks typically use a combination of both assignment methods depending on the device's role.

Feature

Dynamic IP Addressing (DHCP)

Static IP Addressing (Manual)

Assignment

Handed out automatically by a DHCP server.

Configured manually on the device itself.

Permanence

Can change over time or when the device reboots.

Remains the same until manually changed.

Best Used For

End-user devices (Smartphones, laptops, IoT gadgets).

Infrastructure devices (Servers, network printers, routers).

Management

Zero effort for the user; handled centrally.

High effort; must be tracked manually to avoid conflicts.

 

Question : Which architecture allows peers to act as both client and server?

Solution :
145820260403100755 Correct Answer : P2P

Description -

The correct answer is P2P (Peer-to-Peer).

Architecture Breakdown

  • P2P (Peer-to-Peer): In this architecture, every node (peer) acts as both a client and a server. Peers share resources directly with each other without relying on a centralized coordinator. When a peer downloads data, it acts as a client; when it uploads that same data to another node, it acts as a server.
  • Client-Server: Roles are strictly separated. Dedicated servers hold resources and respond to requests, while clients only request and consume those resources. Clients do not share data with other clients.
  • Centralized: A system architecture where all control, processing, and data reside on a single, primary central node. It is a structural concept rather than a peer functional role.
  • Hybrid only: While hybrid models exist (combining central tracking servers with peer data sharing, like BitTorrent), the primary structural definition for nodes acting as both client and server is inherently P2P.

Question : Which of the following is a disadvantage of client-server architecture?

Solution :
109820260403100650 Correct Answer : Single point of failure

Description -

The correct answer is Single point of failure.

Disadvantage Breakdown

  • Single point of failure: In a client-server architecture, all data and core services reside on the central server. If that specific server crashes, experiences a hardware failure, or goes offline, the entire network stops functioning because the clients have no other way to access the resources.
  • High scalability: This is an advantage, not a disadvantage. Client-server systems make it easy to scale up by increasing server capacity or adding new clients to the network.
  • No dependency on server: This statement is factually incorrect. Clients are entirely dependent on the server to function.
  • Low cost: This is incorrect. Setting up a client-server architecture is typically high-cost due to the expensive dedicated server hardware, network operating systems, and professional management required.

Question : In client-server architecture, the server is characterized by:

Solution :
393320260403100527 Correct Answer : Fixed, well-known IP address

Description -

The correct answer is Fixed, well-known IP address.

Server Characteristics Breakdown

  • Fixed, well-known IP address: Because clients must initiate communication with the server to request data, the server must be reliable and easy to find. It runs continuously and has a static (permanent) IP address or domain name so that clients always know where to send their requests.
  • Temporary connection: This describes the client, not the server. Clients connect intermittently when they need a service and disconnect when done. Servers must maintain an always-on connection.
  • Direct communication with other clients: This is a characteristic of P2P (Peer-to-Peer) In a client-server model, clients never talk directly to each other; they only communicate with the central server.
  • No response capability: This is incorrect. The primary job of a server is to process client requests and send a back response with the requested data.

Question : Which application layer protocol is stateless in nature?

Solution :
357620260403100417 Correct Answer : HTTP

Description -

The correct answer is HTTP.

Protocol State Breakdown

  • HTTP (Hypertext Transfer Protocol): Inherently stateless, meaning the server treats every incoming request as entirely isolated and independent. The server retains no memory of previous interactions or context from that specific client. To maintain state (such as keeping you logged in or remembering a shopping cart), modern web applications must use external workarounds like cookies, tokens, or sessions.
  • FTP (File Transfer Protocol): A stateful protocol. It maintains a continuous control connection throughout the entire session to track the user's login status and current directory paths.
  • SMTP (Simple Mail Transfer Protocol): A stateful protocol. It relies on a multi-step conversational state machine (HELO, MAIL FROM, RCPT TO, DATA) to verify and transmit email messages over a single session.
  • DHCP (Dynamic Host Configuration Protocol): A stateful protocol. The DHCP server keeps track of physical hardware (MAC addresses) and maintains a persistent database of active IP address leases to prevent address conflicts.

Question : Which protocol is responsible for translating domain names into IP addresses?

Solution :
765320260403100335 Correct Answer : DNS

Description -

The correct answer is DNS.

Protocol Breakdown

  • DNS (Domain Name System): Acts as the phonebook of the internet. It is responsible for translating human-friendly domain names (like com) into machine-readable IP addresses (like 192.0.2.1) so that web browsers can load the correct internet resources.
  • HTTP (Hypertext Transfer Protocol): Used to fetch and transmit web pages and hypermedia documents once the IP address of the server has already been found.
  • FTP (File Transfer Protocol): Used specifically for uploading or downloading files between a client and a server on a network.
  • DHCP (Dynamic Host Configuration Protocol): Automatically assigns IP addresses and network configurations to devices when they connect to a local network.

Question : Which of the following is NOT a service of the application layer?

Solution :
301320260403100246 Correct Answer : Routing of packets

Description -

The correct answer is Routing of packets.

Application Layer Services Breakdown

  • Routing of packets: This is NOT a service of the Application Layer; it is the core responsibility of the Network Layer (Layer 3 of the OSI model). Routing involves determining the optimal physical path for data packets to travel across interconnected networks, handled by protocols like IP, OSPF, and BGP.
  • File Transfer and Management: A fundamental Application Layer service. It allows users to access, manage, and move files between remote computers, managed by protocols like FTP and SFTP.
  • Directory Services: A native Application Layer service that provides distributed database capabilities to look up global network resources and mappings, handled by protocols like DNS and LDAP.
  • Mail Services: A dedicated Application Layer service that provides the framework for forwarding, storing, and retrieving electronic messages, managed by protocols like SMTP, IMAP, and POP3

Question : The application layer in the OSI model is responsible for:

Solution :
917620260403100118 Correct Answer : Providing services directly to user applications

Description -

The correct answer is Providing services directly to user applications.

OSI Model Responsibilities Breakdown

  • Providing services directly to user applications: The Application Layer (Layer 7) acts as the window for user applications to access network services. It directly supports software programs (like web browsers or email clients) by managing human-to-network interfaces, ensuring communication partners are available, and handling protocols like HTTP, DNS, and SMTP.
  • Routing packets between networks: This is the job of the Network Layer (Layer 3), which handles logical addressing and path determination across different networks.
  • Data encryption and compression only: These tasks are primarily handled by the Presentation Layer (Layer 6), which ensures that data sent from the application layer of one system can be read by the application layer of another.
  • Error detection and correction: This is handled at lower layers. The Data Link Layer (Layer 2) detects physical transmission errors using frames (like CRC), and the Transport Layer (Layer 4) handles end-to-end error correction and retransmissions (like TCP).