Class 12Computer Science · Computer NetworksFull chapter

Topologies, Protocols and Web Services

The whole chapter in one place — read it, then test yourself. Clear notes, a reference sheet, a practice quiz, and worked NCERT solutions & PYQs.

Types of Networks: PAN, LAN, MAN, WAN

Quick answer Networks are classified by the geographical area they cover — PAN around one person, LAN inside a building, MAN across a city, WAN across countries — and that area decides who owns the network, how fast it is and what it costs.

A computer network is two or more computing devices connected together so they can exchange data and share resources such as files, printers and an internet connection. Each device on a network is called a node.

The standard way to classify networks is by geographical spread. This is not just a naming exercise. As the area grows, three things change together, and the board expects you to know why:

  • The owner changes. A small network is owned by one person or one organisation. A large one has to cross public land, so it must rent lines from telecom companies.
  • The speed usually falls, because signals travel further and pass through more intermediate devices.
  • The cost and error rate rise, for the same reason.

PAN (Personal Area Network) is the smallest, organised around a single person, typically within about 10 metres. Your phone connected to wireless earbuds, a smartwatch syncing to that phone, or a laptop using the phone's hotspot — all PANs. The usual technologies are Bluetooth, infrared and USB. It is owned by the individual and needs no administrator.

LAN (Local Area Network) covers one building or one campus — a school computer lab, an office floor, a college hostel. Its defining feature is that the organisation owns the cabling itself, so it can install as much bandwidth as it likes. That is why a LAN is the fastest and most reliable of the four, and why file transfer inside your lab feels instant. Technologies are Ethernet (wired) and Wi-Fi (wireless).

MAN (Metropolitan Area Network) spans a city, of the order of tens of kilometres. It is normally built by joining several LANs together. Classic examples are a cable TV network across a city, and a bank connecting all its branches within Pune to one another. A MAN usually belongs to a single large organisation or to an Internet Service Provider, and it often has to use public rights of way, so it is costlier per node than a LAN.

WAN (Wide Area Network) spans countries and continents. The Internet is the largest WAN in existence. No single body owns it — it is thousands of networks agreeing to interconnect. It runs on leased telephone lines, undersea optical fibre and satellite links. Because data crosses many routers belonging to many operators, a WAN has the highest delay and the highest error rate of the four.

FeaturePANLANMANWAN
Area coveredAbout 10 m, one personA building or campusA city (tens of km)Country, continent, globe
Owned byThe individualOne organisationOne organisation or an ISPMany operators, no single owner
SpeedLowHighestModerateLowest
Error rateLowLowestModerateHighest
Typical mediumBluetooth, infrared, USBEthernet cable, Wi-FiOptical fibre, coaxial cableLeased lines, fibre, satellite
ExamplePhone to earbudsSchool computer labCable TV across PuneThe Internet

Worked example — classify each situation and justify it. The board asks this as a one-line scenario, and the marks are for the reason, not the label.

SituationTypeWhy
Ananya's laptop prints to a Bluetooth printer on her own deskPANBoth devices belong to one person and are within a few metres
All 60 computers in a school's two labs share one printer and one serverLANSingle campus, cabling owned by the school
A hospital links its four branches across Nagpur on its own fibreMANSeveral LANs joined within one city, one owner
A student in Chennai opens a website hosted in GermanyWANData crosses countries over networks owned by many operators

Worked example — watching the WAN actually work. Domain names were resolved to IP addresses from a machine in India. Each of these servers sits in a different network, and every one of them is reached over the WAN:

cbseacademic.nic.in    -> 164.100.230.217
www.nic.in             -> 23.58.95.96, 23.58.95.125
www.google.co.in       -> 142.251.221.99

Look at the middle line. One name answered with two addresses at once. That is not an error: a busy site runs several servers and publishes an address for each, so visitors are spread across them. If you run this lookup yourself, the numbers for the large sites will very likely differ from the ones printed here, because they change over time and from place to place. The name is stable; the address behind it need not be — which is exactly why we type names instead of numbers.

PAN range ≈ up to 10 m, one person's devices Bluetooth, infrared, USB. Owned by the individual; no administrator needed.
LAN range ≈ one room to one campus Fastest and lowest error rate of the four, because the cabling is privately owned.
MAN range ≈ one city (tens of km) Built by interconnecting several LANs. Cable TV network is the standard example.
WAN range = country / continent / globe The Internet is the largest WAN. No single owner; uses leased lines, fibre, satellite.
Order to memorise PAN < LAN < MAN < WAN As the area grows, speed falls and cost plus error rate rise. This one line answers most comparison questions.
Node any device connected to the network Computers, printers, phones and servers are all nodes. Used in every topology definition.
Remember
  • Networks are classified by geographical area: PAN < LAN < MAN < WAN.
  • A LAN is the fastest and most reliable because the organisation owns its own cabling and can install as much bandwidth as it wants.
  • The Internet is the largest WAN; no single organisation owns it.
  • As area grows, speed falls while cost and error rate rise — state this reason, not just the label, in scenario questions.
  • A MAN is usually built by connecting several LANs across one city.

Network Topologies: Bus, Star and Tree

Quick answer Topology is the physical arrangement of nodes and cables — Bus hangs every node off one backbone, Star gives every node its own cable to a central switch, and Tree stacks stars onto a backbone in a hierarchy.

Network topology is the arrangement or layout in which the nodes of a network are physically connected to one another. Choosing a topology is really a decision about a trade-off: how much cable am I willing to buy, and how much of the network am I willing to lose when one thing breaks? Keep that sentence in mind — it answers almost every topology question.

Your syllabus lists only Bus, Star and Tree. Ring and Mesh topologies exist and you may have seen them in older books, but they are not part of the CBSE 2025-26 Unit 2 scope, so do not spend answer time on them.

