CSS Prepare

optional · CSS study notes

Overview of Networking

🧭

On this page — click any heading below to jump straight to it. ⬅️ Back to P-II.II. Computer Communications & Networks


OSI Layer: Foundations & Models

1. 📖 Definition

A computer network is a collection of autonomous devices (nodes) interconnected by transmission media, exchanging data under a common set of protocols.

2. 🎯 Goals of Networking

  • Resource sharing — hardware, software, data
  • Reliability — redundant paths and replicated files
  • Cost efficiency — shared servers instead of one mainframe
  • Scalability — nodes added incrementally
  • Communication — email, VoIP, video conferencing

3. 🧩 Components

  • End devices (hosts) — PCs, phones, servers
  • Intermediary devices — hub, switch, router, gateway
  • Transmission media — guided (copper, fibre) / unguided (radio, microwave)
  • Protocols — rules of exchange
  • NOS / network software — Windows Server, Linux

4. 📊 Performance Metrics

  • Bandwidth — theoretical capacity of link (bps)
  • Throughput — actual data rate achieved (always ≤ bandwidth)
  • Latency — total delay = propagation + transmission + queuing + processing
  • Jitter — variation in delay; critical for VoIP and live video
  • Reliability — MTBF, failure frequency, recovery time
  • Security — CIA triad: Confidentiality, Integrity, Availability

5. 📏 Protocols & Standards

  • Protocol = syntax (format) + semantics (meaning) + timing (when/how fast)
  • De facto standards — adopted by usage: TCP/IP, Ethernet
  • De jure standards — formally legislated by bodies
  • Standards bodies — ISO, IEEE (802 series), IETF (RFCs), ITU-T, ANSI

6. 🧮 Numericals (Step-by-Step)

A. Formula Sheet — memorise this first

QuantityFormulaUnit
ThroughputData delivered ÷ Time (or frames/s × bits per frame)bps
Utilisation (U)(Throughput ÷ Bandwidth) × 100%
Transmission delay (Tt)L ÷ B (packet size ÷ bandwidth)s
Propagation delay (Tp)d ÷ v (distance ÷ signal speed)s
Total latencyTt + Tp + Tqueue + Tprocs
Round-trip time (RTT)2 × Tp (when Tt is ignored)s
Bandwidth–delay product (BDP)B × RTTbits
Stop-and-wait efficiency (η)1 ÷ (1 + 2a), where a = Tp ÷ Tt—
Effective throughputη × Bbps
File transfer timeFile size (bits) ÷ Data rates
JitterAverage of the differences between consecutive delaysms

⚠️

Unit conversions — where most marks are lost

  • 1 byte = 8 bits. Small b = bits, capital B = bytes (Mb ≠ MB)
  • Data rates use powers of 10: 1 kbps = 10³ bps, 1 Mbps = 10⁶ bps, 1 Gbps = 10⁹ bps
  • 1 km = 10³ m; 1 ms = 10⁻³ s; 1 µs = 10⁻⁶ s
  • Signal speed in copper or fibre ≈ 2 × 10⁸ m/s; in free space (radio, satellite) ≈ 3 × 10⁸ m/s

✍️

Method to write in the exam: Given → Formula → Convert units → Substitute → Answer with unit → One-line interpretation. The interpretation line is what separates a 60% answer from a full-marks one.

B. Solved Numericals

Q1 — Throughput & Utilisation

Given: Bandwidth B = 100 Mbps; frames delivered N = 6,000 frames/s; frame size L = 10,000 bits

Find: Throughput and link utilisation

Step 1 — Throughput

Throughput=N×L=6000×10000=6×107 bps=60 Mbps\text{Throughput} = N \times L = 6000 \times 10000 = 6 \times 10^{7}\ \text{bps} = 60\ \text{Mbps}

Step 2 — Utilisation

U=ThroughputB×100=60100×100=60%U = \frac{\text{Throughput}}{B} \times 100 = \frac{60}{100} \times 100 = 60\%

Answer: Throughput = 60 Mbps; Utilisation = 60%

Interpretation: 40% of the link's capacity sits idle, which shows why throughput is always less than or equal to bandwidth.

Q2 — Total Latency (large message)

Given: Message L = 5 Mb = 5 × 10⁶ bits; B = 10 Mbps = 10 × 10⁶ bps; d = 3,000 km = 3 × 10⁶ m; v = 2 × 10⁸ m/s

Find: Transmission delay, propagation delay and total latency

Step 1 — Transmission delay

Tt=LB=5×10610×106=0.5 sT_t = \frac{L}{B} = \frac{5 \times 10^{6}}{10 \times 10^{6}} = 0.5\ \text{s}

