VM-LEARNING /class.xii ·track.cs ·ch-2-1 session: 2026_27
$cd ..

~/Computer Networks

root@vm-learning ~ $ open ch-2-1
UNIT 2 ▪ CHAPTER 1
09
Computer Networks
Evolution · Data Communication · Media · Devices · Topologies · Internet · Protocols
A computer network is a group of two or more computers (and other devices) connected together so they can share data, files, programs and hardware resources. The largest computer network in the world is the Internet — it connects billions of devices across every country.
Real-life analogy. A computer network is like a postal system. Every house (device) has an address (IP), messages (data packets) are sent in envelopes (packets), the post office follows rules (protocols), and a chain of postmen (routers) carries each envelope from sender to receiver.

9.1 Evolution of Networking

YearMilestoneWhat it brought
1969ARPANET — Advanced Research Projects Agency NetworkThe world’s first packet-switched network; connected four U.S. universities
1980sNSFNET — National Science Foundation NetworkReplaced ARPANET as the research backbone; bigger and faster
1989World Wide Web (Tim Berners-Lee, CERN)HTML, HTTP, URL, the first web browser
1990sCommercial InternetISPs open the net to the public; e-mail and the Web explode
1995Internet in India (VSNL, 15 Aug 1995)Public access available through dial-up
2000s+Broadband, Wi-Fi, 3G / 4G / 5G, fiber opticsAlways-on, mobile, gigabit-speed networks

9.1.1 Benefits of Networking

9.2 Data Communication — The Basics

9.2.1 The Five Components of any Communication

ComponentRoleExample
SenderCreates the messageYour WhatsApp app
ReceiverGets the messageYour friend’s phone
MessageThe data itselfText, image, video
Medium / channelThe path between sender & receiverWi-Fi, cable, radio
ProtocolThe shared rules of communicationTCP/IP, HTTPS

9.2.2 Measuring Capacity of a Communication Channel

Bandwidth is the maximum amount of data a channel can carry per second. Data transfer rate is the actual amount of data flowing through the channel per second. Both are measured in bits per second (bps).
UnitFull formValue
bpsbits per second1 bit / second
KbpsKilobits per second1 024 bps
MbpsMegabits per second1 024 Kbps
GbpsGigabits per second1 024 Mbps
TbpsTerabits per second1 024 Gbps
Your home Wi-Fi plan shows “100 Mbps” — that is the bandwidth. The real download speed while streaming YouTube (say 30 Mbps) is the data transfer rate.

9.3 IP Address

An IP address (Internet Protocol address) is a unique numerical label given to every device on a network, so that data packets know where to go. Just like your home has a postal address, every networked device has an IP address.

9.3.1 IPv4 vs IPv6

IPv4IPv6
Address size32 bits128 bits
Written asFour decimal numbers separated by dotsEight hexadecimal groups separated by colons
Range per octet/group0 – 2550000 – FFFF
Example192.168.1.52001:0db8:85a3:0000:0000:8a2e:0370:7334
Total addresses~4.3 billion (almost exhausted)~3.4 × 1038

9.4 Switching Techniques

Before a message reaches its destination it may pass through several intermediate nodes. A switching technique decides how the route is chosen and used.

9.4.1 Circuit Switching

A dedicated physical path is reserved between sender and receiver for the entire duration of the communication — just like an old telephone call. The path is released only when the call ends.

9.4.2 Packet Switching

The message is chopped into small packets. Each packet carries the destination address and travels independently — possibly via different routes — and the packets are re-assembled at the receiver. This is how the Internet works.

9.4.3 Side-by-side comparison

Circuit SwitchingPacket Switching
Path reserved?Yes, for the whole callNo — decided per packet
Uses bandwidth?Even when silentOnly when data is flowing
Reliability on link failureCall dropsRe-route automatically
ExampleTraditional telephoneInternet, mobile data

9.5 Transmission Media

The transmission medium is the physical (or invisible) channel that carries the signal from sender to receiver. It is broadly divided into wired (guided) and wireless (unguided) media.

9.5.1 Wired (Guided) Media

MediumWhat it isSpeedUsed for
Twisted-pairPairs of copper wires twisted to cancel interference (e.g. Cat-5, Cat-6)100 Mbps – 10 GbpsLAN cabling, telephone lines
Co-axialA central copper conductor wrapped in insulator, braided shield, outer cover10 – 100 MbpsCable TV, older LANs
Optical FibreThin glass / plastic fibre carrying light signals10 – 100 GbpsBackbone Internet, FTTH broadband

