Home / Notes / Class 12 / Computer Science / Networking

Networking: Class 12 Computer Science

Written by Usman Tariq (Computer Science)

Computer networks and their types, topologies, transmission media, devices, network models and protocols, IP addressing, the internet and DNS, bandwidth, and basic network security.

Key points

A computer network is a group of computers and devices joined to share data, files, printers and an internet connection. Networks save cost, allow quick communication and make central backup and control possible. Their weaknesses are security risks and loss of work if the main server fails.

Types of network by size:

  • PAN: a few metres around one person, such as Bluetooth between a phone and earphones.
  • LAN: one building or campus, such as a school lab. Fast and privately owned.
  • MAN: a city, for example a network joining the branches of a bank in a city.
  • WAN: a country or the world. The internet is the largest WAN.

In a client-server network, powerful servers give services and clients request them. It is easy to manage and secure. In a peer-to-peer network every computer is equal and can share resources. It is cheap and simple but harder to secure and suited to small groups.

Topologies (layouts):

  • Bus: all devices on one cable. Cheap, but a break stops all and speed drops as devices increase.
  • Star: all devices connect to a central hub or switch. Easy to add devices and one failure does not stop others, but the central device is a single point of failure.
  • Ring: each device connects to two neighbours in a circle. Data travels in one direction.
  • Mesh: devices have many links to each other. Very reliable but costly.
  • Tree: stars joined to a bus-like backbone.

Transmission media:

  • Twisted pair: copper wires twisted in pairs, used in Ethernet cables (UTP). Cheap, with a limit of 100 m per segment.
  • Coaxial cable: copper core with shielding, used for cable TV.
  • Fibre optic: sends light through glass. Very fast, long distance and free from electrical noise, but costly.
  • Wireless: radio waves (Wi-Fi), microwaves and satellite.

Network devices:

  • NIC: the card that connects a computer to a network.
  • Hub: repeats data to all ports.
  • Switch: sends data only to the port of the destination device using its MAC address.
  • Router: joins different networks and chooses the path using IP addresses.
  • Modem: converts digital signals to analogue and back for telephone or cable lines.
  • Access point: gives wireless access to a wired network.

A protocol is a set of rules for communication. The TCP/IP model has four layers: application (HTTP, FTP, SMTP, DNS), transport (TCP, UDP), internet (IP) and network access. TCP is reliable and ordered, UDP is fast without guarantee, as used in video calls. Data is split into packets which may travel by different routes and are put in order at the destination.

An IP address identifies a device on a network. IPv4 has 32 bits, written as four decimal numbers from 0 to 255 separated by dots, such as 192.168.1.10. This gives 2³² addresses, which are running out, so IPv6 with 128 bits is used. A MAC address is a 48-bit hardware address fixed in the NIC. A subnet mask separates the network part from the host part.

The Domain Name System (DNS) turns names such as example.com into IP addresses, like a phonebook. The internet is a global network of networks, and the World Wide Web is a service on it. An ISP gives access to the internet.

Bandwidth is the amount of data a link can carry per second, measured in bits per second (bps, Mbps). Latency is the delay in reaching the destination. Note that 1 byte is 8 bits, so file sizes in bytes and speeds in bits need care.

Network security protects data and users. A firewall filters traffic by rules. Strong passwords, encryption, antivirus and updates reduce risk. Threats include malware, phishing, hacking and denial of service attacks. Encryption makes data unreadable to anyone without the key.

Study tip: Draw neat labelled diagrams of each topology and give one advantage and disadvantage for each. In numericals, convert units first, and show that 1 byte = 8 bits.

Definitions and flashcards

Say the meaning first, then open the card to check.

LAN

A network that covers a small area such as a building.

Topology

The physical or logical layout of devices in a network.

Protocol

A set of rules that devices follow to communicate.

Router

A device that joins networks and forwards packets by IP address.

IP address

A number that identifies a device on a network.

DNS

A system that changes domain names into IP addresses.

Bandwidth

The data rate of a link, in bits per second.

Firewall

Hardware or software that filters network traffic by rules.

Packet

A small unit of data sent across a network.

Formula sheet

NameFormulaWhat it means
Download timetime (s) = file size in bits ÷ speed in bpsTime for transfer, with 1 byte = 8 bits
IPv4 addresses2³² = 4,294,967,296Total possible IPv4 addresses
Usable hosts2ʰ − 2h host bits; one address is the network and one the broadcast

Short questions with model answers

These are the kind of questions asked for 2, 3 and 5 marks. Try each one before opening the answer.

Differentiate between a hub and a switch. (3 marks)

A hub sends incoming data to every port, so all devices see it and traffic is high. A switch learns the MAC address of each device and sends data only to the intended port. A switch is faster, safer and more efficient.

What is the function of DNS? (2 marks)

DNS converts a domain name that people can remember, such as example.com, into the numeric IP address that computers use. Without it we would have to type IP addresses to open sites.

State two advantages and two disadvantages of star topology. (3 marks)

Advantages: a fault in one cable affects only that device, and new devices are easy to add. Disadvantages: if the central switch fails, the whole network stops, and it needs more cable than a bus.

Compare TCP and UDP. (3 marks)

TCP sets up a connection, numbers the packets, checks for errors and resends lost ones, so data arrives complete and in order. It is used for web pages and email. UDP sends packets without a connection or checking, so it is faster but may lose data. It is used in live video and games.

Explain the types of network by geographic area. (5 marks)

A PAN covers a few metres around a person. A LAN covers a building such as a school, and is fast and privately owned. A MAN covers a city and joins several LANs. A WAN covers countries or the world and uses leased lines or satellites. The internet is a WAN. Range, speed and cost differ for each type.

Why is fibre optic cable better than twisted pair for long distances? (2 marks)

Fibre carries light signals, so it is not affected by electrical noise, loses little signal over distance and offers very high bandwidth. Twisted pair loses signal strength and picks up interference, so it is limited to about 100 m.

Numericals with worked steps

How long does it take to download a 100 MB file at 8 Mbps?
  1. Convert size to bits: 100 × 8 = 800 megabits
  2. Time = 800 Mb ÷ 8 Mbps = 100 s

Answer: 100 seconds (1 min 40 s)

A network uses 8 host bits. How many usable hosts are there?
  1. Total addresses = 2⁸ = 256
  2. Subtract the network and broadcast addresses: 256 − 2 = 254

Answer: 254 hosts

Write the first part of the IP address 192.168.1.10 in binary.
  1. 192 = 128 + 64 = 10000000 + 01000000
  2. Add: 11000000

Answer: 192 = 11000000

Common mistakes

  • Mixing up bits and bytes when working out download time.
  • Calling the internet and the World Wide Web the same thing.
  • Saying a hub and a switch work alike. A switch sends only to the destination port.
  • Writing IPv4 numbers above 255.
  • Forgetting that a router joins different networks, while a switch connects devices in one network.

Practise this chapter

Practice questions and timed test Printable worksheet

Previous: Databases and SQL Next: Web development