Preparing for software engineering placements can feel overwhelming, especially when you have to balance Data Structures, System Design, core computer science subjects, and project development. Among the core subjects, Computer Networks (CN) is a absolute favorite for technical interviewers. Whether you are interviewing for a product-based MNC or a fast-paced tech startup, networking fundamentals always come up.
In this guide, we break down the most frequently asked Computer Networks questions for placements, helping you move beyond rote memorization to truly understanding the concepts.
1. What Happens When You Type a URL and Press Enter?
This is the classic multi-layered interview question. It tests your holistic understanding of how the web actually works. Instead of panicking, break your answer down layer by layer:
- URL Parsing: The browser checks the syntax and extracts the protocol (
https), domain name (example.com), and path. - DNS Lookup: The browser checks its local cache, OS cache, router cache, and finally asks a DNS server to resolve the domain name into an IP address.
- TCP Handshake: Once the IP is found, the client establishes a reliable connection with the server using the 3-way handshake.
- TLS Handshake: For HTTPS, secure keys and certificates are exchanged to encrypt the communication channel.
- HTTP Request/Response: The browser sends an
GETrequest, and the server processes it and returns HTML, CSS, and JavaScript assets. - Rendering: The browser parses the HTML, builds the DOM tree, and renders the webpage on your screen.
2. TCP vs. UDP: What Every Developer Should Know
This is a staple interview question. Make sure you don't just list bullet points, but explain why and where each protocol is used.
- TCP (Transmission Control Protocol): Connection-oriented, reliable, and guarantees ordered delivery. It uses flow control, congestion control, and acknowledges every packet. If a packet is lost, it gets retransmitted.
- Use cases: Web browsing (HTTP/HTTPS), file transfers (FTP), and email (SMTP).
- UDP (User Datagram Protocol): Connectionless, unreliable, and unordered. There is no handshake and no guarantee of delivery or duplicate protection. It is extremely lightweight and fast.
- Use cases: Live video streaming, online gaming, VoIP calls, and DNS lookups where speed matters more than a dropped packet.
TCP: [Client] ---> SYN ---> [Server] (Reliable, Ordered)
UDP: [Client] ---> Datagram ---> [Server] (Fast, Fire-and-Forget)3. Explain the TCP 3-Way Handshake
Interviewers love asking how TCP establishes a connection. Walk them through the three exact steps:
- SYN (Synchronize): The client sends a segment with the
SYNflag set and a random sequence number (seq = x) to the server to initiate the connection. - SYN-ACK (Synchronize-Acknowledge): The server receives the request, acknowledges it by setting
ACK = x + 1, and sends its own synchronization number (seq = y). - ACK (Acknowledge): The client acknowledges the server's sequence number by sending
ACK = y + 1.
Once this handshake completes, both parties are ready to transmit data reliably.
4. HTTP vs. HTTPS: What Actually Changes?
Many students say HTTPS is the secure version of HTTP, which is true but too basic for an interview. Go deeper:
- HTTP (Hypertext Transfer Protocol): Transfers data in plain text over TCP Port 80. Anyone snooping on the network (like a malicious actor on public Wi-Fi) can read passwords, cookies, and sensitive payloads.
- HTTPS (HTTP Secure): Combines HTTP with TLS (Transport Layer Security) or SSL over TCP Port 443. It provides three core guarantees:
- Encryption: No one can read your data in transit.
- Integrity: Data cannot be modified tampered with along the way.
- Authentication: Verifies that you are communicating with the actual server and not an imposter.
5. What is the OSI Model vs. TCP/IP Model?
Interviewers often ask you to compare these two foundational networking models.
- OSI Model (Open Systems Interconnection): A conceptual, theoretical 7-layer model developed by ISO. Layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
- TCP/IP Model: A practical 4-layer model that powers the modern internet. Layers: Network Access, Internet, Transport, and Application.
Placement Tip: Be ready to map OSI layers to real-world protocols. For example, Routers work at the Network Layer (Layer 3), Switches work at the Data Link Layer (Layer 2), and HTTP works at the Application Layer (Layer 7).
6. What is a Subnet Mask and Why Do We Need It?
An IP address consists of two parts: the Network ID and the Host ID. A subnet mask is a 32-bit number that masks an IP address and divides the IP address into networks and sub-networks.
By using subnet masks, organizations can divide a massive single network into smaller, manageable, and secure subnetworks, reducing network traffic congestion and improving security boundaries.
7. Explain Gateways and Load Balancers
- Gateway: A node that acts as a "gate" or entry-exit point between two completely different networks (often translating protocols between an internal enterprise network and the public internet).
- Load Balancer: A device or software service that distributes incoming network traffic across multiple backend servers. This prevents a single server from crashing under heavy traffic and ensures high availability and fault tolerance.
Final Advice for Networking Interviews
When answering networking questions during your campus placements, always ground your answers with examples. If an interviewer asks about TCP, mention how streaming a video uses UDP while downloading a bank statement uses TCP. Clear concepts combined with clear articulation will easily help you ace this section of your technical interview.

