Computer Networks Interview Questions and Networking Notes

How data actually moves across the internet, from physical cabling up through DNS, routing, and application protocols.

25 topics across 5 categories, 101 interview questions

Top 10 Computer Networks interview questions with answers

  1. 1.Name the 7 layers of the OSI model in order.

    Physical, Data Link, Network, Transport, Session, Presentation, Application (bottom to top).

    The OSI Model
  2. 2.How many layers does the TCP/IP model have, and what are they?

    Four: Network Access, Internet, Transport, and Application.

    The TCP/IP Model
  3. 3.Walk me through what happens between typing a URL and the page loading.

    DNS resolution is almost always the first thing expected in this answer, before TCP handshake, before HTTP request/response.

    DNS (Domain Name System)
  4. 4.What's the actual difference between HTTP and HTTPS?

    HTTPS is HTTP running over TLS encryption; the protocol and data format are the same, but HTTPS encrypts the traffic so it can't be read or modified in transit.

    HTTP vs HTTPS
  5. 5.What's the difference between a hub and a switch?

    A hub blindly broadcasts incoming data to every port; a switch learns which device is on which port and forwards data only to the intended recipient.

    Networking Devices (Hub, Switch, Router, Gateway)
  6. 6.Why was IPv6 created?

    IPv4's 32-bit address space (about 4.3 billion addresses) has been exhausted by the sheer number of internet-connected devices; IPv6's 128-bit addresses provide a vastly larger supply.

    IPv4 vs IPv6 Addressing
  7. 7.What does the /24 in 192.168.1.0/24 mean?

    The first 24 bits of the 32-bit address are fixed as the network portion, leaving 8 bits for host addresses within that subnet (256 total addresses, 254 usable).

    Subnetting, Supernetting, and CIDR
  8. 8.What problem does NAT solve?

    It lets many devices on a private network share a single public IP address, dramatically reducing the number of public IPv4 addresses needed.

    NAT (Network Address Translation)
  9. 9.What problem does ARP solve?

    It resolves a known IP address to the corresponding MAC address on a local network, since actual data delivery locally happens using MAC addresses, not IP addresses directly.

    ARP Protocol
  10. 10.What problem does DHCP solve?

    Automatically assigning IP addresses and network configuration to devices, instead of requiring manual configuration on every device that joins a network.

    DHCP (Dynamic Host Configuration Protocol)

All 101 Computer Networks interview questions

101 questions, grouped by topic. Each one is answered on its topic page, next to the explanation it comes from.

Application Layer

DNS (Domain Name System)

  1. Walk me through what happens between typing a URL and the page loading.
  2. What's the difference between a recursive resolver and an authoritative name server?
  3. What is a TTL and why does it matter?
  4. What DNS record types do you know?
  5. What is DNS cache poisoning, and how does DNSSEC help?
Answers and notes

HTTP vs HTTPS

  1. What's the actual difference between HTTP and HTTPS?
  2. Walk me through what a TLS handshake does.
  3. Why does TLS use both asymmetric and symmetric encryption?
  4. What does a certificate actually prove?
Answers and notes

DHCP (Dynamic Host Configuration Protocol)

  1. What problem does DHCP solve?
  2. Walk me through the DHCP process.
  3. Why is the Request step broadcast instead of sent directly to the chosen server?
  4. What happens when a DHCP lease expires without renewal?
Answers and notes

Basics

What Is Computer Networking?

  1. What is a computer network, in one sentence?
  2. Why do networks use packets instead of sending data as one continuous stream?
  3. What's the difference between a protocol and a network?
  4. Give an example of why networking matters in practice.
Answers and notes

Important Computer Networking Terms

  1. What's the difference between bandwidth and throughput?
  2. What's the difference between latency and bandwidth?
  3. What is a protocol, and can you name a few?
  4. What's the difference between a router and a switch?
Answers and notes

Types of Networks (LAN, WAN, MAN, PAN)

  1. What's the difference between a LAN and a WAN?
  2. Where does a MAN fit in?
  3. Give an example of a PAN.
  4. Is the internet a WAN?
Answers and notes

Network Topologies (Star, Bus, Ring, Mesh)

  1. What's the most common topology used in real networks today, and why?
  2. What's the main weakness of a bus topology?
  3. Why would someone choose a mesh topology despite the extra cost?
  4. How does a ring topology handle a broken connection?
Answers and notes

Web vs Internet

  1. What's the actual difference between the web and the internet?
  2. Give an example of something that uses the internet but isn't part of the web.
  3. Did the internet or the web come first?
  4. If a browser can't load any website, is the internet down or the web down?
Answers and notes

Networking Devices (Hub, Switch, Router, Gateway)

  1. What's the difference between a hub and a switch?
  2. What's the difference between a switch and a router?
  3. What does a gateway do?
  4. Why did hubs mostly disappear from real networks?
Answers and notes

