BSc CSIT (TU) Science Computer Networks (BSc CSIT, CSC258) Question Paper 2078 Nepal
This is the official BSc CSIT (TU) (Science stream) Computer Networks (BSc CSIT, CSC258) question paper for 2078, 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 2078 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt any TWO questions.
Describe the medium access control sub-layer. Explain the CSMA/CD and CSMA/CA protocols with their working principles.
Medium Access Control (MAC) Sub-layer
The MAC sub-layer is the lower part of the Data Link Layer (the upper part being the LLC sub-layer). When a channel (medium) is shared among many stations (as in a LAN), more than one station may try to transmit at the same time, causing a collision. The MAC sub-layer's job is to decide which station gets to use the shared medium and when, so as to maximize utilization while minimizing collisions. It also handles framing and physical (MAC) addressing.
Multiple-access protocols are broadly: (i) Random access (ALOHA, CSMA, CSMA/CD, CSMA/CA), (ii) Controlled access (polling, token passing, reservation), and (iii) Channelization (FDMA, TDMA, CDMA).
CSMA (Carrier Sense Multiple Access): Before transmitting, a station senses the medium ("listen before talk"). It transmits only if the channel is idle, reducing the chance of collision.
CSMA/CD (Collision Detection) — used in wired Ethernet
Used where a station can transmit and listen simultaneously (it can detect a collision on the wire).
Working principle:
- A station that wants to send senses the carrier. If the channel is busy, it waits (defers).
- If idle, it begins transmitting while continuing to listen to the medium.
- If it detects a collision (the signal on the line differs from what it sent), it immediately stops and sends a short jam signal so all stations know a collision occurred.
- The station then waits a random time chosen by the binary exponential back-off algorithm: after the -th collision it waits a random multiple of the slot time in the range (capped at 1023), then retries.
This reduces wasted bandwidth because transmission is aborted as soon as a collision is sensed.
CSMA/CA (Collision Avoidance) — used in wireless 802.11 (Wi-Fi)
In wireless networks a station cannot reliably detect collisions while transmitting (hidden-terminal problem, can't listen and send at once), so collisions are avoided rather than detected.
Working principle:
- Station senses the channel. If idle, it waits for a DIFS (interframe space) interval to be sure it stays idle.
- It then performs a random back-off (contention window) and counts down only while the channel is idle, freezing the counter when busy.
- When the counter reaches zero, it transmits the frame.
- Because the sender can't detect collisions, the receiver returns an ACK after a SIFS gap to confirm success; no ACK ⇒ assume collision/loss ⇒ retransmit with a larger contention window.
- Optionally uses RTS/CTS handshaking (Request-to-Send / Clear-to-Send) to reserve the channel and solve the hidden-terminal problem.
Summary of Difference
| Feature | CSMA/CD | CSMA/CA |
|---|---|---|
| Medium | Wired (Ethernet) | Wireless (Wi-Fi) |
| Strategy | Detect collisions, then recover | Avoid collisions beforehand |
| Acknowledgement | Not required | ACK required |
| Mechanism | Jam signal + back-off | IFS + back-off + (RTS/CTS) |
Explain the IPv4 datagram header format in detail. Differentiate between IPv4 and IPv6 addressing.
IPv4 Datagram Header Format
An IPv4 packet has a header (20–60 bytes) followed by data. The header is described in 32-bit (4-byte) words:
| Field | Size | Purpose |
|---|---|---|
| Version | 4 bits | IP version (= 4). |
| IHL (Header Length) | 4 bits | Header length in 32-bit words (5–15, i.e. 20–60 bytes). |
| Type of Service / DSCP | 8 bits | Priority and quality-of-service handling. |
| Total Length | 16 bits | Length of entire datagram (header + data), max 65,535 bytes. |
| Identification | 16 bits | Identifies fragments of the same original datagram. |
| Flags | 3 bits | DF (Don't Fragment), MF (More Fragments). |
| Fragment Offset | 13 bits | Position of this fragment in the original datagram. |
| Time To Live (TTL) | 8 bits | Max hops; decremented at each router, datagram dropped at 0. |
| Protocol | 8 bits | Upper-layer protocol (TCP=6, UDP=17, ICMP=1). |
| Header Checksum | 16 bits | Error check over the header only. |
| Source Address | 32 bits | Sender's IP address. |
| Destination Address | 32 bits | Receiver's IP address. |
| Options + Padding | 0–40 bytes | Optional (record route, timestamp); padded to a 32-bit boundary. |
The minimum header is 20 bytes (no options); with options it can extend to 60 bytes.
IPv4 vs IPv6 Addressing
| Feature | IPv4 | IPv6 |
|---|---|---|
| Address size | 32 bits (~4.3 billion addresses) | 128 bits (~ addresses) |
| Notation | Dotted decimal, e.g. 192.168.1.1 | Hexadecimal, colon-separated, e.g. 2001:0db8:85a3::8a2e:0370:7334 |
| Header | Variable 20–60 bytes, complex | Fixed 40 bytes, simplified |
| Header checksum | Present | Removed (relies on lower layers) |
| Address configuration | Manual / DHCP | Auto-configuration (SLAAC) + DHCPv6 |
| Fragmentation | By sender and routers | By sender only (uses Path MTU) |
| Broadcast | Supported | Not supported (uses multicast/anycast) |
| Security (IPsec) | Optional | Built-in (mandatory in original spec) |
| NAT | Commonly required (address shortage) | Generally not needed (huge address space) |
Conclusion: IPv6 was designed to solve IPv4 address exhaustion and to simplify the header, improve auto-configuration, and integrate security.
Discuss congestion control in the transport layer. Explain the leaky bucket and token bucket algorithms for traffic shaping.
Congestion Control
Congestion occurs when the load offered to the network (number of packets) exceeds its capacity, causing queues at routers to overflow, packets to be dropped, throughput to fall, and delay to rise. Congestion control is the set of techniques to keep the load within the network's capacity.
Approaches:
- Open-loop (prevention): policies applied before congestion occurs — admission control, traffic shaping, retransmission/discarding policy.
- Closed-loop (removal): detect congestion and react — feedback signals (choke packets, ECN), and end-to-end window adjustment.
At the transport layer, TCP implements congestion control using a congestion window with slow start (exponential growth), congestion avoidance (additive increase / multiplicative decrease — AIMD), fast retransmit, and fast recovery. The sender treats packet loss as a sign of congestion and shrinks its window.
Traffic Shaping
Traffic shaping regulates the average rate and burstiness of data sent into the network so that traffic becomes smooth and predictable.
Leaky Bucket Algorithm
Think of a bucket with a small hole at the bottom. Water (packets) may arrive at any (bursty) rate, but leaks out at a constant rate, regardless of input rate. If the bucket overflows, excess packets are discarded.
- Output rate is fixed/constant (e.g. one packet per tick or bytes/sec).
- Smooths bursty traffic into a steady stream.
- A bursty input becomes a constant-rate output; bursts are not preserved.
arrival (bursty) --> [ bucket (queue, size = b) ] --> constant output rate
overflow -> dropped
Token Bucket Algorithm
Tokens are generated at a constant rate and stored in a bucket of capacity . To send a packet, a station must remove a token. If tokens are available, packets may be sent (allowing bursts up to the number of accumulated tokens); if no token is available, the packet waits.
- Allows bursts (up to bucket capacity) while limiting the long-term average rate to .
- If the host is idle, it saves up tokens and may later send a burst — more flexible than leaky bucket.
- Maximum burst length satisfies , where is the maximum output rate, giving .
Comparison
| Leaky Bucket | Token Bucket |
|---|---|
| Constant output rate | Variable output, bursts allowed |
| Discards excess packets | Discards/holds tokens, not packets |
| No memory of idle time | Saves tokens during idle periods |
Section B: Short Answer Questions
Attempt any EIGHT questions.
Explain the working of the HTTP protocol.
HTTP (HyperText Transfer Protocol)
HTTP is the application-layer protocol used by the World Wide Web to transfer web resources (HTML pages, images, etc.) between a web client (browser) and a web server. It runs over TCP, typically on port 80 (HTTPS uses TLS on port 443).
Working (request–response model):
- The browser establishes a TCP connection to the server (three-way handshake).
- The client sends an HTTP request message consisting of a request line (method, URL, version), headers, and an optional body. Common methods: GET (retrieve), POST (submit data), PUT, DELETE, HEAD.
- The server processes the request and returns an HTTP response message: a status line (e.g.
200 OK,404 Not Found,301 Moved,500 Internal Server Error), headers (Content-Type, Content-Length, etc.), and the body (the requested resource). - The browser renders the resource.
Key features:
- Stateless: each request is independent; the server keeps no memory of previous requests. State is maintained externally using cookies/sessions.
- Persistent connections (HTTP/1.1): one TCP connection can carry multiple request/response pairs (keep-alive), unlike non-persistent HTTP/1.0 which opened a new connection per object.
What is NAT? Explain its types and uses.
NAT (Network Address Translation)
NAT is a technique that maps private (internal) IP addresses to one or more public IP addresses (and vice versa) at the boundary router/gateway. It lets many hosts on a private network share a small number of public addresses, conserving the limited IPv4 address space and hiding the internal network structure.
Types of NAT
- Static NAT: A fixed one-to-one mapping between a single private IP and a single public IP. Used when an internal server must be reachable from outside.
- Dynamic NAT: Private IPs are mapped to public IPs drawn from a pool, on a first-come basis. Mapping is temporary and changes per session.
- PAT (Port Address Translation) / NAT Overload: Many private IPs share one public IP, distinguished by different port numbers. This is the most common form (e.g. home routers).
Uses / Advantages
- Conserves public IPv4 addresses by letting many hosts share one.
- Provides a measure of security/privacy by hiding internal addresses from the Internet.
- Allows an organization to change its internal addressing without affecting the outside.
Limitation: breaks end-to-end connectivity and complicates protocols that embed IP addresses (e.g. FTP, VoIP).
Explain the FTP protocol and its working.
FTP (File Transfer Protocol)
FTP is an application-layer, TCP-based protocol used to transfer files between a client and a server over a network. It is unique in that it uses two separate TCP connections:
- Control connection (port 21): stays open for the whole session; carries commands (USER, PASS, LIST, RETR, STOR, QUIT) and responses/status codes.
- Data connection (port 20): opened separately for the actual file data and closed after each transfer.
Working
- The client opens a control connection to the server on port 21 and logs in with a username and password (anonymous FTP allows guest access).
- Commands such as
LIST,RETR <file>(download) orSTOR <file>(upload) are sent over the control connection. - For each transfer a data connection is established (active or passive mode) and the file content is transferred.
- The data connection closes after the transfer; the control connection persists until
QUIT.
Modes
- Active mode: the server opens the data connection back to the client.
- Passive mode: the client opens the data connection to the server (works better through firewalls/NAT).
Note: Standard FTP sends data and credentials in plaintext (insecure); FTPS/SFTP add encryption.
What is the purpose of ICMP? List some common ICMP message types.
ICMP (Internet Control Message Protocol)
Purpose: IP provides an unreliable, connectionless, best-effort delivery service and has no built-in mechanism to report errors or send control information. ICMP fills this gap: it is a companion protocol to IP (carried inside IP datagrams, protocol number 1) used to report errors in datagram processing and to send network diagnostic/query messages. ICMP does not correct errors — it only reports them back to the source.
Common ICMP message types
ICMP messages fall into two categories — error-reporting and query messages.
Error-reporting messages:
- Destination Unreachable (Type 3) — packet cannot be delivered (network/host/port unreachable).
- Time Exceeded (Type 11) — TTL reached 0, or fragment reassembly timed out. (Used by
traceroute.) - Source Quench (Type 4) — congestion notification (deprecated).
- Parameter Problem (Type 12) — bad header field.
- Redirect (Type 5) — better route available.
Query messages:
- Echo Request / Echo Reply (Types 8 and 0) — used by the
pingutility to test reachability. - Timestamp Request / Reply (Types 13 and 14).
Examples of use: ping (Echo Request/Reply) and traceroute (Time Exceeded) are the two most common diagnostic tools built on ICMP.
Differentiate between symmetric and asymmetric key cryptography.
Symmetric vs Asymmetric Key Cryptography
Symmetric-key cryptography uses a single shared secret key for both encryption and decryption. Asymmetric-key (public-key) cryptography uses a pair of keys — a public key (to encrypt / verify) and a mathematically related private key (to decrypt / sign).
| Feature | Symmetric Key | Asymmetric Key |
|---|---|---|
| Number of keys | One shared secret key | Pair: public + private key |
| Encrypt/Decrypt | Same key for both | One key encrypts, the other decrypts |
| Speed | Fast (suitable for bulk data) | Slow (computationally heavy) |
| Key distribution | Difficult — secret key must be shared securely | Easy — public key can be shared openly |
| Scalability | Poor ( keys for users) | Good ( keys for users) |
| Examples | DES, 3DES, AES, RC4, Blowfish | RSA, Diffie–Hellman, ECC, DSA |
| Uses | Encrypting large data | Key exchange, digital signatures |
Note: In practice both are combined (hybrid systems, e.g. TLS): asymmetric crypto securely exchanges a symmetric session key, which is then used for fast bulk encryption.
Explain the concept of port numbers and socket addresses.
Port Numbers and Socket Addresses
Port number: A 16-bit number (–) used by the transport layer (TCP/UDP) to identify a specific process/application running on a host. While an IP address identifies the machine, a port number identifies the service within that machine, enabling multiplexing/demultiplexing of many connections.
Port ranges:
- Well-known ports (0–1023): standard services, e.g. HTTP=80, HTTPS=443, FTP=21, SSH=22, DNS=53, SMTP=25.
- Registered ports (1024–49151): assigned to specific applications.
- Dynamic / ephemeral ports (49152–65535): temporarily assigned to client connections.
Socket address: The combination of an IP address and a port number, written as IP:Port (e.g. 192.168.1.5:80). It uniquely identifies one endpoint of a network connection.
A full connection is identified by a socket pair — the four-tuple:
This four-tuple lets the transport layer distinguish every individual connection, even when multiple connections share the same server port.
What is multiplexing? Explain FDM and TDM.
Multiplexing
Multiplexing is the technique of combining multiple signals/data streams from different sources so they can share a single transmission medium (channel), improving link utilization. At the receiving end, demultiplexing separates the combined signal back into the original streams. The device that combines is a multiplexer (MUX) and the one that separates is a demultiplexer (DEMUX).
FDM (Frequency Division Multiplexing)
- The bandwidth of the channel is divided into several non-overlapping frequency bands, one per signal.
- Each source is modulated onto a different carrier frequency; guard bands separate channels to prevent interference.
- All signals are transmitted simultaneously but on different frequencies.
- Analog technique. Example: radio/TV broadcasting, cable TV.
Freq | ch1 | guard | ch2 | guard | ch3 (all at the same time)
TDM (Time Division Multiplexing)
- The channel's time is divided into time slots; each source is given a slot in turn (round-robin).
- Signals share the same frequency but transmit at different times.
- Digital technique. Two kinds: Synchronous TDM (fixed slot per source even if idle) and Statistical/Asynchronous TDM (slots allocated only to active sources, more efficient).
- Example: T1/E1 carrier lines, GSM.
Time | s1 | s2 | s3 | s1 | s2 | s3 ... (same frequency, different times)
Difference
| FDM | TDM |
|---|---|
| Divides frequency | Divides time |
| Signals sent at same time, different frequencies | Signals sent at same frequency, different times |
| Analog | Digital |
| Needs guard bands | Needs guard times/synchronization |
Differentiate between guided and unguided transmission media.
Guided vs Unguided Transmission Media
Guided (wired/bounded) media carry signals along a solid physical path (a cable). The signal is confined within the conductor. Unguided (wireless/unbounded) media transmit signals through free space (air, vacuum, water) as electromagnetic waves, without a physical conductor.
| Feature | Guided Media | Unguided Media |
|---|---|---|
| Path | Physical cable/conductor | Free space (air) — wireless |
| Direction | Signal directed along the wire | Signal broadcast in all/some directions |
| Examples | Twisted-pair, coaxial cable, optical fiber | Radio waves, microwaves, infrared, satellite |
| Interference | Less affected by external noise (shielded) | More prone to interference, fading, weather |
| Security | More secure (must tap the cable) | Less secure (signal travels openly in air) |
| Installation/cost | Cabling needed; costlier to lay over distance | Easy to deploy; no cabling |
| Mobility | Limited (fixed cables) | High (supports mobile devices) |
| Distance/bandwidth | Fiber gives very high bandwidth over long range | Depends on power, frequency, line-of-sight |
Summary: Guided media offer higher reliability, security and bandwidth but require physical cabling; unguided media offer mobility and easy deployment at the cost of security and susceptibility to interference.
Explain the difference between LAN, MAN, and WAN.
LAN vs MAN vs WAN
Networks are classified by geographical area they cover.
- LAN (Local Area Network): Covers a small area — a room, building, or campus (up to ~a few km). Privately owned, high data rate, low latency, low error rate. Examples: office/college network, home Wi-Fi. Technologies: Ethernet, Wi-Fi.
- MAN (Metropolitan Area Network): Covers a city or metropolitan area (up to ~50 km). Often interconnects several LANs. Owned by an organization or a service provider. Examples: city-wide cable TV network, a campus spread across a city. Technology: e.g. Metro Ethernet.
- WAN (Wide Area Network): Covers a large geographical area — country, continent, or the whole world. Built from many interconnected LANs/MANs using leased lines, fiber backbones and routers. Usually owned/operated by multiple organizations. Lower data rate per hop and higher latency than LAN. The Internet is the largest WAN.
| Feature | LAN | MAN | WAN |
|---|---|---|---|
| Area | Building/campus | City | Country/world |
| Ownership | Private | Private/Provider | Usually multiple/Provider |
| Speed | High | Medium–High | Lower per link |
| Latency | Low | Moderate | High |
| Error rate | Low | Moderate | Higher |
| Example | Office network | City cable network | The Internet |
Frequently asked questions
- Where can I find the BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) question paper 2078?
- The full BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) 2078 (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) 2078 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) 2078 paper?
- The BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) 2078 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.