Follow Us
Select Medium / माध्यम चुनें:
Eng (English) Beng (বাংলা) Hindi (हिन्दी)
WBB • Class XI • Computer Science • Ch 5
Estimated Time: 45 Mins
Study Progress: In Progress

Computer Networks

Computer Networks constitute the indispensable digital communications infrastructure of modern human civilization, enabling billions of autonomous computing devices to interconnect, exchange structured data, and share physical and logical resources worldwide. A computer network is fundamentally an interconnected collection of autonomous computing nodes that communicate through shared transmission media adhering to standardized protocols. Under the West Bengal Council of Higher Secondary Education (WBCHSE) Class 11 Computer Science curriculum, this chapter delivers a rigorous architectural foundation spanning geographic network classifications (PAN, LAN, MAN, WAN); physical bounded media (Twisted Pair with RJ-45, Coaxial, and Optical Fiber operating under Total Internal Reflection) alongside unbounded wireless channels (Radio, Microwave, Infrared); geometric network topologies (Bus, Star, Ring, Mesh, Tree); interconnecting hardware devices (Hubs, Switches, Routers, Bridges, Gateways); the authoritative reference architectures (the ISO-OSI 7-Layer model and the TCP/IP 4-layer protocol suite); logical IPv4 classful addressing, subnetting mathematics, and private IP blocks; and core Internet application layer protocols (HTTP, HTTPS, FTP, DNS, SMTP, DHCP) alongside fundamental network switching paradigms.

Why This Chapter Matters

In the contemporary technological landscape, isolated standalone computers are virtually non-existent. Modern software architectures—ranging from cloud computing clusters, global financial transaction networks, and e-commerce platforms to streaming media services, artificial intelligence APIs, and cyber-physical IoT systems—are intrinsically networked. Understanding how data packets are encapsulated, addressed, routed across complex topologies, and reassembled without loss is essential for every aspiring computer scientist and software engineer. The principles explored in this chapter explain how data traverses submarine fiber-optic cables at near the speed of light, how routers direct packets through the optimal global path, and how network security barriers defend against cyber intrusions. For higher secondary board candidates, mastery of network layers, topologies, and IP address mathematics guarantees top marks in theoretical examinations and establishes the groundwork for web development, distributed systems, and cyber security in higher education.

Chapter Roadmap & Progression

1 Network Concepts, Architecture & Ge...
2 Transmission Media: Guided (Wired)...
3 Network Topologies & Interconnectin...
4 Reference Models: ISO-OSI 7-Layer A...
5 Internet Protocol (IPv4) Addressing...
6 Switching Paradigms, Application Pr...

Complete Concept Guide (100% Curriculum Coverage)

Network Concepts, Architecture & Geographic Classification

1.1 Definition and Core Goals of Computer Networks

A Computer Network is defined as an interconnected collection of autonomous computing devices (computers, servers, smartphones, network switches, IoT devices) that communicate with one another using standardized protocols over physical or wireless transmission media.

The foundational design goals and business drivers of computer networks include:

  • Resource Sharing: Making expensive hardware (high-capacity printers, optical storage arrays, GPUs) and software programs available to any network user regardless of physical location.
  • High Reliability & Redundancy: Replicating files and databases across multiple redundant machines. If one server experiences hardware failure, alternate machines seamlessly assume processing duties.
  • Cost Reduction: Small interconnected workstations communicating with centralized server clusters provide vastly superior price-to-performance ratios compared to monolithic mainframes.
  • High-Speed Communication: Providing near-instantaneous global messaging (email, video conferencing, real-time collaboration).
  • Distributed Processing: Distributing compute-heavy tasks across multiple cooperative worker nodes in parallel.
1.2 Network Architectural Models: Client-Server vs Peer-to-Peer (P2P)

Networks are architecturally structured into two fundamental relationship models:

Architectural ParameterClient-Server ArchitecturePeer-to-Peer (P2P) Architecture
Control PhilosophyCentralized: Dedicated servers manage resources and dictate security policies.Decentralized: All nodes (peers) possess equal operational status and rights.
Role SpecializationRigid: Clients request services; Servers process and fulfill requests (Web, File, Database servers).Fluid: Every node operates simultaneously as both a client (consumer) and a server (provider).
Scalability & PerformanceHigh: Servers are optimized for heavy concurrent workloads, though servers can become bottlenecks.Extremely High for file distribution (BitTorrent): Aggregate bandwidth increases as more peers join.
Administration & BackupSimple & Unified: Centralized data backups, user access control lists (ACLs), and audit logging.Complex: Backups and security must be managed independently on each individual host machine.
Implementation CostHigh: Requires dedicated server hardware, specialized operating systems, and network administrators.Minimal: Inexpensive; uses existing desktop workstations and standard operating systems.
1.3 Network Classification by Geographic Scale

Computer networks are universally classified by the physical geographic diameter they encompass:

  1. PAN (Personal Area Network): Spans a radius of $1$ to $10$ meters centered around an individual. Uses short-range technologies like Bluetooth (IEEE 802.15.1), Zigbee, and USB. Connects wireless earphones, smartwatches, and laptops.
  2. LAN (Local Area Network): Confined to a geographically restricted area such as a single room, office floor, school laboratory, or university campus (up to a few kilometers). Characteristics: privately owned, ultra-high data rates ($100\text{ Mbps}$ to $10\text{ Gbps}$ Ethernet / Wi-Fi), and extremely low bit-error rates.
  3. MAN (Metropolitan Area Network): Spans an entire city or municipal district (typically $10$ to $50\text{ km}$). Classic examples include city cable television networks, municipal traffic camera networks, and inter-branch bank networks across a metropolis.
  4. WAN (Wide Area Network): Spans vast geographical regions crossing country borders, continents, or the entire globe. Characteristics: utilizes public telecommunications backbones, leased undersea fiber cables, and communication satellites; operates at lower speeds and higher error rates compared to LANs. The Internet is the quintessential global WAN.

