CS Fundamentals
Common interview and exam questions about Computer Networking with detailed answers — covering protocols, topologies, IP addressing, and the OSI model.
Introduction
Computer networking questions appear in almost every technical interview and university exam for IT students. Networking is the backbone of modern computing — every internet application, cloud service, email, and online game depends on network principles. Interviewers ask networking questions to assess whether you understand how computers communicate, which is fundamental to building any modern software system.
This chapter covers the most frequently asked networking questions with detailed answers. Study these not just to memorize answers but to genuinely understand the concepts. Interviewers can easily tell the difference between someone reciting memorized text and someone who truly understands how networks work.
Basic Concepts
What is a computer network?
A computer network is a collection of two or more computing devices connected together for the purpose of sharing resources and communicating. Resources shared over networks include files, printers, internet connections, databases, and applications. The connection can be wired (Ethernet cables, fiber optic) or wireless (WiFi, Bluetooth, cellular).
What is the difference between the Internet and an intranet?
The Internet is a global, public network of networks — anyone can connect and access publicly available services. An intranet is a private network within an organization that uses internet technologies (TCP/IP, HTTP, web browsers) but is accessible only to that organization's members. It is used for internal communication, document sharing, and enterprise applications. An extranet extends the intranet to selected external partners or customers with controlled access.
What are the types of computer networks?
PAN (Personal Area Network) covers a very small area, typically around one person — Bluetooth connection between your phone and earbuds, or between a laptop and wireless mouse. Range is about 10 meters.
LAN (Local Area Network) covers a building or small campus. It connects computers in an office, school lab, or home. Ethernet and WiFi are common LAN technologies. High speed (100 Mbps to 10 Gbps), low cost, and privately owned.
MAN (Metropolitan Area Network) spans a city or large campus. Cable television networks and city-wide WiFi are examples. Moderate cost, typically owned by a single organization or service provider.
WAN (Wide Area Network) covers large geographic areas — countries or the entire world. The internet is the largest WAN. Lower speed than LAN, higher cost, and typically uses leased telecommunications infrastructure.
OSI Model
Explain the OSI Model.
The OSI (Open Systems Interconnection) Model is a conceptual framework with seven layers that describes how data moves from one application to another across a network. Each layer has specific responsibilities and communicates with the layers directly above and below it.
Layer 7 (Application): Provides network services directly to user applications. Protocols: HTTP, FTP, SMTP, DNS, SNMP.
Layer 6 (Presentation): Handles data format translation, encryption/decryption, and compression. Ensures data from the application layer of one system is readable by the application layer of another.
Layer 5 (Session): Manages sessions (ongoing connections) between applications. Handles session establishment, maintenance, and termination. Manages dialog control and synchronization.
Layer 4 (Transport): Ensures reliable end-to-end data delivery. Handles segmentation, flow control, and error checking. Protocols: TCP (reliable, connection-oriented) and UDP (unreliable, connectionless but faster).
Layer 3 (Network): Handles logical addressing (IP addresses) and routing — determining the best path for data to travel from source to destination across multiple networks. Protocol: IP. Devices: Routers.
Layer 2 (Data Link): Handles physical addressing (MAC addresses), framing (packaging data for physical transmission), and error detection for the physical link. Devices: Switches, Bridges.
Layer 1 (Physical): Deals with the physical transmission of raw bits over the communication medium — electrical signals over copper, light over fiber, or radio waves. Defines connectors, cable types, voltages. Devices: Hubs, cables, repeaters.
What is the TCP/IP Model?
The TCP/IP Model is the practical implementation model of the internet, with four layers: Application (combines OSI layers 5-7), Transport (OSI layer 4), Internet (OSI layer 3), and Network Access (combines OSI layers 1-2). While the OSI model is a theoretical reference, TCP/IP is what the internet actually uses.
Protocols and Addressing
What is the difference between TCP and UDP?
TCP (Transmission Control Protocol) is connection-oriented — it establishes a connection before sending data (three-way handshake), guarantees delivery (retransmits lost packets), delivers data in order, and performs flow control. Use TCP when reliability matters: web browsing, email, file transfer.
UDP (User Datagram Protocol) is connectionless — it sends data without establishing a connection, does not guarantee delivery or ordering, and has no flow control. It is faster and has less overhead. Use UDP when speed matters more than reliability: live video streaming, online gaming, VoIP calls, DNS queries.
What is an IP address?
An IP address is a unique numerical identifier assigned to every device on a network. IPv4 addresses are 32-bit numbers written as four octets (e.g., 192.168.1.100) providing approximately 4.3 billion unique addresses. IPv6 addresses are 128-bit numbers (e.g., 2001:0db8:85a3::8a2e:0370:7334) providing virtually unlimited addresses — created because IPv4 addresses were running out.
Private IP addresses (like 192.168.x.x, 10.x.x.x, 172.16-31.x.x) are used within local networks. Public IP addresses are globally unique and used for internet communication. NAT (Network Address Translation) allows multiple private addresses to share a single public address.
What is DNS and how does it work?
DNS (Domain Name System) translates human-readable domain names (like google.com) to IP addresses (like 142.250.180.14). The process: your browser asks a recursive DNS resolver, which checks its cache. If not cached, it queries root nameservers, then TLD nameservers (.com, .org), then the authoritative nameserver for the specific domain. The IP address is returned and cached for future use. Without DNS, you would need to memorize IP addresses for every website.
What is a subnet mask?
A subnet mask determines which portion of an IP address identifies the network and which portion identifies the specific host (device) on that network. For example, with mask 255.255.255.0, the first three octets identify the network and the last octet identifies hosts within it, allowing 254 hosts per subnet.
Network Devices
What is the difference between a hub, switch, and router?
A Hub operates at Layer 1 (Physical). It receives data on one port and broadcasts it to ALL other ports. Every device receives every transmission, creating unnecessary traffic. Hubs are obsolete in modern networks.
A Switch operates at Layer 2 (Data Link). It learns MAC addresses of connected devices and forwards data ONLY to the specific port where the destination device is connected. This is efficient and reduces unnecessary traffic.
A Router operates at Layer 3 (Network). It connects different networks together and routes packets between them based on IP addresses. It makes intelligent forwarding decisions using routing tables. Your home router connects your LAN to the internet (WAN).
Key Takeaways
- Understand the OSI model layers and their functions — this is asked in almost every exam
- Know TCP vs UDP differences and when to use each
- IP addressing (IPv4, IPv6, public vs private, subnetting) is consistently tested
- DNS translates domain names to IP addresses through a hierarchical lookup process
- Distinguish between hub (broadcast), switch (intelligent forward), and router (inter-network routing)
- Practice explaining concepts in your own words with real-world examples
- Draw network diagrams and protocol flow diagrams to demonstrate understanding in written exams
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Networking Interview Questions.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Computer Fundamentals topic.
Search Terms
computer-fundamentals, computer fundamentals, computer, fundamentals, interview, preparation, networking, questions
Related Computer Fundamentals Topics