🔥 LIVE 👩‍🏫 Teachers: Host Live Tests  |  🎓 Students: Practice Class-wise Quizzes Go to Quiz Portal ➔

Computer Networks Class 12 Notes (CBSE Computer Science Unit 2) – With Diagrams

Computer Networks Class 12 Notes | CBSE Unit 2 PDF + Diagrams

In this chapter we will study what a network is, how data travels, the types of networks, topologies, network devices, protocols and basic web services. Read each topic carefully, look at the diagram given with it, and then learn the “Remember” points – they are exactly what examiners ask in the board exam.

Introduction to computer networks and evolution of networking – ARPANET, NSFNET and Internet (CBSE Class 12)

 

Quick Index (Table of Contents)

  1. Introduction to Computer Networks
  2. Evolution of Networking
  3. Data Communication and its Components
  4. Switching Techniques
  5. IP Address vs MAC Address
  6. Transmission Media (Wired and Wireless)
  7. Types of Networks – PAN, LAN, MAN, WAN
  8. Network Topologies
  9. Bandwidth and Data Transfer Rate
  10. Network Devices
  11. Network Protocols
  12. Introduction to Web Services
  13. Important Questions and Answers

1. Introduction to Computer Networks

Students, a computer network is a group of interconnected computers and other devices that share resources and information with each other.

Key components of a network

  • Nodes – computers, servers and other devices connected in the network.
  • Transmission media – wired or wireless path through which data travels.
  • Network devices – router, switch, modem, etc.
  • Protocols – the set of rules for communication.

Why are computer networks important?

  • They enable communication and collaboration.
  • They allow sharing of data, software and hardware (for example, one printer for the whole lab).
  • They provide access to the Internet and global resources.
  • They improve efficiency and productivity.
  • They support services like web, email, online learning and e-commerce.

Remember: Network = Share + Access + Communicate.

2. Evolution of Networking

NetworkPeriodImportant points
ARPANET
(Advanced Research Projects Agency Network)
1969 – 1983Developed by the U.S. Department of Defense (through ARPA). First network to connect computers over long distances. Connected 4 nodes (UCLA, Stanford, UCSB, Utah). Used packet switching.
NSFNET
(National Science Foundation Network)
1983 – 1995Developed by the National Science Foundation. Connected research and educational institutions. Worked at higher speeds (56 Kbps and later 1.5 Mbps). Helped build the backbone of the Internet.
Internet1995 – PresentResult of interconnection of multiple networks (including ARPANET and NSFNET). Uses the TCP/IP protocol suite. Supports websites, email, cloud computing, social media and online transactions.

Remember: ARPANET → NSFNET → Internet. The Internet grew from a research network into a global information superhighway.

3. Concept of Communication and Components of Data Communication

Communication is the process of exchanging data or information between two or more devices through a communication medium using agreed-upon rules called protocols.

Five components of data communication – sender, receiver, message, communication media and protocols

 

Five components of data communication

ComponentMeaningExample
SenderDevice that starts (initiates) and sends the data.Computer, smartphone
ReceiverDevice that receives the transmitted data.Computer, smartphone
MessageThe actual information being communicated.Text, image, audio, video
Communication mediaPhysical or wireless channel used to carry data.Cable, fibre optic, Wi-Fi, radio waves
ProtocolsRules and conventions that control communication.TCP/IP, HTTP, FTP

Memory aid: Sender → Message → Media → Receiver + Protocols. Without protocols, devices may not understand each other.

4. Switching Techniques

Switching decides how data moves from the sender to the receiver across a network. There are two main techniques.

 

 

Circuit switching

A fixed (dedicated) path called a circuit is established between sender and receiver before data is transmitted. The path is reserved for the whole session. Think of an old telephone call.

 

Difference between circuit switching and packet switching with diagram

  • Dedicated path, no sharing with other users.
  • Constant data rate (fixed bandwidth).
  • Setup time is required to build the circuit.