Bus topology connects every node to a single common cable called the backbone or bus. A node sends its signal onto the backbone and the signal travels in both directions; every node sees it, but only the node with the matching address accepts it. Both ends of the backbone carry a terminator, a small resistor that absorbs the signal when it reaches the end. Without terminators the signal bounces back down the cable and collides with new data — this is why a missing terminator is a favourite exam detail.

  • Advantages: uses the least cable, so it is the cheapest to install; simple to understand; easy to extend a small network by joining another length of cable.
  • Disadvantages: a break anywhere in the backbone brings down the whole segment; faults are hard to locate because there is no central point to test from; only one node can transmit at a time, so performance drops sharply as nodes are added.

Star topology connects every node by its own dedicated cable to a central device — a hub or, in any modern network, a switch. Nothing travels directly between two nodes; everything passes through the centre. This is by far the most common topology in real school and office LANs.

  • Advantages: if one node's cable breaks, only that node goes offline and the rest keep working; adding or removing a node does not disturb anyone else; fault finding is easy because every cable ends at one place; the switch can send data only to the intended node, so several conversations run at once.
  • Disadvantages: needs much more cable than a bus; the central device costs money; and the central device is a single point of failure — if the switch dies, the entire network dies.

Tree topology (also called hierarchical topology) is a combination of bus and star. Several star networks are connected to a common backbone cable, forming levels: a root node at the top, then branches, then the nodes. A school with one switch per lab, all the lab switches wired back to a main school switch, is a tree.

  • Advantages: scales well, because a whole new branch can be added without touching existing branches; suits organisations that are already divided into groups such as blocks or departments; a fault inside one branch is isolated to that branch.
  • Disadvantages: needs the most cable and is the most complex to configure; and it depends on the backbone — if the backbone between branches fails, the branches keep working internally but can no longer talk to each other, splitting the network into islands.
PointBusStarTree
LayoutOne backbone, all nodes tap itAll nodes to one central switchStars joined to a backbone
Cable neededLeastMoreMost
CostLowestModerateHighest
One node cable failsThat node onlyThat node onlyThat node only
Central point failsBackbone break kills the segmentSwitch failure kills the networkBackbone failure splits it into islands
Fault findingDifficultEasyModerate
Best suited toSmall, cheap, temporary setupsA single lab or officeA campus with several blocks

Worked example — putting a number on the trade-off. Take one lab of 20 computers standing in a row, 3 m apart, with a 2 m drop from each desk down to the cabling, and the switch standing at one end of the row. Compare the cable a bus needs against the cable a star needs, and compare what one broken cable costs you:

nodes = 20, spacing = 3 m, drop = 2 m, switch at one end of the row

BUS  : backbone 19 x 3 = 57 m  +  20 drops x 2 m  =  97 m
STAR : 20 separate runs back to the switch        = 610 m
STAR uses 6.3x the cable of BUS

one backbone break in BUS    -> up to 20 nodes affected
one drop-cable break in STAR -> 1 node affected
central switch fails in STAR -> 20 nodes affected

Read the two halves together, because that is the whole lesson. The star costs about six times the cable, and in exchange a broken cable takes down one machine instead of twenty. Schools and offices happily pay that six times, because cable is bought once but a dead lab costs a period every time. The one risk the star does not remove is the switch itself, which is why the switch is the thing you keep a spare of.

One practical note on that 610 m: it assumes the switch sits at one end of the row, which is the worst case. Move the switch to the middle of the row and the same twenty machines need only about 340 m. Where you put the central device changes the bill substantially, which is why wiring cupboards are placed centrally in real buildings.

Bus topology one backbone cable + a terminator at each end Terminators absorb the signal so it does not reflect back and corrupt new data. A missing terminator is a classic exam trap.
Star topology every node → central hub or switch One node cable fails = 1 node down. Central device fails = whole network down.
Tree topology backbone + several stars in a hierarchy Bus and star combined. Backbone failure does not kill branches, it isolates them from each other.
Cable needed Bus < Star < Tree Star needs n cables for n nodes; bus reuses one backbone. Quote this ordering in any 'which is cheapest' question.
Single point of failure Bus → backbone · Star → central switch · Tree → backbone Name the exact component. 'The network fails' alone will not earn the mark.
Not in this syllabus Ring, Mesh CBSE 2025-26 Unit 2 names only Bus, Star and Tree. Do not write about Ring unless asked.
Remember
  • Topology is the physical arrangement of nodes; choosing one trades cable cost against how much of the network a single failure destroys.
  • Bus uses the least cable but a backbone break kills the whole segment; terminators at both ends absorb the signal and prevent reflection.
  • Star costs far more cable (about 6x in the worked example) but confines a cable fault to one node — its weakness is the central switch, a single point of failure.
  • Tree is a combination of bus and star: stars connected to a common backbone in a hierarchy, ideal for a campus of several blocks.
  • Ring and Mesh are NOT in the CBSE 2025-26 Unit 2 scope — only Bus, Star and Tree.

Network Protocols and Their Ports

Quick answer A protocol is the agreed set of rules for communication; the nine named in the syllabus each solve one job — moving pages, files, mail, voice or a login session — and most listen on a fixed, memorisable port number.

A protocol is a set of rules that governs how data is exchanged between devices on a network. Both sides must follow the same rules — the format of the message, the order in which messages are sent, and what to do when something goes wrong. Two computers with perfectly good cabling between them cannot communicate if they do not agree on a protocol.

A port number is a 16-bit number that identifies which program on a machine a message is meant for. The IP address gets the data to the right computer; the port number gets it to the right application on that computer. Well-known services use fixed port numbers so a client knows where to knock without being told.

Your syllabus names nine protocols. Learn each one's full form, its job, and its port where it has a standard one.

1. HTTP — HyperText Transfer Protocol (port 80). The rules by which a web browser asks a web server for a page and the server replies. It works on a request-response cycle and is stateless: the server does not remember you between two requests, which is why websites need cookies or sessions to keep you logged in.

