Computer Networks CBSE class 12
Computer Networks CBSE class 12
Networking has always helped people achieve better results and make the best use of resources.
For example, if you need a book that is unavailable in your area, a friend from another part of the city can buy it for you.
The next day, he gives you the book, and you pay him back—both of you benefit.
This is how human networking works, and the same idea applies to computers.
Just like people connect to help each other, computers connect to share information and resources.
1. Hosts or Nodes
• Hosts (or nodes) are the computers and devices connected to a network to share resources.
• Examples: PCs, laptops, smartphones, smart TVs, and printers connected to a network.
2. Server
• A server is a computer that manages and provides services to other computers in the network.
• It helps in sharing data, resources, and communication among devices.
• There are two types of servers:
dedicated (only used for server tasks) and non-dedicated (used for other tasks as well).
3. Clients
• A client is a computer that requests services from a server.
• The server responds by providing the requested service, such as accessing a file or a website.
4. Network Hardware
These are the physical devices required to set up a network.
• NIC (Network Interface Card):
• A small hardware component attached to a computer for network connection.
• Each NIC has a unique MAC address (6-byte or 48-bit unique ID).
• Also called Network Interface Unit (NIU) or Terminal Access Point (TAP).
• Hub, Switch, Router:
• These devices help connect multiple computers in a network.
• Hub: Sends data to all devices in a network.
• Switch: Sends data only to the intended device, making it more efficient.
• Router: Connects different networks (e.g., home network to the internet).
5. Communication Channel
The medium through which data travels in a network.
• Wired Communication Channels (Uses physical cables):
• Examples: Twisted-pair cables, coaxial cables, fiber-optic cables.
• Wireless Communication Channels (Uses invisible signals like radio waves):
• Examples: Microwaves, radio waves, satellites, infrared waves, laser.
6. Software
Software plays a key role in making networking work properly.
• Protocols:
• Predefined rules that allow computers to communicate.
• Example: TCP/IP (used for the internet), HTTP (used for websites).
• Network Operating System (NOS):
• A special operating system designed for handling network tasks.
• Example: Windows Server, Linux Ubuntu Server.
7. Network Services
These are applications that provide various functions over a network.
• DNS (Domain Name System): Converts website names (like google.com) into IP addresses.
• File Sharing: Allows multiple users to access shared files.
• VoIP (Voice over IP): Enables voice calls over the internet (e.g., WhatsApp calls).
Types of Computer Networks
A computer network is a group of computers that are connected to share information and resources.
Networks can be small (few computers in an office) or very large (millions of computers across the world).
They differ in size, complexity, and how far they spread.
LAN WAN
1. It is spread over a small area. It is spread over a very large area.
2. It usually costs less to set it up. It costs higher to set it up.
3. It is usually a single network. It is usually a network of many networks.
4. LANs facilitate information sharing, WANs facilitate information sharing and
enhanced communication and resource enhanced communication primarily.
sharing.
Types of Networks by Component Roles
Computer networks can also be classified based on the role that computers play in the network.
There are two main types: Peer-to-Peer (P2P) Networks , Client-Server Networks
2. Client-Server Networks
• In a client-server network, there is a dedicated server that manages all requests from client
computers.
• This server does not function as a workstation—it is purely for managing network tasks.
• These networks are used in large organizations where centralized control is needed.
Conclusion
• P2P networks are good for small setups where users share files directly.
• Client-server networks are best for large setups where centralized control and security are needed.
Client-server Network P2P Network
Security The server controls security of the network. No central control over security.
Management The server manages the network. No central control over the network. Anyone
Needs a dedicated team of people to can set up.
manage the server.
Dependency Clients are dependent on the server. Clients are not dependent on a central server.
Performance The server can be upgraded to be made If machines on the network are slow they will
more powerful to cope with high demand. slow down other machines.
Backups Data is all backed up on the main server. Each computer has to be backed up.
Data can easily be deleted by users.
Evolution of Networking
1. ARPANET (1969) – The First Network
• ARPANET (Advanced Research Projects Agency NETwork) was the first-ever computer network.
• It was developed in 1969 by the U.S. Department of Defense to connect computers at universities and
defense organizations.
• The goal was to allow computers in different locations to communicate and share data.
• This was the foundation of today’s Internet.
Key Point: ARPANET was the first network in history.
Important Terms
1. Gateway
A gateway is a device that connects different types of networks so they can communicate with each other.
2. Backbone
The backbone is like the main highway of the Internet.
It is the central structure that connects different networks, just like:
• The trunk of a tree connects all its branches
• The spine of a human body connects different body parts
This backbone ensures that information can travel across different networks smoothly.
How the Internet Works
The Internet works by breaking information into small parts and sending them to the destination,
where they are reassembled into the original message.
Here’s how it happens step by step:
2. IP (Internet Protocol)
• Handles the address of the destination computer.
• Routes (sends) each packet to the correct destination.
Together, TCP/IP ensures that data reaches the correct place and is properly organized.
The Future of the Internet: InterSpace
What is InterSpace?
InterSpace is a software program that allows multiple users to communicate online using:
• Real-time audio, video, and text chat
• Dynamic 3D environments
Switching Techniques
Switching techniques are methods used to transmit data across networks. They help in establishing
communication between two computers.
There are three types of switching techniques:
1. Circuit Switching
2. Message Switching
3. Packet Switching
1. Circuit Switching
What is Circuit Switching?
• In this technique, a complete physical connection is first established between the sender and receiver
before data is sent.
• Once the connection is made, data flows continuously between the two computers.
Example
• A local telephone network is an example of circuit switching.
• When you make a phone call, the telephone system creates a direct copper path between your phone
and the receiver’s phone.
Key Feature
• The most important part of circuit switching is that it sets up an end-to-end connection before
sending data.
2. Message Switching
What is Message Switching?
• In this technique, the sender’s computer sends the message to a switching office first.
• The switching office stores the message in its memory and waits for a free link to the next switching
office.
• Once a free link is available, the message is sent to the next office.
• This process continues until the message reaches the receiver’s computer.
Key Feature
• There is no direct connection between the sender and receiver. Instead, the message is passed
through different switching offices.
3. Packet Switching
What is Packet Switching?
• In packet switching, data is divided into small fixed-size packets before being sent.
• These packets travel separately through the network and may take different routes.
• At the receiver’s end, all the packets are reassembled in the correct order.
Key Feature
• Packet switching is faster and more efficient than message switching because smaller packets are
easier to manage.
Data Communication Terminologies
Data communication is the process of transferring information from one place to another. Here are some
important terms related to data communication.
1. Data Channel
A data channel is the medium used to carry data from one point to another.
It can be a wired connection like fiber optics or copper cables, or a wireless connection like Wi-Fi or radio
waves.
2. Baud
Baud is a unit that measures how much information a communication channel can carry.
It is similar to bps (bits per second), which is another unit for measuring data transfer speed.
4. Bandwidth
Bandwidth refers to the capacity of a communication channel.
It determines how much data can be transmitted in a given time.
A higher bandwidth allows more data to be sent or received per second.
In digital systems, bandwidth is measured in bps (bits per second).
For example, a modem that works at 57,600 bps has twice the bandwidth of a modem that works at 28,800
bps.
In analog systems, bandwidth is measured by the difference between the highest and lowest frequency of a
signal.
Frequency is measured in hertz (Hz), which represents cycles per second.
A typical voice signal has a bandwidth of about 3 kHz (kilohertz), while an analog TV video signal has a
bandwidth of about 6 MHz (megahertz), which is 2,000 times wider than a voice signal.
Frequency measurements follow this order:
• 1 kHz (kilohertz) = 1,000 cycles per second
• 1 MHz (megahertz) = 1,000 kHz or 1 million cycles per second
• 1 GHz (gigahertz) = 1,000 MHz or 1 billion cycles per second
• 1 THz (terahertz) = 1,000 GHz or 1 trillion cycles per second
2. Thinnet
• Thinner than thicknet.
• Can connect network nodes up to 185 meters apart.
Coaxial cables are mainly used in cable TV, security systems, and high-speed networks, but their use in
networking is declining due to the rise of fiber optics and wireless communication.
Optical Fibers
Optical fibers are thin strands of glass or plastic that carry light signals from one end to another.
The light is produced by Light Emitting Diodes (LEDs) or Laser Diodes (LDs), and data is transmitted using
frequency modulation.
Optical fibers provide very high bandwidth, supporting speeds from 20 Mbps to 150 Mbps with LEDs and
even higher with LDs.
Advantages:
1. Cheaper than laying cables and maintaining repeaters.
2. No need for land rights (unlike underground cables).
3. Works well in difficult terrains (mountains, remote areas).
4. Can communicate over oceans.
Disadvantages:
1. Less secure than wired communication.
2. Signal interference due to multi-path propagation.
3. Weather affects signals (rain, storms).
4. Limited bandwidth available for use.
5. High cost for setup and maintenance.
Radio Wave Transmission
• Uses radio frequencies to send information (audio, video, data).
• Works with a transmitter (sends signal) and a receiver (receives and decodes signal).
• Antennas are used to send and capture signals.
Advantages:
1. Mobile – Works without fixed cables.
2. Cheaper than laying underground cables.
3. No need for land acquisition rights (unlike cables).
4. Works well in difficult terrains (hills, forests, remote areas).
Disadvantages:
1. Insecure – Signals can be intercepted.
2. Weather-dependent – Rain and storms affect signals.
3. Limited security – Communication can be easily disrupted.
Satellite Communication
• A special type of microwave communication using satellites as relay stations.
• Used for voice, fax, data, video, internet services.
• Works as a backup when wired networks fail (e.g., disasters).
How It Works:
1. Earth station sends signals to a satellite.
2. The satellite amplifies and retransmits signals.
3. Another earth station receives the signals.
4. This allows global communication in one step.
Advantages:
1. Covers a large area – Good for remote places.
2. Best alternative to expensive undersea cables.
3. Useful for intercontinental communication (long-distance calls, TV, internet).
4. Ideal for sparsely populated areas with no wired networks.
Disadvantages:
1. Limited antenna size on satellites reduces efficiency.
2. Overcrowded bandwidths due to low antenna gains.
3. High cost – Satellites are expensive to launch and insure.
4. Atmospheric losses above 30 GHz affect signals.
Other Unguided Media
Apart from microwaves, radio waves, and satellites, there are three other popular wireless communication
methods: Infrared, Laser, and Bluetooth.
1. Infrared
• Uses infrared light to transmit data.
• Commonly used in TV remotes, wireless speakers, and garage doors.
• Works within a room by bouncing off surfaces but cannot pass through walls.
• Used in handheld devices like PDAs (Personal Digital Assistants).
• Considered secure since it doesn’t spread beyond a room.
2. Laser
• Requires a direct line of sight between sender and receiver.
• Faster than microwaves but also unidirectional (one-way).
• Used for point-to-point communication, such as between buildings.
• Disadvantage: Affected by weather conditions like fog and rain.
3. Bluetooth
• Short-range wireless communication (up to 10 meters or 30 feet).
• Uses low-power radio waves (2.400 GHz – 2.483.5 GHz).
• Connects Bluetooth-enabled devices like smartphones, computers, and headphones.
• Widely used for file sharing, wireless accessories, and IoT devices.
Network Topologies
What is Network Topology?
• Topology refers to the pattern of interconnection between nodes (devices) in a network.
• The choice of topology affects the type of media used and the way data is transmitted.
2. Difficult to Expand
• Adding a new device requires a new cable running all the way to the central node, making expansion
complicated.
2. Reliable Design
• Straightforward architecture makes the network stable and efficient.
3. Easy to Expand
• New devices can be added anywhere along the cable.
• More segments can be added using repeaters (devices that boost signals).
How It Works
• Data transmission works like in a bus topology.
• Terminators at the end of the network absorb signals.
Advantages
• Uses point-to-point wiring for segments.
• Supported by many hardware and software vendors.
• Flexible and scalable (can expand easily).
Disadvantages
• Limited segment length (depends on cable type).
• If the backbone cable breaks, the whole network fails.
• More complex to configure and wire than other topologies.
2. Cost
• Bus topology is the cheapest.
• Fully connected topology is the most expensive.
3. Cable Length
• Bus topology uses less cable, making it cost-effective.
4. Future Expansion
• Star topology is best for easy network growth.
5. Communication Media
• Some locations (e.g., hilly areas) cannot use bus topology due to cable limitations.
• Star topology is commonly used in schools with unshielded twisted pair cables.
Identifying Devices in a Computer Network
To communicate in a large network like the Internet, every computer needs a unique identity. This is done
using two types of addresses:
• IP Address – Helps data reach the correct network.
• MAC Address – Ensures data reaches the correct device within the network.
Network Devices
To make a computer network work smoothly, specialized devices are needed along with computers and
cables. Here are the key network devices:
Modem
A modem connects a computer to the internet by converting digital data into analog signals and vice versa.
This process is called Modulation/Demodulation:
• Modulation – Converts digital data into analog signals for transmission.
• Demodulation – Converts received analog signals back into digital data.
Types of Modems:
1. Internal Modems – Fixed inside a computer.
2. External Modems – Connected externally like other peripherals.
Modulation Techniques:
1. AM (Amplitude Modulation) – Data is sent by changing the signal's amplitude.
2. FM (Frequency Modulation) – Data is sent by changing the signal's frequency.
3. PM (Phase Modulation) – Data is sent by changing the signal's phase.
RJ-45 Connector
RJ-45 (Registered Jack-45) is an 8-wire connector used in Ethernet LANs to connect computers. It looks
similar to an RJ-11 telephone connector but is wider.
Features of NIC:
• Every NIC has a unique node address.
• Also called Terminal Access Point (TAP) or Network Interface Unit (NIU).
• The manufacturer assigns a unique MAC Address (48-bit) to each NIC.
MAC Address: This is the Media Access Control Address, a unique physical address assigned to each NIC.
Ethernet Card
An Ethernet Card is a type of NIC specifically designed for Ethernet networks.
Ethernet Features:
• Developed by Xerox, DEC, and Intel.
• Uses bus or star topology.
• Supports speeds up to 10 Gbps.
Conclusion
Network devices like modems, NICs, and Ethernet cards play a crucial role in communication. RJ-45
connectors help in Ethernet connections, while MAC addresses ensure unique identification. Understanding
these devices is essential for working with networks.
Hub
A hub is a hardware device that connects multiple computers in a network. It helps in communication
between different devices in a Local Area Network (LAN).
Types of Hubs
Hubs can be passive or active:
1. Active Hub – Boosts (amplifies) the signal as it moves between devices, similar to a repeater.
2. Passive Hub – Simply forwards the signal without changing it.
Conclusion
• A hub is a simple device that connects multiple computers and broadcasts messages to all devices.
• A switch is smarter and sends data only to the correct destination, reducing congestion and improving
speed.
• In modern networks, switches are preferred over hubs for better performance and security.
Repeater
A repeater is a device that boosts and restores network signals to ensure they reach their destination
without losing quality.
Types of Repeaters
1. Amplifier Repeater – Amplifies both the signal and any background noise.
2. Signal Repeater – Cleans and retransmits the signal as if it were fresh from the source.
Bridge
A bridge is a device that connects two networks that use the same communication rules (protocols).
Router
A router is a device that connects different networks and decides the best path for data to travel.
Types of Routers
1. Wired Router – Connects devices using cables.
2. Wireless Router – Connects devices using WiFi.
3. Modem Router – A single device that functions as both a router and a modem.
Gateway
A gateway is a device that connects different types of networks with different communication protocols.
How Does a Gateway Work?
• It acts as an entry point between networks.
• In companies, a gateway helps connect internal networks to external networks.
• In homes, the Internet Service Provider (ISP) acts as a gateway to connect users to the Internet.
WiFi Card
A WiFi card is either an internal or external Local Area Network adapter with a built-in wireless radio and
antenna.
Types of WiFi Cards
1. Internal WiFi Card – Installed inside the computer, usually as a PCI-Express card in desktop computers.
2. External WiFi Card – A plug-in device (like a USB WiFi adapter) that adds wireless connectivity to a
computer.
Conclusion
• Repeaters boost signals for long-distance communication.
• Bridges connect similar networks, while routers connect different networks.
• Gateways manage traffic between networks with different protocols.
• WiFi cards enable wireless connectivity in computers.
Each of these devices plays a crucial role in making network communication smooth and efficient.
Limitations of HTTP:
• It is not secure because data is sent without encryption.
Advantages of FTP:
1. Useful for businesses – Helps transfer files between different offices or departments.
2. Collaboration tool – Makes it easier for teams in different locations to work together.
3. Popular for file sharing – Used widely for distributing files over the Internet.
What is TCP/IP?
• It is a set of rules that allows computers to send and receive data.
• It is made up of two main parts:
• TCP (Transmission Control Protocol) – Ensures reliable delivery of data.
• IP (Internet Protocol) – Finds the address of the receiving device.
SLIP and PPP (Protocols for Internet Connection Over Dial-Up Lines)
1. What is SLIP?
SLIP (Serial Line Internet Protocol) is an old protocol used to send IP packets over dial-up lines (telephone lines).
Features of SLIP:
• First protocol for sending IP data over dial-up connections.
• Very basic – It only defines how to encapsulate (wrap) IP packets.
• No extra features – It doesn’t support dynamic address assignment, link testing, or using multiple
protocols.
• Outdated – It has been replaced by PPP.
2. What is PPP?
PPP (Point-to-Point Protocol) is the modern standard for sending IP packets over serial lines (e.g., telephone lines).
Example Use:
If you check your email from a phone and later from a computer, IMAP makes sure your emails are
synced across all devices.
✅
Pros and Cons of POP3:
❌
Works well if you want to keep emails stored on your personal device.
❌
Can download spam or viruses if not filtered properly.
If emails are removed from the server, you can’t access them from another device.
Example Use:
If you send an email using Gmail, SMTP is responsible for delivering it to the receiver’s email server.
4. HTTP (Hypertext Transfer Protocol)
HTTP is not an email-specific protocol, but it is used for web-based email services like Gmail, Outlook, and
Yahoo Mail.
You don’t need to download emails—they remain accessible from any device with a browser.
Example Use:
When you log into Gmail from a web browser (like Chrome or Firefox), HTTP is used to access your emails.
Wireless and Mobile Computing Technologies
Wireless and mobile computing allow people to communicate and access the internet without physical wires.
Below are the main technologies and interfaces used for wireless and mobile communication.
Features of GSM:
• Developed as a 2G network to replace old analog systems (1G).
• Uses TDMA (Time Division Multiple Access) to allow eight calls on the same frequency.
• Supports voice calls, SMS (Short Messaging Service), and data transmission.
• Works in different frequency bands:
• 900 MHz & 1800 MHz in Europe and Asia
• 1900 MHz in the U.S.
• Encrypts calls for security.
Wi-Fi Hotspots
• Public places (cafes, airports, hotels) with Wi-Fi access.
• Some are free, while others require payment.
Features of WiMAX:
• Covers up to 30 miles (50 km) for fixed connections.
• Uses microwave links instead of cables.
• Requires a WiMAX tower to provide wireless internet.
Internetworking Terms and Concepts
This section explains different terms and concepts related to internetworking, starting with the
World Wide Web (WWW).
2. Telnet
Telnet is a tool that allows users to connect to a remote computer over the Internet and work on it as if they
were using it physically.
Uses of Telnet
• Logging into remote computers.
• Accessing information stored in online libraries.
• Running commands on a remote system.
To use Telnet, a user enters the IP address or domain name of the remote computer and logs in with valid
credentials.
Structure of a URL
A URL consists of three main parts:
1. Protocol – Specifies how data is transferred (e.g., http://, https://, ftp://).
2. Domain Name – The address of the server (e.g., www.google.com).
3. Path – The specific location of the resource on the server (e.g., /images/photo.jpg).
Domain Names
A Domain Name is the readable version of an Internet address. Instead of remembering a long IP address like
192.168.1.1, users can simply type google.com.
What is DNS?
• The Domain Name System (DNS) is like a phonebook for the Internet.
• Instead of remembering numbers (IP addresses) like 203.127.54.9, we use easy names like
google.com.
• Example: Instead of 8.8.8.8, you can type google.com in your browser.
DNS Resolution
• The process of finding an IP address from a domain name is called Domain Name Resolution.
• If the first DNS server doesn’t know the IP, it asks another DNS server until the address is found.
What is a Website?
• A website is a collection of related web pages stored on a web server.
Web 1.0 (Static Web) Web 2.0 (Interactive Web) Web 3.0 (Intelligent Web)
• The first version of the Added interactive features like • Uses AI (Artificial
Internet. social media, blogs, and video Intelligence), Machine
• Websites were static (only sharing. Learning, and Blockchain.
displayed text and images, Allowed users to create and share • Websites become more
no interaction). content. intelligent and customized
Social Media: Facebook, Twitter, MySpace for users.
Video Sharing: YouTube, Flickr • Supports 3D graphics and
Blogging: WordPress, Blogger
virtual reality.
Advantages of Web 2.0
• More user participation Advantages of Web 3.0
(people can comment, like, • Better privacy and security.
and share). • More interactive
• Easy access to information experiences.
and collaboration. • Faster and smarter websites.
Limitations of HTML
• HTML is not a programming language; it is just used for structuring web pages.
• It does not support advanced interactivity or complex features on its own.
Examples of DHTML
• Hover effects (changing a button’s color when the mouse moves over it).
• Displaying different content based on the user’s location.
• Updating page content without reloading the whole page.
Server-Side Scripting
• Runs on the web server before sending content to the user’s browser.
• Used for secure tasks like password protection, form processing, and database management.
• Works independently of the user’s browser.
• Examples: PHP, ASP, Perl, JSP.
2. Authentication
• Verifies the user’s identity by checking credentials like passwords.
• Ensures that only genuine users can enter the system.
3. Biometric Systems
• The most secure method of authentication.
• Uses fingerprints, retinal patterns, or facial recognition to verify identity.
4. Firewalls
• A security system that blocks unauthorized access to networks.
• Firewalls can be hardware or software and protect private networks from hackers.
• They filter messages to allow only safe communications.
2. Malicious Hacking
• Unauthorized access with the intent to cause damage or steal data.
4. Child Pornography
• A serious cybercrime involving illegal content related to minors.
6. Breach of Privacy
• Stealing or sharing private information without consent is a criminal offense.
Importance of IPR
• Protects original creators from unfair use of their work.
• Encourages innovation and creativity in business and technology.
Computer Viruses and Cyber Threats
A computer virus is a harmful program that needs a host (like a file or software) to spread, similar to a real
virus in humans.
Some viruses are harmless pranks, while others can damage computers.
Characteristics of a Virus
• It can make copies of itself (replicate).
• It needs a host file or program.
• It becomes active only when triggered (e.g., opening an infected file).
2. Worms
A worm is a self-replicating program that spreads through networks. Unlike viruses, it doesn’t need a host file.
Characteristics:
• Spreads across networked computers.
• Runs independently.
• May carry harmful code.
3. Spam
Spam is unwanted email (junk mail), often containing ads or scams.
How to Avoid Spam?
• Use email filters.
• Avoid signing up for unnecessary websites with your real email ID.
Types of Malware:
1. Spyware – Secretly collects user data like passwords and banking details.
2. Adware – Displays annoying ads based on your internet activity.
3. Ransomware – Locks your files and demands money to unlock them.
4. Keyloggers – Records every key you press (used to steal passwords).
Tip: Use a virtual keyboard for sensitive tasks like online banking to avoid keyloggers.
Antivirus Software
An antivirus detects and removes viruses, worms, and malware. It monitors your system for suspicious
activity and prevents harm to your computer.