CHAPTER 3

🌐 Computer Network

How two or more computers connect, the shapes those connections take, the devices that glue them together, and how the Internet addresses every machine on earth.

3.1Basic Networking: definition, types, topologies

Definition

A computer network is a collection of two or more computers and devices connected together to share resources (files, printers, Internet) and communicate.

Think of a building with shared WhatsApp group. One person cooks extra daal-bhat (a file) and announces it on the group. Everyone who wants some can come pick it up. That's a network β€” shared resources, shared conversation.

Types of networks (by size)

Topologies β€” the shape of a network

TopologyShapeVibe
BusAll devices on one single cableCheap, but one cable break = whole network down
StarAll devices connect to a central hub/switchMost common in offices; if hub fails, network dies
RingDevices in a closed loop, data goes roundOne break = whole ring down
MeshEvery device connects to every otherSuper reliable, expensive. Used in military, Internet backbone
TreeHierarchy β€” like branches from a trunkCombines bus + star; used in large networks
HybridMix of two or more aboveReal-world networks are usually this
Star topology = electricity board in your house. Every switch, fan, light connects back to the main board. If one fan dies, the rest keep running. But if the main board trips, everything's off.

3.2Connectivity and media: Network cables and connectors

Transmission media β€” wired (guided)

Transmission media β€” wireless (unguided)

Connectors

Copper cable = sending letters through a postman. Fibre optic = sending the same message as a laser flash through glass. Light always wins the race.

3.3Network Devices (Hub, Switch, Router, Gateway)

DeviceWhat it doesIntelligence
Hub Sends incoming signal to every port. Dumb repeater. None
Switch Sends data only to the port where the target device lives. Uses MAC addresses. Smart within a LAN
Router Connects different networks, picks the best path between them. Uses IP addresses. Smart across networks
Gateway Connects networks that use different protocols (translator between two systems). Very smart β€” translates
Modem Converts digital ↔ analog so your ISP's line can reach your computer. Simple converter
Bridge Connects two LAN segments into one. Moderate
Repeater Boosts a weak signal so it can travel further. None (amplifier)
NIC Network Interface Card β€” the actual Ethernet/Wi-Fi chip in your computer. N/A (component)
Router vs Switch = postman vs office peon. The office peon (switch) only delivers mail inside one office β€” if it's for someone in this building, they know which desk. The postman (router) picks up mail that needs to go to another city and decides which road is fastest.
Hub = that uncle at a wedding who shouts every announcement to the whole room even if it's only for the bride. Switch = the MC who walks over to the right table and whispers it.

3.4Network cabling and cable testing

Crimping a cable

To make your own Ethernet cable: strip the outer jacket, untwist the 8 wires, arrange them in the T568A or T568B color order, trim, insert into an RJ-45 connector, and use a crimping tool to press the connector shut.

Two main wiring standards (colors)

Straight-through vs Crossover

Cable testing

A cable tester has two small boxes: plug each end of the cable into one. LEDs light up in sequence to confirm every wire is connected correctly. Broken wire = missing LED.

Cable tester = doctor's stethoscope for your network cable. Instead of heartbeats it listens for electric signals on all 8 wires.

3.5IP Addressing

An IP address (Internet Protocol address) is a unique number assigned to every device on a network. It's how the network knows where to send packets.

IP address = your home's ward + tole + house number. Without it, the postman has no idea where to deliver your Daraz parcel.

IPv4

IPv6

Classes of IPv4

ClassRange (first octet)Used for
A1–126Very large networks
B128–191Medium networks
C192–223Small networks (most common)
D224–239Multicast
E240–255Research/experimental

Public vs private IP

Static vs dynamic

Special addresses

3.6E-mail, Internet, Extranet, Intranet, WWW

Internet

A global network of networks. Billions of devices connected through ISPs, routers, and undersea cables.

Intranet

A private network inside an organization, using Internet-style tools (web pages, email) but not accessible from outside. Example: an office's internal portal.

Extranet

An intranet that selectively lets in outsiders β€” typically suppliers, vendors, partners. Example: a bank's portal for its partner merchants.

Intranet = your family's private WhatsApp group. Extranet = same group but with your in-laws added. Internet = a group with the whole country in it.

E-mail (Electronic mail)

A method of exchanging digital messages over a network. Requires an email address (you@gmail.com) and a server.

World Wide Web (WWW)

The WWW is a collection of interlinked web pages (HTML documents) accessed via the Internet using HTTP/HTTPS. It's not the same as the Internet β€” the Internet is the infrastructure, the WWW is one service that runs on it.

Internet = the road system. WWW = the shops on those roads. Email, file transfer, online games β€” those are other shops on the same roads, not part of the WWW.

3.7Internet browsers

A web browser is software that fetches web pages from servers and displays them. You type a URL β†’ browser sends an HTTP request β†’ server sends HTML/CSS/JS back β†’ browser renders it.

Popular browsers

Key parts of a browser

URL anatomy

https://www.example.com.np/page?id=5

URL = a courier tracking number + full address. The protocol is "which courier company" (DHL vs Aramex), the domain is the street, the path is the flat number.

Ready for MCQs?

Gemini will write 10 fresh questions from this chapter's syllabus. Hit "Generate more" for another round.

Back to Home