Transmission Media: Guided (Wired) & Unguided (Wireless)

2.1 Classification of Transmission Media

The physical path connecting the transmitter and the receiver across which electromagnetic or optical energy propagates is called the Transmission Medium. It is categorized into Guided (Wired / Bounded) and Unguided (Wireless / Unbounded) channels.

2.2 Guided Transmission Media (Wired Cables)

1. Twisted Pair Cable: Consists of pairs of insulated copper wires twisted spirally around each other. Twisting mathematically cancels out electromagnetic interference (EMI) and radio frequency interference (RFI) from external sources and suppresses crosstalk between adjacent pairs.

  • Unshielded Twisted Pair (UTP): Inexpensive, lightweight, flexible, and standard in modern LANs. Categories include Cat 5e ($100\text{ MHz}$, up to $1\text{ Gbps}$) and Cat 6 ($250\text{ MHz}$, up to $10\text{ Gbps}$ up to 55m). Terminated with standard 8-pin RJ-45 connectors. Maximum run without repeaters: $100\text{ meters}$.
  • Shielded Twisted Pair (STP): Features a braided metal foil shield encasing each pair or all pairs, providing superior noise immunity in heavy industrial environments, but is bulkier, stiffer, and requires proper electrical grounding.

2. Coaxial Cable: Features a central solid copper conductor encased in a thick dielectric insulator, surrounded by a cylindrical woven wire mesh shield, and protected by an outer plastic jacket.

  • The concentric shielding provides exceptional noise immunity and high bandwidth compared to twisted pair.
  • Types: Baseband (50-ohm, transmits single digital signal) and Broadband (75-ohm, frequency division multiplexed for cable TV and high-speed cable modems). Terminated using BNC connectors (Bayonet Neill–Concelman).

3. Optical Fiber Cable (OFC): Transmits data as pulses of light through ultra-pure cylindrical strands of silica glass or plastic. An optical fiber consists of three concentric layers: (1) Core (ultra-pure glass with refractive index $n_1$), (2) Cladding (surrounding glass layer with lower refractive index $n_2 < n_1$), and (3) Buffer / Jacket (protective polymer coating).

Physics of Total Internal Reflection (TIR): Light injected into the core hits the core-cladding boundary at an angle of incidence $\theta_i$ greater than the critical angle $\theta_c = \arcsin(n_2 / n_1)$. Because $n_1 > n_2$, the light ray experiences complete reflection with zero refraction loss, zigzagging through thousands of kilometers of glass at approximately $2 \times 10^8\text{ m/s}$.
  • Key Advantages: Astronomical bandwidth (terabits per second), complete immunity to Electromagnetic Interference (EMI), lightning strikes, and radio snooping (zero crosstalk), extremely low signal attenuation enabling repeater spacings of over $80\text{ km}$.
  • Fiber Types: Single-Mode Fiber (SMF) (narrow $8-10\,\mu\text{m}$ core, single laser beam path, zero modal dispersion, long-haul backbones) vs Multi-Mode Fiber (MMF) ($50-62.5\,\mu\text{m}$ core, LED source, multiple light paths, short-range campus backbones).
2.3 Unguided Transmission Media (Wireless Communication)

Unguided media broadcast electromagnetic signals through atmospheric air or vacuum without physical conduits:

Wireless Wave TypeFrequency SpectrumPropagation CharacteristicsTypical Real-World Applications
Radio Waves$3\text{ kHz} - 1\text{ GHz}$Omnidirectional (radiates in all directions); easily penetrates solid architectural walls; prone to multipath interference.FM/AM radio, cellular telephony, Wi-Fi ($2.4\text{ GHz}$), cordless phones.
Microwaves$1\text{ GHz} - 300\text{ GHz}$Unidirectional, highly focused narrow beams; line-of-sight propagation; cannot penetrate solid obstacles; requires tall towers or satellites.Terrestrial microwave dish relay towers, satellite transponders (geostationary orbit at $35,786\text{ km}$), GPS, radar.
Infrared Waves$300\text{ GHz} - 400\text{ THz}$Extremely high frequency; strictly line-of-sight; completely blocked by solid walls, preventing eavesdropping across rooms.Television remote controls, wireless optical mice, short-range IrDA device pairing.
2.4 Transmission Direction Modes
  • Simplex: Strictly unidirectional communication. One device transmits exclusively; the other receives exclusively (e.g., keyboard to CPU, broadcast television).
  • Half-Duplex: Bidirectional communication, but only one direction at a time. When one transmits, the other must listen (e.g., Walkie-Talkie).
  • Full-Duplex: Simultaneous bidirectional communication in both directions simultaneously (e.g., switched Ethernet, telephone conversations).

Network Topologies & Interconnecting Hardware Devices

3.1 Geometric Network Topologies

A Network Topology defines the geometric layout or physical and logical arrangement of nodes, workstations, and connecting links within a computer network.

