Browse papers
A

Section A: Long Answer Questions

Attempt any TWO questions.

3 questions·10 marks each
1long10 marks

What is a layered network architecture? Explain the OSI reference model with the functions of each of its seven layers.

Layered Network Architecture

A layered network architecture organizes the complex task of network communication into a stack of smaller, manageable layers. Each layer performs a well-defined set of functions, offers services to the layer above it, and uses the services of the layer below it. Layers communicate through interfaces, and peer layers on different machines communicate using protocols. This approach provides modularity, abstraction, interoperability, and ease of maintenance (a layer can be changed without affecting others).

OSI Reference Model

The OSI (Open Systems Interconnection) model was developed by ISO. It is a 7-layer reference model that standardizes communication functions:

#LayerData UnitKey Function
7ApplicationDataUser services (HTTP, FTP, SMTP)
6PresentationDataTranslation, encryption, compression
5SessionDataDialog control, synchronization
4TransportSegmentEnd-to-end delivery, reliability
3NetworkPacketLogical addressing, routing
2Data LinkFrameFraming, MAC, error/flow control
1PhysicalBitTransmission of raw bits

Functions of Each Layer

  1. Physical Layer – Transmits raw bits over the medium. Defines voltage levels, data rate, pin layout, transmission mode (simplex/duplex), and physical topology.
  2. Data Link Layer – Provides node-to-node delivery. Handles framing, physical (MAC) addressing, error control (CRC), flow control, and medium access control.
  3. Network Layer – Responsible for source-to-destination delivery across multiple networks. Performs logical addressing (IP), routing, and congestion control.
  4. Transport Layer – Provides end-to-end (process-to-process) delivery. Handles segmentation/reassembly, port addressing, connection control, flow control, and error control (e.g., TCP, UDP).
  5. Session Layer – Establishes, manages, and terminates sessions. Provides dialog control and synchronization (checkpoints).
  6. Presentation Layer – Deals with syntax and semantics of data: translation, encryption/decryption, and compression.
  7. Application Layer – Provides the interface and services to the end user/application (HTTP, FTP, DNS, SMTP).

Mnemonic (1→7): Please Do Not Throw Sausage Pizza Away.

osi-modellayering
2long10 marks

Compare the OSI reference model with the TCP/IP protocol suite. Explain each layer of the TCP/IP protocol architecture in detail.

OSI vs TCP/IP

AspectOSI ModelTCP/IP Suite
Layers74 (or 5)
Developed byISODARPA/IETF
NatureReference/theoretical modelPractical, implemented
Layer dependencyLayers strictly independentLayers somewhat integrated
Service/Interface/ProtocolClearly separatedNot clearly separated
Transport reliabilityBoth connection-oriented & connectionlessConnection-oriented (TCP) and connectionless (UDP)
UsageConceptual guideBasis of the modern Internet

The OSI Application, Presentation, Session layers map to the single TCP/IP Application layer; OSI Physical + Data Link map to the TCP/IP Network Access (Host-to-Network) layer.

TCP/IP Protocol Architecture (4 layers)

  1. Application Layer – Combines OSI's application, presentation and session layers. Provides protocols that user applications use: HTTP, FTP, SMTP, DNS, Telnet, SNMP. Handles data representation and dialog.

  2. Transport Layer – Provides process-to-process delivery using port numbers.

    • TCP – connection-oriented, reliable, ordered, with flow & error control (3-way handshake).
    • UDP – connectionless, unreliable but fast and low-overhead.
  3. Internet (Network) Layer – Handles logical addressing and routing of packets across networks. Core protocol is IP; supporting protocols include ICMP, IGMP, ARP/RARP. Provides best-effort, connectionless delivery.

  4. Network Access / Host-to-Network Layer – Combines OSI's data link and physical layers. Defines how data is physically sent on the network: framing, MAC addressing, and transmission of bits over media (Ethernet, Wi-Fi, PPP).

Thus TCP/IP is the practical realization of the layering concept that OSI describes theoretically.

tcp-iposi-model
3long10 marks