2. HTTPS — HyperText Transfer Protocol Secure (port 443). This is ordinary HTTP wrapped inside an encryption layer called SSL/TLS. The content is the same; what changes is that anyone intercepting the traffic sees only scrambled bytes. The server also presents a digital certificate issued by a Certifying Authority, which proves it really is the site it claims to be. The padlock in the address bar means both of these succeeded. Use HTTPS for anything involving passwords, banking or personal data.

3. FTP — File Transfer Protocol (port 21 for control, port 20 for data). Used to upload and download files between a client and a server — for example, a web developer copying finished pages up to a hosting server. FTP is unusual in using two connections: commands such as 'list this folder' travel on port 21, while the file contents travel separately on port 20. Anonymous FTP lets the public download files without an account.

4. SMTP — Simple Mail Transfer Protocol (port 25). The protocol for sending mail: it pushes a message from your mail client to your mail server, and onward from one mail server to another. Remember it as a push protocol — it moves mail away from you.

5. POP3 — Post Office Protocol version 3 (port 110; port 995 when encrypted). The protocol for receiving mail: it pulls messages from your mail server down to your device. In its default behaviour POP3 downloads the mail and deletes it from the server, so the message then exists only on that one device. Remember it as a pull protocol.

6. TELNET (port 23). Lets you log in to a remote computer over the network and use it through a text terminal, as though you were sitting at it. Its fatal flaw is that it sends everything — including your password — as plain, unencrypted text, so anyone capturing the traffic can read it. For this reason TELNET has been replaced in real use by SSH, which does the same job with encryption.

7. PPP — Point-to-Point Protocol. A data link layer protocol that connects exactly two nodes over a direct link, such as a dial-up modem line or a DSL connection. It handles authentication (checking your username and password with the ISP), error detection, and carrying several different network-layer protocols over the one link. Because PPP works below the transport layer, it has no port number at all — port numbers only exist for TCP and UDP. This is a favourite trick question.

8. TCP/IP — Transmission Control Protocol / Internet Protocol. Not one protocol but the suite the entire Internet is built on, so it has no single port of its own. The two halves do different jobs:

  • TCP is connection-oriented and reliable. It breaks a message into numbered packets, sends them, waits for an acknowledgement for each, retransmits anything lost, and reassembles the packets in the correct order at the other end.
  • IP handles addressing and routing — giving every machine an IP address and deciding which path each packet takes. IP is connectionless and best-effort: it will try to deliver a packet but makes no promise, which is exactly why TCP's checking is needed on top.

9. VoIP — Voice over Internet Protocol. A technology that carries voice as digital packets over an IP network instead of over the traditional telephone circuit. Your voice is sampled, digitised, compressed and sent as packets. WhatsApp calls, Google Meet and Skype all use VoIP. It is much cheaper than a conventional trunk call because it uses the internet connection you already pay for. VoIP has no single fixed port: call setup commonly uses SIP on port 5060 (5061 when encrypted), while the audio itself flows over RTP on ports chosen dynamically for each call.

ProtocolFull formUsed forPort
HTTPHyperText Transfer ProtocolFetching web pages80
HTTPSHyperText Transfer Protocol SecureFetching web pages, encrypted443
FTPFile Transfer ProtocolUploading and downloading files21 control, 20 data
SMTPSimple Mail Transfer ProtocolSending email25
POP3Post Office Protocol version 3Receiving email110 (995 encrypted)
TELNETTerminal NetworkRemote login, text terminal23
PPPPoint-to-Point ProtocolDirect link between two nodesNone — data link layer
TCP/IPTransmission Control Protocol / Internet ProtocolThe Internet's core suiteNone — it is a suite
VoIPVoice over Internet ProtocolVoice calls over the internetNo fixed port (SIP 5060/5061)

Worked example — the ports are real, so let us knock on them. Connecting to each service on its standard port makes the server answer in its own protocol. These are the actual replies received:

FTP control     ftp.gnu.org:21    -> 220 GNU FTP server ready.
SMTP            smtp.gmail.com:25 -> 220 smtp.gmail.com ESMTP ... gsmtp
POP3 over SSL   pop.gmail.com:995 -> +OK Gpop ready for requests
POP3 plain      pop.gmail.com:110 -> blocked / no reply

Notice three things. FTP and SMTP both greet with the code 220, meaning 'service ready' — that numeric-reply style is part of what makes them protocols rather than free conversation. POP3 answers +OK instead, its own way of saying the same thing. And plain POP3 on port 110 gave no reply at all while the encrypted version on 995 worked: major mail providers now switch the unencrypted port off, the same shift that pushed HTTP towards HTTPS and TELNET towards SSH.

Worked example — HTTP is readable, HTTPS is not. An HTTP request was sent to a real web server on port 80. Both the request and the reply cross the network as ordinary text that anybody in between could read:

GET / HTTP/1.0
Host: example.com

HTTP/1.1 200 OK
Date: Fri, 21 Aug 2026 15:21:41 GMT
Content-Type: text/html
Connection: close
Server: cloudflare

The same kind of request was then made over HTTPS on port 443. Before any web data moved, the two sides negotiated encryption and the server proved its identity with a certificate:

TLS version negotiated : TLSv1.3
cipher                 : TLS_AES_128_GCM_SHA256
certificate issued to  : www.python.org
certificate issued by  : GlobalSign nv-sa

HTTP/1.1 200 OK

The final line is identical in both cases — HTTP/1.1 200 OK — which proves the point that HTTPS is not a different language. It is the very same HTTP, carried inside a TLS envelope, with a certificate from a Certifying Authority (here GlobalSign) vouching for who the server is.