1. Bus Topology (Linear Bus): All nodes connect directly to a single continuous central coaxial or twisted-pair cable called the backbone. At each physical end of the backbone, a resistive Terminator (typically 50-ohm) absorbs traveling electrical signals to prevent signal reflection.

  • Advantages: Inexpensive, minimal cabling, easy to set up for small temporary networks.
  • Disadvantages: A single break in the central backbone cable halts the entire network; difficult fault diagnosis; heavy packet collisions as node count increases.

2. Star Topology: Every node connects independently to a central concentrator device (a multi-port Hub or Switch) via a dedicated point-to-point drop cable. This is the universal standard for modern Ethernet LANs.

  • Advantages: High fault tolerance—failure of a single cable or node isolates only that node while the rest of the network operates normally; easy installation, reconfiguration, and centralized traffic monitoring.
  • Disadvantages: Central dependency—if the central switch fails, the entire network collapses; requires significantly more total cable footage than bus topology.

3. Ring Topology: Each workstation is connected to exactly two neighboring nodes, forming an unbroken closed circular loop. Data circulates unidirectionally in the form of a special electronic bit-pattern called a Token.

  • Advantages: Equal channel access; no packet collisions since only the token-holding node transmits; performs well under heavy traffic load.
  • Disadvantages: In a standard single ring, a failure in any single workstation or cable segment disables the entire loop; adding or removing nodes disrupts communication. (Solved by Dual-Ring FDDI architecture).

4. Mesh Topology: Every device has a dedicated point-to-point physical link to every other device in the network (Full Mesh), or to multiple selected devices (Partial Mesh).

$$\text{Physical Links in Full Mesh} = \frac{N(N - 1)}{2}, \quad \text{I/O Ports per Device} = N - 1$$
  • Advantages: Maximum fault tolerance, absolute redundancy, zero traffic congestion between pairs, robust privacy and security.
  • Disadvantages: Prohibitive cabling cost, excessive physical I/O ports required per device, complex installation and maintenance.

5. Tree Topology (Hierarchical): An extension of star topology where multiple star-configured clusters are interconnected via a central bus backbone cable, organized in root-parent-child hierarchies.

3.2 Network Connecting Hardware Devices & Layer Mapping
Connecting DeviceActive OSI LayerOperating Mechanism & CharacteristicsCollision & Broadcast Domains
NIC (Network Interface Card)Layer 1 & Layer 2Provides physical connection to media; contains unique 48-bit burned-in MAC Address (e.g., 00:1A:2B:3C:4D:5E).N/A (Host hardware)
RepeaterLayer 1 (Physical)Regenerates and amplifies attenuated electrical/optical signals to extend maximum physical transmission distance.Extends same collision domain.
Hub (Multi-port Repeater)Layer 1 (Physical)Unintelligent device. Receives bits on one port and blindly broadcasts them to all other connected ports.Single shared collision domain; single broadcast domain.
BridgeLayer 2 (Data Link)Filters and forwards frames between two network segments by learning hardware MAC addresses in an internal table.Divides network into 2 collision domains; single broadcast domain.
Switch (Multi-port Bridge)Layer 2 (Data Link)Intelligent device. Inspects incoming frame destination MAC addresses and forwards packets directly to the designated destination port via an internal MAC address table (CAM table).Each switch port is an isolated collision domain; single broadcast domain.
RouterLayer 3 (Network)Intelligent internetworking device. Examines destination logical IP Addresses, consults dynamic routing tables (OSPF, BGP, RIP), and determines optimal path across distinct networks.Isolates collision domains AND isolates broadcast domains.
GatewayAll Layers (L1 - L7)Complex protocol converter that translates between completely dissimilar network architectures (e.g., connecting a TCP/IP network to an IBM SNA mainframe).Isolates all domains.
Modem (Modulator-Demodulator)Physical LayerConverts digital binary pulses from a computer into analog audio frequencies for telephone lines (Modulation) and back into digital pulses (Demodulation).Point-to-point link.

Reference Models: ISO-OSI 7-Layer Architecture vs TCP/IP Suite

4.1 The Concept of Layered Network Architecture

Computer networking problems are too complex to solve with a monolithic software program. Instead, networking relies on Layered Architecture, where complex communication tasks are decomposed into sequential, modular tiers. Each layer provides specific services to the layer above it, while concealing the implementation details of the layers below it.

4.2 The ISO-OSI 7-Layer Reference Model