What is routing? Explain the Link State routing algorithm (Dijkstra's) in detail with a suitable example.

Routing

Routing is the network-layer process of selecting the best path for forwarding packets from a source to a destination across an internetwork. The routing algorithm running in routers builds and updates a routing table that maps destinations to next hops. Routing can be static (manual) or dynamic (adaptive, e.g., Distance Vector, Link State).

Link State Routing (Dijkstra's Algorithm)

In Link State (LS) routing, every router:

  1. Discovers its neighbors and learns their network addresses.
  2. Measures the cost (delay/metric) to each neighbor.
  3. Builds a Link State Packet (LSP) describing these costs.
  4. Floods the LSP to all routers so every router obtains the complete topology (a graph).
  5. Runs Dijkstra's shortest-path algorithm locally to compute the shortest path to every other node.

Dijkstra's Algorithm

Initialize: dist[source]=0, dist[v]=∞ for all v≠source
N' = { source }            // set of finalized nodes
while (not all nodes in N'):
    pick node w not in N' with smallest dist[w]
    add w to N'
    for each neighbor v of w not in N':
        if dist[w] + cost(w,v) < dist[v]:
            dist[v] = dist[w] + cost(w,v)
            prev[v] = w

Example

Consider this weighted graph (find shortest paths from A):

      4        1
  A ----- B ----- C
  |       |       |
 1|      2|      5|
  |       |       |
  D ----- E ----- F
      1        3

Edges: A-B=4, A-D=1, B-C=1, B-E=2, D-E=1, C-F=5, E-F=3.

Applying Dijkstra from A:

StepFinalizeddist(A)dist(B)dist(C)dist(D)dist(E)dist(F)
0A041
1A,D0412
2A,D,E04125
3A,D,E,B045125
4+C045125
5+F045125

Shortest distances from A: B=4, C=5 (A→B→C), D=1, E=2 (A→D→E), F=5 (A→D→E→F).

Link state protocols (e.g., OSPF, IS-IS) converge quickly and avoid the count-to-infinity problem of distance-vector routing.

routinglink-state
B

Section B: Short Answer Questions

Attempt any EIGHT questions.

9 questions·5 marks each
4short5 marks

Differentiate between guided and unguided transmission media.

Guided vs Unguided Transmission Media

Guided (wired) media use a physical conductor/path to carry signals; unguided (wireless) media propagate signals through air/space without a physical conductor.

BasisGuided MediaUnguided Media
PathPhysical conductor (cable)Free space / air
DirectionSignal confined within the wireSignal spreads in all directions
ExamplesTwisted pair, coaxial cable, optical fiberRadio waves, microwave, infrared, satellite
SecurityMore secure (harder to tap)Less secure (easily intercepted)
InstallationCabling required; less flexibleNo cabling; flexible, mobile
InterferenceLess affected by external noiseMore affected by noise/weather
DistanceLimited by cable lengthCan cover long distances (satellite)
CostHigher installation/maintenanceLower deployment, infrastructure-light

Summary: Guided media (bounded) physically direct the signal and offer reliability and security; unguided media (unbounded) offer mobility and wider coverage at the cost of security and noise immunity.

transmission-media
5short5 marks

Explain the difference between LAN, MAN, and WAN.

LAN vs MAN vs WAN

Networks are classified by their geographical span.

BasisLANMANWAN
Full formLocal Area NetworkMetropolitan Area NetworkWide Area Network
CoverageSingle building/campus (≈ up to 1 km)A city (≈ 10–100 km)Country/continent/global
OwnershipPrivate (single organization)Private or publicUsually public/leased
SpeedHigh (100 Mbps–10 Gbps)ModerateLower per-link, variable
Transmission mediumTwisted pair, fiber, Wi-FiFiber, microwaveTelephone lines, satellite, fiber
Error rate / delayLowestMediumHighest
ExampleOffice/lab networkCity-wide cable TV, campus networkThe Internet

Summary: A LAN connects devices over a small area, a MAN spans a city (often interconnecting several LANs), and a WAN interconnects LANs/MANs over very large distances — the Internet being the largest WAN.

network-types
6short5 marks

What is bandwidth? Explain Nyquist and Shannon's theorems.

Bandwidth

Bandwidth is the range of frequencies a channel can transmit, or equivalently the maximum data-carrying capacity of a link. In the analog sense it is measured in Hertz (Hz); in the digital sense (channel capacity) it is measured in bits per second (bps).

Nyquist's Theorem (Noiseless Channel)

For a noiseless channel, the maximum bit rate is:

C=2Blog2L   bpsC = 2B \log_2 L \;\text{ bps}

where BB = bandwidth in Hz and LL = number of discrete signal levels.

Example: A 3000 Hz noiseless channel with 2 levels gives C=2×3000×log22=6000C = 2 \times 3000 \times \log_2 2 = 6000 bps.

Shannon's Theorem (Noisy Channel)

For a noisy channel, the maximum capacity depends on the Signal-to-Noise Ratio (SNR):

C=Blog2 ⁣(1+SN)   bpsC = B \log_2\!\left(1 + \frac{S}{N}\right)\;\text{ bps}

where S/NS/N is the linear SNR (often given in dB, where SNRdB=10log10(S/N)\text{SNR}_{dB} = 10\log_{10}(S/N)).

Example: B=3000B = 3000 Hz, SNR = 30 dB ⇒ S/N=103=1000S/N = 10^{3} = 1000, so

C=3000×log2(1+1000)3000×9.9729,901 bps.C = 3000 \times \log_2(1+1000) \approx 3000 \times 9.97 \approx 29{,}901 \text{ bps}.

Note: Shannon gives the theoretical upper bound (accounting for noise); Nyquist tells how many signal levels are needed to reach a target rate. In practice the lower of the two limits applies.

bandwidthphysical-layer
7short5 marks

Explain various network topologies with their advantages and disadvantages.

Network Topologies

Topology is the physical or logical arrangement of nodes and links in a network.

1. Bus Topology

All devices connect to a single common backbone cable.

  • Advantages: Cheap, easy to install, less cable.
  • Disadvantages: Single backbone failure breaks the whole network; collisions; hard to troubleshoot.

2. Star Topology

All devices connect to a central hub/switch.

  • Advantages: Easy to add/remove nodes; failure of one link doesn't affect others; easy fault isolation.
  • Disadvantages: Central device is a single point of failure; more cable; cost of the hub/switch.

3. Ring Topology

Devices form a closed loop; data travels in one (or both) direction(s).

  • Advantages: No collisions (token passing); orderly access; good for moderate load.
  • Disadvantages: A single node/link failure can break the ring; difficult to reconfigure.

4. Mesh Topology

Every node connects to every other node (n(n1)/2n(n-1)/2 links for full mesh).

  • Advantages: Highly reliable/fault-tolerant; dedicated links give privacy and no traffic contention.
  • Disadvantages: Very high cabling and I/O cost; complex installation.

5. Tree (Hierarchical) Topology

Star networks connected in a hierarchy via a backbone.

  • Advantages: Scalable; easy to expand; supports many devices.
  • Disadvantages: Failure of the backbone/root affects large segments; heavy cabling.

Summary table:

TopologyReliabilityCostEase of fault isolation
BusLowLowHard
StarMediumMediumEasy
RingMediumMediumMedium
MeshHighHighEasy
TreeMediumMediumMedium
topology
8short5 marks

What is framing? Explain bit stuffing and byte stuffing.

Framing

Framing is the data-link-layer function of dividing the stream of bits received from the network layer into manageable units called frames, so the receiver can identify where each frame begins and ends. The DLL adds a header and trailer (with addresses and a checksum) around the payload.

Frame boundaries can be marked using character count, byte (character) stuffing, bit stuffing, or physical-layer coding violations.

Byte (Character) Stuffing

Used in byte-oriented protocols. Each frame starts and ends with a special FLAG byte. To prevent a flag pattern occurring inside the data from being mistaken for a frame boundary, an ESC (escape) byte is inserted before any FLAG or ESC byte appearing in the data. The receiver removes the inserted ESC bytes (de-stuffing).

Example (FLAG, ESC are special bytes):

Data:           A FLAG B ESC C
Stuffed (sent): FLAG A ESC FLAG B ESC ESC C FLAG

Bit Stuffing

Used in bit-oriented protocols (e.g., HDLC). The flag is the bit pattern 01111110. To ensure this pattern never appears in the data, the sender inserts a 0 after every five consecutive 1s in the data. The receiver, on seeing five 1s followed by a 0, removes (de-stuffs) that 0.

Example:

Data:    0110111111111100  (six+ consecutive 1s)
Stuffed: 011011111 0 11111 0 100   (a 0 inserted after each run of five 1s)

Key difference: Byte stuffing works on whole bytes using ESC bytes (variable-length, multiple-of-8 overhead); bit stuffing works at the bit level and is independent of character codes.

framingdata-link-layer
9short5 marks

Differentiate between the Stop-and-Wait and Sliding Window protocols.

Stop-and-Wait vs Sliding Window

Both are flow-control / ARQ protocols at the data-link (or transport) layer.

BasisStop-and-WaitSliding Window
Frames in transitOnly one frame sent, then sender waits for its ACKMultiple frames (up to window size) sent before waiting
Window size1>1> 1 (e.g., 2m12^{m}-1 for m-bit sequence numbers)
Efficiency / throughputLow (link idle while waiting)High (pipelining keeps link busy)
Sequence numbers1 bit (0,1) sufficientMultiple bits needed
UtilizationU=11+2aU = \dfrac{1}{1+2a}U=N1+2aU = \dfrac{N}{1+2a} (until 1), where a=Tp/Tta=T_p/T_t
Bandwidth useUnderutilizes high bandwidth-delay linksEfficient on high bandwidth-delay links
ExamplesSimple stop-and-wait ARQGo-Back-N, Selective Repeat

Summary: Stop-and-Wait sends one frame at a time and is simple but wastes capacity on long/fast links. Sliding Window allows several outstanding (unacknowledged) frames, achieving pipelining and much higher utilization, at the cost of larger buffers and sequence-number management.

flow-controlarq
10short5 marks

Explain the difference between connection-oriented and connectionless services.

Connection-Oriented vs Connectionless Services

BasisConnection-OrientedConnectionless
Connection setupRequired (handshake) before data transferNo setup; data sent immediately
PhasesSetup → Data transfer → TeardownSingle phase (just send)
ReliabilityReliable (ACKs, retransmission)Best-effort, unreliable
OrderingPackets delivered in orderMay arrive out of order
PathOften a fixed virtual circuitEach packet (datagram) routed independently
Overhead / delayHigher (setup + control)Lower, faster
Congestion handlingEasier (state maintained)Harder
ExampleTCP, telephone call, virtual circuitsUDP, IP, postal mail, datagrams

Analogy: Connection-oriented service is like a phone call — you dial, talk, then hang up, with a guaranteed ordered connection. Connectionless service is like the postal system — each letter (packet) is addressed and sent independently with no guarantee of order or delivery.

transport-layer
11short5 marks

What is UDP? Explain the UDP header format.

UDP (User Datagram Protocol)

UDP is a connectionless, unreliable transport-layer protocol. It provides process-to-process delivery using port numbers but adds no flow control, error recovery, or ordering. It is fast and low-overhead, making it suitable for real-time applications such as DNS, DHCP, VoIP, video streaming, and online gaming where speed matters more than reliability.

Key features:

  • No connection establishment (no handshake).
  • No acknowledgements or retransmission.
  • No sequencing — datagrams are independent.
  • Small fixed 8-byte header.

UDP Header Format (8 bytes)

The header has four 16-bit fields:

 0              15 16             31
+----------------+----------------+
| Source Port    | Destination Port|
+----------------+----------------+
| Length         | Checksum        |
+----------------+----------------+
|            Data (payload)        |
+----------------------------------+
FieldSizeDescription
Source Port16 bitsPort number of the sending process (optional)
Destination Port16 bitsPort number of the receiving process
Length16 bitsTotal length of UDP datagram (header + data), minimum 8
Checksum16 bitsError detection over header + data + pseudo-header (optional in IPv4)

Because the header is only 8 bytes (versus TCP's 20+), UDP has minimal overhead.

udptransport-layer
12short5 marks

Explain CIDR (Classless Inter-Domain Routing) with an example.

CIDR (Classless Inter-Domain Routing)

CIDR is an IP addressing scheme that replaces the rigid classful (A/B/C) system with variable-length subnet masking. Instead of fixed network/host boundaries, CIDR allows the prefix length to be any value, written in slash notation as IP/n, where n is the number of bits in the network prefix.

Why CIDR?

  • Reduces IPv4 address exhaustion by allocating only as many addresses as needed.
  • Enables route aggregation (supernetting), shrinking routing tables.
  • Removes the inefficiency of fixed classes.

Notation

For 200.10.0.0/22:

  • Prefix length = 22 bits ⇒ host bits = 3222=1032 - 22 = 10.
  • Subnet mask = 255.255.252.0.
  • Number of addresses = 210=10242^{10} = 1024 (usable hosts =10242=1022= 1024 - 2 = 1022).

Example (Supernetting / Aggregation)

Suppose an ISP must route to four contiguous /24 networks:

192.168.0.0/24
192.168.1.0/24
192.168.2.0/24
192.168.3.0/24

These can be aggregated into a single CIDR route:

192.168.0.0/22192.168.0.0/22

because the first 22 bits are common (192.168.000000xx). A router now advertises one route instead of four, reducing routing-table size.

Summary: CIDR uses IP/prefix notation to allocate address blocks of any size and to aggregate multiple networks into a single advertisement, improving address utilization and routing efficiency.

cidrip-addressing

Frequently asked questions

Where can I find the BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) question paper 2074?
The full BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) 2074 (regular) question paper is available free on Kekkei. You can read every question online and attempt the paper under timed exam conditions.
Does the Computer Networks (BSc CSIT, CSC258) 2074 paper come with solutions?
Yes. Every question on this Computer Networks (BSc CSIT, CSC258) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
How many marks is the BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) 2074 paper?
The BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) 2074 paper carries 60 full marks and is meant to be completed in 180 minutes, across 12 questions.
Is practising this Computer Networks (BSc CSIT, CSC258) past paper free?
Yes — reading and attempting this Computer Networks (BSc CSIT, CSC258) past paper on Kekkei is completely free.