9.5.2 Wireless (Unguided) Media

MediumFrequencyNeeds line-of-sight?Used for
Radio waves3 KHz – 1 GHzNoAM/FM radio, Wi-Fi, Bluetooth
Microwaves1 GHz – 300 GHzYesMobile towers, satellite links
Infrared300 GHz – 400 THzYes, short rangeTV remotes, some sensors

9.5.3 Wired vs Wireless — Pros & Cons

Wired
  • Higher, more stable speed
  • Harder to intercept
  • Less affected by weather
Wireless
  • Mobility — no cables
  • Easier installation
  • Cheaper for large areas
  • ❌ More interference / security risk

9.6 Network Devices

DeviceWhat it does
ModemMOdulator + DEModulator — converts digital signals to analog (and back) so they can travel over telephone/cable lines
HubDumb multi-port repeater — broadcasts data to every connected device (obsolete, used for small LANs)
SwitchSmart hub — forwards data only to the specific device using MAC addresses; standard in modern LANs
RepeaterBoosts / regenerates a weakening signal over long distances
RouterConnects different networks, finds the best path for a packet, uses IP addresses (your Wi-Fi router)
GatewayConnects two networks that use different protocols; a protocol translator
BridgeConnects two LANs (or segments) operating with the same protocol
Wi-Fi card / NICNetwork Interface Card — hardware inside every computer / phone that actually transmits and receives data
Hub vs Switch vs Router — hub shouts to everyone, switch whispers only to the right person, router directs traffic between different networks.

9.7 Network Topologies

A topology is the physical or logical arrangement of devices in a network — the shape made by the cables and nodes.
Bus one main cable Star HUB central hub/switch Tree hierarchy of hubs Mesh every node connects to every other Ring loop of nodes

9.7.1 Bus Topology

Every device connects to a single backbone cable. Simple and cheap, but the whole network fails if the main cable breaks.

9.7.2 Star Topology

Every device connects to a central hub or switch. Most common in schools/offices today. One broken cable affects only one device.

9.7.3 Tree Topology

A hierarchy of star networks — hubs of hubs. Used in large campus networks.

9.7.4 Mesh Topology

Every device connects directly to every other device. Extremely reliable, expensive. Used on the Internet backbone.

9.7.5 Summary table

TopologyCostReliabilityTypical use
BusLowLow (single cable)Small, obsolete LANs
StarMediumMedium (hub is critical)Schools, offices
TreeMedium-HighMediumCampus networks
MeshVery highVery highInternet backbone, military
RingMediumLow (if node fails)Some older LANs (Token Ring)

9.8 Types of Networks by Size

TypeFull formCoversExample
PANPersonal Area Network~10 mBluetooth headphones + phone
LANLocal Area NetworkOne buildingHome Wi-Fi, school lab
MANMetropolitan Area NetworkOne cityCable TV network, city-wide ISP
WANWide Area NetworkCountry / worldThe Internet itself

9.9 Introduction to the Internet

The Internet is the global network of interconnected networks. It uses the TCP/IP protocol suite and enables services such as the Web, e-mail, file transfer, instant messaging, online games, video streaming and IoT.

9.9.1 URL — Uniform Resource Locator

A URL is the full address of any resource on the Web. Break down this example:

https://www.cbse.gov.in/curriculum/comp-science.pdf └──┬──┘ └─────┬─────┘ └──────┬──────┘ protocol domain name path / file
PartMeaning
https://Protocol — how the browser should fetch the resource
www.cbse.gov.inDomain name — human-friendly label that maps to an IP
/curriculum/comp-science.pdfPath + file on the web server

9.9.2 WWW — World Wide Web

The WWW (1989, Tim Berners-Lee) is a collection of inter-linked web pages accessed over the Internet using HTTP. The Web is one service running on the Internet — not the Internet itself.

9.9.3 Website vs Web Server vs Web Browser

TermWhat it is
WebsiteCollection of related web pages hosted under one domain
Web ServerA computer running software (Apache, Nginx, IIS) that serves web pages on request
Web BrowserProgram on the user’s device (Chrome, Firefox, Edge, Safari) that requests and displays web pages
Web HostingService of storing your website files on a server that is always online

9.9.4 Web Scripting

