Basic Questions & Answers
1. What is the main function of the application layer in the OSI model?
- The application layer is the topmost layer in the OSI model. It provides interface and network services to end-users by facilitating data exchange between applications. It ensures proper message formatting, encryption, and authentication for communication.
2. Name at least five application layer protocols and their purposes.
- HTTP/HTTPS – Web browsing & data transfer
- FTP – File transfer between client and server
- SMTP – Sending emails
- DNS – Domain name resolution
- DHCP – Assigning dynamic IP addresses
3. How does HTTP work? Explain its request-response mechanism.
- HTTP follows a client-server model where a browser (client) sends an HTTP request to the web server, and the server responds with an HTTP response.
- Example:
- Client Request:
GET /index.html HTTP/1.1
- Server Response:
HTTP/1.1 200 OK
(with the webpage content)
- Client Request:
4. What is the difference between HTTP and HTTPS?
- HTTP (Hypertext Transfer Protocol) sends data in plaintext, making it vulnerable to attacks.
- HTTPS (Secure HTTP) uses SSL/TLS encryption to secure data transfer and prevent unauthorized access.
5. What is the purpose of DNS in networking?
- DNS (Domain Name System) translates human-readable domain names (e.g.,
google.com
) into IP addresses (142.250.182.14
) so that computers can locate and access websites.
6. Explain the difference between POP3, IMAP, and SMTP in email communication.
- SMTP (Simple Mail Transfer Protocol): Used for sending emails from a client to an email server.
- POP3 (Post Office Protocol v3): Downloads emails to the client’s device and removes them from the server.
- IMAP (Internet Message Access Protocol): Syncs emails across multiple devices without deleting them from the server.
7. What is the function of the DHCP protocol?
- DHCP (Dynamic Host Configuration Protocol) automatically assigns IP addresses, subnet masks, default gateways, and DNS settings to devices on a network.
8. How does FTP work, and what are the two modes of FTP?
- FTP (File Transfer Protocol) allows file transfer between a client and a server.
- Modes:
- Active Mode: Server opens a connection to the client.
- Passive Mode: Client opens a connection to the server (useful in firewalled networks).
9. Explain the working of VoIP and its advantages.
- VoIP (Voice over Internet Protocol) converts voice into digital packets and transmits them over the internet instead of traditional telephone lines.
- Advantages:
- Lower cost than traditional calls
- Supports video and multimedia communication
- No need for separate telephone networks
10. What is the role of the application layer in client-server architecture?
- The application layer handles request processing, data presentation, and network communication between clients and servers. It ensures smooth interaction between user applications (browsers, email clients, VoIP apps) and network protocols.
Advanced Questions & Answers
11. How does DNS resolve a domain name to an IP address?
- Steps:
- The user enters
www.example.com
in a browser. - The browser checks its local cache for an IP address.
- If not found, it sends a request to a DNS resolver (ISP).
- The resolver queries root DNS servers → TLD servers → authoritative DNS servers.
- The authoritative DNS returns the IP address, which is sent back to the browser.
- The user enters
12. What is the difference between active mode FTP and passive mode FTP?
- Active Mode: The client opens a command channel, and the server opens a data channel to transfer files.
- Passive Mode: Both command and data channels are opened by the client, which helps bypass firewalls.
13. What are the advantages of using a caching DNS server?
- Faster domain resolution by storing frequently accessed DNS records.
- Reduces network traffic and server load.
- Improves reliability by reducing dependency on external DNS servers.
14. Explain statelessness in HTTP. Why is HTTPS more secure than HTTP?
- Statelessness: Each HTTP request is independent and does not retain any past session information.
- HTTPS is more secure because it uses SSL/TLS encryption to protect against eavesdropping, man-in-the-middle attacks, and data tampering.
15. What is the difference between TFTP and FTP?
- TFTP (Trivial File Transfer Protocol):
- Uses UDP, faster but unreliable.
- No authentication, used for simple file transfers like firmware updates.
- FTP:
- Uses TCP, reliable but slower.
- Supports authentication and directory listing.
16. How does a web browser retrieve a webpage from a web server?
- Steps:
- User enters
www.example.com
in the browser. - DNS resolves the domain name to an IP address.
- Browser sends an HTTP GET request to the web server.
- The web server responds with an HTTP response containing the webpage content.
- The browser renders the webpage for the user.
- User enters
17. What are the key differences between IPv4 DHCP and IPv6 DHCP (DHCPv6)?
- IPv4 DHCP: Assigns IPv4 addresses dynamically to clients.
- DHCPv6: Assigns IPv6 addresses, but IPv6 also supports stateless address autoconfiguration (SLAAC) without DHCP.
18. Explain Reverse DNS Lookup (rDNS) and its uses.
- rDNS translates an IP address back to a domain name.
- Used for email spam filtering, network troubleshooting, and security authentication.
19. What are the benefits of using SMTP authentication in email servers?
- Prevents unauthorized email relaying.
- Reduces spam and phishing attacks.
- Ensures only verified users can send emails through the server.
20. How do cookies and sessions work in web applications?
- Cookies:
- Stored on the client-side.
- Used for tracking user preferences, login details, and shopping carts.
- Sessions:
- Stored on the server-side.
- Maintain user state across multiple HTTP requests.