Computer Networks
Types of Networks: PAN, LAN, MAN, WAN
| Type | Covers | Example |
|---|---|---|
| PAN — Personal Area Network | the devices around one person, within about 10 metres | a phone linked to wireless earphones by Bluetooth, or to a laptop by USB |
| LAN — Local Area Network | a room, a building or a campus, up to about a kilometre; high speed, owned by one organisation | a school computer lab using Ethernet cables or Wi-Fi |
| MAN — Metropolitan Area Network | a city or a few tens of kilometres — in effect an extended LAN | a cable TV network across a city |
| WAN — Wide Area Network | a country, a continent or the world, often joining many LANs and MANs | the Internet, the largest WAN; a bank's network linking its branches |
Network Devices
- Modem (MOdulator–DEModulator): converts a computer's digital signal into an analog signal for transmission over a telephone or cable line, and the analog signal back into digital at the other end.
- Ethernet card (NIC, network interface card): the hardware that connects a computer to a wired network; each card carries a unique physical address, its MAC address, and usually has an RJ45 socket.
- RJ45 (Registered Jack-45): the eight-pin connector at the ends of the twisted-pair Ethernet cables used in LANs.
- Repeater: a signal weakens as it travels along a cable (beyond about 100 metres on an Ethernet cable); a repeater regenerates it so that it can travel further.
- Hub: connects several devices of a LAN; data arriving on one port is sent out on every other port, so all devices share the bandwidth and simultaneous transmissions can collide.
- Switch: also connects devices of a LAN, but reads the destination (MAC) address of each frame and sends it only to the port of the intended device, which cuts unnecessary traffic and collisions.
- Router: connects different networks — for example a LAN to the Internet — and forwards each data packet towards its destination using IP addresses, choosing a route.
- Gateway: the entry and exit point of a network, joining networks that may use different protocols and translating between them; it is often combined with a router and a firewall.
Network Topologies
| Topology | Arrangement | Strength | Weakness |
|---|---|---|---|
| Mesh | every device linked directly to every other; n devices need n(n − 1)/2 links | very reliable — a broken link has alternatives | expensive and complex to cable |
| Ring | each device linked to exactly two neighbours, forming a closed loop; data usually flows one way | simple, orderly transmission | one failed node or link can break the ring |
| Bus | all devices attached to one shared backbone cable, with terminators at its ends | little cable, cheap and easy to set up | a fault in the backbone stops the whole network |
| Star | each device connected by its own cable to a central hub or switch | one device's failure does not affect the others; easy to add devices and find faults | if the central device fails, the whole network stops |
| Tree (hybrid) | a hierarchy of star networks joined to a common backbone | scales to large organisations | depends on the backbone and the upper levels |
Identifying Nodes: MAC and IP Addresses
The MAC (Media Access Control) address is the physical address burnt into a network interface card by its manufacturer. It is 48 bits (6 bytes) long and written as 12 hexadecimal digits in pairs, such as FC:F8:AE:CE:7B:16. The first three bytes identify the manufacturer (the organisationally unique identifier) and the last three are assigned by the manufacturer to that card. A MAC address is fixed for the card and does not change when the device moves to another network.
The IP (Internet Protocol) address is a logical address given to a device on a network, and it can change when the device joins a different network. An IPv4 address is 32 bits, written as four decimal numbers from 0 to 255 separated by dots — 192.168.0.178. Because 32 bits allow only about 4.3 billion addresses, IPv6 was introduced with 128-bit addresses, written as eight groups of four hexadecimal digits separated by colons, such as 2001:0DB8:0000:0000:0000:0000:0000:0001. A useful contrast: the MAC address says who a device is, the IP address where it currently is on the network.
The Internet, the Web, and Domain Names
The Internet is the worldwide network of networks — the cables, routers and protocols that carry data between computers. The World Wide Web (WWW) is one service that runs on it: a system of interlinked web pages written in HTML, each identified by a URL (uniform resource locator) and fetched with HTTP. E-mail, file transfer and video calls also use the Internet without being part of the Web.
Computers on the Internet locate each other by IP address, but people remember names. A domain name such as ncert.nic.in is a readable name for a server; its rightmost part is the top-level domain — generic ones like .com, .org, .edu, .gov and .net, or country codes like .in. The Domain Name System (DNS) is the Internet's directory: when a browser is given a domain name, a DNS server looks it up and returns the matching IP address, a process called domain name resolution. Only then can the browser contact the web server.
Key takeaways
- A network links nodes to share data and resources; ARPANET (1969) was the forerunner of the Internet, and Tim Berners-Lee created the Web.
- PAN is around one person, LAN a building or campus, MAN a city, WAN a country or the world — the Internet is the largest WAN.
- Modem converts digital ↔ analog; repeater regenerates; hub sends to all ports, switch to one by MAC; router joins networks by IP; gateway joins different protocols.
- Mesh needs n(n − 1)/2 links; bus fails with its backbone, star with its centre, and a star survives the loss of one node.
- MAC: 48-bit physical address, first 3 bytes the manufacturer; IPv4: 32-bit dotted decimal; IPv6: 128-bit hexadecimal with colons.
- The Web is a service on the Internet; DNS resolves a domain name into the IP address of the server.
Practice questions (8)
Attempt each one before opening the answer. Every explanation names the tempting wrong option as well as the right one, because that is where marks are lost.
A cable TV operator connects homes and offices across an entire city. Which type of network is this?
Show answer
Answer: D — MAN
A network spread over a city is a metropolitan area network, and a city-wide cable TV network is the book's own example of one. A LAN stops at a building or campus and a PAN at the devices around one person. A WAN spans countries or continents; calling a single city's network a WAN overshoots the scale.Which device converts a computer's digital signals into analog signals for a telephone line, and back again at the receiving end?
Show answer
Answer: B — Modem
Modem stands for modulator–demodulator: modulation turns digital data into an analog signal for the line and demodulation reverses it. A repeater regenerates a weakened signal without changing its kind, a switch forwards frames within a LAN, and an RJ45 connector is a passive plug at the end of an Ethernet cable.Which statement correctly distinguishes a hub from a switch?
Show answer
Answer: B — A hub sends incoming data to all its ports; a switch sends it only to the intended device
Both join the devices of one LAN; the difference is delivery. A hub copies every frame to every port, so all devices share the bandwidth, while a switch reads the destination MAC address and sends the frame to one port. Forwarding by IP address between networks is a router's job, regeneration is a repeater's, and digital-to-analog conversion is a modem's.Six computers are to be connected in a full mesh topology. How many dedicated links are required?
Show answer
Answer: C — 15
Each computer connects to the other five, but every link joins two computers and would otherwise be counted twice, so the total is 6 × 5 / 2 = 15. Thirty counts each link from both ends, and 36 multiplies 6 by 6 as if a computer linked to itself. Six links would be enough only for a ring.Which statement about a MAC address is correct?
Show answer
Answer: C — It is 48 bits long, and its first three bytes identify the manufacturer
A MAC address is the 48-bit physical address fixed in the network card, with the first three bytes naming the manufacturer and the last three set by it for that card. The 32-bit address that changes from network to network is an IPv4 address, and 128 bits in eight hexadecimal groups is IPv6. DNS servers translate names into IP addresses and assign nothing.Which of the following is a valid IPv4 address?
Show answer
Answer: A — 192.168.10.255
An IPv4 address is 32 bits written as exactly four numbers, each from 0 to 255 because each is one byte; 192.168.10.255 meets both rules. 256 is too large for a single byte. 192.168.1 has only three parts, giving 24 bits, and 10.0.0.0.1 has five parts, more than 32 bits allow.Assertion (A): IPv6 addresses are written as groups of hexadecimal digits separated by colons. Reason (R): IPv6 was introduced because the 32-bit address space of IPv4 was running out.
Show answer
Answer: B — Both A and R are true, but R is not the correct explanation of A
Both statements are facts: IPv6 addresses are written in eight colon-separated hexadecimal groups, and IPv6 was created because 32 bits could not supply enough addresses. But R explains why IPv6 exists and why its addresses are longer (128 bits), not why they are written in hexadecimal with colons — that is a notation chosen to keep 128 bits readable. So R does not explain A.When a user types a website's domain name into a browser, what does the Domain Name System (DNS) do?
Show answer
Answer: D — It translates the domain name into the IP address of the web server
Computers locate a server by its IP address, so the name must first be looked up; a DNS server returns the matching IP address and only then can the browser connect. Encryption is the job of HTTPS, a MAC address is fixed in the network card and never assigned by DNS, and DNS keeps name-to-address records, not copies of pages.