HTTP / HTTPS 80 / 443 TCP port · HTTPS = HTTP + SSL/TLS encryption + digital certificate. Same protocol underneath.
FTP 21 (control) and 20 (data) TCP port · The only syllabus protocol using two ports: commands on 21, file contents on 20.
SMTP — sending 25 TCP port · Push protocol: moves mail from you to a server and between servers.
POP3 — receiving 110 (995 when encrypted) TCP port · Pull protocol: downloads mail and by default deletes it from the server.
TELNET 23 TCP port · Remote login as a text terminal. Sends the password unencrypted — replaced by SSH in practice.
No port number PPP · TCP/IP · VoIP PPP is data link layer (ports exist only for TCP/UDP); TCP/IP is a suite; VoIP picks ports per call (SIP 5060/5061).
Remember
  • A protocol is a set of rules for communication; a port number identifies which application on a machine the data is for.
  • Ports to memorise: HTTP 80, HTTPS 443, FTP 21 control and 20 data, SMTP 25, POP3 110, TELNET 23.
  • PPP, TCP/IP and VoIP have no fixed port — PPP is a data link layer protocol, TCP/IP is a whole suite, and VoIP picks ports per call.
  • SMTP sends mail (push), POP3 receives mail (pull) and by default deletes it from the server after download.
  • HTTPS is HTTP inside SSL/TLS encryption plus a digital certificate proving the server's identity; TELNET sends even passwords in plain text, which is why SSH replaced it.

Web Services: WWW, HTML and XML

Quick answer The WWW is the service of linked hypertext documents running on top of the Internet; HTML marks up a page for display using a fixed tag set, while XML stores and carries data using tags you invent yourself and rules that are strictly enforced.

The World Wide Web (WWW) is a vast collection of interlinked documents and resources, identified by URLs and accessed over the Internet using HTTP. It was proposed in 1989 by Tim Berners-Lee at CERN, the European particle physics laboratory.

The single most commonly examined idea here is this: the Internet and the WWW are not the same thing. The Internet is the physical network — the cables, fibre, routers and satellites, plus the addressing that ties them together. The WWW is one service that runs on top of that network. Email, VoIP calls and file transfer are other services on the same Internet, and none of them is the Web. So: the Internet is the road; the WWW is one kind of traffic on it.

What makes the Web a web is hypertext — text containing links that jump you to another document anywhere in the world. The documents are written in HTML.

HTML (HyperText Markup Language) is the language used to create web pages. It is a markup language, not a programming language: it has no variables, no loops and no decisions. It works by wrapping content in tags that tell the browser what each piece of content is and how to present it. Its defining features:

  • The tag set is fixed and predefined. You may use only the tags the standard defines — p, table, h1 and so on. You cannot invent student, because no browser would know what to do with it.
  • It is not case-sensitive.
  • It is forgiving. Leave a tag unclosed and the browser guesses your intent and displays the page anyway.
  • Its purpose is presentation — how information should look to a human reader.

XML (eXtensible Markup Language) looks similar but exists for the opposite purpose. XML is used to store and transport data, especially between two different systems that must agree on the data but may be written in different languages and run on different platforms. Its defining features:

  • Tags are user-defined. This is what 'extensible' means — you invent tags that describe your data, such as student, marks or city. The document becomes self-describing.
  • It is case-sensitive: Name and name are two different elements.
  • It is strict. An XML document must be well-formed or it is rejected outright: exactly one root element, every opening tag closed, tags properly nested, and every attribute value in quotes.
  • Its purpose is data, not display. XML by itself says nothing about fonts or colours.

Worked example — the same two files, side by side. First an HTML page that displays a mark list. Every tag in it is a standard HTML tag:

<!DOCTYPE html>

Class XII-A Marks

  Class XII-A - Computer Science
  <table>
    <tr><th>Roll</th><th>Name</th><th>Marks</th></tr>
    <tr><td>12</td><td>Ananya Iyer</td><td>92</td></tr>
    <tr><td>17</td><td>Rohit Deshmukh</td><td>85</td></tr>
  </table>
  <p>Total: 177</p>

Listing the tags this file actually uses confirms they are all borrowed from HTML's fixed vocabulary — none was invented:

tags used in marks.html: ['b', 'body', 'h2', 'head', 'html', 'p',
                          'table', 'td', 'th', 'title', 'tr']

Now the same information as XML. Notice that class, student, name, city and marks are tags invented for this data — they exist nowhere in any standard:

<?xml version="1.0" encoding="UTF-8"?>

  
    Ananya Iyer
    Chennai
    92
  
  
    Rohit Deshmukh
    Pune
    85
  

Because those tags describe the data, a program can pull meaning straight out of the file. Reading the XML above and extracting the fields gives:

root tag  : class | attribute name = XII-A
roll 12: Ananya Iyer, Chennai, CS = 92
roll 17: Rohit Deshmukh, Pune, CS = 85
total marks: 177

The HTML file contains the same marks, but they are trapped inside td cells that mean only 'a box in a table'. The XML file says which number is a mark and whose it is, so the total could be computed automatically. That is the real difference: HTML describes appearance, XML describes meaning.

Worked example — proving XML is strict and HTML is not. Take one badly written fragment, with p never closed and a br that has no closing tag, and feed it to both parsers. As XML it is fatally rejected:

input: <p>Ananya Iyer<br>Chennai

XML  : ParseError: no element found: line 1, column 25
HTML : start tag: p
       text     : Ananya Iyer
       start tag: br
       text     : Chennai

Same characters, opposite outcomes. The browser shrugs and shows the text; the XML parser refuses to produce anything at all. Case sensitivity behaves the same way — closing Name with /name is fine in HTML but fatal in XML:

HTML:     -> all three read as the same tag: body
XML : Ananya
      -> ParseError: mismatched tag: line 1, column 23

This strictness is a feature, not a nuisance. XML is meant to be exchanged between machines, and a machine that guesses at malformed data will silently produce wrong answers. Better to fail loudly.

