TomoLink
Core CS Subject

Computer Networks Interview Questions 2025

OSI model, TCP/IP, HTTP, DNS, subnetting — top CN questions asked in TCS, Infosys & placement technical rounds.

7
OSI Layers
4
TCP/IP Layers
80
HTTP Port
443
HTTPS Port

Top CN Interview Questions & Answers

Q1

What are the 7 layers of the OSI model?

Physical, Data Link, Network, Transport, Session, Presentation, Application. Mnemonic: 'Please Do Not Throw Sausage Pizza Away'.

Q2

What is the difference between TCP and UDP?

TCP: connection-oriented, reliable, ordered delivery (e.g., HTTP, FTP). UDP: connectionless, faster, no reliability guarantee (e.g., DNS, video streaming, gaming).

Q3

What happens when you type a URL in a browser?

DNS resolution → TCP handshake → HTTP/HTTPS request → Server processes → HTML response → Browser renders. Full understanding impresses interviewers.

Q4

What is the difference between HTTP and HTTPS?

HTTP sends data in plaintext. HTTPS encrypts data using TLS/SSL. HTTPS uses port 443, HTTP uses port 80.

Q5

What is a subnet mask? How does subnetting work?

Subnet mask divides an IP into network and host parts. E.g., 255.255.255.0 (/24) gives 254 usable hosts. Subnetting splits a network into smaller sub-networks for efficiency.

Q6

What is the difference between a hub, switch, and router?

Hub: broadcasts to all ports (Layer 1). Switch: sends to specific port by MAC (Layer 2). Router: routes between networks by IP (Layer 3).

Q7

What is DNS? How does DNS resolution work?

DNS (Domain Name System) maps domain names to IP addresses. Flow: Browser cache → OS cache → Recursive resolver → Root nameserver → TLD → Authoritative nameserver.

Q8

What is the TCP 3-way handshake?

SYN (client initiates) → SYN-ACK (server acknowledges) → ACK (client confirms). Establishes a reliable connection before data transfer.

Q9

What is ARP (Address Resolution Protocol)?

ARP maps IP addresses to MAC addresses within a local network. A device broadcasts 'Who has IP X?' and the owner responds with its MAC address.

Q10

What is the difference between IPv4 and IPv6?

IPv4: 32-bit (4.3 billion addresses). IPv6: 128-bit (340 undecillion addresses). IPv6 solves address exhaustion and improves routing efficiency.

Q11

What is NAT (Network Address Translation)?

NAT allows multiple devices on a private network to share one public IP. The router translates private IPs to its public IP for outgoing traffic.

Q12

What is a firewall? How does it work?

A firewall filters network traffic based on rules. Can block/allow by IP, port, protocol. Types: packet filter, stateful inspection, application-layer (proxy) firewall.

OSI Model Quick Reference

7 – Application
HTTP, HTTPS, FTP, SMTP, DNS, SSH
6 – Presentation
SSL/TLS, JPEG, MPEG, ASCII
5 – Session
NetBIOS, PPTP, RPC
4 – Transport
TCP, UDP, SCTP
3 – Network
IP, ICMP, OSPF, BGP
2 – Data Link
Ethernet, MAC, ARP, PPP
1 – Physical
Cables, Radio Frequency, Fiber, Hubs

Practice CN with company-specific questions

TomoLink curates CN questions for TCS, Infosys, Wipro & top IT company technical rounds.

Start Preparing Now

Related Guides