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.

Quick Index (Table of Contents)
- Introduction to Computer Networks
- Evolution of Networking
- Data Communication and its Components
- Switching Techniques
- IP Address vs MAC Address
- Transmission Media (Wired and Wireless)
- Types of Networks – PAN, LAN, MAN, WAN
- Network Topologies
- Bandwidth and Data Transfer Rate
- Network Devices
- Network Protocols
- Introduction to Web Services
- 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
| Network | Period | Important points |
|---|---|---|
| ARPANET (Advanced Research Projects Agency Network) | 1969 – 1983 | Developed 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 – 1995 | Developed 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. |
| Internet | 1995 – Present | Result 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
| Component | Meaning | Example |
|---|---|---|
| Sender | Device that starts (initiates) and sends the data. | Computer, smartphone |
| Receiver | Device that receives the transmitted data. | Computer, smartphone |
| Message | The actual information being communicated. | Text, image, audio, video |
| Communication media | Physical or wireless channel used to carry data. | Cable, fibre optic, Wi-Fi, radio waves |
| Protocols | Rules 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.

- 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.

- 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.
| Basis | Circuit switching | Packet switching |
|---|---|---|
| Path | Dedicated, fixed | No dedicated path |
| Data unit | Continuous stream | Small packets |
| Bandwidth use | Inefficient | Efficient |
| Delay | Low and predictable | Variable |
| Setup time | Required | Not required |
Remember: Circuit switching = dedicated path. Packet switching = packets travel independently.
5. IP Address vs MAC Address

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.
| Feature | IP address | MAC address |
|---|---|---|
| Full form | Internet Protocol address | Media Access Control address |
| Type | Logical | Physical |
| Purpose | Routing across networks | Local delivery on a specific network |
| OSI layer | Network layer (Layer 3) | Data Link layer (Layer 2) |
| Size | 32 bits (IPv4) / 128 bits (IPv6) | 48 bits |
| Format | Dotted decimal, e.g. 192.168.1.10 | Hexadecimal, e.g. 00:1A:2B:3C:4D:5E |
| Can it change? | Yes (dynamic or manual) | Usually no (fixed by manufacturer) |
| Assigned by | ISP / DHCP / manually | Manufacturer (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
| Cable | Construction | Features | Advantages | Disadvantages | Used in |
|---|---|---|---|---|---|
| Twisted pair | Two insulated copper wires twisted together to reduce electromagnetic interference (EMI). Types: UTP and STP (shielded). | Supports up to 1 Gbps and higher | Low cost, easy to install, flexible, widely available | More prone to EMI, lower bandwidth than fibre | Ethernet / LAN cables |
| Co-axial | Central copper conductor, dielectric insulator, metallic shield, outer jacket. | Better shielding, higher bandwidth than twisted pair | Good noise immunity, durable, suits high-frequency signals | More expensive, less flexible, larger diameter | Cable TV, broadband |
| Fibre optic | Thin glass or plastic strands (core, cladding, protective jacket); data travels as light signals. | Very high data rate, immune to EMI, long distance | Highest bandwidth, no EMI, very low signal loss, thin and light | Higher cost, fragile, needs special installation | High-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 use electromagnetic waves to transmit data without physical cables. They give flexibility, mobility and wide coverage.
| Basis | Radio waves | Microwaves | Infrared waves |
|---|---|---|---|
| Frequency | Low (3 kHz – 300 MHz) | High (1 GHz – 300 GHz) | Very high (300 GHz – 400 THz) |
| Direction | Omnidirectional (all directions) | Highly directional (focused beam) | Line-of-sight, short range |
| Range | Long distance | Point-to-point, satellite links | Short range |
| Penetration | Can pass through buildings | Line-of-sight needed | Cannot pass through walls or solid objects |
| Examples | FM/AM radio, broadcast | Wi-Fi, Bluetooth, satellite communication | TV remote, IrDA |
| Advantages | Long coverage, good penetration, low cost | High data rate, large bandwidth, small antenna | High data rate, low interference, secure (limited range) |
| Disadvantages | Lower data rate, larger antenna, more interference | Affected by rain and weather, line-of-sight needed | Short range, blocked by obstacles |
7. Types of Networks

Networks are classified mainly by the size of the geographical area they cover.
| Type | Full form | Coverage | Key features | Examples |
|---|---|---|---|---|
| PAN | Personal Area Network | Around one person, 1–10 metres | Short range, low power; uses Bluetooth, NFC, ZigBee | Bluetooth devices, smart watch, wireless headphones |
| LAN | Local Area Network | Home, school, office or building | Limited area, high data transfer rate, owned and managed by one organization or person | Home, office and school networks |
| MAN | Metropolitan Area Network | A city | Larger than LAN, smaller than WAN; connects multiple LANs; usually owned by service providers or large organizations | City network, cable TV network |
| WAN | Wide Area Network | Countries or the whole world | Very large coverage; public or private networks; higher latency and lower speed than LAN/MAN | Internet, 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.

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.

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.

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

| Basis | Bandwidth | Data transfer rate |
|---|---|---|
| Meaning | Maximum 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 |
| Unit | bits per second (bps) | bits per second (bps) |
| Value | Fixed maximum | Can be lower than bandwidth because of congestion and network conditions |
| Examples | 1 Mbps, 10 Mbps, 100 Mbps, 1 Gbps | 256 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 (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

- 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

| Basis | Hub | Switch |
|---|---|---|
| Nature | Simple, no intelligence (multi-port repeater) | Intelligent multi-port bridge |
| Data forwarding | Broadcasts data to all connected devices | Forwards data only to the intended device using the MAC address table |
| OSI layer | Layer 1 (Physical) | Layer 2 (Data Link) |
| Collisions | More | Fewer |
| Cost | Low | More expensive |
| Performance | Lower, less efficient | Better, efficient use of bandwidth |
10.4 Router and Gateway

- 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

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

| Protocol | Full form | Use | Port | Security |
|---|---|---|---|---|
| HTTP | HyperText Transfer Protocol | Transfers web pages and resources; used to browse websites | 80 | Plain text, not encrypted |
| HTTPS | HyperText Transfer Protocol Secure | Secure HTTP; used in banking, e-commerce, secure sites | 443 | Encrypted using SSL/TLS; protects against eavesdropping and tampering |
| FTP | File Transfer Protocol | Upload, download, delete and manage files between computers | 21 | Plain 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): 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

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

| Basis | Static webpage | Dynamic webpage |
|---|---|---|
| Content | Fixed, predefined | Generated on the fly; changes with user input or data |
| Built with | HTML, CSS, images | Server-side scripts (PHP, Python, Node.js) and database |
| Interaction with server | None | Interacts with database / external services |
| Updating | Manual editing and redeployment | Updates automatically with data |
| Example | Simple HTML file | PHP / 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.
- You enter a domain name in the browser.
- Your device checks its cache; if not found, it queries a DNS server.
- The DNS server looks up the record and finds the IP address.
- 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