BasisHTMLXML
Full formHyperText Markup LanguageeXtensible Markup Language
PurposeTo display data — presentationTo store and transport data
TagsFixed, predefinedUser-defined
Case sensitivityNot case-sensitiveCase-sensitive
Error handlingForgiving; browser still rendersStrict; must be well-formed or rejected
Closing tagsSome may be omittedEvery tag must be closed
Internet vs WWW Internet = the network · WWW = a service on it The one-line answer to a very common 1-mark question. Email and VoIP are other services on the same Internet.
HTML page skeleton html > head > title, then html > body DOCTYPE first, then html containing head and body. Only predefined tags allowed.
XML declaration Optional, but if present it must be the very first line with nothing before it, not even a space.
Well-formed XML rules one root · every tag closed · properly nested · attributes quoted Break any one and the whole document is rejected. Case must match too: Name closes with /Name.
HTML vs XML in one line HTML describes how data LOOKS; XML describes what data MEANS Write this sentence first in any comparison question, then give the table.
Extensible you invent your own tags in XML This is exactly what the X in XML stands for, and the most-awarded point in the comparison.
Remember
  • The Internet is the physical network; the WWW is one service running on it — email and VoIP are other services on the same Internet.
  • WWW was proposed in 1989 by Tim Berners-Lee at CERN.
  • HTML has a fixed predefined tag set, is not case-sensitive and is forgiving of errors — its job is presentation.
  • XML has user-defined tags, is case-sensitive and must be well-formed — its job is storing and transporting data.
  • The same malformed fragment renders happily in HTML but is fatally rejected by an XML parser; XML fails loudly on purpose, because machines that guess produce wrong answers.

Domain Names, URLs, Websites and Web Hosting

Quick answer Domain names are human-readable stand-ins for IP addresses resolved by DNS; a URL adds protocol, path and query to point at one exact resource, which a browser requests and a web server delivers from space bought as web hosting.

Every computer on the Internet is identified by an IP address, a number such as 164.100.230.217. Numbers are fine for machines and hopeless for people, so we use domain names instead — readable names like cbseacademic.nic.in.

The Domain Name System (DNS) is the service that translates a domain name into its IP address. It runs on port 53. When you type a name into a browser, the browser first asks DNS for the matching IP address, and only then can it contact the server. This lookup is invisible but it happens before every single page you open.

Worked example — a real lookup. Resolving a name returns the address the browser must actually connect to:

lookup : cbseacademic.nic.in
answer : 164.100.230.217

the browser now opens its connection to 164.100.230.217, never to the name itself

Domain names are hierarchical, and you read them right to left, from most general to most specific. Take cbseacademic.nic.in:

  • in is the Top Level Domain (TLD), the rightmost part.
  • nic is the second level domain, the registered name.
  • cbseacademic is a sub-domain of that.

TLDs come in two kinds. Generic TLDs (gTLD) describe the type of organisation: .com commercial, .org organisation, .net network, .edu education, .gov government, .info information. Country code TLDs (ccTLD) identify a country in two letters: .in India, .uk United Kingdom, .jp Japan, .us United States. India's .in domain is administered by the National Internet Exchange of India (NIXI), and you will often meet its combined forms — .co.in for companies, .ac.in for academic institutions, .gov.in and .nic.in for government bodies.

A domain name gets you to a server. To point at one exact resource on that server you need a URL (Uniform Resource Locator) — the complete address of a specific file or page on the Web.

Worked example — breaking a URL into its parts. Take this URL and split it. These are the components an actual URL parser reported for it:

https://www.vidyalaya.edu.in:8080/class12/cs/notes.html?unit=2&topic=networks#protocols

scheme   : https
hostname : www.vidyalaya.edu.in
port     : 8080
path     : /class12/cs/notes.html
query    : unit=2&topic=networks
fragment : protocols

Each part has a name and a job, and the board asks you to identify them:

PartValue hereWhat it does
Protocol / schemehttpsWhich protocol to use to fetch the resource
Sub-domainwwwNames a particular host within the domain
Domain namevidyalaya.edu.inIdentifies the server; DNS turns it into an IP address
Port8080Which program on that server. Omitted when it is the default (80 or 443)
Path/class12/cs/The folder route to the file on the server
File namenotes.htmlThe exact document being requested
Query stringunit=2&topic=networksExtra data passed to the server after a ?, pairs joined by &
FragmentprotocolsA named spot within the page to scroll to, after a #

A website is a collection of related web pages kept under a single domain name, linked to one another and usually reached through a home page. A website is static if every visitor is served the same stored pages, and dynamic if pages are built when requested, so different visitors see different content — your own marks on a results portal, for instance.

A web browser is the client software on your device that requests pages and renders them. It sends the HTTP request, receives the HTML, CSS and JavaScript, interprets them, and draws the page. Common browsers are Google Chrome, Mozilla Firefox, Microsoft Edge, Apple Safari and Opera.

A web server is the server side of that exchange: software (running on a powerful, permanently connected computer) that stores the website's files and delivers them over HTTP or HTTPS whenever a browser asks. Common web server software includes Apache HTTP Server, Nginx and Microsoft IIS. Do not confuse the two — the browser requests, the server responds.

Worked example — web servers name themselves. Every HTTP response can carry a Server header saying which software produced it. Three different real sites were contacted, and they replied:

example.com      -> Server: cloudflare
www.python.org   -> server: nginx
ftp.gnu.org      -> Server: Apache/2.4.52

That is direct evidence of the client-server model: three separate machines running three different web server programs, all answering the same HTTP request that any browser would send.

Web hosting is the service of renting space and bandwidth on a web server so that your website stays available on the Internet 24 hours a day. You could in principle run a server from home, but it would need a permanent connection, a fixed IP address, backup power and constant security patching — so almost everybody rents instead. The main types, cheapest first:

  • Shared hosting — many websites share one physical server and its resources. Cheapest, and fine for a school or small business site, but a busy neighbour can slow you down.
  • VPS (Virtual Private Server) hosting — one physical server is divided into isolated virtual machines, each with guaranteed resources. Costlier, but a neighbour's traffic cannot affect you.
  • Dedicated hosting — an entire physical server is rented by you alone. Maximum control and performance, highest cost.
  • Cloud hosting — the site runs across a pool of servers and can grow or shrink with demand, so a sudden rush (a results day, say) is absorbed automatically.
  • Colocation — you own the server hardware but keep it in a provider's data centre for their power, cooling and connectivity.