Network Layer

IPv4 vs IPv6 Addressing

  1. Why was IPv6 created?
  2. Are IPv4 and IPv6 directly compatible?
  3. How has IPv4 lasted this long despite address exhaustion?
  4. What does the double-colon mean in an IPv6 address?
Answers and notes

Subnetting, Supernetting, and CIDR

  1. What does the `/24` in `192.168.1.0/24` mean?
  2. How would you split a `/24` network into 4 equal subnets?
  3. What's the difference between subnetting and supernetting?
  4. Why did CIDR replace the old class-based addressing system?
Answers and notes

Routing Algorithms (Distance Vector, Link State)

  1. What's the difference between distance vector and link state routing?
  2. What is the count-to-infinity problem?
  3. Why does link state routing generally converge faster after a topology change?
  4. Name a real protocol using each approach.
Answers and notes

Routing Protocols (RIP, OSPF, BGP)

  1. What kind of protocol is RIP, and what's its main limitation?
  2. Why is OSPF preferred over RIP in most modern networks?
  3. What makes BGP different from OSPF?
  4. Why can a BGP misconfiguration cause a real internet outage?
Answers and notes

IP Protocol Concepts (ARP, RARP, ICMP, IGMP)

  1. What does ARP actually do?
  2. How does the `ping` command actually work?
  3. Why might a real, online server not respond to ping?
  4. What replaced RARP in modern networks?
Answers and notes

NAT (Network Address Translation)

  1. What problem does NAT solve?
  2. Walk me through how NAT actually works.
  3. Why is NAT considered a reason IPv4 hasn't been fully replaced by IPv6 yet?
  4. Does NAT provide security?
Answers and notes

How the Internet Actually Works

  1. Is the internet owned by one company or government?
  2. What is an autonomous system?
  3. Walk me through what happens when you load a website, at a high level.
  4. Why is the internet considered resilient to individual failures?
Answers and notes

OSI Models

The OSI Model

  1. Name the 7 layers of the OSI model in order.
  2. Which layer do IP addresses belong to? Which layer do MAC addresses belong to?
  3. What does encapsulation mean in the context of the OSI model?
  4. Is the OSI model actually used in real networks?
Answers and notes

The TCP/IP Model

  1. How many layers does the TCP/IP model have, and what are they?
  2. How does the TCP/IP model relate to the OSI model?
  3. What's the core difference between TCP and UDP?
  4. Would you use TCP or UDP for a live video call, and why?
Answers and notes

IPv4 Addressing (Classes, Subnet Masks)

  1. What does a subnet mask actually do?
  2. Why is the class-based addressing system considered outdated?
  3. Why does a /24 network have 254 usable addresses instead of 256?
  4. Give an example of a private IP address range.
Answers and notes

Network Protocols Overview

  1. What is a network protocol, in one sentence?
  2. Why are network protocols layered instead of being one big protocol?
  3. Name a protocol responsible for naming, and one responsible for reliable delivery.
  4. How would you start diagnosing 'the website won't load'?
Answers and notes

ARP Protocol

  1. What problem does ARP solve?
  2. Walk me through the ARP request/reply process.
  3. What is ARP spoofing, and why is it possible?
  4. How would you check a device's current ARP cache?
Answers and notes

ICMP Protocol

  1. What does ICMP actually do?
  2. How does ping use ICMP?
  3. How does traceroute discover each router along a path?
  4. Why might a server not respond to ping even though it's actually online?
Answers and notes

Physical Layer

Transmission Media (Guided and Unguided)

  1. What's the difference between guided and unguided media?
  2. Why is fiber optic cable preferred for long-distance, high-bandwidth connections?
  3. What's the tradeoff of using radio waves (like WiFi) instead of a cable?
  4. Give a real-world example of where each transmission medium type is used.
Answers and notes

Throughput, Bandwidth, and Latency

  1. What's the difference between bandwidth and throughput?
  2. Can a connection have high bandwidth and high latency at the same time?
  3. Why might real-world throughput be lower than a connection's rated bandwidth?
  4. Why do gamers care more about latency than bandwidth?
Answers and notes

Modulation and Multiplexing

  1. What does modulation actually do?
  2. What problem does multiplexing solve?
  3. What's the difference between frequency division and time division multiplexing?
  4. What multiplexing technique is used in fiber optics, and why?
Answers and notes

Frequently asked questions

Where do these computer networks interview questions come from?

Each of the 101 questions comes from the "What interviewers actually ask" section of one of 25 Computer Networks topic notes. Every question links to its topic page, where it is answered next to the explanation it tests.

What does the Computer Networks section cover?

25 topics across 5 categories: How data actually moves across the internet, from physical cabling up through DNS, routing, and application protocols.

Is it free to read?

Yes. Every article is free to read with no account required. Creating a free DevsUnite account lets you mark topics as read and track your progress across every Core Subjects article.