Step 2 — Propagation delay

Tp=dv=3×1062×108=0.015 s=15 msT_p = \frac{d}{v} = \frac{3 \times 10^{6}}{2 \times 10^{8}} = 0.015\ \text{s} = 15\ \text{ms}

Step 3 — Total latency (queuing and processing taken as zero)

Latency=Tt+Tp=0.5+0.015=0.515 s\text{Latency} = T_t + T_p = 0.5 + 0.015 = 0.515\ \text{s}

Answer: Total latency ≈ 0.515 s

Interpretation: For a large message, transmission delay dominates. A faster link (more bandwidth) helps here; a shorter distance hardly does.

Q3 — Total Latency (small packet, long distance)

Given: Packet = 1,000 bytes; B = 1 Gbps = 10⁹ bps; d = 2,000 km = 2 × 10⁶ m; v = 2 × 10⁸ m/s

Find: Which delay dominates?

Step 1 — Convert bytes to bits

L=1000×8=8000 bitsL = 1000 \times 8 = 8000\ \text{bits}

Step 2 — Transmission delay

Tt=8000109=8×10−6 s=8 μsT_t = \frac{8000}{10^{9}} = 8 \times 10^{-6}\ \text{s} = 8\ \mu\text{s}

Step 3 — Propagation delay

Tp=2×1062×108=0.01 s=10 msT_p = \frac{2 \times 10^{6}}{2 \times 10^{8}} = 0.01\ \text{s} = 10\ \text{ms}

Answer: Tp (10 ms) is about 1,250 times bigger than Tt (8 µs), so propagation delay dominates.

Interpretation: Compare with Q2. Small packets over long distances are limited by the speed of the signal, not by bandwidth. That is why buying more bandwidth does not make a Karachi–London video call feel faster.

Q4 — Latency with all four delay components

Given: Packet L = 12,000 bits; B = 2 Mbps; d = 4,000 km; v = 2 × 10⁸ m/s; queuing delay = 2 ms; processing delay = 1 ms

Find: Total end-to-end latency

Step 1 — Transmission delay

Tt=120002×106=6×10−3 s=6 msT_t = \frac{12000}{2 \times 10^{6}} = 6 \times 10^{-3}\ \text{s} = 6\ \text{ms}

Step 2 — Propagation delay

Tp=4×1062×108=0.02 s=20 msT_p = \frac{4 \times 10^{6}}{2 \times 10^{8}} = 0.02\ \text{s} = 20\ \text{ms}

Step 3 — Add all four components

Latency=Tt+Tp+Tqueue+Tproc=6+20+2+1=29 ms\text{Latency} = T_t + T_p + T_{queue} + T_{proc} = 6 + 20 + 2 + 1 = 29\ \text{ms}

Answer: Total latency = 29 ms

Q5 — Bandwidth–Delay Product (BDP)

Given: B = 1 Mbps = 10⁶ bps; RTT = 20 ms = 0.02 s

Find: BDP in bits and bytes

Step 1 — Apply formula

BDP=B×RTT=106×0.02=2×104 bits=20,000 bits\text{BDP} = B \times RTT = 10^{6} \times 0.02 = 2 \times 10^{4}\ \text{bits} = 20{,}000\ \text{bits}

Step 2 — Convert to bytes

200008=2500 bytes≈2.5 KB\frac{20000}{8} = 2500\ \text{bytes} \approx 2.5\ \text{KB}

Answer: BDP = 20,000 bits ≈ 2.5 KB

Interpretation: BDP is the amount of data "in flight" on the link. The sender's window must be at least this big to keep the link fully busy.

Q6 — Stop-and-Wait Efficiency

Given: Frame L = 1,000 bits; B = 1 Mbps; Tp = 20 ms

Find: Link efficiency, effective throughput, and the window size needed for 100% use

Step 1 — Transmission delay

Tt=1000106=10−3 s=1 msT_t = \frac{1000}{10^{6}} = 10^{-3}\ \text{s} = 1\ \text{ms}

Step 2 — Ratio a

a=TpTt=201=20a = \frac{T_p}{T_t} = \frac{20}{1} = 20

Step 3 — Efficiency

η=11+2a=11+40=141≈0.0244=2.44%\eta = \frac{1}{1 + 2a} = \frac{1}{1 + 40} = \frac{1}{41} \approx 0.0244 = 2.44\%

Step 4 — Effective throughput

η×B=0.0244×106≈24.4 kbps\eta \times B = 0.0244 \times 10^{6} \approx 24.4\ \text{kbps}

Step 5 — Window size for full utilisation

W=1+2a=41 framesW = 1 + 2a = 41\ \text{frames}

