Unit 6: Application Layer and Wireless Networks - Subjective Questions
CSE306 — Computer Networks • Practice Questions with Detailed Answers
20 questions
Define the Domain Name System (DNS). Explain its need and hierarchical organization.
Domain Name System (DNS) is a distributed and hierarchical naming system that translates human-readable domain names, such as www.example.com, into IP addresses used by network devices.
Need for DNS:
- Humans can remember names more easily than numerical IP addresses.
- The IP address associated with a server may change while its domain name remains the same.
- DNS provides a scalable and distributed naming mechanism for the Internet.
- It supports services such as host aliasing, mail-server identification, and load distribution.
DNS hierarchy:
- Root domain: The highest level, represented by a dot.
- Top-Level Domains (TLDs): Examples include
.com,.org,.edu, and country-code domains such as.in. - Second-level domains: Organization-specific names such as
exampleinexample.com. - Subdomains and host names: Examples include
mail.example.comandwww.example.com.
The namespace is divided into zones, and each zone is managed by an authoritative DNS server. This distributed structure improves scalability, reliability, and administrative control.
Describe the DNS name-resolution process. Distinguish between recursive and iterative queries.
When a user enters a domain name, the following DNS resolution process generally occurs:
- The application sends a request to the operating system's stub resolver.
- The resolver checks local caches and the hosts file.
- If no answer is found, the query is sent to a recursive DNS resolver.
- The resolver may contact a root server, which directs it to the appropriate TLD server.
- The TLD server provides the address of the domain's authoritative server.
- The authoritative server returns the required DNS record.
- The resolver caches the response according to its Time to Live (TTL) and returns it to the client.
Recursive query:
- The queried server must return the final answer or an error.
- The client delegates the complete resolution task to the server.
- It is commonly used between a host and its local DNS resolver.
Iterative query:
- A server returns the best information it has, often a referral to another server.
- The requester continues querying other servers.
- It is commonly used by recursive resolvers when contacting root, TLD, and authoritative servers.
Caching reduces lookup delay and DNS traffic, although expired records must be refreshed.
Explain the purpose of important DNS resource records with suitable examples.
DNS stores information as resource records (RRs). A record generally contains a name, type, class, TTL, and value.
Important record types include:
- A: Maps a host name to an IPv4 address. Example:
www.example.comto192.0.2.10. - AAAA: Maps a host name to an IPv6 address.
- CNAME: Creates an alias for a canonical host name. For example,
store.example.commay refer toserver1.example.com. - MX: Identifies the mail servers responsible for a domain. A priority value determines the preferred server.
- NS: Identifies the authoritative name servers for a domain or zone.
- PTR: Performs reverse mapping from an IP address to a host name.
- SOA: Contains administrative information about a zone, including the primary server, serial number, and refresh timers.
- TXT: Stores descriptive text and is often used for email-security policies such as SPF.
These records allow DNS to support address resolution, aliases, email routing, delegation, reverse lookup, and service configuration.
Describe the architecture of an email system and explain how an email travels from sender to receiver.
An email system consists of the following components:
- Mail User Agent (MUA): Software used to compose, send, receive, and organize messages.
- Mail Submission Agent: Accepts outgoing mail from the sender's user agent.
- Mail Transfer Agent (MTA): Transfers email between mail servers using SMTP.
- Mail Delivery Agent (MDA): Places received email into the recipient's mailbox.
- Mailbox: Storage area containing the recipient's messages.
- DNS: MX records identify the destination domain's mail servers.
Email delivery process:
- The sender creates a message using an MUA.
- The MUA submits the message to the sender's mail server using SMTP.
- The sending MTA queries DNS for the recipient domain's MX record.
- The sending MTA establishes an SMTP connection with the destination MTA.
- The destination server accepts the message and stores it in the recipient's mailbox.
- The recipient accesses the message using IMAP, POP3, or a webmail interface.
SMTP mainly performs message submission and transfer, while POP3 and IMAP provide message-access functions.
Explain SMTP and describe the major stages and commands involved in an SMTP session.
Simple Mail Transfer Protocol (SMTP) is an application-layer protocol used to submit and transfer email. It operates over TCP, providing reliable delivery between clients and mail servers or between mail servers.
Major stages of an SMTP session:
- Connection establishment: The client connects to the SMTP server, and the server sends a greeting.
- Handshake: The client identifies itself using
EHLOorHELO. - Mail transaction:
MAIL FROMspecifies the sender.RCPT TOspecifies a recipient.DATAbegins transmission of the message headers and body.
- Termination: The client sends
QUITto close the session.
Common ports:
- Port 25 is traditionally used for server-to-server transfer.
- Port 587 is commonly used for authenticated message submission.
- Port 465 is associated with SMTP over implicit TLS.
SMTP is a push protocol because a sending system pushes messages to another server. Security extensions such as authentication and TLS help prevent unauthorized use and protect communication.
Compare POP3 and IMAP as protocols for accessing email.
POP3 and IMAP allow users to access messages stored on a mail server, but their operating models differ.
| Feature | POP3 | IMAP |
|---|---|---|
| Basic model | Downloads messages to the client | Manages messages on the server |
| Synchronization | Limited | Supports synchronization across devices |
| Folder support | Usually works mainly with the inbox | Supports multiple server-side folders |
| Message state | Changes may remain local | Read, unread, flagged, and deleted states are synchronized |
| Offline use | Well suited after messages are downloaded | Supports both online and cached offline access |
| Server storage | Can delete mail after download | Normally retains mail on the server |
| Typical ports | 110; 995 with TLS | 143; 993 with TLS |
POP3 is suitable when messages are primarily accessed from one device and local storage is preferred. IMAP is more suitable for modern multi-device access because the server maintains a consistent view of mailboxes and message states.
What is MIME? Explain how it extends the capabilities of Internet email.
Multipurpose Internet Mail Extensions (MIME) is a standard that extends the original text-oriented email format so that messages can carry different character sets, formatted content, and binary attachments.
Important MIME headers include:
- MIME-Version: Indicates the MIME version used.
- Content-Type: Specifies the media type, such as
text/plain,text/html,image/jpeg, orapplication/pdf. - Content-Transfer-Encoding: States how content is encoded for transmission, such as Base64 or quoted-printable.
- Content-Disposition: Indicates whether content should be displayed inline or treated as an attachment.
Multipart messages contain several body parts separated by boundaries. For example, a message may contain plain text, HTML, and an attached image.
MIME does not replace SMTP. Instead, it converts non-ASCII or binary content into a form that can be transported through email systems and interpreted correctly by the recipient's mail client.
Explain the working of FTP, including its control and data connections.
File Transfer Protocol (FTP) is an application-layer protocol used to transfer files and perform remote file-management operations over TCP.
FTP uses two separate connections:
- Control connection: Established from the client to the server, normally on TCP port 21. It carries commands and responses and usually remains active throughout the session.
- Data connection: Used to transfer file contents or directory listings. It is created separately from the control connection and may be opened multiple times.
Typical FTP operation:
- The client establishes a control connection.
- The user authenticates using
USERandPASS. - Commands such as
CWD,LIST,RETR, andSTORare issued. - A data connection is created for a file or directory transfer.
- The server sends numeric status responses to indicate success or failure.
- The client sends
QUITto end the session.
FTP supports ASCII and binary transfer modes. Traditional FTP sends credentials and data without encryption; secure alternatives include FTPS and SFTP, although SFTP is a separate protocol based on SSH.
Distinguish between active and passive modes of FTP. Why is passive mode commonly preferred?
FTP can create its data connection in active or passive mode.
Active mode:
- The client opens the control connection to the server's port 21.
- The client informs the server of a client-side port using the
PORTcommand. - The server initiates the data connection from its port 20 to the client's specified port.
- A client-side firewall or NAT device may reject this incoming connection.
Passive mode:
- The client sends the
PASVcommand. - The server selects a port and sends its address and port information to the client.
- The client initiates both the control and data connections.
- Extended passive mode may use the
EPSVcommand, especially with IPv6.
Why passive mode is preferred:
- It works more easily with NAT.
- It avoids unsolicited incoming connections to the client.
- Client firewalls generally permit outbound connections more readily.
Passive mode does not automatically make FTP secure; it only changes how the data connection is established.
Introduce wireless networks and explain their advantages, limitations, and major operating modes.
A wireless network uses electromagnetic waves rather than physical cables to connect devices and carry data. Common technologies include Wi-Fi, Bluetooth, cellular networks, and satellite communication.
Advantages:
- Mobility and roaming support.
- Fast and flexible deployment.
- Reduced cabling requirements.
- Convenient connectivity for portable and embedded devices.
- Easier network expansion in many environments.
Limitations:
- Shared and variable transmission medium.
- Interference from other devices and networks.
- Signal attenuation, shadowing, and multipath fading.
- Lower predictability than many wired links.
- Security risks because signals may extend beyond physical boundaries.
- Limited spectrum, range, and battery power.
Major operating modes:
- Infrastructure mode: Stations communicate through an access point connected to a distribution system.
- Ad hoc mode: Stations communicate directly without an access point.
Wireless networks require mechanisms for medium access, authentication, encryption, mobility management, error control, and efficient use of radio spectrum.
Explain the hidden-terminal, exposed-terminal, interference, and multipath problems in wireless networks.
Wireless communication faces several problems that are less significant in wired networks:
- Hidden-terminal problem: Two stations cannot hear each other but can both reach the same receiver. They may transmit simultaneously and cause a collision at the receiver. RTS/CTS can reduce this problem.
- Exposed-terminal problem: A station unnecessarily postpones transmission after sensing a nearby transmission, even though its own transmission would not interfere with the intended receiver. This reduces channel utilization.
- Interference: Signals from neighboring wireless networks, Bluetooth devices, microwave ovens, or other radio sources may corrupt frames and reduce throughput.
- Multipath propagation: A transmitted signal reaches the receiver through several reflected paths. Different delays and phases may strengthen or weaken the received signal and can cause intersymbol interference.
- Path loss and fading: Signal strength decreases with distance and may vary because of obstacles, movement, and environmental conditions.
Wireless systems address these effects using acknowledgements, retransmission, channel selection, spread-spectrum techniques, diversity, OFDM, adaptive modulation, and MIMO.
Describe the IEEE 802.11 architecture and explain the terms station, access point, BSS, ESS, and distribution system.
IEEE 802.11 defines wireless LAN architecture using the following components:
- Station (STA): Any device with an IEEE 802.11 wireless interface, such as a laptop or smartphone.
- Access Point (AP): A station that provides access to a distribution system and coordinates communication within an infrastructure network.
- Basic Service Set (BSS): A group of stations that communicate with one another. In infrastructure mode, the BSS is controlled by an AP.
- Basic Service Set Identifier (BSSID): An identifier, commonly based on the AP's MAC address, used to distinguish a BSS.
- Independent BSS (IBSS): An ad hoc network in which stations communicate without an AP.
- Distribution System (DS): The logical system that interconnects BSSs, commonly implemented using an Ethernet backbone.
- Extended Service Set (ESS): Two or more infrastructure BSSs connected through a DS and presented as one logical network.
- Portal: A logical point that connects the 802.11 distribution system to another network.
An ESS allows users to roam between access points while remaining connected to the same logical WLAN.
Explain how CSMA/CA and the optional RTS/CTS mechanism control access to the IEEE 802.11 wireless medium.
IEEE 802.11 mainly uses Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA) because a wireless station generally cannot reliably detect a collision while transmitting.
Basic CSMA/CA operation:
- A station senses the channel.
- If the medium is idle for the required interframe space, the station selects a random backoff value.
- The backoff counter decreases only while the channel remains idle.
- When the counter reaches zero, the station transmits.
- The receiver verifies the frame and returns an acknowledgement after a short interframe space.
- If no acknowledgement arrives, the sender assumes failure and retransmits using an increased contention window.
RTS/CTS operation:
- The sender transmits a Request to Send (RTS).
- The receiver replies with a Clear to Send (CTS).
- Stations hearing RTS or CTS update their Network Allocation Vector and defer transmission.
- The sender transmits the data, followed by an acknowledgement from the receiver.
RTS/CTS can reduce hidden-terminal collisions, especially for large frames, but it adds overhead and is therefore not always used.
Describe the main features of IEEE 802.11a and IEEE 802.11b. Compare their performance and deployment characteristics.
IEEE 802.11a:
- Operates mainly in the 5 GHz band.
- Uses Orthogonal Frequency-Division Multiplexing (OFDM).
- Supports a maximum nominal physical-layer rate of 54 Mbps.
- Offers more non-overlapping channels and usually experiences less interference than the crowded 2.4 GHz band.
- Higher-frequency operation generally results in shorter range and weaker obstacle penetration for similar transmission conditions.
IEEE 802.11b:
- Operates in the 2.4 GHz band.
- Uses Direct-Sequence Spread Spectrum and Complementary Code Keying.
- Supports a maximum nominal rate of 11 Mbps.
- Generally provides better range than 802.11a under comparable conditions.
- Can experience interference from Bluetooth devices, microwave ovens, and neighboring WLANs.
Comparison:
- 802.11a has a much higher nominal speed and more channel capacity.
- 802.11b historically offered lower cost and broader early adoption.
- The two standards are not directly interoperable at the radio level because they use different frequency bands and physical-layer techniques.
- Actual application throughput is lower than the stated physical-layer rates because of protocol overhead and channel conditions.
Explain the features of IEEE 802.11g and discuss its compatibility with IEEE 802.11b.
IEEE 802.11g is a wireless LAN standard designed to provide higher rates while operating in the widely used 2.4 GHz band.
Main features:
- Operates in the 2.4 GHz frequency band.
- Uses OFDM for higher data rates.
- Supports a maximum nominal physical-layer rate of 54 Mbps.
- Provides a range broadly comparable to 802.11b under similar conditions.
- Shares the crowded 2.4 GHz spectrum and is therefore vulnerable to interference.
Backward compatibility:
- 802.11g networks can support 802.11b stations.
- Compatibility allows older devices to connect to a newer access point.
- Protection mechanisms may be required when 802.11b and 802.11g devices share a network.
- The presence of 802.11b stations can reduce overall efficiency because of lower transmission rates and additional protection overhead.
Thus, 802.11g combined the 54 Mbps nominal rate associated with OFDM-based WLANs with backward compatibility for 2.4 GHz 802.11b devices.
Explain how IEEE 802.11n improves wireless LAN performance. Discuss MIMO, channel bonding, frame aggregation, and frequency-band support.
IEEE 802.11n improves WLAN speed, range, and reliability through several physical-layer and MAC-layer enhancements.
Major enhancements:
- MIMO: Multiple-Input Multiple-Output uses multiple transmitting and receiving antennas. Spatial multiplexing allows independent data streams to be transmitted simultaneously, while diversity improves reliability.
- Channel bonding: Two adjacent 20 MHz channels can be combined into a 40 MHz channel, increasing available bandwidth.
- Frame aggregation: Multiple MAC frames can be grouped into larger transmissions, reducing repeated headers, interframe spaces, and acknowledgement overhead.
- Block acknowledgement: A group of frames can be acknowledged together, further reducing overhead.
- Short guard interval: An optional shorter guard interval can improve the data rate where channel conditions permit.
- Dual-band operation: 802.11n can operate in either the 2.4 GHz or 5 GHz band, depending on the equipment.
The standard supports a maximum theoretical physical-layer rate of up to 600 Mbps with four spatial streams, 40 MHz channels, and a short guard interval. Actual throughput is lower and depends on antenna configuration, interference, channel width, distance, and protocol overhead.
Compare IEEE 802.11a, 802.11b, 802.11g, and 802.11n with respect to frequency band, modulation, nominal rate, compatibility, and major advantages.
| Standard | Frequency band | Main technique | Maximum nominal rate | Important characteristics |
|---|---|---|---|---|
| 802.11a | 5 GHz | OFDM | 54 Mbps | More channel availability and less 2.4 GHz interference, but generally shorter range |
| 802.11b | 2.4 GHz | DSSS and CCK | 11 Mbps | Good range and early popularity, but low rate and greater interference |
| 802.11g | 2.4 GHz | OFDM, with legacy support | 54 Mbps | Backward compatible with 802.11b but affected by 2.4 GHz congestion |
| 802.11n | 2.4 or 5 GHz | OFDM with MIMO | Up to 600 Mbps | Higher throughput and reliability using spatial streams, aggregation, and channel bonding |
Compatibility:
- 802.11g is backward compatible with 802.11b.
- 802.11n can support earlier standards when configured for the corresponding band and compatibility mode.
- 802.11a cannot communicate directly with 2.4 GHz-only 802.11b or 802.11g radios.
Overall development:
The standards evolved from lower-rate single-antenna communication to higher-rate OFDM and then to MIMO-based transmission. Nominal rates are physical-layer values; user throughput is lower because of contention, headers, acknowledgements, and environmental conditions.
Describe Bluetooth architecture. Explain piconets, scatternets, device roles, and connection establishment.
Bluetooth is a short-range wireless technology designed for low-power communication in a personal area network. Classic Bluetooth operates in the 2.4 GHz ISM band and uses frequency hopping to reduce the effect of interference.
Piconet:
- A piconet is the basic Bluetooth network.
- One device coordinates the timing and hopping pattern.
- In traditional terminology, it is called the master, while connected devices are called slaves; modern terminology often uses central and peripheral where applicable.
- Classic Bluetooth permits up to seven active secondary devices in one piconet, with additional devices parked or inactive depending on the implementation and mode.
Scatternet:
- A scatternet is formed when multiple piconets are interconnected.
- A device can participate in more than one piconet and may have different roles in each.
- The bridging device switches timing and hopping sequences to communicate in the different piconets.
Connection establishment:
- Devices discover one another through inquiry or scanning procedures.
- A connection is created through paging or related setup procedures.
- Devices may authenticate and establish encryption keys.
- Services are discovered, and appropriate higher-layer protocols or profiles are selected.
Bluetooth profiles specify how protocols are used for applications such as audio, keyboards, serial communication, and file exchange.
Explain the Bluetooth protocol stack and state the function of each major Bluetooth layer.
The Bluetooth protocol stack contains controller, host, and application-oriented protocols.
Major layers and protocols:
- Radio layer: Defines frequencies, modulation, transmitter power, and radio characteristics in the 2.4 GHz band.
- Baseband or physical-link layer: Handles channel access, timing, frequency hopping, packet formation, error control, and physical links.
- Link Manager Protocol (LMP): Manages link setup, authentication, encryption, power modes, role changes, and quality-of-service parameters in Classic Bluetooth.
- Host Controller Interface (HCI): Provides a standardized command and data interface between the Bluetooth host and controller.
- Logical Link Control and Adaptation Protocol (L2CAP): Multiplexes higher-layer protocols, performs segmentation and reassembly, and supports logical channels.
- Service Discovery Protocol (SDP): Enables a device to discover the services offered by another Bluetooth device.
- RFCOMM: Emulates a serial cable connection for applications requiring serial-port-like communication.
- Object Exchange protocols: Support the exchange of files, contacts, and similar objects in applicable profiles.
- Profiles and applications: Define interoperable behavior for specific uses, such as headsets, human-interface devices, and audio streaming.
The exact stack differs between Classic Bluetooth and Bluetooth Low Energy, but both organize radio control, link management, logical transport, services, and applications into layers.
Compare Bluetooth and IEEE 802.11 wireless LANs in terms of purpose, range, power, architecture, data rate, and applications.
| Feature | Bluetooth | IEEE 802.11 WLAN |
|---|---|---|
| Primary purpose | Wireless personal area networking | Wireless local area networking |
| Typical use | Peripheral, sensor, audio, and device-to-device links | Internet and LAN access |
| Range | Usually short, depending on device class and environment | Usually larger within homes, offices, and campuses |
| Power consumption | Designed for relatively low-power operation, especially Bluetooth Low Energy | Generally higher because of greater range and throughput |
| Network organization | Piconets and, conceptually, scatternets | Infrastructure BSS, ESS, or ad hoc IBSS |
| Data rate | Lower than modern Wi-Fi | Higher, particularly with 802.11n and later standards |
| Spectrum | Commonly uses the 2.4 GHz ISM band | Uses 2.4 GHz, 5 GHz, or other bands depending on the standard |
| Medium access | Coordinated links with frequency hopping and Bluetooth-specific scheduling | Primarily CSMA/CA contention |
Bluetooth applications: Keyboards, mice, headphones, wearable devices, short-range sensors, and cable replacement.
Wi-Fi applications: Web access, multimedia streaming, file transfer, enterprise networking, and high-speed local connectivity.
Bluetooth emphasizes low power and personal-area connectivity, whereas Wi-Fi emphasizes greater coverage and network throughput. Because both may use 2.4 GHz, coexistence mechanisms and channel planning are important.
Define the Domain Name System (DNS). Explain its need and hierarchical organization.
Domain Name System (DNS) is a distributed and hierarchical naming system that translates human-readable domain names, such as www.example.com, into IP addresses used by network devices.
Need for DNS:
- Humans can remember names more easily than numerical IP addresses.
- The IP address associated with a server may change while its domain name remains the same.
- DNS provides a scalable and distributed naming mechanism for the Internet.
- It supports services such as host aliasing, mail-server identification, and load distribution.
DNS hierarchy:
- Root domain: The highest level, represented by a dot.
- Top-Level Domains (TLDs): Examples include
.com,.org,.edu, and country-code domains such as.in. - Second-level domains: Organization-specific names such as
exampleinexample.com. - Subdomains and host names: Examples include
mail.example.comandwww.example.com.
The namespace is divided into zones, and each zone is managed by an authoritative DNS server. This distributed structure improves scalability, reliability, and administrative control.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill. The rest comes out of a student's own pocket: the domain, the storage, and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason. to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it. What it pays for →