URL general form protocol://sub.domain.tld:port/path/file?query#fragment Port is omitted when it is the default (80 for http, 443 for https). Query starts at ?, fragment at #.
Domain hierarchy read right to left: TLD ← second level ← sub-domain In cbseacademic.nic.in: in is the TLD, nic the second level domain, cbseacademic the sub-domain.
Indian TLDs .in · .co.in · .ac.in · .gov.in · .nic.in .in is India's ccTLD, administered by NIXI. .ac.in marks an academic institution, .gov.in a government body.
DNS domain name → IP address, on port 53 Happens before every page load. Remember the direction: name in, address out.
Browser vs web server browser = client (requests) · web server = software (responds) Examples: Chrome/Firefox/Edge are browsers; Apache/Nginx/IIS are web servers. Never swap these in an answer.
Web hosting types shared < VPS < dedicated (by cost and control) Shared means many sites on one server; dedicated means the whole server is yours. Cloud hosting scales with demand.
Remember
  • DNS (port 53) translates a human-readable domain name into the IP address a browser must actually connect to.
  • Domain names are hierarchical and read right to left: TLD, then second level domain, then sub-domain.
  • TLDs are generic (.com, .org, .edu) or country code (.in for India, administered by NIXI); .ac.in is academic and .gov.in government.
  • A URL names one exact resource: protocol, domain, optional port, path, file name, optional query string after ? and fragment after #.
  • The browser is the client that requests and renders; the web server is the software that stores and delivers pages. Web hosting is renting space on such a server.

The formula sheet

Every formula in this chapter, in one place — screenshot it before your exam.

range ≈ up to 10 m, one person's devices
PAN
range ≈ one room to one campus
LAN
range ≈ one city (tens of km)
MAN
range = country / continent / globe
WAN
PAN < LAN < MAN < WAN
Order to memorise
any device connected to the network
Node
one backbone cable + a terminator at each end
Bus topology
every node → central hub or switch
Star topology
backbone + several stars in a hierarchy
Tree topology
Bus < Star < Tree
Cable needed
Bus → backbone · Star → central switch · Tree → backbone
Single point of failure
Ring, Mesh
Not in this syllabus
80 / 443
HTTP / HTTPSTCP port
21 (control) and 20 (data)
FTPTCP port
25
SMTP — sendingTCP port
110 (995 when encrypted)
POP3 — receivingTCP port
23
TELNETTCP port
PPP · TCP/IP · VoIP
No port number
Internet = the network · WWW = a service on it
Internet vs WWW
html > head > title, then html > body
HTML page skeleton
XML declaration
one root · every tag closed · properly nested · attributes quoted
Well-formed XML rules
HTML describes how data LOOKS; XML describes what data MEANS
HTML vs XML in one line
you invent your own tags in XML
Extensible
protocol://sub.domain.tld:port/path/file?query#fragment
URL general form
read right to left: TLD ← second level ← sub-domain
Domain hierarchy
.in · .co.in · .ac.in · .gov.in · .nic.in
Indian TLDs
domain name → IP address, on port 53
DNS
browser = client (requests) · web server = software (responds)
Browser vs web server
shared < VPS < dedicated (by cost and control)
Web hosting types

Test yourself

Tap an answer to check it instantly — you'll see why it's right, and what to revise if it isn't.

0 correct · 0/12 answered
Q1

Rohit's smartwatch syncs step data to his phone over Bluetooth, and the same phone streams music to his wireless earbuds. What type of network is this?

Q2

A cooperative bank connects all fourteen of its branches spread across the city of Pune using its own optical fibre. Which type of network has it built?

Q3

In which topology is a terminator required at both ends of the cable, and what does it do?

Q4

A school lab is wired as a star. The cable running to computer number 7 is accidentally cut. What happens?

Q5

Tree topology is best described as:

Q6

A student notices a padlock icon and the address beginning with https:// while paying school fees online. Which port is this connection using by default, and what does the padlock indicate?

Q7

Which statement about FTP is correct?

Q8

Ananya composes an email in her mail client and presses Send. Later she opens the client again and her new messages are downloaded to her laptop and removed from the server. Which two protocols were used, in that order?

Q9

Which of the following protocols does NOT have a port number, and why?

Q10

A family in Jaipur talks to relatives in Dubai using a WhatsApp voice call instead of a trunk call. Which technology is being used, and why is it cheaper?

Q11

Which single statement correctly distinguishes XML from HTML?

Q12

In the URL https://www.school.edu.in/results/class12.html?roll=45, which part must DNS resolve into an IP address before the browser can open a connection?

NCERT solutions & previous-year questions

Step-by-step model answers — tap a question to reveal the full solution.

NCERT questions 6

1 What is meant by network topology? Explain bus topology, listing two advantages and two disadvantages.Network topologies

Network topology is the physical arrangement or layout in which the nodes of a network are connected to one another by transmission media.

Bus topology connects all nodes to a single common cable known as the backbone or bus. When a node transmits, the signal travels along the backbone in both directions and every node receives it, but only the node whose address matches accepts the data. A terminator is fitted at each end of the backbone to absorb the signal on arrival, preventing it from reflecting back along the cable and corrupting fresh data.

Advantages

  1. It requires the least cable of all topologies, making it the cheapest to install.
  2. It is simple in design and a small network is easy to extend by adding another length of cable.

Disadvantages

  1. A break anywhere in the backbone brings down the entire segment, since all nodes depend on that one cable.
  2. Fault detection is difficult because there is no central point from which to test, and performance falls sharply as more nodes are added since only one node can transmit at a time.
2 Differentiate between LAN, MAN and WAN on the basis of area covered, ownership and speed, giving one example of each.Types of networks
BasisLANMANWAN
Area coveredOne building or campusOne city, tens of kilometresCountry, continent or the whole world
OwnershipOwned entirely by one organisationOwned by one large organisation or an ISPNo single owner; many operators interconnect
SpeedHighest, with the lowest error rateModerateLowest, with the highest error rate
ExampleA school computer labA cable TV network across a cityThe Internet