Answer: η ≈ 2.44%; effective throughput ≈ 24.4 kbps; window needed = 41 frames

Interpretation: On a long link, stop-and-wait wastes almost the whole bandwidth waiting for ACKs. Sliding window protocols fix this by keeping several frames in flight.

Q7 — File Transfer Time

Given: File = 10 MB; link = 8 Mbps; actual throughput = 80% of bandwidth

Find: Ideal and actual transfer time

Step 1 — Convert file size to bits

10 MB=10×106×8=8×107 bits10\ \text{MB} = 10 \times 10^{6} \times 8 = 8 \times 10^{7}\ \text{bits}

Step 2 — Ideal time (full bandwidth)

T=8×1078×106=10 sT = \frac{8 \times 10^{7}}{8 \times 10^{6}} = 10\ \text{s}

Step 3 — Actual rate and time

Rate=0.8×8=6.4 Mbps⇒T=8×1076.4×106=12.5 s\text{Rate} = 0.8 \times 8 = 6.4\ \text{Mbps} \quad\Rightarrow\quad T = \frac{8 \times 10^{7}}{6.4 \times 10^{6}} = 12.5\ \text{s}

Answer: Ideal = 10 s; actual = 12.5 s

Interpretation: The classic trap is forgetting × 8. Without it you would get 1.25 s, which is wrong by a factor of eight.

Q8 — Jitter

Given: Four VoIP packets arrive with delays of 40, 45, 38 and 47 ms

Find: Average delay and average jitter

Step 1 — Average delay

Dˉ=40+45+38+474=1704=42.5 ms\bar{D} = \frac{40 + 45 + 38 + 47}{4} = \frac{170}{4} = 42.5\ \text{ms}

Step 2 — Differences between consecutive delays

∣45−40∣=5,∣38−45∣=7,∣47−38∣=9|45 - 40| = 5, \quad |38 - 45| = 7, \quad |47 - 38| = 9

Step 3 — Average jitter

J=5+7+93=213=7 msJ = \frac{5 + 7 + 9}{3} = \frac{21}{3} = 7\ \text{ms}

Answer: Average delay = 42.5 ms; jitter = 7 ms

Interpretation: Delay tells you how late packets are; jitter tells you how unevenly they arrive. VoIP can tolerate some delay but suffers badly from jitter, which is why phones use a jitter buffer.

C. Common Mistakes Checklist

  • Forgetting to multiply bytes by 8
  • Leaving distance in km while speed is in m/s
  • Mixing up Tt (depends on packet size and bandwidth) with Tp (depends on distance and medium)
  • Writing a bare number with no unit — always end with s, ms, bps or %
  • Using 1 KB = 1,024 bytes for data rates; networking rates use powers of 10

D. Practice MCQs on Numericals

MCQ 1. A 2,000-bit frame is sent on a 1 Mbps link. The transmission delay is:

  • (A) 0.2 ms
  • (B) 2 ms
  • (C) 20 ms
  • (D) 2 s

Answer: (B) 2 ms. Tt = L ÷ B = 2,000 ÷ 10⁶ = 2 × 10⁻³ s = 2 ms. Option (A) comes from a wrong power of ten, and (D) from forgetting that Mbps means 10⁶.

MCQ 2. Two hosts are 6,000 km apart over fibre (v = 2 × 10⁸ m/s). The propagation delay is:

  • (A) 3 ms
  • (B) 30 ms
  • (C) 300 ms
  • (D) 0.3 ms

Answer: (B) 30 ms. Tp = (6 × 10⁶ m) ÷ (2 × 10⁸ m/s) = 0.03 s = 30 ms. Students who leave distance in km get (D).

MCQ 3. A 100 Mbps link carries an actual throughput of 25 Mbps. Its utilisation is:

  • (A) 4%
  • (B) 25%
  • (C) 75%
  • (D) 400%

Answer: (B) 25%. U = (25 ÷ 100) × 100 = 25%. Utilisation can never exceed 100% because throughput can never exceed bandwidth, which rules out (D).

7. 🇵🇰 Pakistan Context

  • E-governance — NADRA, FBR IRIS
  • Branchless banking — Easypaisa, JazzCash, 1-Link interbank switch
  • Backbone — PTCL fibre network, CPEC optical fibre via Khunjerab
  • Challenges — rural digital divide, international bandwidth cost, cybersecurity, spectrum management

8. 📝 Long-Question Outlines

✍️

Write this outline first (2–3 minutes), then develop each heading. Roman numerals = main headings · A / B / C = points · (1) / (2) = details.

