Computer Networks Interview Questions
150 curated questions graded from Foundations (Easy) to Practical Patterns (Medium) and Internals & Architecture (Hard).
150
150
0
5 / Level
Foundations & Core Concepts
Q1What is a Computer Network?
A computer network is a collection of interconnected computing devices (nodes) that share resources, exchange data, and communicate via wired or wireless media.
- Nodes: PCs, servers, routers, switches, IoT devices.
- Links: Fiber optics, coaxial cables, copper wires, radio waves.
- Purpose: Resource sharing (files, printers), communication (emails, video), and application hosting.
Q2What is the OSI model and list its 7 layers?
The Open Systems Interconnection (OSI) model is a conceptual framework standardizing network communication into seven logical layers:
- Physical (Layer 1): Transmits raw unstructured bit streams over physical media (electrical, optical, radio).
- Data Link (Layer 2): Provides reliable node-to-node frame delivery, error detection, and MAC addressing.
- Network (Layer 3): Handles packet routing, logical addressing (IP), and path determination.
- Transport (Layer 4): Ensures end-to-end reliability, flow control, congestion control, and segmenting (TCP/UDP).
- Session (Layer 5): Establishes, manages, and terminates communication sessions between applications.
- Presentation (Layer 6): Translates, encrypts, and compresses data (syntax layer, e.g., SSL/TLS, ASCII, JPEG).
- Application (Layer 7): Provides direct user interfaces and protocols for software applications (HTTP, DNS, SMTP).
Q3What is the TCP/IP model and its layers?
The TCP/IP model is a practical suite of communication protocols used on the modern Internet. It consolidates the OSI model into 4 or 5 layers:
- Network Access (or Link) Layer: Combines OSI's Physical and Data Link layers. Manages physical transmission and hardware addressing.
- Internet Layer: Equivalent to OSI's Network layer. Routes packets across networks using logical IP addresses.
- Transport (Host-to-Host) Layer: Matches OSI's Transport layer. Manages end-to-end communication, reliability, and flow control.
- Application Layer: Merges OSI's Session, Presentation, and Application layers. Provides high-level APIs and user services.
Q4What is the difference between TCP and UDP?
- TCP (Transmission Control Protocol): Connection-oriented, guarantees ordered/reliable packet delivery, supports flow and congestion control, overhead is higher (20-byte header). Used for HTTP, FTP, SMTP.
- UDP (User Datagram Protocol): Connectionless, best-effort/unreliable delivery, no flow/congestion control, minimal overhead (8-byte header). Used for DNS, VoIP, video streaming, gaming.
Q5What is DNS and how does it work?
Domain Name System (DNS) translates human-readable domain names (e.g., example.com) to machine-readable IP addresses (e.g., 192.0.2.1).
- Resolving Name Server: Receives queries from client machines.
- Root Name Server: Directs the resolver to the Top-Level Domain (TLD) server (e.g.,
.com). - TLD Name Server: Directs the resolver to the Authoritative Name Server.
- Authoritative Name Server: Contains the actual IP mapping and returns it to the resolver.
Unlock the complete Computer Networks Easy question bank
Get instant access to all 50 questions, in-depth model answers, code sandboxes, and all 27+ technologies for a single one-time payment.
Browse All Computer Networks Questions by Difficulty
Core concepts, definitions, basic syntax, and first principles expected in round 1 screening.
Real-world mechanisms, state management, edge cases, performance trade-offs, and practical coding.
Deep runtime internals, memory models, distributed design, concurrency failure modes, and architectural decisions.