📌 Snapshot
- How computers talk to each other: network types, devices, topologies, addresses and the web, compared in tables.
- Hub versus switch, router versus gateway, MAC versus IP, and the Internet versus the Web, each in one comparison.
- Worked examples: cables needed in mesh, star and bus, checking IP addresses, reading a URL and following a DNS lookup.
- The five topologies with their strengths, weaknesses and what happens when a device fails.
📖 Detailed Notes
Written and reviewed by Rohit Singh, Computer Science & Commerce faculty at UniDrill (MCA, Osmania University · 6 years teaching). Based on NCERT Computer Science Class XII, Chapter 10.
What happens in the half second between typing a web address and seeing the page?
Your phone has no idea where the website lives. It asks a name server for the number behind the name, sends small chunks of data through a router, past an ISP, across regional and national networks, and the answer comes back the same way. Every step is a device or an address that this chapter names: a node, a modem, a switch, a router, a MAC address, an IP address, a DNS server. Learn what each one does and how it differs from its look-alike, because the exam asks exactly those differences.
What is a network?
A computer network is an interconnection of two or more computers or computing devices, so that they can share data and resources such as a printer or storage. The devices on it are called hosts or nodes: servers, desktops, laptops, mobile phones and also networking devices like switches and routers. A node is any device on the network that can receive, create, store or send data along network routes, for example a modem, hub, bridge, switch, router, printer, computer or server.
Data in a network is broken into smaller chunks called packets, which are carried over the network. Devices may be joined by wired media (cables) or wireless media (air). A hotspot made from a smartphone, with a few devices connected, is a small personal network.
How networking grew
| Time | Milestone |
|---|---|
| 1960s | A research project of the US Department of Defence (ARPANET) is started to connect academic and research institutions for scientific collaboration |
| 1969 | ARPANET becomes functional, connecting UCLA and Stanford Research Institute (SRI); the first message is sent between them |
| 1971 | E-mail is developed (the @ symbol comes to mean "at") |
| 1974 | The term "Internet" is coined; first commercial use of ARPANET starts as Telenet |
| Early 1980s | TCP/IP becomes the standard protocol on ARPANET; the Domain Name System is introduced |
| 1986 | The National Science Foundation brings connectivity to more people through NSFNET |
| 1990 | Tim Berners-Lee at CERN develops HTML and URL, giving birth to the World Wide Web |
| 1997 | The first version of the Wi-Fi (802.11) standard is introduced |
Types of networks
Networks are classified by the area they cover and their data transfer rate.
| Feature | PAN | LAN | MAN | WAN |
|---|---|---|---|---|
| Full form | Personal Area Network | Local Area Network | Metropolitan Area Network | Wide Area Network |
| Area covered | About 10 metres around a person | A room, floor, office, school, campus; up to about 1 km | A city or town; up to about 30 to 40 km | Different cities, countries or continents |
| Speed | Short range links | High: 10 Mbps (Ethernet) to 1000 Mbps (Gigabit Ethernet) | Mbps, but considerably lower than LAN | Usually lower than a LAN |
| Medium | Wired (USB) or wireless (Bluetooth, giving a WPAN) | Cables, Ethernet, fibre optic, Wi-Fi | Cables and others | Wired or wireless links between LANs and MANs |
| Examples | Phone to laptop by USB; two smartphones by Bluetooth | School computer lab, office network | Cable TV network, cable based broadband | Banks linking branches worldwide; the Internet |
A LAN is comparatively secure, since only authentic users can reach the shared resources, and it gives fast short range transfer. Many LANs joined together can form a MAN. A LAN joined to other LANs forms a WAN, and the Internet is the largest WAN, connecting billions of computers, smartphones and millions of LANs.
Worked example: why megabits matter. Speeds are given in Mbps, which is megabits per second, not megabytes. 1 byte is 8 bits. How long does a 50 MB file take on a 100 Mbps LAN (ignoring overheads)?
| Step | Working | Result |
|---|---|---|
| Convert size to bits | $50 \times 8$ | 400 megabits |
| Divide by speed | $400 / 100$ | 4 seconds |
The wrong step is dividing 50 by 100 and getting half a second.
Network devices
| Device | What it does | The fact the exam asks |
|---|---|---|
| Modem | MOdulator DEModulator: converts digital data to analog signals at the sender and back to digital at the receiver | A modem sits at both ends of the link |
| Ethernet card (NIC) | Network adapter, a circuit board on the motherboard that sets up a wired network | Supports 10 Mbps to 1 Gbps; each NIC has a unique MAC address |
| RJ45 | Eight pin connector at the end of Ethernet cables | Plugs into the RJ45 jack of the Ethernet card |
| Repeater | Regenerates weakened signals and puts them back on the cable | An analog device; signals fade after about 100 m |
| Hub | Connects devices by wires; data arriving on one line goes out on all the others | Collisions happen if two devices send at once |
| Switch | Reads the destination address of a packet and looks it up in a table, so it sends only to the selected device | Can forward many packets at once; drops noisy or corrupted signals and asks for a resend |
| Router | Receives data, analyses it and passes it to other networks; connects a LAN to the Internet | Can repackage packets (smaller sizes) for a different type of network; may be wired or wireless |
| Gateway | The entry and exit point between a network and the outside world | All traffic in or out passes through it; firewall is usually integrated |
Hub versus switch, the favourite comparison. Suppose computers A, B, C and D are connected, and A sends a packet meant for B.
| Hub | Switch | |
|---|---|---|
| Who receives the packet | B, C and D (all other ports) | Only B |
| Can A and C send at the same time? | No, their data collide | Yes, multiple packets are forwarded at once |
| Handles faulty signals | Passes them on | Drops them and asks the sender to resend |
| How it decides | It doesn't; it broadcasts | Looks up the destination address in a table |
Pause and predict: Four computers are connected to a hub. A sends a packet to B. How many computers other than A receive the packet at their port, and how many would receive it if a switch were used?
Check your answer: Three (B, C, D) with a hub, because it sends the packet out on all other lines. One (B) with a switch, which looks up the destination address and forwards only there.
A home Wi-Fi box is often a modem, router and switch (and wireless access point) in one: it connects to the incoming broadband line from the ISP and turns the signal into digital data your devices can use. A router is generally configured to act as the gateway, though a gateway can be software, hardware or a combination. The router moves packets between networks; the gateway is the doorway a network uses to reach others.
Beyond the textbook. For the exam: a hub broadcasts and a switch forwards to a selected device. In reality: hubs have largely disappeared from homes and offices because switches do the same job without collisions. Today's "star" networks are almost always built around a switch.
Network topologies
The arrangement of computers and other devices in a network is its topology. Five are common.
| Topology | How devices are joined | Strengths | Weaknesses |
|---|---|---|---|
| Mesh | Every device is connected to every other device | Many nodes can send at once; reliable because one failed node does not break the others; more secure since each cable carries different data | Complex wiring, high cost, many redundant connections |
| Ring | Each node connects to two others, one on each side, forming a ring; the link is unidirectional (data goes one way only) | Each node has just two neighbours | Less secure and less reliable |
| Bus | All devices share one backbone wire (the bus); data goes both ways along the bus and any node can receive it | Cheap, easy to maintain | Less secure and less reliable |
| Star | Every device is connected to a central device such as a hub or switch | Effective, efficient and fast; trouble in one device does not affect the rest | If the central device fails, the whole network fails |
| Tree or hybrid | Hierarchical: branches, each of which can be a star, ring or bus; common in WANs linking LANs | Scales to many nodes; data from the source reaches the central device and then each branch | More complex to set up |
The central node of a star can be a broadcasting device (a hub, which sends to all) or a unicast device (a switch, which identifies the destination and sends only to it).
Worked example: how many cables? A computer lab has 5 computers. A fully connected mesh needs $\dfrac{n(n-1)}{2}$ cables for $n$ nodes.
| Topology | Calculation | Cables |
|---|---|---|
| Mesh | $\dfrac{5 \times 4}{2}$ | 10 |
| Star | One cable from each computer to the switch | 5 |
| Bus | One backbone, plus one connection from each computer | 1 backbone and 5 connections |
Doubling to 10 computers makes the mesh need $\dfrac{10 \times 9}{2} = 45$ cables, while a star needs only 10. That growth is why mesh is costly and star is popular.
Pause and predict: In a simple bus network and in a simple ring network, one ordinary computer stops working. Which network is more likely to be disrupted?
Check your answer: The ring. Data in a ring moves one way and passes through the nodes, so a dead node or a broken link can stop the circulation. In a bus, the failed computer simply stops talking, while the shared backbone still connects the rest (a break in the backbone itself would cut the network).
| Situation | Suitable topology | Reason |
|---|---|---|
| A small office where speed and easy fault finding matter | Star | Each device has its own link; one failure leaves the rest running |
| A very small network on a tight budget | Bus | Single shared wire is cheapest |
| A system where continuous operation is critical and cost is secondary | Mesh | Redundant paths keep traffic flowing |
| A company joining several LANs of different kinds | Tree or hybrid | Branches can each use star, ring or bus |
Identifying nodes: MAC and IP addresses
Each node needs a unique identity so that devices can tell who sent data and who should get it.
| Feature | MAC address | IP address |
|---|---|---|
| Full form | Media Access Control address | Internet Protocol address |
| Also called | Physical or hardware address | Logical address on a network using the Internet Protocol |
| Tied to | The network adapter (NIC) | The node's current network |
| Set when | Engraved on the NIC at manufacture | Assigned when the node joins a network |
| Changes? | Permanent | Can change if the node moves to another network |
| Size | 12 hexadecimal digits, 48 bits: first 6 digits (24 bits) are the manufacturer ID (OUI), last 6 digits (24 bits) are the card's serial number | IPv4: 32 bits; IPv6: 128 bits |
The IPv4 address is four numbers separated by periods, each the decimal value of an 8 bit binary number, so each is between 0 and 255. A sample is 192.168.0.178. Since 32 bits give $2^{32} = 4{,}294{,}967{,}296$ addresses, just under 4.3 billion, the supply ran short as more devices came online, and IPv6 was proposed. An IPv6 address is eight groups of hexadecimal numbers separated by colons, for example 2001:CDBA:0000:0000:0000:0000:3257:9652. Eight groups of four hexadecimal digits are 32 digits, and at 4 bits each that is 128 bits.
Worked example: is it a valid IPv4 address?
| Address | Valid? | Reason |
|---|---|---|
| 192.168.0.178 | Yes | Four numbers, each between 0 and 255 |
| 256.10.1.1 | No | 256 is greater than 255, which an 8 bit number cannot hold |
| 192.168.1 | No | Only three numbers; IPv4 needs four |
| 10.0.0.255 | Yes | 255 is the largest allowed value |
Beyond the textbook. For the exam: a MAC address is permanent and cannot be changed. In reality: the number burned into a network card is permanent, but software can present a different one, and many modern phones deliberately use changing "random" addresses on Wi-Fi to make tracking harder. For the exam, the answer is still that the MAC address is permanent. The MAC is the identity of the card, and the IP address is the identity of the node on a particular network.
Beyond the textbook. For the exam: IPv6 is written as eight groups of hexadecimal digits. In reality: long IPv6 addresses are usually shortened by dropping leading zeros and replacing one run of all zero groups by a double colon, so the example above is written 2001:CDBA::3257:9652. The shortening is for people, and the address is still 128 bits.
The Internet, the Web and IoT
The Internet is the global network of computing devices: desktops, laptops, servers, tablets, phones, printers, scanners, routers, switches, gateways, and also smart TVs, ACs, lights, drones, vehicles, door locks and security cameras (the Internet of Things). A computer connects through a modem, wired or wireless, to a local ISP (Internet service provider). ISPs connect to form regional networks, regional networks join into national networks, and national networks together form the Internet backbone.
The World Wide Web (WWW) is a vast collection of interlinked web pages and web resources, accessed through the Internet. It was invented in 1990 by Sir Tim Berners-Lee, who defined three technologies.
| Technology | Full form | Job |
|---|---|---|
| HTML | HyperText Markup Language | Designs standardised web pages so they can be read on any computer |
| URI (URL) | Uniform Resource Identifier (Uniform Resource Locator) | Unique address of each web resource |
| HTTP | HyperText Transfer Protocol | Rules for retrieving linked web pages; HTTPS is the more secure version |
| Feature | Internet | Web |
|---|---|---|
| What it is | The global network of connected computers | The collection of web pages stored on some of those computers |
| Needs | Cables, wireless links, devices | The Internet, HTTP, HTML and URLs |
| Without the other | Can exist without any web page | Cannot be reached without the Internet |
| Examples | Email and video calls use it | Browsing a website |
Worked example: reading a URL. Take http://www.ncert.nic.in/textbook/textbook.htm.
| Part | Value | Meaning |
|---|---|---|
| Protocol | http |
The rules used to fetch the page (HTTPS if secure) |
| Domain name | www.ncert.nic.in |
The name of the server hosting the site |
| Path | /textbook/textbook.htm |
The particular resource on that server |
A URL is not just the domain name. It carries the extra information that completes the web address.
Domain Name System (DNS)
Every server has an IP address, but numbers are hard to remember, so each server is also given a domain name (or hostname) such as wikipedia.org. The DNS works like a phone book: it matches names to numbers. Converting a domain name into its IP address is called domain name resolution, and it is done by a DNS server.
Worked example: following a request.
| Step | What happens |
|---|---|
| 1 | You type www.ncert.nic.in in the browser |
| 2 | HTTP asks a DNS server for the IP address that goes with that name |
| 3 | The DNS server replies with the address (for example 164.100.60.233) |
| 4 | HTTP uses that address to fetch the page, which loads in the browser |
DNS servers are arranged in a hierarchy. At the top are 13 root servers, with other DNS servers below them. A DNS server either holds the IP address for a domain or holds the address of another DNS server where the entry can be found.
Exam traps
| The trap | Why it's tempting | The truth |
|---|---|---|
| "The Internet and the Web are the same." | People use them interchangeably | The Internet is the network; the Web is the pages accessible over it |
| "A repeater is a digital device." | Modern networks are digital | A repeater is an analog device that regenerates signals |
| "A hub sends data only to the destination." | It connects computers like a switch | A hub sends to all other ports; a switch sends to the selected device |
| "The IP address of a node never changes." | MAC address is permanent, so IP seems so too | IP can change when the node joins another network |
| "A fully connected mesh of n nodes needs n cables." | Each node seems to need one | It needs $n(n-1)/2$ cables |
| "In a star network, the failure of any device stops the whole network." | One failure sounds fatal | Only the failure of the central device does that |
| "Mbps means megabytes per second." | Files are measured in MB | Mbps is megabits per second |
| "MAN is the biggest network." | It sounds large | The order is PAN, LAN, MAN, WAN; the Internet is the largest WAN |
60-second revision
| Topic | Lock this in |
|---|---|
| Network | 2 or more devices sharing data and resources; packets; nodes |
| Types | PAN (about 10 m), LAN (up to about 1 km, 10 to 1000 Mbps), MAN (up to about 30 to 40 km, cable TV), WAN (Internet) |
| Modem | Modulator-demodulator: digital to analog and back |
| NIC | Wired adapter with a MAC address; 10 Mbps to 1 Gbps |
| Repeater / hub / switch | Regenerates signal (about 100 m) / broadcasts to all / forwards to the destination only |
| Router / gateway | Connects LAN to Internet, repackages packets / entry and exit point |
| Topologies | Mesh, ring, bus, star, tree (hybrid) |
| Mesh cables | $n(n-1)/2$ |
| MAC | 48 bits, 12 hex digits, first 24 bits OUI, permanent |
| IPv4 / IPv6 | 32 bits, four numbers 0 to 255 / 128 bits, eight hex groups |
| Web technologies | HTML, URI (URL), HTTP (HTTPS) by Tim Berners-Lee in 1990 |
| DNS | Domain name to IP address; 13 root servers at the top |
Where this chapter connects
- Previous: Structured Query Language (SQL) covers how data is stored and queried; this chapter covers how it travels.
- Next: Data Communication goes deeper into bandwidth, switching and transmission media.
- Related: Internet and Web continues the story of DNS and the Web, and Security Aspects looks at protecting networks and the data that crosses them.
🎯 Practice MCQs
First 3 questions free · create a free account to unlock the rest — answers & explanations included, no payment needed
Q1. A network that connects computers in a school campus, up to a distance of about 1 km, with data rates from 10 Mbps to 1000 Mbps, is a
▸ Show answer & explanation
Answer: B
A LAN covers a limited area such as a room, building or campus at high speed. A PAN covers only about 10 metres, a MAN covers a city, and a WAN spreads across cities or countries.
Q2. Cable TV networks and cable based broadband services are examples of
▸ Show answer & explanation
Answer: C
A MAN extends over a city or a town, and cable TV networks are the standard example. The Internet, which links LANs across continents, is the largest WAN.
Q3. The device that converts digital data to analog signals at the sender and analog signals back to digital at the receiver is a
▸ Show answer & explanation
Answer: C
Modem stands for modulator demodulator. A repeater only regenerates signals, a hub forwards data to all ports, and a gateway is the entry and exit point of a network.
🔒 12 more practice MCQs
Create a free account to unlock every MCQ in this chapter — answers and explanations included. No payment needed.
Already registered? Just log in and they'll all appear here.
Q4. Statement I: A switch forwards a packet only to the device whose address matches the destination. Statement II: A hub forwards data arriving on any line to all the other lines. Which is correct?
▸ Show answer & explanation
Answer: C
A switch looks up the destination address in a table and sends only there, whereas a hub broadcasts to every other port. Both statements are correct.
Q5. How many cables are needed to connect 6 computers in a fully connected mesh topology?
▸ Show answer & explanation
Answer: C
A mesh of n nodes needs n times (n minus 1) divided by 2 cables, which is 6 times 5 divided by 2, giving 15. Option D forgets to divide by 2, because each cable joins two computers.
Q6. In which topology does the failure of a single central device bring down the whole network?
▸ Show answer & explanation
Answer: B
Every device in a star is joined to the central hub or switch, so if that device fails no one can communicate. A mesh has redundant paths, and bus and ring have no central device.
Q7. Assertion (A): A MAC address helps identify a machine physically on the network. Reason (R): The MAC address is engraved on the network interface card at the time of manufacture.
▸ Show answer & explanation
Answer: A
The MAC address belongs to the NIC and is fixed at manufacture, so the machine carrying that card can be physically identified. R explains A.
Q8. Which of the following is a valid IPv4 address?
▸ Show answer & explanation
Answer: C
IPv4 needs exactly four numbers separated by periods, each from 0 to 255. Option A has 256, option B has only three numbers and option D has five.
Q9. An IPv6 address is written as
▸ Show answer & explanation
Answer: B
IPv6 has 128 bits, written as eight groups of hexadecimal digits separated by colons. Option A is IPv4, option C describes a MAC address and option D is the size of an IPv4 address in bits.
Q10. Match List I with List II. List I: (i) Repeater (ii) Router (iii) NIC (iv) Gateway. List II: (p) Entry and exit point of a network (q) Regenerates weak signals (r) Carries a MAC address (s) Connects a LAN to the Internet and can repackage packets
▸ Show answer & explanation
Answer: A
A repeater regenerates signals, a router connects a LAN to the Internet, a NIC carries the MAC address and a gateway is the entry and exit point. The other options swap router and gateway, or NIC and repeater.
Q11. What is the job of a DNS server?
▸ Show answer & explanation
Answer: B
Domain name resolution is done by a DNS server, which holds a database of domain names and their IP addresses. It does not assign MAC addresses or host the pages themselves.
Q12. Which statement about the Internet and the Web is correct?
▸ Show answer & explanation
Answer: B
The Internet is the global network of computers, and the Web is the set of interlinked web pages that can be reached over it. The Internet can exist without any web page, but the Web cannot be reached without the Internet.
Q13. Match List I with List II. List I: (i) HTML (ii) URL (iii) HTTP (iv) DNS. List II: (p) Rules to retrieve linked web pages (q) Unique address of a web resource (r) Language to design web pages (s) Domain name to IP address conversion
▸ Show answer & explanation
Answer: A
HTML designs pages, a URL is the address of a resource, HTTP is the set of retrieval rules and DNS translates names into IP addresses. The other options exchange two or more of these roles.
Q14. A repeater is needed in a cabled network because
▸ Show answer & explanation
Answer: A
Signals weaken beyond a certain distance, and a repeater, which is an analog device, regenerates them. Conversion between analog and digital is the work of a modem, and route selection is a router function.
Q15. A school has computers in three labs. Each lab has its own switch with computers attached to it, and the three switches are joined to a main switch. Which topology is described?
▸ Show answer & explanation
Answer: C
A hierarchy of branches, each of which is a star around a switch, is a tree or hybrid topology. A bus has a single backbone, a ring joins each node to two neighbours, and a mesh joins every node to every other node.
📊 Previous-Year Questions
Practise with real CUET Computer Science previous-year papers — every question solved, with the correct answer and a step-by-step explanation.
View solved CUET PYQ papers →Ready to drill Computer Science?
Unlock all MCQs, chapter tests, mocks & PYQs for ₹199/year.
Get UniDrill Pro