Learning Objectives
By the end of this chapter, you will be able to:
- Place any protocol in its TCP/IP layer and explain IP versus TCP in one sentence.
- Contrast TCP and UDP with one use case for each.
- Place any device by what address it uses and where it forwards.
- Size a small shop network and state each part and its cost in NPR.
The core idea
A protocol is a shared rule for formatting and timing. Without it, a wire carries noise. Hardware is where the rule runs. Protocols decide what is said, hardware decides where it goes.
flowchart TB
APP[Application: HTTP, SMTP, DNS] --> TR[Transport: TCP, UDP]
TR --> NET[Internet: IP addressing]
NET --> LINK[Link: Ethernet and Wi-Fi]
LINK --> HW[Hardware: NIC, switch, router, modem, AP]
Grouped Framework A: Protocols grouped by layer
Think in four layers, not one list.
| Layer | Job | Typical protocols |
|---|---|---|
| Application | What the user asked for | HTTP, SMTP, FTP, DNS |
| Transport | How carefully to deliver | TCP, UDP |
| Internet | Where to send the packet | IP |
| Network access | How to push bits on the local wire or air | Ethernet, Wi-Fi |
IP writes the destination address on each packet and picks the next hop. TCP numbers the packets, checks arrival, asks for missing ones, and puts pages in order. A book by post analogy still works: IP is the address on each envelope, TCP is the numbered pages and the check that all 300 arrived.
Ethernet is the usual Link rule for a LAN: who may speak on the local cable and how a collision is handled.
TCP versus UDP
| Aspect | TCP | UDP |
|---|---|---|
| Reliability | Retransmits, ordered | Fire and forget |
| Speed | Slower due to checks | Faster, small header |
| Connection | Handshake, steady stream | No handshake, datagram |
| Use for | Web pages, email, file transfer | Video call, online game, DNS lookup |
The OSI seven layer model is a teaching reference. TCP/IP four layer is what the internet runs.
Self-check
Grouped Framework B: Hardware grouped by address and reach
Group by what the box looks at.
- NIC (Network Interface Card) In every PC, printer, and phone. Wired NIC has an Ethernet port, wireless NIC has a Wi-Fi radio. Each NIC has a MAC address burned in. It is the device door.
- Hub Old. Copies every bit to every port. No address check, so it floods. Now replaced.
- Switch Forwards by MAC. Learns which MAC lives on which port and sends only there. This is the LAN traffic cop for one building.
- Router Forwards by IP. Connects one network to another, such as your shop LAN to the ISP WAN. Keeps a routing table and picks the next network.
- Modem and ONT The translator. A DSL modem converts between digital and analog on a phone line. An ONT converts fiber light to Ethernet for the router. The ISP hands you one of these at the wall.
- Access Point Gives Wi-Fi to phones and laptops. It bridges air to wire. A home router is often a switch plus router plus AP in one box, sometimes with an ONT.
- Repeater Rebuilds a weak signal to go farther.
- Gateway Speaks two protocol worlds, often the default next hop for a LAN.
| Device | Looks at | Sends to | Typical place |
|---|---|---|---|
| Hub | Electrical signal | Every port | Museum, not in a new build |
| Switch | MAC | One port on the same LAN | Office floor, 8 to 48 ports |
| Router | IP | Next network | Edge to ISP |
| Modem or ONT | Line signal | Router WAN port | Wall to router |
| Access point | Wi-Fi association | Switch or router | Ceiling, per floor |
Grouped Framework C: A small office build from A plus B
Put A and B together on one diagram.
flowchart LR
ISP[ISP line: fiber] --> ONT[ONT]
ONT --> R[Router with firewall]
R --> SW[Switch]
SW --> PC1[PC 1]
SW --> PC2[PC 2]
SW --> PR[Printer]
R --> AP[Access point]
AP --> L[Laptops and phones]
- Wired PCs and the printer go to the switch by Cat 6 for speed and stability.
- The switch goes to one router port. The router is the only path to the internet and holds the firewall.
- Phones and laptops join the AP. Keep staff and guests on separate SSIDs if you offer public Wi-Fi.
Nepal worked example: a Butwal branch that priced a 10 user build (NPR, BS 2081)
Dated 2081-04-10. A cooperative opens a 10 seat branch in Butwal. It needs 7 desktops, one network printer, 4 laptops on Wi-Fi, and a link to the head office in Bhairahawa.
Quote on 2081-04-12:
- 16 port Gigabit switch NPR 7,500, router with firewall NPR 9,500, ONT rental free, AP NPR 6,800, 7 Cat 6 drops at NPR 1,100 each = NPR 7,700, 7 NICs already in PCs, printer NIC already built in.
- Labour and testing NPR 8,000.
- Internet 40 Mbps NPR 1,800 per month.
Total one time about NPR 39,500 before internet. Monthly is NPR 1,800.
Throughput check: internal copies are LAN only and ride the 1 Gbps switch, so a 500 MB daily backup to the printer server moves in about 4 seconds on a quiet LAN (500 x 8 = 4000 Mb at 1000 Mbps = 4 seconds ideal). Internet traffic is limited by 40 Mbps, about 5 MB per second, so a head office sync of 200 MB takes about 40 seconds plus protocol overhead. The branch keeps wired for ledger and printer, wireless for laptops, and separates guest phones from core stock traffic.
Decision: buy a switch, not a hub. Hub would flood every sale to every PC and fail an audit test for needless exposure.
Example 1: In a finance and audit reading, stress Group B as control: log which switch port links to which MAC, fix the router as the only gateway, and keep the switch price and install date in the fixed asset register for BS 2081-04-25.
Example 2: In a sales and operations reading, stress Group C as service: wired tills for speed at the counter, AP for phones on the floor, and test that a till can still print when the internet is down because the switch keeps the LAN alive.
Summary
Protocols are grouped by layer: Application asks, Transport chooses careful (TCP) or fast (UDP), Internet addresses (IP), Link carries (Ethernet and Wi-Fi). Hardware is grouped by address: NIC is the door, switch forwards by MAC inside the LAN, router forwards by IP between networks, modem or ONT translates the ISP line, AP bridges air to wire. A small office joins them as ONT to router to switch to PCs and printer, with an AP for laptops.
Key Takeaways
- IP addresses, TCP ensures order and recovery, UDP trades reliability for speed.
- Hub floods, switch learns, router routes, AP bridges.
- Wired for ledger and printer, wireless for movement, one gateway for control.
Discussion Questions
- A shop offers free Wi-Fi on the same SSID as tills. Which grouping mistake is this and what is the fix.
- When is UDP the right transport choice even though it may lose a packet.
Exercises
Short answer
- Name the four TCP/IP layers with one protocol for each.
- Differentiate hub and switch by what address each uses.
- What does an ONT do.
Long answer
- Explain TCP versus UDP with two use cases each and state which layer each sits in.
- Draw and price a 10 user office network with switch, router, AP, and cabling. State what traffic stays on LAN and what needs the internet.


