Introduction to Computer Networks
Learning Objectives
- Define a computer network and identify its three core building blocks: nodes, links, and protocols.
- Distinguish between LAN, MAN, WAN, WLAN, and VPN, and give a real example of each.
- Compare bus, star, ring, mesh, and hybrid topologies and explain the trade-offs of each.
- Identify the role of core network devices: hub, switch, router, bridge, and modem.
- Explain why protocols are necessary for two arbitrary devices to communicate at all.
- Recognize at least three common security mechanisms used to protect networks.
Quick Answer
A computer network is a set of devices (computers, phones, servers, printers) connected by communication links so they can exchange data using an agreed-upon set of rules called protocols. Networks matter because almost nothing useful in modern computing happens on an isolated machine — email, web browsing, cloud storage, video calls, and even software updates all depend on devices finding each other and exchanging data reliably. Understanding networks means understanding how devices are physically and logically connected (topology), what rules govern their conversation (protocols), what hardware moves the data (routers, switches), and what geographic scope the network covers (LAN vs. WAN). This foundation underpins everything else in networking, from the OSI model to security.
What Is a Computer Network?
Definition. A computer network is a collection of two or more devices ("nodes") linked together by a communication medium so they can share data, resources, and services using a common protocol.
How it works. Three things have to exist simultaneously for a network to function:
- Nodes — the endpoints. A node can be a laptop, phone, printer, server, or even a smart thermostat. Each node needs some way to be individually addressed (an IP address, a MAC address) so data reaches the right one.
- Links — the physical or wireless medium connecting nodes: copper Ethernet cable (Cat5e/Cat6), fiber optic cable, or radio waves (Wi-Fi, cellular).
- Protocols — the agreed-upon rules for formatting, sending, and interpreting data. Without a shared protocol, two connected devices are like two people wired together by a telephone line who don't speak the same language — the physical connection exists, but no communication happens.
Example. Your laptop connects to a home router over Wi-Fi (the link), gets assigned an IP address like 192.168.1.15 (node addressing), and uses HTTP over TCP/IP (the protocol) to request a web page from a server on the other side of the world.
Real-world example. A hospital's network connects nurses' workstations, patient monitoring devices, pharmacy systems, and administrative servers — all as nodes on the same infrastructure, following strict protocols so that a heart-rate monitor's alert reaches the right nurse's station within milliseconds.
Why it matters. Every technology you use daily — messaging, streaming, banking, cloud backups — is built on this basic idea of networked communication. If you understand nodes, links, and protocols, you have the vocabulary to reason about any networking problem, from "why is my Wi-Fi slow" to "how does Netflix stream to millions of people at once."
Common misunderstanding. Students often think "network" means "the internet." The internet is just one enormous network of networks. A network can be as small as two laptops connected directly by an Ethernet cable with no internet access at all — that's still a valid, fully functional computer network.
Types of Computer Networks
Networks are usually classified by their geographic scope, because scope determines what technology and protocols are practical.
| Type | Scope | Typical Technology | Example |
|---|---|---|---|
| LAN (Local Area Network) | A single building or campus | Ethernet, Wi-Fi | An office network connecting all desks on one floor |
| MAN (Metropolitan Area Network) | A city or large campus | Fiber backbones, WiMAX | A university connecting multiple campuses across a city |
| WAN (Wide Area Network) | Country or global | Leased lines, satellite, MPLS | The internet itself; a bank's network linking branches across states |
| WLAN (Wireless LAN) | Same as LAN, wireless medium | IEEE 802.11 (Wi-Fi) | A home Wi-Fi network |
| VPN (Virtual Private Network) | Logical, overlaid on a WAN | IPsec, TLS tunneling | A remote employee securely accessing a company's internal LAN over the public internet |
Definition (LAN vs WAN, the two you'll be tested on most). A LAN is confined to a small geographic area (a home, office, or building) and typically owned and managed by a single organization. A WAN spans large distances and usually depends on third-party carriers (ISPs, telecom providers) to link separate LANs together.
How it works. A LAN uses cheap, fast, low-latency technology (Gigabit Ethernet, Wi-Fi 6) because distances are short. A WAN must deal with long distances, so it relies on routers making forwarding decisions across many intermediate networks, higher latency, and often slower or more expensive links (leased lines, fiber backbones, satellite).
Example. Your home network (router + laptop + phone + smart TV) is a LAN. When you browse a website hosted in another country, your request leaves your LAN, crosses your ISP's network, transits several WAN backbone providers, and reaches a data center — that entire path outside your home is WAN territory.
Real-world example. A retail chain like a supermarket brand has a LAN in each store (registers, inventory scanners, back-office PCs) and a WAN connecting all store LANs to a central headquarters data center for sales reporting and inventory sync.
Why it matters. Network design, security policy, and troubleshooting approach all differ by scope. You secure a LAN differently than a WAN (physical access control vs. encryption over public infrastructure), and this classification shows up constantly in networking certifications and interviews.
Common misunderstanding. A common confusion is thinking WAN = internet. The internet is the largest WAN, but private WANs exist too — a company can lease dedicated lines between offices in different cities without any of that traffic touching the public internet.
Network Topologies
Definition. Topology describes how nodes are arranged and interconnected — either physically (cable layout) or logically (how data actually flows, which may differ from the physical layout).
How it works — the main topologies:
- Bus: All devices share a single backbone cable. Cheap and simple, but a break anywhere kills the whole segment, and only one device can transmit at a time (collisions are common). Rare today.
- Star: Every device connects to a central hub or switch. If one cable fails, only that device is affected. This is the dominant topology in modern LANs because switches make it fast and fault-tolerant.
- Ring: Each device connects to exactly two neighbors, forming a closed loop; data travels around the ring (used historically in Token Ring and FDDI networks).
- Mesh: Every device connects directly to every other device (full mesh) or to several others (partial mesh). Extremely fault-tolerant — there's no single point of failure — but expensive to cable and scale (a full mesh of n nodes needs n(n-1)/2 links).
- Hybrid: A combination, e.g., several star networks linked together by a backbone — this is what most real organizational networks actually look like.
Example. In your home, if your laptop, phone, and smart TV all plug into (or connect wirelessly to) one central Wi-Fi router, that's a star topology — the router is the hub.
Real-world example. Internet backbone providers use partial mesh topologies between their core routers so that if one fiber link is cut (e.g., a backhoe accident), traffic can automatically reroute through another path.
Why it matters. Topology directly affects fault tolerance, cost, and how easy it is to add new devices. Understanding topology helps you reason about single points of failure in any network you design or troubleshoot.
Common misunderstanding. Students often assume topology only describes physical cabling. In practice, "logical topology" — how data actually flows — can differ from the physical layout. For example, older Ethernet hubs were physically wired in a star shape but behaved logically like a bus (only one device could transmit at a time across the shared medium).
Network Devices
Devices operate at different points in the network and make decisions using different information:
- Hub: A dumb, physical-layer device that repeats every incoming signal out to all other ports. No filtering, no addressing awareness — this causes unnecessary traffic and collisions. Largely obsolete now.
- Switch: A data-link-layer device that learns which MAC address lives on which port and forwards frames only to the correct port, dramatically reducing unnecessary traffic compared to a hub.
- Router: A network-layer device that forwards packets between different networks based on IP addresses, using routing tables and protocols to choose the best path.
- Bridge: Connects and filters traffic between two network segments at the data-link layer, similar in principle to a switch but usually with fewer ports.
- Modem: Converts digital signals from your devices into a form suitable for transmission over the ISP's medium (e.g., modulating digital data onto the analog signal of a cable or DSL line) and back again.
Network Protocols (Preview)
Protocols are the rulebooks that let heterogeneous devices — a Windows laptop, an iPhone, a Linux server — talk to each other despite having different hardware and software. The two major reference frameworks are the OSI model (seven layers) and the TCP/IP model (four layers), covered in depth in the next page. A few protocols you'll meet immediately:
- HTTP — transfers web pages (default port 80; HTTPS uses port 443 with TLS encryption)
- FTP — transfers files between client and server (ports 20/21)
- SMTP — sends email between mail servers (port 25)
Network Security (Preview)
A network is only as useful as it is trustworthy. Core mechanisms include:
- Firewalls — filter traffic in and out of a network based on rules (IP address, port, protocol)
- Encryption — scrambles data (e.g., TLS/SSL) so intercepted traffic is unreadable
- Access control — authentication and authorization systems that decide who can reach which resources
- Antivirus/anti-malware — detects and removes malicious software that could compromise a node
These are explored in full in the Network Security and Cryptography page.
Key Terms
| Term | Definition |
|---|---|
| Node | Any device connected to a network (computer, phone, printer, server) |
| Link | The physical or wireless medium connecting two nodes |
| Protocol | An agreed set of rules governing how data is formatted and exchanged |
| LAN | Local Area Network — confined to a small area like a home or office |
| WAN | Wide Area Network — spans large geographic distances, often across ISPs |
| MAN | Metropolitan Area Network — spans a city, connecting multiple LANs |
| VPN | Virtual Private Network — a secure, encrypted tunnel across a public network |
| Topology | The physical or logical arrangement of nodes in a network |
| Hub | A physical-layer device that broadcasts incoming data to all ports |
| Switch | A data-link-layer device that forwards frames to the specific port of the destination MAC address |
| Router | A network-layer device that forwards packets between different networks |
| Bandwidth | The maximum rate of data transfer across a link, typically measured in bits per second |
Common Mistakes
| Misconception | Why it's wrong | Correct understanding |
|---|---|---|
| "The internet and a network are the same thing." | The internet is one specific, massive WAN made of many interconnected networks; it's not a synonym for "network" in general. | A network is any set of connected devices sharing protocols; the internet is the largest example of a WAN, but private, isolated networks exist too. |
| "A hub and a switch do the same job." | Both connect multiple devices, but a hub blindly repeats data to every port while a switch intelligently forwards only to the destination's port. | Switches are smarter (they learn MAC-to-port mappings) and far more efficient; hubs cause unnecessary traffic and collisions and are essentially obsolete. |
| "Mesh topology is always the best choice because it's the most fault-tolerant." | Fault tolerance comes at a steep cost: a full mesh needs n(n-1)/2 links, which becomes impractical very quickly as node count grows. | The "best" topology depends on trade-offs between cost, scalability, and fault tolerance — star topology is the practical default for most LANs today. |
Comparison and Connections
| Concept | vs. | Key Difference |
|---|---|---|
| LAN | WAN | LAN is confined to a small area and self-owned; WAN spans large distances and often relies on third-party carriers. |
| Hub | Switch | Hub repeats to all ports blindly (Physical layer); switch forwards intelligently based on learned MAC addresses (Data Link layer). |
| Switch | Router | Switch operates within one network using MAC addresses; router connects different networks using IP addresses. |
| Bus topology | Star topology | Bus shares one cable (single point of failure for the whole segment); star isolates each device's link, so one failure doesn't take down others. |
| VPN | Plain WAN connection | A VPN adds an encrypted tunnel over existing WAN infrastructure; a plain WAN link carries traffic without that security layer. |
Practice Questions
Recall
- What are the three essential components required for a computer network to function? Answer guidance: Nodes (devices), links (physical/wireless medium), and protocols (rules governing data exchange).
- Name the five main network topologies. Answer guidance: Bus, star, ring, mesh, and hybrid.
Understanding
- Why is a switch generally preferred over a hub in modern LANs? Answer guidance: A switch learns which MAC address is on which port and forwards frames only to that port, reducing unnecessary traffic and collisions, whereas a hub repeats every signal to all ports regardless of the destination.
- Explain why topology affects fault tolerance. Answer guidance: Topologies that have a single shared link or hub (bus, naive star with one hub) create single points of failure; mesh topologies spread connections so failure of one link doesn't isolate other nodes, at the cost of more cabling.
Application
- A small office has 10 computers that all need to talk to each other and share one internet connection. Which topology and device would you recommend, and why? Answer guidance: Star topology with a switch (or router with built-in switch ports) — cost-effective, easy to add devices, and a single cable failure only affects one computer.
- An employee working from home needs to securely access files on their company's internal LAN. What technology should be used, and why? Answer guidance: A VPN — it creates an encrypted tunnel over the public WAN/internet so the remote device behaves as if it's on the internal LAN, while protecting the data from interception.
Analysis
- Compare a full mesh topology to a hybrid topology for a company with 100 branch offices. Which is more practical and why? Answer guidance: A full mesh would need 100×99/2 = 4,950 links — completely impractical. A hybrid (e.g., hub-and-spoke stars connected through a WAN backbone) is far more cost-effective while still providing reasonable redundancy.
- A network administrator notices that when one device on a network floods traffic, every other device slows down. What kind of device is likely at the center of this network, and what would fix it? Answer guidance: A hub is likely at the center, since it broadcasts all traffic to every port, causing collisions and congestion; replacing it with a switch would isolate traffic to only the relevant ports.
FAQ
Q: Is Wi-Fi a type of network or a type of technology? A: Wi-Fi (IEEE 802.11) is a wireless communication technology/protocol used to build a WLAN — the network type is WLAN, and Wi-Fi is the underlying technology that makes it work.
Q: Can a LAN exist without internet access? A: Yes. Two computers connected directly by an Ethernet cable, or a home network with file sharing but no ISP connection, are both fully functional LANs. Internet access is a separate service that a LAN can optionally connect to via a router.
Q: What's the practical difference between a router and a switch for a home user? A: A switch just adds more wired ports to your local network. A router connects your entire local network to another network (typically your ISP's WAN), manages IP addressing (often via DHCP), and makes routing decisions — most "home routers" are actually a router, switch, and Wi-Fi access point combined into one box.
Q: Why do we still learn about bus and ring topologies if nobody uses them anymore? A: They illustrate fundamental trade-offs (shared medium vs. dedicated links, single point of failure vs. distributed failure) that show up in modern systems too — for example, some backbone and industrial control networks still use ring-like designs for their self-healing properties.
Q: How is a MAN different from just a big LAN? A: Scope and ownership. A MAN typically spans a whole city and often uses infrastructure and technology (like fiber backbones or WiMAX) not found in a single-building LAN, and may involve multiple organizations or a municipal/ISP-provided backbone connecting several separate LANs.
Quick Revision
- A network = nodes + links + protocols.
- LAN = small area, self-owned; WAN = large area, often relies on carriers; MAN = city-scale; VPN = encrypted tunnel over a public network.
- Star topology dominates modern LANs because a single link failure only affects one device.
- Mesh gives the best fault tolerance but scales terribly in cost (n(n-1)/2 links).
- Hub = broadcasts to all ports (Physical layer, obsolete); Switch = forwards to correct port using MAC address (Data Link layer); Router = forwards between networks using IP address (Network layer).
- Bridge connects two network segments at the data-link layer; modem converts digital signals for transmission over ISP media.
- HTTP (port 80) and HTTPS (port 443) transfer web content; FTP (ports 20/21) transfers files; SMTP (port 25) sends email.
- Network security relies on firewalls, encryption, access control, and antivirus software working together.
- Logical topology (how data flows) can differ from physical topology (how cables are laid out).
- The internet is a WAN, not a synonym for "network" — private, isolated networks exist without any internet connection.
Related Topics
Prerequisites
- None — this is the entry point to the Computer Networks unit.
Related Topics
- OSI and TCP/IP Models
- Network Layer and Routing Protocols
- Wireless Networks and Mobile Communication
Next Topics
- OSI and TCP/IP Models
- Data Link Layer
- Network Security and Cryptography