Why speed falls as area grows: in a LAN the organisation owns its own cabling and can install as much bandwidth as it wishes, and signals travel only a short distance through very few intermediate devices. Over a MAN and then a WAN, data must cross public rights of way and pass through many routers belonging to many operators, which adds delay and increases the chance of error.

3 What is a protocol? Explain the purpose of HTTP and FTP, giving the port number of each.Network protocols

A protocol is a set of rules that governs the exchange of data between devices on a network. It fixes the format of messages, the order in which they are sent, and the action to be taken when an error occurs. Both communicating devices must follow the same protocol, since correctly wired computers still cannot exchange data if they do not agree on the rules.

HTTP — HyperText Transfer Protocol, port 80. HTTP defines how a web browser requests a web page from a web server and how the server sends its reply. It works on a request-response cycle and is stateless, meaning the server retains no memory of a client between two separate requests; this is why websites use cookies or sessions to keep a user logged in.

FTP — File Transfer Protocol, port 21 for control and port 20 for data. FTP is used to upload and download files between a client and a server, for instance when a developer copies completed web pages up to a hosting server. Unlike HTTP it opens two connections: commands such as listing a directory travel on port 21, while the contents of the files themselves transfer on port 20. Anonymous FTP allows members of the public to download files without holding an account on the server.

4 Distinguish between SMTP and POP3. Why are two different protocols needed for electronic mail?Mail protocols
BasisSMTPPOP3
Full formSimple Mail Transfer ProtocolPost Office Protocol version 3
PurposeSending mailReceiving mail
DirectionPush — moves mail away from the clientPull — brings mail down to the client
Port25110 (995 when encrypted)
Effect on the serverDelivers the message onward to the recipient's serverBy default downloads the mail and deletes it from the server

Why two protocols are needed: sending and receiving mail are genuinely different problems. Sending is a push: your message must be handed to your mail server and then relayed onward to the recipient's server, possibly through several servers, and it must arrive whether or not the recipient is online. Receiving is a pull: the mail is already sitting on your server, and you decide when to collect it. SMTP was designed for delivery between servers, and POP3 for a user's device to collect what has accumulated, so each is optimised for its own task.

5 What is the World Wide Web? Differentiate between HTML and XML with an example of each.WWW, HTML and XML

The World Wide Web (WWW) is a vast collection of interlinked hypertext documents and other resources, identified by URLs and accessed over the Internet using HTTP. It was proposed in 1989 by Tim Berners-Lee at CERN.

The WWW must not be confused with the Internet. The Internet is the physical network of cables, fibre, routers and satellites together with the addressing that links them; the WWW is one service running on top of it. Email and VoIP are other services on the same Internet and are not part of the Web.

BasisHTMLXML
Full formHyperText Markup LanguageeXtensible Markup Language
PurposeTo display data — presentationTo store and transport data
TagsFixed and predefinedDefined by the user
Case sensitivityNot case-sensitiveCase-sensitive
ErrorsForgiving; the browser still renders the pageStrict; must be well-formed or it is rejected

HTML example — every tag used here belongs to HTML's fixed vocabulary:


  
    Class XII-A
    <p>Ananya Iyer scored 92</p>
  

XML example — the tags student, name and marks were invented to describe this particular data:


  Ananya Iyer
  Chennai
  92

Both files contain the mark 92, but in the HTML it sits inside a paragraph that means only 'a line of text to display', while in the XML it sits inside marks, so a program can identify it as a mark and process it. HTML describes how data looks; XML describes what data means.

6 Define domain name, URL and web hosting. Identify the parts of the URL https://www.cbse.gov.in/results/class12.htmlDomain names, URL and web hosting

Domain name: a human-readable name that identifies a server on the Internet, used in place of its numeric IP address. The Domain Name System (DNS), which runs on port 53, translates the domain name into the IP address before the browser can connect. Domain names are hierarchical and read from right to left, from the most general part to the most specific.

URL (Uniform Resource Locator): the complete address of a specific resource on the Web. Where a domain name identifies only the server, a URL identifies one exact page or file on that server, along with the protocol to be used to fetch it.

Web hosting: the service of renting space and bandwidth on a web server so that a website remains available on the Internet at all times. The provider supplies the permanent connection, fixed IP address, backup power and security maintenance that would otherwise have to be arranged privately. Common types are shared, VPS, dedicated, cloud and colocation hosting.

Parts of the given URL

PartValueFunction
ProtocolhttpsThe protocol used to fetch the resource, here HTTP secured with SSL/TLS
Sub-domainwwwNames a particular host within the domain
Domain namecbse.gov.inIdentifies the server; gov is the second level domain and in the country code TLD for India
Path/results/The folder route to the file on the server
File nameclass12.htmlThe exact document requested

No port number appears in this URL. That is because HTTPS uses port 443 by default, and a default port is always omitted.

Previous-year board questions 4

Q1 (a) Expand the following terms: (i) VoIP (ii) SMTP (iii) PPP. (b) Give the default port numbers of HTTPS and TELNET. (c) Name one protocol from the list above that has no port number and state why. [1 + 1 + 1 = 3 marks] Recurring board pattern

(a) Expansions — 1 mark for all three correct

  • VoIP — Voice over Internet Protocol
  • SMTP — Simple Mail Transfer Protocol
  • PPP — Point-to-Point Protocol

(b) Default port numbers — 1 mark

  • HTTPS — port 443
  • TELNET — port 23

(c) Protocol without a port number — 1 mark

PPP has no port number. Port numbers are assigned only at the transport layer, to TCP and UDP services, so that data can be directed to the correct application on a machine. PPP operates at the data link layer, where it connects two nodes directly over a single physical link such as a dial-up or DSL line, so the concept of a port does not apply to it.

Examiner's note: VoIP and TCP/IP would also be accepted in part (c), but with different reasons — VoIP has no single fixed port because each call negotiates its own, and TCP/IP is a whole suite of protocols rather than one service. State the reason, since the mark is for the explanation and not the name.