Client-sideServer-side
Runs whereIn the browserOn the web server
PurposeInteractive pages, validationDatabase access, business logic
ExamplesJavaScript, VBScriptPHP, Python, Node.js, JSP

9.9.5 Web 2.0

Web 2.0 is the second generation of the Web, where ordinary users also create content — not just read it. Hallmarks: social networking (Facebook, Twitter), blogs, wikis (Wikipedia), video-sharing (YouTube), collaborative editing (Google Docs) and user-generated reviews.

9.10 Network Protocols

A protocol is the set of rules that computers follow when they communicate — what format to use, how to acknowledge messages, how to handle errors. Without a shared protocol, computers cannot talk, just as two people with no common language cannot hold a conversation.
ProtocolFull formDefault portPurpose
TCP/IPTransmission Control / Internet ProtocolThe core protocol suite of the Internet; breaks data into packets, addresses them, re-assembles them reliably
HTTPHyper-Text Transfer Protocol80Transfers web pages between browser and server
HTTPSHTTP Secure443HTTP over an encrypted SSL/TLS channel — modern standard for websites
FTPFile Transfer Protocol21Upload / download files to and from a server
SMTPSimple Mail Transfer Protocol25Sending e-mail from client to mail server / between servers
POP3Post Office Protocol v3110Downloading e-mail from server to client; usually deletes server copy
IMAPInternet Message Access Protocol143Reading e-mail while keeping it on the server — used by Gmail / Outlook
PPPPoint-to-Point ProtocolCarries TCP/IP over serial / dial-up / DSL links
TelnetTele-networking23Remote login to another computer in plain text (insecure)
SSHSecure Shell22Secure, encrypted replacement for Telnet
Quick way to remember SMTP vs POP3: SMTP = Sending, POP = Picking Out Post.

9.10.1 The TCP/IP four-layer model (brief)

LayerJobExamples
ApplicationEnd-user servicesHTTP, FTP, SMTP, DNS
TransportReliable delivery between hostsTCP, UDP
InternetRouting & addressingIP, ICMP
Network AccessPhysical linkEthernet, Wi-Fi, PPP

9.11 Common Mistakes & Confusions

#Mistake / ConfusionCorrection
1“Internet” and “WWW” mean the sameInternet is the network; Web is just one service on it
2Confusing hub, switch and routerHub → broadcasts · Switch → targets a device · Router → connects networks
3Confusing bandwidth and data rateBandwidth = maximum; data rate = actual
4Writing an IP octet as 256Each octet is 0–255 only
5Mixing SMTP & POP3 rolesSMTP sends · POP3/IMAP receives
6Calling Wi-Fi “a protocol”Wi-Fi is a technology; TCP/IP is the protocol suite running over it
7Saying fibre optic carries electricityIt carries light signals through glass/plastic

Quick-revision summary

  • Networks evolved: ARPANET (1969) → NSFNET → WWW (1989) → Commercial Internet → 5G / fibre today.
  • Data communication = sender · receiver · message · medium · protocol.
  • Bandwidth (max capacity) is measured in bps, Kbps, Mbps, Gbps, Tbps.
  • IPv4 uses 32 bits (four 0–255 numbers); IPv6 uses 128 bits (eight hex groups).
  • Switching: circuit (dedicated path, phone) vs packet (independent packets, Internet).
  • Wired media: twisted-pair, co-axial, fibre optic. Wireless media: radio, microwave, infrared.
  • Devices: modem · hub · switch · repeater · router · gateway · bridge · NIC / Wi-Fi card.
  • Topologies: bus · star · tree · mesh · (ring). Network types by size: PAN · LAN · MAN · WAN.
  • A URL has three parts — protocol, domain name, path.
  • Web scripting — client-side (JavaScript) runs in the browser; server-side (PHP, Python) runs on the web server.
  • Web 2.0 = user-generated content (social media, blogs, wikis).
  • Key protocols: TCP/IP · HTTP/HTTPS · FTP · SMTP (send mail) · POP3/IMAP (read mail) · PPP · Telnet · SSH.
Unit 3
🗄️
Database
Management
Relational Model · SQL (DDL + DML) · Aggregates · Joins · MySQL + Python
Chapter 10 • Database Concepts & SQL Basics
Chapter 11 • Advanced SQL
Chapter 12 • Python ⇄ MySQL Connectivity
🧠Practice Quiz — test yourself on this chapter