Advantages: guaranteed bandwidth; predictable performance (low delay, no jitter).
Disadvantages: inefficient use of bandwidth; higher setup time; not suitable for bursty traffic.

 

Packet switching

Data is divided into small units called packets and each packet is sent independently through the network. Packets may take different routes and are joined again at the receiver. The Internet works on this principle.

 

packet switching diagram

  • No dedicated path – each packet can take a different route.
  • Shared network – many users can use the same links.
  • Variable data rate – bandwidth is shared dynamically.
  • Each packet carries source and destination addresses.

Advantages: efficient use of bandwidth; supports many users; flexible and scalable.
Disadvantages: higher overhead (header information); possible packet loss; variable delay and jitter.

BasisCircuit switchingPacket switching
PathDedicated, fixedNo dedicated path
Data unitContinuous streamSmall packets
Bandwidth useInefficientEfficient
DelayLow and predictableVariable
Setup timeRequiredNot required

Remember: Circuit switching = dedicated path. Packet switching = packets travel independently.

5. IP Address vs MAC Address

Difference between IP address and MAC address with IPv4, IPv6 and MAC examples

 

An IP address is a logical address that identifies a device on a network and helps in routing data across networks. A MAC address is a physical address that uniquely identifies the Network Interface Card (NIC) of a device on a local network.

FeatureIP addressMAC address
Full formInternet Protocol addressMedia Access Control address
TypeLogicalPhysical
PurposeRouting across networksLocal delivery on a specific network
OSI layerNetwork layer (Layer 3)Data Link layer (Layer 2)
Size32 bits (IPv4) / 128 bits (IPv6)48 bits
FormatDotted decimal, e.g. 192.168.1.10Hexadecimal, e.g. 00:1A:2B:3C:4D:5E
Can it change?Yes (dynamic or manual)Usually no (fixed by manufacturer)
Assigned byISP / DHCP / manuallyManufacturer (NIC)

IPv4 has 4 octets (32 bits), e.g. 192.168.1.10. IPv6 has 8 groups (128 bits), e.g. 2001:0db8:85a3:0000:0000:8a2e:0370:7334. A MAC address has 6 pairs of hex digits (0–9, A–F) separated by colons or hyphens.

How they work together: the IP address helps data reach the correct network (routing), and the MAC address helps deliver it to the correct device inside that local network.

Remember: IP = logical address (routing). MAC = physical address (local delivery).

6. Transmission Media

Transmission media is the path through which data travels. It is of two types: wired (guided) and wireless (unguided).

6.1 Wired communication media

 

CableConstructionFeaturesAdvantagesDisadvantagesUsed in
Twisted pairTwo insulated copper wires twisted together to reduce electromagnetic interference (EMI). Types: UTP and STP (shielded).Supports up to 1 Gbps and higherLow cost, easy to install, flexible, widely availableMore prone to EMI, lower bandwidth than fibreEthernet / LAN cables
Co-axialCentral copper conductor, dielectric insulator, metallic shield, outer jacket.Better shielding, higher bandwidth than twisted pairGood noise immunity, durable, suits high-frequency signalsMore expensive, less flexible, larger diameterCable TV, broadband
Fibre opticThin glass or plastic strands (core, cladding, protective jacket); data travels as light signals.Very high data rate, immune to EMI, long distanceHighest bandwidth, no EMI, very low signal loss, thin and lightHigher cost, fragile, needs special installationHigh-speed Internet, long-distance links

Remember: Twisted pair = cheap, for LANs. Co-axial = better shielding, cable TV. Fibre optic = fastest, immune to EMI.

6.2 Wireless media

Wireless media – radio waves, microwaves and infrared waves with features and examples

 

Wireless media use electromagnetic waves to transmit data without physical cables. They give flexibility, mobility and wide coverage.