Formulated in 1984 by the International Organization for Standardization (ISO), the Open Systems Interconnection (OSI) model defines seven distinct functional layers:

  1. Layer 1: Physical Layer (PDU: Bits): Responsible for transmitting raw unstructured bit streams (0s and 1s) over physical communication channels. Defines mechanical, electrical, functional, and procedural specifications: pinouts, voltages, data rates, bit synchronization, and cable media.
  2. Layer 2: Data Link Layer (PDU: Frames): Provides error-free point-to-point node transfer across the physical link. Packages bits into Frames, adds physical source and destination MAC Addresses, performs flow control (stop-and-wait, sliding window), and detects transmission errors using Cyclic Redundancy Check (CRC). Sub-divided into LLC (Logical Link Control) and MAC (Media Access Control).
  3. Layer 3: Network Layer (PDU: Packets): Responsible for end-to-end routing and forwarding of packets across diverse internetworks. Assigns logical IP Addresses (IPv4/IPv6), calculates shortest paths using routing algorithms, handles packet fragmentation and reassembly, and manages network congestion.
  4. Layer 4: Transport Layer (PDU: Segments): Responsible for true end-to-end process-to-process communication. Manages source and destination Port Numbers (addressing specific running software processes), breaks application messages into segments, controls transmission flow, and guarantees reliability through acknowledgments and retransmissions (TCP) or fast delivery (UDP).
  5. Layer 5: Session Layer (PDU: Data): Establishes, maintains, coordinates, and terminates communication sessions between software applications. Controls dialog discipline (simplex, half-duplex, full-duplex) and inserts synchronization checkpoints into long file transfers to resume from interruptions without restarting.
  6. Layer 6: Presentation Layer (PDU: Data): Acts as the network translator. Resolves syntax and semantics differences between disparate computers. Core duties: (1) Data Translation (ASCII to EBCDIC), (2) Data Compression (reducing bandwidth consumption), and (3) Cryptographic Encryption and Decryption (SSL/TLS security).
  7. Layer 7: Application Layer (PDU: Data): The highest layer, providing direct network service interfaces to user software applications. Contains protocols like HTTP/HTTPS (web browsing), FTP (file transfer), SMTP (electronic mail), and DNS (domain resolution).
4.3 The TCP/IP 4-Layer Architectural Model

While OSI is a comprehensive theoretical reference model, the practical global Internet operates on the TCP/IP Protocol Suite (developed by DARPA). It consolidates networking into four operational layers:

TCP/IP LayerEquivalent OSI LayersCore ProtocolsPrimary Functions
4. Application LayerApplication, Presentation, SessionHTTP, HTTPS, FTP, DNS, SMTP, POP3, SSH, Telnet, DHCPUser interface, data formatting, encryption, session management, and application services.
3. Transport LayerTransportTCP (Transmission Control Protocol), UDP (User Datagram Protocol)Process-to-process delivery, port multiplexing, segmentation, connection management.
2. Internet LayerNetworkIP (IPv4, IPv6), ICMP, ARP, RARP, IGMPLogical addressing, routing across internetworks, packet encapsulation.
1. Network Access LayerData Link, PhysicalEthernet (IEEE 802.3), Wi-Fi (IEEE 802.11), PPP, Frame RelayHardware MAC framing, hardware signaling, physical transmission over copper/fiber/air.
Data Encapsulation & Decapsulation: As application data moves down the protocol stack at the sending computer, each layer prepends its own control header (and trailer at L2)—a process called Encapsulation. At the destination machine, the reverse process—Decapsulation—strips headers layer by layer until the pristine payload reaches the target application process.

Internet Protocol (IPv4) Addressing, Subnetting & Routing

5.1 Structure of an IPv4 Address

An Internet Protocol version 4 (IPv4) address is a 32-bit logical address uniquely identifying every host interface connected to an IP network. For human readability, the 32 binary bits are divided into four 8-bit groups called Octets, each converted to a decimal integer ($0$ to $255$) separated by periods—known as Dotted-Decimal Notation (e.g., 192.168.1.1).

Every IP address is hierarchically partitioned into two essential components:

  • Network ID (NetID): Identifies the specific physical or logical network to which the host belongs. All hosts on the same physical broadcast segment share identical NetID bits.
  • Host ID (HostID): Uniquely identifies a specific host machine or network interface card on that network.
5.2 Classful IPv4 Addressing Architecture

The original Internet architecture established five address classes distinguished by their leading binary bits:

ClassLeading BitsFirst Octet RangeDefault Subnet MaskNetID / HostID BitsTotal Networks & Hosts per Network
Class A0$1 - 126$255.0.0.0 (/8)8 NetID / 24 HostID$126$ networks; $2^{24} - 2 = 16,777,214$ hosts each. Designed for massive international organizations.
Class B10$128 - 191$255.255.0.0 (/16)16 NetID / 16 HostID$16,384$ networks; $2^{16} - 2 = 65,534$ hosts each. Designed for medium-sized enterprises and universities.
Class C110$192 - 223$255.255.255.0 (/24)24 NetID / 8 HostID$2,097,152$ networks; $2^8 - 2 = 254$ hosts each. Designed for small local business LANs.
Class D1110$224 - 239$N/A (No subnet mask)Multicast Group IDReserved exclusively for Multicasting (one-to-many packet streaming).
Class E1111$240 - 255$N/A (No subnet mask)Experimental / ResearchReserved by IANA for future experimental research; not routable.
Special IP Addresses:
• Network ID (All Host bits = 0): Represents the network as a whole (e.g., 192.168.1.0); cannot be assigned to an individual host.
• Directed Broadcast Address (All Host bits = 1): Transmits packets to all hosts on that subnet (e.g., 192.168.1.255); cannot be assigned to a host.
• Loopback Address (127.0.0.1 - localhost): Tests internal network protocol stack functionality without transmitting signals to physical media.
• Formula for Usable Hosts: In any subnet with $H$ host bits, $\text{Usable Hosts} = 2^H - 2$.
5.3 Private IP Addresses (RFC 1918) & NAT

To mitigate the rapid depletion of IPv4 addresses, the IETF reserved three private address blocks that are never routed over the public Internet:

  • 10.0.0.0 to 10.255.255.255 (10.0.0.0/8 - Single Class A network, 16 million private hosts).
  • 172.16.0.0 to 172.31.255.255 (172.16.0.0/12 - 16 contiguous Class B networks, 1 million private hosts).
  • 192.168.0.0 to 192.168.255.255 (192.168.0.0/16 - 256 contiguous Class C networks, 65,536 private hosts; standard in home Wi-Fi routers).

