CBSE Class 12 CS (083) - Computer Networks

Computer Networks

A computer network is a collection of interconnected devices that share resources and communicate with each other. This chapter covers the fundamentals of computer networks including types, topologies, transmission media, and network devices as per the CBSE Class 12 Computer Science syllabus.

1. Introduction to Computer Networks

A computer network is a system consisting of two or more computers connected together to share resources, exchange data, and communicate. The devices in a network are called nodes and the connections between them are called links.

Key components of a network:

  • Nodes: Computers, servers, printers, or any device connected to the network.
  • Links: Wired or wireless connections between nodes.
  • Protocols: Rules governing communication between devices.
  • NIC (Network Interface Card): Hardware that connects a device to the network.
  • Switch/Router: Devices that forward data within and between networks.

2. Advantages of Networking

  • Resource sharing: Share hardware like printers, scanners, and storage devices.
  • Data sharing: Share files and databases across multiple users.
  • Communication: Enable email, instant messaging, video conferencing.
  • Cost-effective: Reduce hardware costs by sharing resources.
  • Centralized management: Manage data and security from a central location.
  • Scalability: Add new devices easily to the network.
  • Reliability: Data can be replicated across multiple servers.

3. Types of Networks

Network TypeFull FormGeographical AreaExample
PANPersonal Area NetworkWithin a person's reach (few meters)Bluetooth, smartphone tethering
LANLocal Area NetworkSingle building or campus (up to 1 km)School computer lab, office network
MANMetropolitan Area NetworkA city or town (up to 50 km)Cable TV network, city Wi-Fi
WANWide Area NetworkCountries or continents (unlimited)Internet

4. Network Topologies

Network topology refers to the physical or logical arrangement of devices in a network. The choice of topology affects performance, scalability, and fault tolerance.

5. Star Topology

All devices are connected to a central device (hub or switch). Data passes through the central device to reach its destination.

Advantages: Easy to install and manage; failure of one node does not affect others; easy to add or remove devices.

Disadvantages: Central device failure brings down the entire network; requires more cable than bus topology.

6. Bus Topology

All devices are connected to a single central cable called the bus or backbone. Data travels along the cable in both directions.

Advantages: Simple and cost-effective for small networks; requires less cable.

Disadvantages: Limited cable length; a break in the cable brings down the entire network; difficult to troubleshoot.

7. Ring Topology

Each device is connected to exactly two other devices, forming a circular ring. Data travels in one direction around the ring.

Advantages: Equal access for all nodes; no data collisions; predictable performance.

Disadvantages: Failure of one node can disrupt the entire network; adding/removing devices requires reconfiguration.

8. Mesh Topology

Every device is connected to every other device in the network. A full mesh has n(n-1)/2 connections for n devices.

Advantages: Highest fault tolerance; no single point of failure; excellent performance.

Disadvantages: Very expensive and complex; requires extensive cabling; difficult to maintain.

9. Tree Topology

A combination of star topology arranged hierarchically. Multiple star networks are connected to a central bus backbone.

Advantages: Scalable and easy to manage; supports hierarchical organization.

Disadvantages: Failure of backbone affects the entire network; more cable required than bus topology.

10. Hybrid Topology

A combination of two or more different topologies. Large networks often use hybrid topologies to leverage the advantages of each type.

Example: A university network may use star topology within departments and bus topology to connect different departments.

11. Network Devices

Network devices are hardware components used to connect computers and other devices in a network.

12. Hub

A hub is a simple device that connects multiple devices in a network. It broadcasts data to all connected ports.

Characteristics:

  • Operates at the Physical layer (Layer 1) of the OSI model.
  • Broadcasts data to all devices; no intelligent routing.
  • Half-duplex communication.
  • Inefficient for large networks due to collisions.

13. Switch

A switch is an intelligent device that forwards data only to the intended recipient based on MAC addresses.

Characteristics:

  • Operates at the Data Link layer (Layer 2).
  • Creates a dedicated connection between sender and receiver.
  • Full-duplex communication.
  • More efficient than a hub; reduces collisions.

14. Router

A router forwards data packets between different networks based on IP addresses.

Characteristics:

  • Operates at the Network layer (Layer 3).
  • Connects different networks (e.g., home network to the Internet).
  • Performs path selection using routing algorithms.
  • Can filter traffic using access control lists.

15. Modem

A modem (Modulator-Demodulator) converts digital signals from a computer to analog signals for transmission over telephone lines and vice versa.

Types: DSL modem, cable modem, fiber optic modem.

16. Gateway

A gateway connects two networks that use different protocols. It performs protocol conversion between the two networks.

Example: Connecting a local network to the Internet requires a gateway.

17. Transmission Media

Transmission media carry data from one device to another. They are classified into guided (wired) and unguided (wireless) media.

18. Guided/Wired Media

MediumDescriptionSpeedUse
Twisted Pair CableTwo insulated copper wires twisted togetherUp to 10 GbpsTelephone lines, Ethernet
Coaxial CableCopper wire with insulation and shieldingUp to 1 GbpsCable TV, broadband Internet
Fiber Optic CableGlass/plastic fibers carrying light signalsUp to 100+ GbpsHigh-speed backbone networks

Unguided (Wireless) Media: Radio waves, microwaves, infrared, satellite communication.

19. Revision Questions and Answers

Very Short Answer Questions

1. What is a computer network?
A collection of interconnected devices that share resources and communicate.

2. Expand LAN, MAN, WAN.
LAN: Local Area Network, MAN: Metropolitan Area Network, WAN: Wide Area Network.

3. Which topology has a central device?
Star topology.

4. Which network device broadcasts data to all ports?
Hub.

5. Which device forwards data based on IP addresses?
Router.

Short Answer Questions

1. Differentiate between a hub and a switch.
A hub broadcasts data to all connected devices and operates at the physical layer. A switch forwards data only to the intended device based on MAC addresses and operates at the data link layer. Switches are more efficient and provide better performance than hubs.

2. Explain the advantages and disadvantages of star topology.
Advantages: Easy to install and manage, failure of one node does not affect others, easy to add/remove devices. Disadvantages: Central device failure brings down the network, requires more cabling than bus topology.

Long Answer Questions

1. Compare and contrast the four main types of networks: PAN, LAN, MAN, and WAN.
PAN covers the smallest area (few meters) for personal devices. LAN covers a single building or campus (up to 1 km) with high speed and low cost. MAN covers a city (up to 50 km) connecting multiple LANs. WAN covers large geographical areas (countries/continents) with lower speed and higher cost. The Internet is the largest WAN.

2. Explain guided transmission media with examples.
Guided media provide a physical path for signal transmission. Twisted pair cable consists of copper wires twisted to reduce interference, used in telephone and Ethernet. Coaxial cable has a copper core with shielding, used in cable TV and broadband. Fiber optic cable uses light signals through glass fibers, offering the highest speed and bandwidth, used in backbone networks.