BasisRadio wavesMicrowavesInfrared waves
FrequencyLow (3 kHz – 300 MHz)High (1 GHz – 300 GHz)Very high (300 GHz – 400 THz)
DirectionOmnidirectional (all directions)Highly directional (focused beam)Line-of-sight, short range
RangeLong distancePoint-to-point, satellite linksShort range
PenetrationCan pass through buildingsLine-of-sight neededCannot pass through walls or solid objects
ExamplesFM/AM radio, broadcastWi-Fi, Bluetooth, satellite communicationTV remote, IrDA
AdvantagesLong coverage, good penetration, low costHigh data rate, large bandwidth, small antennaHigh data rate, low interference, secure (limited range)
DisadvantagesLower data rate, larger antenna, more interferenceAffected by rain and weather, line-of-sight neededShort range, blocked by obstacles

7. Types of Networks

Types of computer networks – PAN, LAN, MAN and WAN with examples

 

Networks are classified mainly by the size of the geographical area they cover.

TypeFull formCoverageKey featuresExamples
PANPersonal Area NetworkAround one person, 1–10 metresShort range, low power; uses Bluetooth, NFC, ZigBeeBluetooth devices, smart watch, wireless headphones
LANLocal Area NetworkHome, school, office or buildingLimited area, high data transfer rate, owned and managed by one organization or personHome, office and school networks
MANMetropolitan Area NetworkA cityLarger than LAN, smaller than WAN; connects multiple LANs; usually owned by service providers or large organizationsCity network, cable TV network
WANWide Area NetworkCountries or the whole worldVery large coverage; public or private networks; higher latency and lower speed than LAN/MANInternet, mobile networks, global corporate networks

Remember: PAN < LAN < MAN < WAN (in size of area covered).

8. Network Topologies

 

Network topology is the physical or logical arrangement of devices (nodes) in a network and the way they are connected to each other.

Bus topology

All devices are connected to a single backbone cable using T-connectors, with a terminator at both ends.

bus topology diagram

Advantages: low cost, easy to install, less cable, suitable for small networks.
Disadvantages: single point of failure (if the backbone fails, the whole network stops); performance falls as devices increase; hard to troubleshoot.

Star topology

All devices are connected to a central device (switch or hub) using individual cables.

star topology diagram

Advantages: high reliability, easy fault isolation, better performance, easy to add new devices.
Disadvantages: higher cost (more cable and a central device); if the central device fails, the entire network stops; more cable clutter.

Tree topology

A combination of star and bus topologies. Devices are connected in a hierarchical structure (like a tree) with a root switch, branch switches and a central backbone cable.

tree topology diagram

Advantages: scalable and flexible, better organization, supports large networks, easy management.
Disadvantages: more complex setup, higher cost, needs more cabling, a fault in the main switch affects the whole network.

Remember: The choice of topology depends on network size, cost, performance and reliability requirements.

9. Measuring Capacity of Communication Media

Bandwidth and data transfer rate – measuring capacity of communication media

 

BasisBandwidthData transfer rate
MeaningMaximum amount of data that can be transmitted through a medium in a given time (capacity of the channel)Actual speed at which data is transmitted through the medium
Unitbits per second (bps)bits per second (bps)
ValueFixed maximumCan be lower than bandwidth because of congestion and network conditions
Examples1 Mbps, 10 Mbps, 100 Mbps, 1 Gbps256 Kbps, 1 Mbps, 5 Mbps, 50 Mbps

Units: 1 Kbps = 1000 bps, 1 Mbps = 1,000,000 bps, 1 Gbps = 1,000,000,000 bps.

Remember: Bandwidth = maximum capacity. Data transfer rate = actual speed.

10. Network Devices

Network devices are hardware components that help in connecting devices, transmitting data and enabling communication within a network.

10.1 Ethernet card (NIC) and RJ45

