BSc CSIT (TU) Science Computer Networks (BSc CSIT, CSC258) Question Paper 2075 Nepal
This is the official BSc CSIT (TU) (Science stream) Computer Networks (BSc CSIT, CSC258) question paper for 2075, as set in the regular annual examination. It carries 60 full marks and a time allowance of 180 minutes, across 12 questions. On Kekkei you can attempt this Computer Networks (BSc CSIT, CSC258) past paper online with a timer, get instant AI feedback and step-by-step solutions, and track the topics where you lose marks — completely free. Whether you are revising for your BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) exam or solving previous years' question papers, this 2075 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt any TWO questions.
Explain the distance vector routing algorithm. Discuss the count-to-infinity problem and the methods used to solve it.
Distance Vector Routing
Distance Vector (DV) routing is a distributed, iterative, and asynchronous routing algorithm in which each router maintains a routing table (the distance vector) listing, for every destination, the best known distance (cost/metric) and the next hop to reach it. It is based on the Bellman-Ford equation:
where is the least cost from node to , is the cost of the direct link from to its neighbour , and is 's estimate of the cost to .
Working
- Each router initializes its table with the cost to its directly connected neighbours (and to all others).
- Periodically (e.g. every 30 s in RIP) each router sends its entire distance vector to its immediate neighbours.
- On receiving a neighbour's vector, a router updates its table using the Bellman-Ford equation; if a lower-cost path is found, it records the new cost and the next hop.
- The process repeats until the tables converge (no further changes). RIP is the classic example, using hop count as the metric with a maximum of 15.
Characteristics: simple, low overhead, but slow convergence and "routing by rumour" (a router trusts neighbours without knowing the full topology).
Count-to-Infinity Problem
When a link or router fails, the bad news (an increased/infinite cost) propagates slowly while good (but now stale) routes bounce back and forth between routers, each incrementing the cost by one in every exchange. The metric creeps upward step by step toward infinity instead of converging quickly.
Example: A — B — C. If the C–B link breaks, B should mark C unreachable. But A still advertises "I can reach C in 2 hops" (its route actually goes through B). B believes A, sets cost = 3, advertises it; A then raises to 4, and so on — the count climbs to infinity. This delays convergence and can cause routing loops.
Methods to Solve It
- Defining a maximum (infinity): Treat a cost (e.g. 16 hops in RIP) as infinity. This bounds the counting but does not eliminate the loop.
- Split Horizon: A router never advertises a route back over the interface from which it learned that route. (A does not tell B about C, since A's route to C is via B.)
- Split Horizon with Poison Reverse: Instead of suppressing the route, the router advertises it back with a cost of infinity, explicitly poisoning it so the neighbour immediately knows the path is invalid.
- Route Poisoning / Triggered Updates: When a route fails, the router immediately sets its cost to infinity and sends a triggered update without waiting for the periodic timer, speeding up propagation of bad news.
- Hold-down timers: A router ignores updates about a recently-failed route for a fixed period, preventing stale information from reinstating it.
Assume a Class B network. Divide it into four subnets. Write the subnet ID and broadcast address of each subnet and determine the new subnet mask.
Subnetting a Class B Network into 4 Subnets
Take the Class B network 172.16.0.0 with the default mask 255.255.0.0 (/16). The default network bits = 16, host bits = 16.
Step 1 — Bits to borrow
To create at least 4 subnets we need bits borrowed from the host part.
- New prefix length = → mask
/18 - Number of subnets =
- Host bits remaining = → hosts per subnet =
Step 2 — New Subnet Mask
The third octet borrows the two high-order bits: 11000000 = 192.
Block size in the third octet = .
Step 3 — Subnet ID and Broadcast Address of Each Subnet
| Subnet | Subnet ID (Network) | First Host | Last Host | Broadcast Address |
|---|---|---|---|---|
| 1 | 172.16.0.0 | 172.16.0.1 | 172.16.63.254 | 172.16.63.255 |
| 2 | 172.16.64.0 | 172.16.64.1 | 172.16.127.254 | 172.16.127.255 |
| 3 | 172.16.128.0 | 172.16.128.1 | 172.16.191.254 | 172.16.191.255 |
| 4 | 172.16.192.0 | 172.16.192.1 | 172.16.255.254 | 172.16.255.255 |
Result: New subnet mask = 255.255.192.0 (/18), giving 4 subnets each with 16,382 usable hosts, with the subnet IDs and broadcast addresses shown above.
What is TCP? Explain the TCP segment structure and the three-way handshake mechanism for connection establishment and termination.
TCP (Transmission Control Protocol)
TCP is a connection-oriented, reliable, byte-stream transport-layer protocol (RFC 793). It provides reliable in-order delivery using sequence/acknowledgement numbers, retransmission, flow control (sliding window) and congestion control. It is full-duplex and uses port numbers for process-to-process delivery.
TCP Segment Structure
The TCP header is 20 bytes (minimum), up to 60 bytes with options.
| Field | Size | Purpose |
|---|---|---|
| Source Port | 16 bits | Sending process port |
| Destination Port | 16 bits | Receiving process port |
| Sequence Number | 32 bits | Byte number of first data byte in segment |
| Acknowledgement Number | 32 bits | Next byte expected from the other side |
| Header Length (Data Offset) | 4 bits | Header size in 32-bit words |
| Reserved | 6 bits | Unused (set 0) |
| Control Flags | 6 bits | URG, ACK, PSH, RST, SYN, FIN |
| Window Size | 16 bits | Flow-control / advertised receive window |
| Checksum | 16 bits | Error detection over header + data + pseudo-header |
| Urgent Pointer | 16 bits | Offset of urgent data (valid if URG set) |
| Options + Padding | variable | MSS, window scale, timestamps, etc. |
Three-Way Handshake (Connection Establishment)
- SYN: Client sends a segment with
SYN = 1and an initial sequence numberseq = x. - SYN + ACK: Server replies with
SYN = 1, ACK = 1, its ownseq = y, andack = x + 1. - ACK: Client sends
ACK = 1,seq = x + 1,ack = y + 1.
The connection is now ESTABLISHED and data transfer can begin. The handshake synchronizes sequence numbers on both ends.
Connection Termination (Four-Way Handshake)
Because TCP is full-duplex, each direction is closed independently:
- FIN from the initiator (e.g. client),
FIN = 1. - ACK from the server acknowledging the FIN.
- FIN from the server when it has finished sending.
- ACK from the client; it then enters the TIME-WAIT state (2×MSL) before fully closing, to ensure the final ACK is delivered and old segments expire.
Section B: Short Answer Questions
Attempt any EIGHT questions.
What is framing? Explain bit stuffing and byte stuffing.
Framing
Framing is the data-link-layer function of dividing the continuous bit stream received from the network layer into manageable, discrete units called frames, each with a clearly identifiable beginning and end so the receiver can distinguish one frame from the next. A frame typically carries a header, the payload, and a trailer (often with an error-check field).
To mark frame boundaries, a special flag byte/bit pattern (e.g. 01111110) is placed at the start and end. The problem is that the same pattern may appear inside the data; stuffing solves this.
Bit Stuffing
Used in bit-oriented protocols (e.g. HDLC) where the flag is 01111110 (six consecutive 1s).
- Sender: Whenever it transmits five consecutive 1s in the data, it automatically inserts (stuffs) a 0 after them, so the flag pattern can never appear in the payload.
- Receiver: On detecting five consecutive 1s followed by a 0, it removes (de-stuffs) the 0.
Example: Data 0111111 → transmitted as 01111011 (a 0 stuffed after the five 1s).
Byte (Character) Stuffing
Used in byte-oriented protocols (e.g. PPP). A special flag byte marks frame boundaries, and an escape (ESC) byte handles data that contains the flag.
- Sender: If a FLAG or ESC byte occurs inside the data, an ESC byte is inserted before it.
- Receiver: Removes the ESC byte and treats the following byte as data, not a delimiter.
Byte stuffing works on whole bytes, whereas bit stuffing works at the bit level and adds less overhead.
Differentiate between the Stop-and-Wait and Sliding Window protocols.
Stop-and-Wait vs Sliding Window Protocol
| Feature | Stop-and-Wait | Sliding Window |
|---|---|---|
| Frames in transit | Only one unacknowledged frame at a time | Multiple frames (up to window size ) before an ACK is needed |
| Window size | Sender window = 1, receiver window = 1 | Sender/receiver windows > 1 |
| Efficiency | Low — sender idles waiting for each ACK; poor link utilization on high-bandwidth-delay links | High — pipelining keeps the link busy |
| Throughput / Utilization | where | (up to 1) |
| Sequence numbers | 1 bit (0,1) sufficient | Multiple bits ( of window) |
| Buffering | Minimal (1 frame) | Several frames buffered at both ends |
| Examples | Simple ARQ | Go-Back-N, Selective Repeat |
| Complexity | Simple | More complex (window management, multiple timers) |
Summary: Stop-and-Wait sends one frame and waits, making it simple but inefficient. Sliding Window allows several frames to be outstanding, greatly improving link utilization and throughput, at the cost of more buffering and sequence-number management.
Explain the difference between connection-oriented and connectionless services.
Connection-Oriented vs Connectionless Services
| Feature | Connection-Oriented | Connectionless |
|---|---|---|
| Connection setup | A logical connection (handshake) is established before data transfer and released afterwards | No setup; each packet sent independently |
| Phases | Three phases: setup, data transfer, teardown | Single phase: data transfer only |
| Reliability | Reliable — guarantees ordered, error-free delivery (ACK + retransmission) | Best-effort — no delivery/order guarantee |
| Ordering | Packets arrive in order | Packets may arrive out of order |
| Path | All packets follow the same established path (virtual circuit) | Each packet (datagram) may take a different path |
| Addressing | Address used only during setup | Full destination address in every packet |
| Overhead / Delay | Higher overhead, setup delay | Lower overhead, faster for short messages |
| Example | TCP, virtual-circuit networks (ATM, X.25) | UDP, IP datagram service |
Summary: A connection-oriented service is like a telephone call — connect, talk, hang up — providing reliable ordered delivery. A connectionless service is like sending postcards — each is addressed and sent independently with no guarantee of order or arrival.
What is UDP? Explain the UDP header format.
UDP (User Datagram Protocol)
UDP is a connectionless, unreliable, message-oriented transport-layer protocol (RFC 768). It provides minimal services on top of IP: process-to-process delivery via port numbers and an optional checksum. It has no handshake, sequencing, acknowledgement, flow control or congestion control, so it is fast and low-overhead — suitable for DNS, DHCP, TFTP, SNMP, VoIP, online gaming and streaming where speed matters more than guaranteed delivery.
UDP Header Format
The UDP header is fixed at 8 bytes, consisting of four 16-bit fields:
| Field | Size | Description |
|---|---|---|
| Source Port | 16 bits | Port of the sending process (optional, may be 0) |
| Destination Port | 16 bits | Port of the receiving process |
| Length | 16 bits | Total length of UDP datagram (header + data) in bytes; minimum 8 |
| Checksum | 16 bits | Error detection over header, data and an IP pseudo-header (optional in IPv4, mandatory in IPv6) |
Layout (each row = 16 bits):
0 15 16 31
+-----------------+-----------------+
| Source Port | Destination Port|
+-----------------+-----------------+
| Length | Checksum |
+-----------------+-----------------+
| Data (payload) |
+-----------------------------------+
The small fixed 8-byte header is why UDP is lightweight compared to TCP's 20-byte header.
Explain CIDR (Classless Inter-Domain Routing) with an example.
CIDR (Classless Inter-Domain Routing)
CIDR is an IP addressing and route-aggregation scheme (RFC 1519) that removes the rigid Class A/B/C boundaries and allows the network/host split to occur at any bit position, specified by a prefix length written in slash notation a.b.c.d/n, where is the number of network (prefix) bits.
Key Ideas
- The mask can be any value , not just /8, /16, /24.
- Number of addresses in a block = .
- Route aggregation (supernetting): many contiguous networks are advertised as a single prefix, shrinking routing tables and conserving IPv4 addresses.
Example
Consider 192.168.16.0/20.
- Prefix length → host bits = .
- Mask =
11111111.11111111.11110000.00000000= 255.255.240.0. - Block size = addresses (4094 usable hosts).
- Address range = 192.168.16.0 to 192.168.31.255.
This single /20 block aggregates sixteen /24 networks (192.168.16.0/24 … 192.168.31.0/24) into one routing-table entry, demonstrating CIDR's efficient address use and supernetting benefit.
Differentiate between a hub, a switch, and a router.
Hub vs Switch vs Router
| Feature | Hub | Switch | Router |
|---|---|---|---|
| OSI Layer | Physical (Layer 1) | Data Link (Layer 2) | Network (Layer 3) |
| Function | Repeats incoming signal to all ports | Forwards frames to the specific destination port | Forwards packets between different networks |
| Addressing used | None (electrical signal only) | MAC addresses (MAC table) | IP addresses (routing table) |
| Collision domain | One shared collision domain | Each port = separate collision domain | Each port = separate collision & broadcast domain |
| Broadcast domain | Single | Single (forwards broadcasts) | Separates broadcast domains |
| Intelligence | None (dumb broadcast) | Learns MAC addresses, filters/forwards | Best-path routing, can connect WAN/LAN |
| Data unit | Bits | Frames | Packets |
| Bandwidth | Shared among all ports | Dedicated per port (full-duplex) | Depends on interfaces |
| Typical use | Legacy small LANs (obsolete) | Connecting devices within a LAN | Connecting a LAN to other networks / the Internet |
Summary: A hub blindly repeats bits to every port; a switch intelligently forwards frames using MAC addresses within one network; a router routes packets between different networks using IP addresses and separates broadcast domains.
What is ARP? Explain how ARP resolves a logical address to a physical address.
ARP (Address Resolution Protocol)
ARP is a network-layer protocol (RFC 826) used to map a known logical (IP) address to its corresponding physical (MAC/hardware) address on a local area network. Because data-link delivery on an Ethernet LAN requires the destination MAC address, ARP resolves the next-hop IP into the MAC needed to build the frame.
How ARP Resolves IP → MAC
- Cache check: When a host wants to send a packet to a target IP on the same LAN, it first checks its ARP cache (a table of recent IP→MAC mappings). If found, it uses it directly.
- ARP Request (broadcast): If not cached, the host broadcasts an ARP Request frame to MAC address
FF:FF:FF:FF:FF:FF(all hosts on the LAN). It contains the sender's IP & MAC and the target IP, asking "Who has IP X? Tell me your MAC." - Processing: Every host on the LAN receives the broadcast, but only the host whose IP matches the target IP responds.
- ARP Reply (unicast): The target host replies directly (unicast) to the requester with an ARP Reply containing its MAC address.
- Caching: The requesting host stores the IP→MAC mapping in its ARP cache (with a timeout) so future packets need no new request, then encapsulates the IP packet in a frame addressed to that MAC.
If the destination is on a different network, ARP resolves the MAC of the default gateway (router) instead of the final host.
Explain the working of the HTTP protocol.
HTTP (HyperText Transfer Protocol)
HTTP is the application-layer, request–response protocol used by the World Wide Web to transfer hypermedia resources (HTML, images, etc.) between a client (browser) and a web server. It runs over TCP, typically on port 80 (HTTPS on 443), and is stateless — each request is independent (state is maintained externally via cookies/sessions).
Working of HTTP
- Connection: The client opens a TCP connection to the server (three-way handshake) on port 80.
- Request: The browser sends an HTTP request message consisting of:
- A request line — method (
GET,POST,PUT,DELETE,HEAD…), the URL/path, and the HTTP version. - Headers — e.g.
Host,User-Agent,Accept. - An optional body (e.g. form data in a POST).
- A request line — method (
- Processing: The server locates/processes the requested resource.
- Response: The server returns an HTTP response message with:
- A status line — HTTP version and a status code (e.g.
200 OK,301 Moved,404 Not Found,500 Server Error). - Headers — e.g.
Content-Type,Content-Length,Date. - A body — the requested content (HTML, image, JSON, etc.).
- A status line — HTTP version and a status code (e.g.
- Connection handling:
- Non-persistent (HTTP/1.0): a separate TCP connection per object.
- Persistent (HTTP/1.1, keep-alive): one connection reused for multiple requests, improving efficiency.
- The browser renders the received content; cookies may carry state across requests.
What is NAT? Explain its types and uses.
NAT (Network Address Translation)
NAT is a technique (RFC 1631/3022) that translates private IP addresses into public IP addresses (and vice-versa) at a router/firewall boundary. It lets many hosts on a private network (e.g. 192.168.x.x) share one or a few public IP addresses to access the Internet, conserving the limited IPv4 address space and adding a layer of security by hiding internal hosts.
Types of NAT
- Static NAT: A one-to-one fixed mapping between a private IP and a public IP. Used when an internal server must be permanently reachable from outside.
- Dynamic NAT: Private IPs are mapped to public IPs drawn from a pool, assigned on demand. The mapping is temporary and changes per session.
- PAT (Port Address Translation) / NAT Overload: Many-to-one — many private IPs share a single public IP, distinguished by different port numbers. This is the most common form (home/office routers).
Uses of NAT
- Conserves public IPv4 addresses — many hosts share few public IPs.
- Security / privacy — internal IP structure is hidden from the outside.
- Easier renumbering / flexibility — internal addressing can change without affecting external addresses.
- Allows organizations to use private address ranges internally while still reaching the public Internet.
Frequently asked questions
- Where can I find the BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) question paper 2075?
- The full BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) 2075 (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) 2075 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) 2075 paper?
- The BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) 2075 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.