Computer Science
Computer Networks

COMPUTER NETWORKS: COMPREHENSIVE STUDY NOTES


1. Introduction to Computer Networks

In our modern interconnected world, information is produced, exchanged, and traced globally in real-time. 


This is made possible because almost everyone and everything in the digital world is linked through networks. 


A network is generally defined as a group of two or more similar things or people interconnected with each other, such as social networks or mobile networks.


Specifically, a computer network is an interconnection among two or more computers or computing devices, allowing them to share data and resources. 


The size of these networks can vary from a small setup connecting a few computers in a single room to global networks connecting millions of devices.


Key Components and Data Communication

Every network consists of hosts (nodes), which can be servers, desktops, laptops, or smartphones. For a network to function, data communication must occur, which refers to the exchange of data between these devices over a communication medium. 


Successful data communication relies on five essential components:


  1. Sender: The device capable of sending data (e.g., computer, mobile phone).

  2. Receiver: The device capable of receiving data (e.g., printer, laptop, TV).

  3. Message: The information being exchanged, such as text, images, audio, or video.

  4. Communication Media: The path (wired or wireless) through which the message travels.

  5. Protocols: A set of standard rules followed by the communicating parties to ensure reliable transmission.


2. Evolution of Networking

The journey of computer networks began in the 1960s with a research project commissioned by the ARPANET (Advanced Research Projects Agency Network) in the U.S. Department of Defence. Its goal was to connect academic and research institutions for scientific collaboration.


Key Milestones in Evolution:

  • 1969: ARPANET becomes functional, connecting UCLA and the Stanford Research Institute (SRI).

  • 1971: Roy Tomlinson develops E-mail, introducing the '@' symbol to mean "at".

  • 1974: The first commercial use of ARPANET begins under the name Telenet.

  • 1982: The term Internet is officially coined.

  • 1983: TCP/IP is introduced as the standard protocol on ARPANET.

  • 1984: The Domain Name System (DNS) is introduced.

  • 1986: The National Science Foundation brings connectivity to more people through NSFNET.

  • 1990: Sir Tim Berners-Lee at CERN develops HTML and URL, giving birth to the World Wide Web (WWW).

  • 1997: The first version of the Wi-Fi (802.11) standard is introduced.


3. Network Types

Computer networks are broadly categorised based on the geographical area they cover and their data transfer rates.


Personal Area Network (PAN)

A PAN is formed by connecting personal devices like computers, smartphones, and printers within a very short range, typically about 10 metres. It can be wired (e.g., a phone connected via USB to a laptop) or wireless (e.g., two smartphones communicating via Bluetooth).


Local Area Network (LAN)

A LAN connects nodes placed at a limited distance, such as a single room, a floor, an office building, or a school campus.


  • Connectivity: Uses Ethernet cables, fibre optics, or Wi-Fi.

  • Speed: High data transfer rates, ranging from 10 Mbps (Ethernet) to 1000 Mbps (Gigabit Ethernet).


  • Security: Comparatively secure as only authenticated users can access the shared resources.


Metropolitan Area Network (MAN)

A MAN is an extended form of LAN that covers a larger geographical area, such as an entire city or town.



  • Range: Can extend up to 30–40 km.

  • Examples: Cable TV networks and cable-based broadband internet services.


Wide Area Network (WAN)

A WAN connects computers, LANs, and MANs spread across different geographical locations, countries, or continents.


  • Connectivity: Established via wired or wireless media, including satellite links.

  • The Internet: The largest existing WAN, connecting billions of computers and smartphones globally.


4. Network Devices

To transmit data across different media and configure networks, various specialised hardware devices are required.


  • Modem (MOdulator DEModulator): Converts digital bits from a computer into analog signals for transmission over telephone lines and converts incoming analog signals back into digital data.


  • Ethernet Card (NIC): A network adapter that acts as an interface between a computer and the network. It is a circuit board mounted on the motherboard, and each NIC has a unique, permanent MAC address.


  • Repeater: Since data signals lose strength after travelling a certain distance (usually 100m), a repeater is used to regenerate the original signal and put it back on the cable.


  • Hub: A device used to connect multiple devices through wires. It is a "broadcast" device; data arriving on one port is sent out to all other ports, which can lead to data collisions if two devices send data at the same time.


  • Switch: An intelligent networking device that plays a central role in a LAN. Unlike a hub, a switch extracts the destination address from a data packet and sends the signal only to the selected device, avoiding unnecessary traffic and collisions.


  • Router: A device that receives, analyses, and transmits data packets to other networks. It can repackage data to fit different network types and connects a LAN to the Internet.


  • Gateway: A key access point that acts as a "gate" between an organisation’s private network and the outside Internet. It serves as the entry and exit point for all data.