ethernet card nic and rj45 connection

 

  • Ethernet card (Network Interface Card – NIC): allows a computer to connect to a wired network using an Ethernet cable. It provides the physical connection, sends and receives data, works at the Data Link layer and carries the MAC address. Examples: 10/100 Mbps card, Gigabit (1 Gbps) card, integrated card on the motherboard.
  • RJ45 (Registered Jack 45): a standard 8-pin (8P8C) connector used with twisted pair cable (UTP/STP) to connect computers, switches, routers and modems. Supports 10/100/1000 Mbps. The connector is the male plug; the port is the female socket.

Remember: Ethernet card + RJ45 + Ethernet cable = wired network connection.

10.2 Wi-Fi card and Modem

modem router and wifi card home network

 

  • Wi-Fi card (wireless NIC): lets a device connect to a wireless network using radio waves. Works on 2.4 GHz / 5 GHz bands and supports IEEE 802.11 standards (a/b/g/n/ac/ax). Examples: laptop Wi-Fi card, desktop Wi-Fi adapter, built-in card in smartphones.
  • Modem (Modulator–Demodulator): connects your local network to a wider network such as the Internet. It converts digital signals to analog (modulation) and analog back to digital (demodulation), and connects to the ISP. Types: DSL, cable and fibre modem. A Wi-Fi router often has modem and router functions together.

Remember: The Wi-Fi card works inside your device, while the modem connects you to the Internet.

10.3 Hub and Switch

hub vs switch diagram

 

BasisHubSwitch
NatureSimple, no intelligence (multi-port repeater)Intelligent multi-port bridge
Data forwardingBroadcasts data to all connected devicesForwards data only to the intended device using the MAC address table
OSI layerLayer 1 (Physical)Layer 2 (Data Link)
CollisionsMoreFewer
CostLowMore expensive
PerformanceLower, less efficientBetter, efficient use of bandwidth

10.4 Router and Gateway

router and gateway diagram

 

  • Router (Layer 3): connects two or more networks and forwards data between them using IP addresses and routing tables. It chooses the best path for data and can add firewall features. Examples: home Wi-Fi router, ISP edge router, enterprise router.
  • Gateway: connects two networks that use different protocols and translates data between them (for example IPv4 ↔ IPv6, or LAN ↔ Internet). It can work at several layers. Examples: default gateway, protocol gateway, email (application) gateway.

Remember: Router = IP-based routing. Gateway = protocol translation.

10.5 Firewall

firewall network security diagram

 

A firewall is a network security device (hardware or software) that monitors and controls incoming and outgoing traffic based on predetermined security rules. It acts as a barrier between a trusted internal network and an untrusted external network such as the Internet. Rules can be based on IP address, port and protocol.

Types: Packet filtering firewall (filters by IP, port, protocol); Stateful inspection firewall (tracks state of active connections); Next-Generation Firewall – NGFW (adds IDS/IPS and application filtering).

Advantages: improves security, prevents unauthorized access, protects against malware and cyber attacks, controls traffic, helps data privacy.
Disadvantages: can be expensive, may slightly reduce performance, needs proper configuration, does not give complete security by itself.

Remember: A firewall is like a security guard for your network.

11. Network Protocols

A protocol is a set of rules for communication over a network. Different protocols provide different services.

11.1 HTTP, HTTPS and FTP

HTTP HTTPS and FTP network protocols with port numbers and differences

 

ProtocolFull formUsePortSecurity
HTTPHyperText Transfer ProtocolTransfers web pages and resources; used to browse websites80Plain text, not encrypted
HTTPSHyperText Transfer Protocol SecureSecure HTTP; used in banking, e-commerce, secure sites443Encrypted using SSL/TLS; protects against eavesdropping and tampering
FTPFile Transfer ProtocolUpload, download, delete and manage files between computers21Plain text (secure versions: FTPS, SFTP)

Examples: http://www.example.com, https://www.example.com, ftp://ftp.example.com.

11.2 PPP and SMTP