NAT (Network Address Translation): A border router technology that enables hundreds of private network devices sharing private IP addresses (e.g., 192.168.1.X) to access the public Internet simultaneously using a single public routable IP address.

5.4 Introduction to IPv6

IPv6 (Internet Protocol version 6) was engineered to overcome IPv4 address exhaustion. It uses a 128-bit address written as 8 groups of 4 hexadecimal digits separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). It provides $2^{128} \approx 3.4 \times 10^{38}$ distinct addresses, eliminating the need for NAT and integrating native IPSec security.

Switching Paradigms, Application Protocols & Web Concepts

6.1 Network Switching Paradigms

When data travels through an interconnected network of multiple nodes, switching techniques determine how transmission paths are allocated:

Switching TechniqueOperating PrincipleAdvantagesDisadvantages & Real-World Use
Circuit SwitchingA dedicated, continuous physical copper/optical circuit is established between sender and receiver prior to communication. The path remains locked for the entire duration of the session.Guaranteed constant bandwidth; zero packet reordering; minimal transmission latency once established.Resource inefficiency: channel remains idle during speech pauses; long call setup delay. Used in traditional landline telephone systems (PSTN).
Packet SwitchingMessages are divided into small, independent chunks called Packets (each containing data payload, source IP, destination IP, and sequence number). Packets traverse intermediate routers independently and are reassembled at destination.High resource efficiency; multiple conversations share same physical media; robust against router failures (packets dynamically re-route).Packets may arrive out-of-order; variable queuing delays and jitter. The foundational technology of the global Internet.
Message SwitchingEntire message is forwarded as a complete entity from node to node using the store-and-forward principle. Intermediate nodes buffer the complete message on disk before forwarding.Efficient line sharing; no connection setup delay.Demands huge intermediate storage; high latency. Historically used in telegraph and early telex networks.
6.2 Core Internet Application Protocols
  • HTTP (HyperText Transfer Protocol - Port 80): The foundational protocol of the World Wide Web. A stateless, request-response protocol running over TCP used to transfer HTML documents, images, and multimedia.
  • HTTPS (HTTP Secure - Port 443): Transmits HTTP over an encrypted cryptographic tunnel using TLS/SSL (Transport Layer Security / Secure Sockets Layer). Protects against eavesdropping, session hijacking, and man-in-the-middle attacks.
  • FTP (File Transfer Protocol - Ports 20 & 21): Protocol for transferring large files between client and server. Uses two separate TCP connections: Port 21 for control commands and Port 20 for data streaming.
  • SMTP (Simple Mail Transfer Protocol - Port 25): A text-based protocol used by mail user agents to push outgoing emails to mail servers and between mail transfer agents.
  • POP3 (Post Office Protocol v3 - Port 110) & IMAP (Port 143): Protocols used by client software to retrieve emails from a mail server. POP3 downloads emails and deletes them from the server; IMAP synchronizes emails across multiple devices while keeping mail stored on the server.
  • DNS (Domain Name System - Port 53): The 'phonebook' of the Internet. Resolves human-readable domain names (e.g., targetexams.com) into 32-bit IP addresses (e.g., 77.237.235.240) using a hierarchical distributed tree of Root, TLD (.com, .org, .in), and Authoritative nameservers.
  • DHCP (Dynamic Host Configuration Protocol - Ports 67 & 68): Automatically configures network host devices by dynamically leasing IP addresses, subnet masks, default gateway routers, and DNS server addresses upon connection.
6.3 World Wide Web (WWW) Fundamentals

Invented in 1989 by Tim Berners-Lee at CERN, the Web is an interconnected information space of hyperlinked documents accessed via the Internet:

  • URL (Uniform Resource Locator): The global address of a web resource. Anatomy: https://www.targetexams.com:443/syllabus/cs?year=2026#sec1 comprises: Protocol (https), Domain Host (www.targetexams.com), Port (443), Path (/syllabus/cs), Query String (?year=2026), and Fragment Identifier (#sec1).
  • Web Browser vs Web Server: A web browser (Chrome, Firefox, Safari) is a client application that renders HTML/CSS/JavaScript. A web server (Apache, Nginx, Microsoft IIS) is an application listening on port 80/443 that serves files upon receiving HTTP requests.
  • Static vs Dynamic Web Pages: Static pages display identical pre-written HTML content to all visitors. Dynamic pages are rendered on-the-fly by server-side scripts (PHP, Python, Node.js) querying backend databases based on user input.

Key Programming Syntax, Statements & Translator Rules

Full Mesh Topology Physical Link Formula
$$L = \frac{N(N - 1)}{2}$$
Hardware I/O Ports Required in Mesh Network
$$P_{\text{per-device}} = N - 1, \quad P_{\text{total}} = N(N - 1)$$
Usable Host Addresses in IPv4 Subnet Formula
$$H_{\text{usable}} = 2^{32 - \text{CIDR}} - 2 = 2^H - 2$$
Total Subnets Created by Borrowing S Bits
$$N_{\text{subnets}} = 2^S$$
Propagation Delay Formula
$$T_p = \frac{D}{V}$$
Transmission (Serialization) Delay Formula
$$T_t = \frac{L}{R}$$