5. Network Topologies

The arrangement or physical layout of computers and peripherals in a network is called its topology.


  • Mesh Topology: Each communicating device is connected to every other device in the network.

    • Pros: Highly reliable (if one node fails, others continue), secure, and handles large traffic.

    • Cons: Complex wiring and high cabling cost.

    • Calculation: To connect n nodes, it requires n(n−1)/2 wires.


  • Ring Topology: Each node is connected to exactly two other devices, forming a circular path. Data transmission is unidirectional (clockwise or counter-clockwise).


  • Bus Topology: All nodes connect to a single central backbone wire called a "bus".

    • Pros: Shared medium makes it cheap and easy to maintain.

    • Cons: If the backbone cable fails, the whole network goes down; it is considered less reliable than mesh.


  • Star Topology: Each device is connected to a central networking device like a hub or a switch.

    • Pros: Fast and efficient; failure of one node does not affect the rest of the network.

    • Cons: If the central networking device fails, the complete network fails.


  • Tree (Hybrid) Topology: A hierarchical arrangement with multiple branches. Each branch can have one or more basic topologies like star, ring, or bus. This is common in WANs where multiple LANs are connected.


6. Basic Concept of MAC and IP Address


Every node in a network must be uniquely identified to ensure data packets reach the correct destination.


MAC Address (Media Access Control)


  • Definition: Also known as the physical or hardware address.

  • Permanence: It is engraved on the NIC at the time of manufacturing and cannot be changed.

  • Format: A 12-digit hexadecimal number (48 bits). The first six digits represent the manufacturer's ID (OUI), and the last six are the serial number.


IP Address (Internet Protocol)

  • Definition: A logical address used to uniquely identify each node in a network using Internet Protocol.


  • Changeability: Unlike a MAC address, an IP address can change if a node is moved to a different network.


  • Versions:

    • IPv4: A 32-bit numeric address written as four decimal numbers (0–255) separated by periods (e.g., 192.168.0.1).

    • IPv6: A 128-bit address designed because IPv4's 4.3 billion unique addresses were insufficient. It is written as eight groups of hexadecimal numbers separated by colons.


7. Difference Between Internet and Web

While often confused, the Internet and the Web are distinct concepts.


  • The Internet: The global hardware infrastructure of interconnected computing devices, including servers, laptops, routers, and even smart appliances (IoT). It is the "network of networks".


  • The World Wide Web (Web): An information system built on top of the Internet. It consists of trillions of interlinked web pages and resources accessible via the Internet.


The Web was created through three fundamental technologies:

  1. HTML (HyperText Markup Language): Used to design standardised web pages that any computer can read.

  2. URI/URL (Uniform Resource Locator): A unique address or path for every resource on the web (e.g., http://www.ncert.nic.in).

  3. HTTP (HyperText Transfer Protocol): The set of rules used to retrieve linked web pages.


8. Domain Name System (DNS)

Every website is stored on a server with a unique IP address. To access a website, we would technically need to enter its numerical IP address into a browser. However, since numbers are hard to remember, each server is given a human-readable Domain Name (e.g., ncert.nic.in).

  • DNS Server: Maintains a database of domain names and their mapped IP addresses.

  • Domain Name Resolution: The process of converting a domain name entered in a browser into its corresponding IP address.

  • Hierarchy: DNS servers are arranged hierarchically. At the top are 13 root servers (named A through M), ten of which are in the US, one in London, one in Stockholm, and one in Japan. The IANA (Internet Assigned Numbers Authority) maintains this list.


9. Summary Table: Network Address Comparison

Feature

MAC Address

IP Address

Full Form

Media Access Control

Internet Protocol

Type

Physical / Hardware Address

Logical / Software Address

Changeability

Permanent (assigned by manufacturer)

Temporary (assigned by ISP/Admin)

Format

48-bit Hexadecimal

32-bit (IPv4) or 128-bit (IPv6)

Primary Use

To physically identify a machine

To route data across global networks