PPP point to point protocol and SMTP simple mail transfer protocol explained

 

  • PPP (Point-to-Point Protocol): a data link layer protocol for direct communication between two devices (e.g. computer and router). It sets up the link, supports authentication (PAP, CHAP), and provides error detection and compression (LCP, NCP). Used in dial-up and router-to-router links.
  • SMTP (Simple Mail Transfer Protocol): an application layer protocol used to send and relay email from client to mail server and between mail servers. Common ports: 25 (standard), 587 (submission), 465 (secure SSL/TLS).

11.3 TCP/IP, POP3, Telnet and VoIP

 

  • TCP/IP (Transmission Control Protocol / Internet Protocol): the fundamental protocol suite of the Internet. TCP gives reliable, ordered delivery; IP handles addressing and routing of packets. Used for web browsing, email, file transfer.
  • POP3 (Post Office Protocol v3): used to receive email – downloads messages from the mail server to your device and, by default, removes them from the server.
  • TELNET (Telecommunication Network): remote login to another computer through a text-based command-line interface. It is not secure (plain text) and is mostly replaced by SSH.
  • VoIP (Voice over Internet Protocol): makes voice calls over the Internet by converting voice into digital packets. Examples: Skype, WhatsApp call, Zoom, Microsoft Teams.

Email trick: SMTP sends, POP3 receives. HTTP = access, HTTPS = secure access, FTP = file transfer.

12. Introduction to Web Services

12.1 WWW and HTML

 

WWW (World Wide Web) is a collection of interlinked web pages and resources available on the Internet, accessed through a web browser. The Internet is the underlying network; the WWW is a service running on it.

HTML (HyperText Markup Language) is the standard markup language used to create web pages. It defines the structure and content of a page using tags. It works with CSS (styling) and JavaScript (interactivity).

<!DOCTYPE html>
<html>
  <head>
    <title>My Web Page</title>
  </head>
  <body>
    <h1>Welcome to HTML</h1>
    <p>This is a simple web page.</p>
  </body>
</html>

12.2 XML

 

XML (Extensible Markup Language) is a simple, flexible, text-based markup language used to store and transport data (HTML displays data, XML describes data). Features: extensible (you can define your own tags), platform independent, structured hierarchy, supports validation (DTD / XML Schema), widely used in web services and APIs.

<?xml version="1.0" encoding="UTF-8"?>
<book>
  <title>Web Services</title>
  <author>John Doe</author>
  <year>2025</year>
</book>

12.3 Domain name and URL

url structure protocol domain path

 

A domain name is a human-readable address of a website (easier to remember than an IP address). Example: www.example.com = subdomain (www) + second-level domain (example) + top-level domain, TLD (.com, .org, .net).

A URL (Uniform Resource Locator) is the complete address of a resource on the Internet. Example: https://www.example.com/about – protocol (https), domain name (www.example.com), path (/about). Other parts: query string (?id=123) and fragment (#section).

12.4 Web browser and website

 

  • Web browser: application software to access, view and interact with websites. Examples: Google Chrome, Mozilla Firefox, Microsoft Edge, Safari, Opera. It interprets HTML, CSS and JavaScript, requests pages from the server and displays them.
  • Website: a collection of related web pages stored on a web server and available on the Internet under a common domain name. Examples: YouTube, Facebook, Amazon, Wikipedia, news sites.

12.5 Static and dynamic web pages

static vs dynamic webpage diagram

 

BasisStatic webpageDynamic webpage
ContentFixed, predefinedGenerated on the fly; changes with user input or data
Built withHTML, CSS, imagesServer-side scripts (PHP, Python, Node.js) and database
Interaction with serverNoneInteracts with database / external services
UpdatingManual editing and redeploymentUpdates automatically with data
ExampleSimple HTML filePHP / database-driven site, personalized page

12.6 Web server and web hosting

 

  • Web server: a computer (hardware or software) that stores websites and delivers them to users when requested. It handles HTTP/HTTPS requests from browsers. Examples: Apache HTTP Server, Nginx, IIS (Microsoft), Lighttpd.
  • Web hosting: a service that provides storage, server resources and technology to make a website accessible on the Internet.