Conceptual Solved Examples & Case Studies

Example 1
Step-by-Step Solution:
Step-by-Step Mathematical Derivation:

1. Identify IP Address Class:
• The first octet is $192$. Since $192$ falls in the range $192 - 223$, this is a Class C IP address.
• Default Class C subnet mask is 255.255.255.0 (/24).

2. Analyze the Custom Subnet Mask (255.255.255.224):
• Convert the 4th octet ($224$) into 8-bit binary: $224_{10} = 11100000_2$.
• Total subnet mask bits = $24 + 3 = 27$ bits (Notation: 192.168.10.77/27).
• Subnet bits borrowed ($S$) = $3$ bits.
• Host bits remaining ($H$) = $8 - 3 = 5$ bits.

3. Calculate Total Subnets and Usable Hosts:
• Total Subnets = $2^S = 2^3 = \mathbf{8\text{ subnets}}$.
• Total Hosts per subnet = $2^H = 2^5 = 32\text{ IP addresses}$.
• Usable Hosts per subnet = $2^H - 2 = 32 - 2 = \mathbf{30\text{ usable hosts}}$.

4. Determine Subnet Block Size (Magic Number):
• Block size = $256 - 224 = 32$.
• The subnet boundaries are multiples of 32: $0, 32, 64, 96, 128, 160, 192, 224$.
• The given host IP $77$ falls between $64$ and $96$.

5. Derive Addresses for the Subnet Containing 192.168.10.77:
• Network ID (Subnet Address): 192.168.10.64 (All 5 host bits = 0).
• First Usable Host IP: $64 + 1 =$ 192.168.10.65.
• Last Usable Host IP: $96 - 2 =$ 192.168.10.94.
• Directed Broadcast Address: $96 - 1 =$ 192.168.10.95 (All 5 host bits = 1).

Summary of Results:
• Class: Class C
• Network ID: 192.168.10.64
• Broadcast Address: 192.168.10.95
• Usable Host IP Range: 192.168.10.65 to 192.168.10.94 (30 hosts)
• Total Subnets: 8
Example 2
Step-by-Step Solution:
Given: Number of nodes $N = 12$.

Case 1: Full Mesh Topology
1. Physical Links Formula:
$$L_{\text{mesh}} = \frac{N(N - 1)}{2} = \frac{12 \times 11}{2} = \frac{132}{2} = \mathbf{66\text{ physical duplex cables}}$$
2. Hardware I/O Ports Required:
• Each server must have a dedicated link to the other $N - 1 = 11$ servers.
• Total network ports across all 12 servers = $N \times (N - 1) = 12 \times 11 = \mathbf{132\text{ NIC ports}}$.
3. Fault Tolerance: Exceptional. If any single cable breaks, only the direct link between those two servers is lost; traffic can automatically reroute via any of the other 10 intermediate servers.

Case 2: Star Topology (Using a Central 16-port Switch)
1. Physical Links Required:
$$L_{\text{star}} = N = \mathbf{12\text{ cables}}$$ (one drop cable per server to central switch).
2. Hardware I/O Ports Required:
• Each server requires only $1$ NIC port = $12$ ports total on servers, plus $12$ ports on the central switch.
3. Fault Tolerance: If one server cable breaks, only that single server is disconnected; all other 11 servers remain operational. However, if the central switch fails, the entire network fails.

Conclusion: Star topology reduces cable requirements from 66 down to 12 (an 81.8% reduction) and NIC ports from 132 to 12. Hence, modern enterprise LANs universally adopt Star topology.
Example 3
Step-by-Step Solution:
Given Parameters:
• File Size $L = 5\text{ MB} = 5 \times 1024 \times 1024 \times 8\text{ bits} = 41,943,040\text{ bits}$
• Channel Bandwidth $R = 100\text{ Mbps} = 100 \times 10^6\text{ bps} = 100,000,000\text{ bps}$
• Distance $D = 1000\text{ km} = 10^6\text{ meters}$
• Velocity of Light in Fiber $V = 200,000\text{ km/s} = 2 \times 10^8\text{ m/s}$

Step 1: Calculate Transmission Delay ($T_t$):
Transmission delay is the time required to push all packet bits onto the physical medium:
$$T_t = \frac{L}{R} = \frac{41,943,040\text{ bits}}{100,000,000\text{ bps}} \approx 0.41943\text{ seconds} = \mathbf{419.43\text{ ms}}$$

Step 2: Calculate Propagation Delay ($T_p$):
Propagation delay is the physical time taken by a single light pulse to travel distance $D$:
$$T_p = \frac{D}{V} = \frac{1,000\text{ km}}{200,000\text{ km/s}} = 0.005\text{ seconds} = \mathbf{5.00\text{ ms}}$$

Step 3: Calculate Total Latency:
$$\text{Total Latency} = T_t + T_p = 419.43\text{ ms} + 5.00\text{ ms} = \mathbf{424.43\text{ ms}}$$ (or $\approx 0.424\text{ seconds}$).
Example 4
Step-by-Step Solution:
7-Layer Encapsulation Trace Table:

