Learning Objectives
By the end of this chapter, you will be able to:
- Define a network protocol and its purpose.
- Describe the roles of TCP/IP and Ethernet, and the layers of TCP/IP.
- Differentiate between TCP and UDP.
- Identify the key hardware components of a network, including NICs, hubs, switches, routers, and modems.
- Design a simple small-office network.
Network Protocols: The Rules of Communication
A protocol is a set of rules that governs how data is formatted, transmitted, and received in a network. Just like humans need to speak the same language to communicate, computers need to use the same protocols.
- TCP/IP (Transmission Control Protocol/Internet Protocol): This is the foundational protocol suite of the internet.
- IP is responsible for addressing and routing packets of data to the correct destination.
- TCP is responsible for ensuring that the data is delivered reliably and in the correct order.
- Ethernet: The most common protocol used for Local Area Networks (LANs).
flowchart TB
APP[Application Layer<br/>HTTP, Email, FTP]
TCP[TCP - Reliable Delivery]
IP[IP - Addressing and Routing]
LINK[Link Layer<br/>Ethernet / Wi-Fi]
APP --> TCP --> IP --> LINK
Figure 1: TCP/IP Protocol Stack
Analogy: sending a book by post
Imagine sending a 300-page book by post as 300 separate envelopes. IP writes the destination address on each envelope so the postal system can route it; envelopes may take different routes. TCP numbers the envelopes, checks that all 300 arrived, asks for missing ones to be resent, and puts the pages back in order.
The TCP/IP model layers
| Layer | Role | Examples |
|---|---|---|
| Application | Services used by applications | HTTP, SMTP, FTP, DNS |
| Transport | Reliable or fast end-to-end delivery | TCP, UDP |
| Internet | Addressing and routing of packets | IP |
| Network access | Physical transmission on the local network | Ethernet, Wi-Fi |
TCP vs UDP
| Aspect | TCP | UDP |
|---|---|---|
| Reliability | Guarantees delivery and order | No guarantee; lost packets not resent |
| Speed | Slower due to checking | Faster, less overhead |
| Connection | Connection-oriented | Connectionless |
| Used for | Web pages, email, file transfer | Live video calls, online games, DNS |
The OSI model is a more detailed seven-layer reference model; TCP/IP is the practical model used by the internet.
Networking Hardware
Several key pieces of hardware are required to create a computer network.
-
Network Interface Card (NIC): The hardware in each computer that connects it to the network, either with a cable (Ethernet port) or wirelessly (Wi-Fi). Every NIC has a unique MAC address.
-
Hub: An older device that connects computers on a LAN but sends every message to all connected devices, causing unnecessary traffic.
-
Switch: A device used to connect multiple computers together on a LAN. A switch receives data from one device and intelligently forwards it only to the specific device it is intended for.
-
Router: A device that connects different networks together. Your home router connects your private LAN to the public internet (a WAN). Routers are responsible for directing traffic between networks.
-
Modem (Modulator-Demodulator): A device that connects your home network to your Internet Service Provider (ISP) over a medium like cable or DSL. It converts the digital signals from your computer into analog signals for transmission over the ISP’s network, and vice versa.
-
Access Point (AP): Provides Wi-Fi connectivity to wireless devices.
-
Repeater: Regenerates a weak signal to extend the distance a network can cover.
-
Gateway: Connects networks that use different protocols; a home router often acts as the default gateway.
| Device | Works with | Sends data to | Main use |
|---|---|---|---|
| Hub | Signals on a LAN | All connected devices | Obsolete; very small networks |
| Switch | MAC addresses | Only the intended device on the LAN | Connecting PCs, printers in an office |
| Router | IP addresses | The correct network | Connecting LAN to the internet |
| Modem | Signals on ISP line | Converts between digital and analog | Connecting to the ISP |
Home “Wi-Fi routers” usually combine a router, a small switch, and an access point in one box, and sometimes a modem or ONT as well.
Example: A Small Office Network
flowchart LR
ISP[ISP line] --> M[Modem or ONT]
M --> R[Router and firewall]
R --> SW[Switch]
SW --> PC1[PC 1]
SW --> PC2[PC 2]
SW --> PR[Network printer]
R --> AP[Wi-Fi access point]
AP --> L[Laptops and phones]
An audit firm in Lalitpur with 10 staff connects its desktops and printer by Ethernet cables to a switch, the switch to a router with a built-in firewall, and the router to the ISP’s ONT. An access point gives Wi-Fi to laptops and phones. Wired desktops get fast, stable connections; the router shares one internet connection among all devices.
Summary
For computers to communicate, they must follow a common set of rules called protocols, with TCP/IP being the fundamental protocol of the internet. IP addresses and routes packets, TCP ensures reliable delivery, and UDP trades reliability for speed. This communication is made possible by key pieces of networking hardware. NICs connect each device; switches connect devices on a local LAN, while routers connect different networks together. A modem is the device that provides the connection from your home or business to your Internet Service Provider, and access points provide Wi-Fi.
Key Takeaways
- Protocols are the rules that govern network communication.
- TCP/IP is the core protocol of the internet, organized in four layers.
- TCP is reliable; UDP is faster but does not guarantee delivery.
- A switch connects devices on a LAN; a router connects different networks.
- A hub broadcasts to all devices; a switch sends only to the intended device.
- A modem connects your network to your ISP.
Discussion Questions
- What is the difference between a switch and a router?
- Using an analogy, explain the roles of TCP and IP.
- When you connect to the Wi-Fi at a coffee shop, what networking hardware are you interacting with?
Exam-Style Questions
Short answer
- What is a protocol? Give two examples.
- Differentiate between a hub and a switch.
- Differentiate between TCP and UDP.
Long answer
- Explain the TCP/IP model and the roles of TCP and IP.
- Describe the networking hardware needed to set up a small office network, with a diagram.