Types of web hosting: Shared (many sites on one server), VPS (virtual private server), Dedicated (one server for one website), Cloud (scalable and flexible).

12.7 DNS server

 

A DNS (Domain Name System) server translates human-readable domain names (www.example.com) into IP addresses (e.g. 93.184.216.34) so that your device can find the website.

  1. You enter a domain name in the browser.
  2. Your device checks its cache; if not found, it queries a DNS server.
  3. The DNS server looks up the record and finds the IP address.
  4. The IP address is returned and the device connects to the website.

Types of DNS servers: Recursive, Root, TLD and Authoritative DNS server.

Remember: DNS = Internet’s phone book (domain name → IP address).

12.8 Add-ons, plugins and cookies

 

  • Add-ons: small programs that extend the functionality of a browser. Examples: AdBlock Plus, Pocket, Grammarly, 1Password.
  • Plugins: software components that add specific capabilities such as playing media. Examples: Adobe Flash (legacy), Java, Silverlight, PDF viewer.
  • Cookies: small text files stored by websites on your device to remember preferences, keep you logged in and personalize your experience. Types: session cookies (temporary) and persistent cookies (remember settings).

Remember: Add-ons add features. Plugins add capabilities. Cookies remember you.

Exam Tips for Board Exams

  • Learn the full forms of ARPANET, NSFNET, NIC, MAC, PAN, LAN, MAN, WAN, HTTP, HTTPS, FTP, PPP, SMTP, POP3, VoIP, DNS, URL, XML, HTML – they come as 1-mark questions.
  • Practise differences (hub vs switch, router vs gateway, IP vs MAC, circuit vs packet switching, static vs dynamic page) in table form.
  • For topology and network-design case questions, write the suitable topology, device and cable with a one-line reason.

Important Questions and Answers

Q1. What is a computer network?
A group of interconnected computers and devices that share resources and information.

Q2. Name the five components of data communication.
Sender, receiver, message, communication media and protocols.

Q3. Differentiate between circuit switching and packet switching.
Circuit switching uses a dedicated path set up before transmission; packet switching divides data into packets that travel independently and share the network.

Q4. What is the difference between IP address and MAC address?
IP is a logical, changeable address used for routing across networks; MAC is a 48-bit physical address fixed by the manufacturer for local delivery.

Q5. Which transmission medium is the fastest and immune to EMI?
Fibre optic cable.

Q6. Differentiate between a hub and a switch.
A hub broadcasts data to all devices (Layer 1); a switch sends data only to the intended device using the MAC table (Layer 2).

Q7. What is the function of a modem?
It converts digital signals to analog and back so a device or network can connect to the Internet through an ISP.

Q8. What is a firewall?
A network security device that monitors and controls traffic using security rules, blocking unauthorized access.

Q9. Which protocol is used to send and which to receive email?
SMTP sends email; POP3 receives (downloads) email.

Q10. What is the difference between HTTP and HTTPS?
HTTP sends data as plain text on port 80; HTTPS encrypts data using SSL/TLS on port 443.

Q11. What is the role of DNS?
It converts domain names into IP addresses.

Q12. What are cookies?
Small text files stored by websites on the user’s device to remember preferences and login status.

Summary

In this chapter we learnt how computer networks evolved from ARPANET to the Internet, how data communication works, the types of networks and topologies, transmission media, network devices, protocols and web services. Revise using the diagrams above, then attempt previous year questions of CBSE Class 12 Computer Science to test yourself.

Related notes on CBSEPython.in: Class 12 Computer Science Notes

Jitendra Singh
✔ Verified Educator

Jitendra Singh

Founder of CBSEPython.in

I help CBSE Class 9–12 students learn Python, Information Technology, Artificial Intelligence and Computer Science through easy notes, quizzes, MCQs and sample papers.

Read More About Me →

Leave a Comment