Layer #OSI LayerActive ProtocolPDU NameInformation / Headers Appended
7ApplicationHTTPS (HTTP)DataGenerates GET / HTTP/1.1\r\nHost: targetexams.com request message.
6PresentationTLS / SSLDataEncrypts the HTTP plaintext into ciphertext using AES-256 session keys.
5SessionTLS Session / SocketsDataEstablishes dialogue synchronization and session checkpoint IDs.
4TransportTCPSegmentAppends TCP Header containing Destination Port 443, dynamic Source Port (e.g., 52418), Sequence Number, and Checksum.
3NetworkIPv4 / IPv6PacketAppends IP Header containing Destination IP (e.g., 77.237.235.240), Source IP (Client IP), Time-To-Live (TTL = 64), and Protocol ID = 6 (TCP).
2Data LinkEthernet (802.3)FrameAppends Ethernet Header containing Destination MAC (Default Gateway Router MAC), Source MAC (Client NIC MAC), EtherType (0x0800 for IPv4), and Frame Check Sequence (CRC-32 trailer).
1PhysicalPHY TransceiverBitsEncodes the framed binary bitstream into electrical voltage pulses on UTP copper wire or optical laser pulses on fiber.
Example 5
Step-by-Step Solution:
DNS Hierarchical Structure:
Domains are parsed from right to left: in (Country Code TLD) → gov (Second-level domain) → wbchse (Domain name) → mail (Host server).

Step-by-Step Resolution Workflow:
1. Local Browser & OS Cache Check: The browser checks its internal DNS cache, then the OS resolver cache (and hosts file). If absent, it issues a Recursive Query to the configured Local DNS Resolver (usually provided by ISP or 8.8.8.8).
2. Recursive vs Iterative Query:
• Recursive Query: The client demands that the Local Resolver find the complete answer or return an error.
• Iterative Query: The Local Resolver contacts other DNS servers; each server returns the IP address of the next authoritative server to ask.
3. Contacting Root DNS Server ('.'): The Local Resolver queries one of the 13 global Root Name Server clusters. The Root Server responds: 'I don't know the IP of mail.wbchse.gov.in, but here is the IP address of the .in TLD Name Server.'
4. Contacting TLD Server ('.in'): The Local Resolver queries the .in TLD nameserver. The TLD server responds: 'Here is the IP address of the authoritative nameserver for gov.in.'
5. Contacting SLD Server ('gov.in'): The Local Resolver queries the gov.in server, which delegates to the authoritative server for wbchse.gov.in.
6. Contacting Authoritative DNS Server ('wbchse.gov.in'): The authoritative server checks its DNS zone database for the 'A' record of mail and responds with the concrete 32-bit IP address (e.g., 164.100.12.34).
7. Caching and Response: The Local Resolver caches the mapping with a Time-To-Live (TTL) and returns the IP address to the student's browser, which initiates the TCP connection.
Example 6
Step-by-Step Solution:
Comparative Architectural Analysis:

Part (a): Collision Domains:
• With 8-Port Hub: A hub is an unmanaged physical layer (Layer 1) repeater. All 8 ports share a single common physical bus inside the hub chassis. Hence, there is exactly 1 shared collision domain.
• With 8-Port Switch: A switch operates at Data Link Layer (Layer 2) with independent hardware switching logic. Every individual switch port provides an isolated micro-segment. Hence, there are exactly 8 separate collision domains.

Part (b): Aggregate Theoretical Bandwidth:
• With 100 Mbps Hub (Half-Duplex): The 100 Mbps bandwidth is shared among all 8 stations. Only one station can transmit at any given instant. Aggregate maximum network bandwidth = 100 Mbps.
• With 100 Mbps Full-Duplex Switch: Each of the 8 ports supports simultaneous 100 Mbps transmit and 100 Mbps receive ($200\text{ Mbps}$ per port). Across 4 simultaneous communication pairs: $4 \times 200\text{ Mbps} = \mathbf{800\text{ Mbps}}$ aggregate full-duplex throughput (an 8x increase).

Part (c): Simultaneous Transmission Scenario ($A \rightarrow B$ and $C \rightarrow D$):
• On the Hub: Station A and Station C transmitting simultaneously causes an immediate electrical voltage collision on the shared wire. Both frames are corrupted. The stations detect the collision (CSMA/CD), broadcast a 32-bit jam signal, execute exponential back-off delays, and retransmit, degrading network performance.
• On the Switch: The switch inspects the destination MAC of Station A's frame and switches it directly to Port B. Simultaneously, it inspects Station C's frame and switches it directly to Port D. Both transfers occur in parallel at full 100 Mbps with zero collisions.

Common Misconceptions & Examiner Traps

Common Misconception

Believing that a network Switch isolates Broadcast Domains.

Scientific Reality & Correction

A switch isolates Collision Domains per port, but all ports on a standard switch remain part of a SINGLE Broadcast Domain. Only a Router (Layer 3) isolates Broadcast Domains.

Common Misconception

Calculating usable hosts as 2^H without subtracting 2 for Network ID and Broadcast address.

Scientific Reality & Correction

Always subtract 2 from the total host address count: 'Usable Hosts = 2^H - 2'. Forgetting to subtract 2 causes point deductions in WBCHSE board numerical problems.

Common Misconception

Confusing the data unit names across the OSI layers.

Scientific Reality & Correction

Remember the PDU hierarchy: Layer 1 is Bits, Layer 2 is Frames, Layer 3 is Packets, Layer 4 is Segments, and Layers 5-7 are Application Data.

Common Misconception

Assuming Private IP addresses (e.g., 192.168.1.1) can route directly across the public Internet.

Scientific Reality & Correction