Q2 Differentiate between HTML and XML, giving any two points of difference. Also state one situation in which XML would be preferred over HTML. [2 + 1 = 3 marks] Recurring board pattern

Two points of difference — 2 marks, 1 for each complete point

BasisHTMLXML
TagsTags are fixed and predefined by the standard; only these may be usedTags are defined by the user, which is what makes it extensible
PurposeDesigned to display data — it describes presentationDesigned to store and transport data — it describes meaning
Case sensitivityNot case-sensitiveCase-sensitive
Error handlingForgiving; a browser renders the page even if tags are unclosedStrict; the document must be well-formed or it is rejected entirely

Any two of the above rows earn full marks.

Situation where XML is preferred — 1 mark

When data must be exchanged between two different software systems that may be written in different languages and run on different platforms. For example, when a school's examination software has to send student results to a government portal, XML is used because its user-defined tags such as roll, name and marks make the file self-describing, so the receiving program can identify each value and process it. HTML could show the same results on screen, but the numbers would sit inside presentation tags such as td, which convey only 'a cell in a table' and carry no information about what the value means.

Q3 Vidya Educational Institute is setting up its campus in Bengaluru with four blocks — ADMIN, ACADEMIC, HOSTEL and LIBRARY. Distances between the blocks and the number of computers in each are given below.Distances: ADMIN to ACADEMIC 55 m; ADMIN to HOSTEL 130 m; ADMIN to LIBRARY 35 m; ACADEMIC to HOSTEL 90 m; ACADEMIC to LIBRARY 65 m; HOSTEL to LIBRARY 120 m.Number of computers: ADMIN 110, ACADEMIC 75, HOSTEL 12, LIBRARY 40.(i) Suggest the most suitable block to house the server, with reason. (ii) Suggest a suitable cable layout for connecting the blocks. (iii) Name the device required in each block to interconnect the computers. (iv) The institute also wants to connect its Mysuru campus. Which type of network will be formed? (v) Which device is needed if the HOSTEL block is connected directly to ADMIN? [5 marks] Recurring board pattern

(i) Best location for the server — ADMIN block [1 mark]

The ADMIN block houses 110 computers, the largest number of any block. Placing the server where the most computers are located means the greatest share of requests is served within that block and does not have to cross the campus cabling, which reduces network traffic and gives the fastest response for the majority of users.

(ii) Suitable cable layout [1 mark]

Connect the blocks in a star layout centred on ADMIN, since ADMIN holds the server and each block then has its own independent link to it:

  • ADMIN to LIBRARY — 35 m
  • ADMIN to ACADEMIC — 55 m
  • ADMIN to HOSTEL — 130 m

Every block reaches the server directly, and a fault in any one link isolates only that block instead of disconnecting the whole campus. Note that the ADMIN to HOSTEL link at 130 m is the longest of all six distances, which is exactly why part (v) requires a repeater on it.

Alternative accepted answer: a layout that instead runs HOSTEL to ACADEMIC (90 m) uses less cable in total and keeps every link under 100 m, avoiding the repeater altogether. Either answer earns the mark provided the choice is justified.

(iii) Device required in each block — a SWITCH [1 mark]

A switch is installed in each block to interconnect the computers within that block. A switch is preferred to a hub because it forwards data only to the intended recipient rather than broadcasting it to every port, which reduces unnecessary traffic and collisions.

(iv) Type of network formed with the Mysuru campus — WAN [1 mark]

Bengaluru and Mysuru are different cities, so the link extends well beyond a single metropolitan area and a WAN (Wide Area Network) is formed. Had both campuses been within Bengaluru, the answer would have been a MAN.

(v) Device needed for the direct ADMIN to HOSTEL link — a REPEATER [1 mark]

The distance is 130 m. An Ethernet segment over twisted pair cable is reliable only up to 100 m, beyond which the signal weakens through attenuation. A repeater must therefore be placed along this link to regenerate the signal so that it arrives intact.

Q4 (a) Study the URL below and name the parts marked (i) to (iv):https://www.result.nic.in:8080/class12/marks.html?roll=1204(i) https (ii) www.result.nic.in (iii) /class12/marks.html (iv) roll=1204(b) Name the protocol you would use in each situation: (i) transferring a large set of website files to a hosting server; (ii) logging in to a remote computer through a text terminal; (iii) making a voice call over the internet. [2 + 3 = 5 marks] Recurring board pattern

(a) Parts of the URL [2 marks]

Marked partNameFunction
(i) httpsProtocol (or scheme)States which protocol the browser must use to fetch the resource — here HTTP secured with SSL/TLS
(ii) www.result.nic.inDomain name (with www as the sub-domain)Identifies the server; DNS translates it into an IP address
(iii) /class12/marks.htmlPath and file name/class12/ is the folder route on the server and marks.html is the exact document requested
(iv) roll=1204Query stringExtra data passed to the server after the ?, here telling it which roll number's marks to fetch

Note also the :8080 in this URL, which is the port number. A port appears explicitly only when it is not the default, since HTTPS would otherwise use port 443 silently.

(b) Protocol for each situation [3 marks, 1 each]

  1. Transferring website files to a hosting server — FTP (File Transfer Protocol). FTP is designed for uploading and downloading files between a client and a server. It uses port 21 for control commands and port 20 for the file data itself.
  2. Logging in to a remote computer through a text terminal — TELNET, on port 23. TELNET lets a user operate a distant machine as though seated at it. In practice it has been replaced by SSH, because TELNET transmits everything including the password as plain unencrypted text.
  3. Making a voice call over the internet — VoIP (Voice over Internet Protocol). The speaker's voice is digitised, compressed and carried as packets over the IP network instead of over a conventional telephone circuit, which makes long-distance calls far cheaper. VoIP has no single fixed port; call setup commonly uses SIP on port 5060.

Part of Priodemy for School

Interactive CBSE lessons, Class 8–12 — free with every school on Priodemy EduSuite. Explore more chapters and labs on the Priodemy for School hub.

Ask AI