Outline 1 — Define computer network and discuss its goals, components and performance metrics with reference to Pakistan (20 marks)

  • I. Introduction
    • A. Definition: autonomous nodes + transmission media + common protocols
    • B. Thesis line: networks are the backbone of the digital economy
  • II. Goals of Networking
    • A. Resource sharing
      • (1) Hardware, software and data
      • (2) Example: shared printer, cloud storage
    • B. Reliability: redundant paths and replicated files
    • C. Cost efficiency: shared servers instead of one mainframe
    • D. Scalability: nodes added step by step
    • E. Communication: email, VoIP, video conferencing
  • III. Components of a Network
    • A. End devices (hosts)
    • B. Intermediary devices: hub, switch, router, gateway
    • C. Transmission media
      • (1) Guided: copper, fibre
      • (2) Unguided: radio, microwave
    • D. Protocols: syntax, semantics, timing
    • E. Network operating system
  • IV. Performance Metrics
    • A. Bandwidth vs throughput (small table)
    • B. Latency
      • (1) Formula: transmission + propagation + queuing + processing
      • (2) One short numerical (Q2 above)
    • C. Jitter and why it matters for VoIP
    • D. Reliability and security (CIA triad)
  • V. Protocols and Standards
    • A. De facto vs de jure standards
    • B. Standards bodies: ISO, IEEE, IETF, ITU-T, ANSI
  • VI. Networking in Pakistan
    • A. E-governance: NADRA, FBR IRIS
    • B. Branchless banking: Easypaisa, JazzCash, 1-Link
    • C. Backbone: PTCL fibre, CPEC optical fibre via Khunjerab
    • D. Challenges: rural digital divide, bandwidth cost, cybersecurity
  • VII. Conclusion
    • A. Restate goals and metrics in one line
    • B. Way forward: rural broadband, local caching, cyber policy

Marks guide: intro 2 · goals 4 · components 4 · metrics with numerical 5 · Pakistan context 3 · conclusion 2

Outline 2 — Differentiate bandwidth, throughput, latency and jitter (8–10 marks)

  • I. Introduction: why performance is measured
  • II. Definitions
    • A. Bandwidth: theoretical capacity
    • B. Throughput: actual delivered rate
    • C. Latency: total delay from sender to receiver
    • D. Jitter: variation in delay
  • III. Comparison table (unit, what it measures, example, who suffers most)
  • IV. Numerical illustration
    • (1) Throughput and utilisation (Q1)
    • (2) Jitter calculation (Q8)
  • V. Conclusion: high bandwidth does not guarantee low latency

9. 🎯 CSS Exam Angle

  • Always separate bandwidth vs throughput and latency vs jitter — common examiner trap
  • Add a Pakistan application for the applied-marks portion
  • Numericals on delay and utilisation are standard MCQ/short-question material

10. 🔁 Likely Questions

  1. Define computer network and discuss its goals with examples.
  2. Differentiate bandwidth, throughput, latency, and jitter.
  3. Discuss the role of networking in Pakistan's digital economy.

11. 📜 Past-Paper Questions & Structured Answers

Question wording is paraphrased. Answer emphasis is a study guide, not an official FPSC marking scheme. Papers reviewed: 2016–2026; MCQ coverage is limited to available sheets.

2025 · Paper-II · Q3(a)(ii) · 3 marks

Question (paraphrased): Sketch Internet organisation using ISPs, identifying its edge and core.

Answer focus: Labelled sketch + a short explanation of each region.

Diagram

Homes / campus / offices (edge end systems)
                 |
        Access network + access ISP
                 |
 Regional / backbone ISP routers (core)
        |                       |
     Peering / IXP         Other ISP networks
                                |
                     Access network → servers / users

Edge: end systems create and consume data; access networks connect them to an ISP. Core: interconnected routers and links carry packets between networks. ISPs exchange traffic through transit and peering; an IXP is an interconnection facility, not another compulsory tier. The Internet is a network of networks, rather than a single central server.

2024 · Paper-II · Q1 item 4 · 1 mark

Question (paraphrased): Which statement best describes network-traffic estimation?

Answer: D — none of the offered claims. Estimation is possible using measurements and statistical/queueing models; it is neither always a simple linear calculation nor restricted to AI. Real traffic is variable, so state model assumptions in numerical answers. Paper

2021 · Paper-I · Q3(a) · ISP option within a 6-mark “choose two” question

Question (paraphrased): Briefly explain two of ISP, HTML, SSD and cloud computing.

Relevant ISP answer: an Internet Service Provider connects users or organisations to other Internet networks. It operates access connectivity, routers and upstream/peering links, and may provide address allocation and DNS services. Example: a household connects through an ISP to reach a server on another provider’s network. For the full six marks, answer one other listed concept as well; the paper does not separately print three marks for ISP. Paper