Private IP blocks defined in RFC 1918 are strictly non-routable on the public Internet; border routers drop them. Access to the Internet requires Network Address Translation (NAT).

Common Misconception

Mixing up the directionality of Simplex, Half-Duplex, and Full-Duplex.

Scientific Reality & Correction

Simplex is one-way only (TV broadcast); Half-Duplex is two-way but one at a time (walkie-talkie); Full-Duplex is two-way simultaneously (telephone, switched Ethernet).

Chapter Summary & 10 Key Takeaways

Takeaway 1
Computer Networks interconnect autonomous devices to share resources, achieve high reliability, and communicate at high speed. Networks span from Personal Area Networks (PAN) and Local Area Networks (LAN) to Metropolitan (MAN) and Wide Area Networks (WAN). Data propagates across guided physical media (Twisted Pair, Coaxial, Optical Fiber utilizing Total Internal Reflection) or unguided wireless channels. Physical topologies include Bus, Star (modern switched standard), Ring, and highly redundant Mesh networks requiring N(N-1)/2 physical links. Network devices operate across layers: Hubs at L1, Switches at L2 (isolating collision domains), Routers at L3 (isolating broadcast domains), and Gateways. The ISO-OSI 7-layer reference model guides protocol design while the practical Internet runs on the 4-layer TCP/IP suite. Logical IPv4 addressing partitions 32 bits into NetID and HostID across Classes A, B, and C, with private blocks conserved via NAT. Packet switching routes discrete datagrams dynamically across the Internet, supporting core application protocols including HTTP, HTTPS, FTP, DNS, SMTP, and DHCP.

Check Your Understanding (Diagnostic Practice Questions)

Diagnostic questions testing core conceptual clarity. Answers are hidden initially — solve each problem first, then click to reveal the step-by-step verified solution.

1
Why is Optical Fiber Cable completely immune to Electromagnetic Interference (EMI) while Twisted Pair is vulnerable? Explain the physical difference.
Reveal Answer & Explanation
Answer: Twisted pair cables transmit data via electrical currents (electrons) moving through copper conductors. Any external magnetic or electric field (from motors, fluorescent lights, high-voltage lines) induces unwanted stray voltages into the copper, causing noise and signal corruption. In contrast, optical fiber cables transmit data entirely as optical photons (light pulses) through a non-conductive dielectric glass core. Because photons carry no electric charge, magnetic and electrical fields have zero physical interaction with light beams, rendering optical fiber completely immune to EMI, lightning strikes, and cross-talk.
2
Explain why modern local area networks universally implement Star Topology using Switches rather than Bus Topology with Hubs.
Reveal Answer & Explanation
Answer: Bus topology with a hub has major flaws: (1) A single break in the shared backbone cable collapses the entire network, (2) All connected nodes share a single collision domain where transmissions collide and waste bandwidth, and (3) Fault isolation is extremely tedious. In contrast, a switched Star topology provides: (1) Robust fault isolation—a broken cable disconnects only that single workstation, (2) Every switch port provides a dedicated, isolated collision domain allowing parallel transmissions, (3) Full-duplex simultaneous transmit/receive at line speed, and (4) Simple centralized administration, re-cabling, and monitoring.
3
Differentiate between a Collision Domain and a Broadcast Domain. How do Hubs, Switches, and Routers influence each?
Reveal Answer & Explanation
Answer: A Collision Domain is a physical network area where simultaneous transmissions collide and corrupt data. A Broadcast Domain is a logical network area where a broadcast frame sent by one device is received by every other device. Device behaviors: (1) Hub: Operates at Layer 1; creates 1 single shared collision domain and 1 broadcast domain. (2) Switch: Operates at Layer 2; breaks the network into multiple collision domains (each port is an isolated collision domain), but maintains 1 unified broadcast domain. (3) Router: Operates at Layer 3; isolates both collision domains AND broadcast domains (routers do not forward Layer 2 broadcast frames).
4
Why are the first and last IP addresses of an IPv4 subnet reserved and unusable for host assignment? State their designated purposes.
Reveal Answer & Explanation
Answer: In any IPv4 subnet, two host address patterns are strictly reserved by international standards: (1) The first address (where all host bits are binary 0) is the Network ID (Subnet Address). It represents the entire subnet in routing tables and cannot be assigned to any individual interface. (2) The last address (where all host bits are binary 1) is the Directed Broadcast Address. When a packet is sent to this address, the router broadcasts it to every host active on that specific subnet. Hence, usable hosts = 2^H - 2.
5
What is the primary difference between TCP and UDP at the Transport Layer? When is UDP preferred over TCP in real-world applications?
Reveal Answer & Explanation
Answer: TCP (Transmission Control Protocol) is connection-oriented, reliable, and provides error checking, packet ordering, and flow control via a 3-way handshake and acknowledgments. If a packet is lost, TCP retransmits it. UDP (User Datagram Protocol) is connectionless, unreliable, and lightweight; it pushes packets without establishing a connection or waiting for acknowledgments. UDP is preferred in real-time streaming (VoIP, video calls, live gaming, DNS queries) where low latency is critical and losing an occasional audio/video packet is far preferable to pausing playback to wait for retransmissions.
Finished Studying This Chapter?
READY TO PRACTICE?

Timed CBT Practice Tests (Exam Simulator)

Put your concepts to the test with official curriculum-aligned Foundation and Advanced practice tests. Get instant accuracy scores, time metrics, and step-by-step verified explanations.