π 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.
Types of networks (by size)
- PAN (Personal Area Network) β 1β10 m. Your phone + Bluetooth headphones.
- LAN (Local Area Network) β one building. Your office / cyber cafΓ© / school.
- MAN (Metropolitan Area Network) β one city. ISP network across Kathmandu.
- WAN (Wide Area Network) β country or global. The Internet itself.
Topologies β the shape of a network
| Topology | Shape | Vibe |
|---|---|---|
| Bus | All devices on one single cable | Cheap, but one cable break = whole network down |
| Star | All devices connect to a central hub/switch | Most common in offices; if hub fails, network dies |
| Ring | Devices in a closed loop, data goes round | One break = whole ring down |
| Mesh | Every device connects to every other | Super reliable, expensive. Used in military, Internet backbone |
| Tree | Hierarchy β like branches from a trunk | Combines bus + star; used in large networks |
| Hybrid | Mix of two or more above | Real-world networks are usually this |
3.2Connectivity and media: Network cables and connectors
Transmission media β wired (guided)
- Twisted pair cable β pairs of copper wires twisted together.
- UTP (Unshielded) β common LAN cable. Cat5e, Cat6.
- STP (Shielded) β has extra shielding against interference.
- Coaxial cable β single copper core with shielding. Used for cable TV, older networks.
- Fibre optic cable β transmits data as light pulses through glass. Very fast, long distance, expensive. Used for internet backbone.
Transmission media β wireless (unguided)
- Radio waves β Wi-Fi, cellular (4G/5G).
- Microwaves β satellite links, point-to-point towers.
- Infrared β TV remotes, short-range.
- Bluetooth β short-range personal devices.
Connectors
- RJ-45 β the familiar Ethernet plug, used with twisted pair for LAN.
- RJ-11 β smaller, used for telephone and old DSL.
- BNC β for coaxial cable.
- ST / SC / LC β for fibre optic cables.
3.3Network Devices (Hub, Switch, Router, Gateway)
| Device | What it does | Intelligence |
|---|---|---|
| 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) |
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)
- T568B (most common) β Orange/white, Orange, Green/white, Blue, Blue/white, Green, Brown/white, Brown.
- T568A β Green/white, Green, Orange/white, Blue, Blue/white, Orange, Brown/white, Brown.
Straight-through vs Crossover
- Straight-through β same standard on both ends. Connects different devices: PC β switch, switch β router.
- Crossover β T568A on one end, T568B on the other. Connects same-type devices: PC β PC, switch β switch (in older gear; modern gear auto-detects).
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.
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.
IPv4
- 32-bit address, written as four numbers (0β255) separated by dots:
192.168.1.10. - About 4.3 billion addresses total β we've nearly run out.
IPv6
- 128-bit address, written as 8 groups of hex digits:
2001:0db8:85a3::7334. - Huge address space β basically unlimited.
Classes of IPv4
| Class | Range (first octet) | Used for |
|---|---|---|
| A | 1β126 | Very large networks |
| B | 128β191 | Medium networks |
| C | 192β223 | Small networks (most common) |
| D | 224β239 | Multicast |
| E | 240β255 | Research/experimental |
Public vs private IP
- Public IP β unique on the entire Internet. Assigned by your ISP.
- Private IP β reused inside local networks. Ranges:
10.x.x.x,172.16.x.x β 172.31.x.x,192.168.x.x.
Static vs dynamic
- Static β manually assigned, doesn't change. For servers.
- Dynamic β given out automatically by DHCP. For home devices.
Special addresses
127.0.0.1β loopback; always refers to "this computer."0.0.0.0β "any address" / unspecified.- Subnet mask β tells you which part of the IP is the network and which is the host, e.g.
255.255.255.0.
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.
E-mail (Electronic mail)
A method of exchanging digital messages over a network. Requires an email address (you@gmail.com) and a server.
- To, Cc, Bcc, Subject, Body, Attachment β standard fields.
- Protocols: SMTP (sending), POP3 / IMAP (receiving).
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.
- Invented by Tim Berners-Lee in 1989 at CERN.
- Needs: a web browser (client) + a web server + a URL (
https://example.com).
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
- Google Chrome β fast, dominates market share.
- Mozilla Firefox β open-source, privacy-focused.
- Microsoft Edge β replaced Internet Explorer, built on Chromium.
- Internet Explorer β Microsoft's old browser, now discontinued.
- Safari β Apple's browser.
- Opera β known for Opera Mini on slow connections.
Key parts of a browser
- Address bar β where you type the URL.
- Tabs β many pages at once.
- Bookmarks β saved links.
- History β list of visited pages.
- Cache β saved copy of pages for speed.
- Cookies β small data files that remember you (login sessions, preferences).
URL anatomy
https://www.example.com.np/page?id=5
httpsβ protocol (secure HTTP).www.example.com.npβ domain name./pageβ path to a specific resource.?id=5β query parameter.
Ready for MCQs?
Gemini will write 10 fresh questions from this chapter's syllabus. Hit "Generate more" for another round.
Back to Home