BSc CSIT (TU) Science Computer Networks (BSc CSIT, CSC258) Question Paper 2081 Nepal
This is the official BSc CSIT (TU) (Science stream) Computer Networks (BSc CSIT, CSC258) question paper for 2081, 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 2081 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt any TWO questions.
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
Given: A Class B network. Take the example network 172.16.0.0 with the default mask 255.255.0.0 (/16).
Step 1: Number of subnet bits
To create 4 subnets we need borrowed bits such that .
Step 2: New subnet mask
Class B default is /16. Borrowing 2 bits gives /18.
The third octet borrows the top 2 bits: .
Step 3: Block size
So subnets increment by 64 in the third octet.
Step 4: Subnet ID and Broadcast addresses
| Subnet | Subnet ID (Network) | Valid Host Range | 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 |
Step 5: Hosts per subnet
Host bits = .
Result: New subnet mask = 255.255.192.0 (/18), with the four subnets, subnet IDs and broadcast addresses listed 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 of the TCP/IP suite. It provides reliable, in-order, error-checked delivery of data between processes using sequence numbers, acknowledgements, retransmission, flow control (sliding window) and congestion control. It is identified by IP protocol number 6.
TCP Segment Structure
The TCP header is a minimum of 20 bytes (without options). Key fields:
| Field | Size | Purpose |
|---|---|---|
| Source Port | 16 bits | Sending application port |
| Destination Port | 16 bits | Receiving application 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 |
| Control Flags | 6 bits | URG, ACK, PSH, RST, SYN, FIN |
| Window Size | 16 bits | Receiver buffer space (flow control) |
| Checksum | 16 bits | Error detection over header + data + pseudo-header |
| Urgent Pointer | 16 bits | Offset of urgent data (when URG set) |
| Options | variable | MSS, window scale, SACK, timestamp |
| Data | variable | Application payload |
Three-Way Handshake (Connection Establishment)
Client Server
|------- SYN (seq=x) -------->|
|<-- SYN+ACK (seq=y,ack=x+1)--|
|------- ACK (ack=y+1) ------>|
Connection ESTABLISHED
- SYN: Client sends a segment with SYN=1 and an initial sequence number .
- SYN+ACK: Server replies with SYN=1, ACK=1, its own sequence , and acknowledgement .
- ACK: Client sends ACK=1 with acknowledgement . The connection is now open and data transfer begins.
Connection Termination (Four-Way Handshake)
TCP uses a graceful, four-way close:
Client Server
|------- FIN (seq=u) -------->|
|<------ ACK (ack=u+1) -------|
|<------ FIN (seq=v) ---------|
|------- ACK (ack=v+1) ------>|
Connection CLOSED
- Client sends FIN to close its side.
- Server replies with ACK.
- Server sends its own FIN when ready.
- Client replies with ACK (then waits in TIME_WAIT before fully closing).
This ensures both directions of the full-duplex connection are closed independently and reliably.
Explain the various error detection and correction techniques used in the data link layer, including CRC and Hamming code with examples.
Error Detection and Correction in the Data Link Layer
Transmission over physical media introduces errors (single-bit or burst errors). The data link layer uses redundant bits to detect and sometimes correct them.
A. Error Detection Techniques
- Parity Check – One redundant bit makes the number of 1s even (even parity) or odd. Detects single-bit errors only; fails on even-numbered bit errors.
- Two-Dimensional (LRC) Parity – Parity computed per row and column; detects most burst errors.
- Checksum – Data divided into -bit words, summed using 1's-complement arithmetic; the complemented sum is sent. Receiver re-adds; result of all 1s means no error.
- Cyclic Redundancy Check (CRC) – Strong polynomial-based detection (below).
B. CRC (Cyclic Redundancy Check) – Example
CRC treats the bit string as a polynomial and divides by a generator using modulo-2 (XOR) division.
Data = 1010, Generator (degree 3, so append 3 zeros).
Dividend = 1010000. Perform modulo-2 division by 1011:
1010000 ÷ 1011
1010 XOR 1011 = 0001
bring down -> 00010 ...
Result: quotient ignored, Remainder (CRC) = 011
Transmitted frame = data + remainder = 1010 + 011 = 1010011.
At the receiver, the frame is divided by again; a zero remainder means no error, otherwise an error is detected. CRC detects all single-bit, double-bit, odd-numbered, and most burst errors.
C. Hamming Code (Error Correction) – Example
Hamming code adds parity bits at positions to detect and correct single-bit errors. For data bits we need parity bits where:
Example: 4 data bits 1011 (positions for d). . Total 7 bits.
Layout (positions 1–7), parity at 1,2,4; data at 3,5,6,7 = 1,0,1,1:
| Pos | 1 (P1) | 2 (P2) | 3 | 4 (P4) | 5 | 6 | 7 |
|---|---|---|---|---|---|---|---|
| Bit | ? | ? | 1 | ? | 0 | 1 | 1 |
- covers bits 1,3,5,7 → 1,0,1 → for even parity
- covers bits 2,3,6,7 → 1,1,1 →
- covers bits 4,5,6,7 → 0,1,1 →
Codeword = 0110011 (positions 1–7).
Correction: At the receiver, recompute the three parity checks; the binary value of the failing parity positions gives the position of the erroneous bit, which is then flipped to correct it.
Summary
- Detection: Parity, 2-D parity, Checksum, CRC.
- Correction: Hamming code (and FEC codes) correct single-bit errors using the error-position syndrome.
Section B: Short Answer Questions
Attempt any EIGHT questions.
Explain the difference between connection-oriented and connectionless services.
Connection-Oriented vs Connectionless Services
| Feature | Connection-Oriented | Connectionless |
|---|---|---|
| Setup | Connection established before data transfer (handshake) | No prior setup; send immediately |
| Reliability | Reliable – acknowledgements and retransmission | Unreliable – best-effort, no guarantee |
| Ordering | Data delivered in order | Packets may arrive out of order |
| Path | Often a logical path/circuit maintained | Each packet routed independently |
| Overhead | Higher (state, ACKs, sequencing) | Lower, faster |
| Example protocol | TCP (transport), virtual circuits | UDP (transport), IP, datagram |
| Use case | File transfer, web, email | DNS, streaming, VoIP, gaming |
Summary: Connection-oriented service is like a telephone call — a dedicated logical connection is set up, used, then released, with guaranteed reliable in-order delivery. Connectionless service is like the postal system — each datagram is independent, requires no setup, and is delivered on a best-effort basis with lower overhead.
What is UDP? Explain the UDP header format.
UDP (User Datagram Protocol)
UDP is a connectionless, unreliable transport-layer protocol (IP protocol number 17). It provides no handshake, no acknowledgement, no retransmission, no flow/congestion control and no guaranteed ordering. It simply adds port-based multiplexing and an optional checksum on top of IP, making it fast and low-overhead. It suits real-time and query/response applications such as DNS, DHCP, TFTP, SNMP, VoIP, online gaming and video streaming.
UDP Header Format
The UDP header is a fixed 8 bytes (64 bits) with four 16-bit fields:
0 16 31
+--------------------+--------------------+
| Source Port | Destination Port |
+--------------------+--------------------+
| Length | Checksum |
+--------------------+--------------------+
| Data (payload) |
+-----------------------------------------+
| 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 header + data in bytes (min 8) |
| Checksum | 16 bits | Error check over pseudo-header + UDP header + data (optional in IPv4) |
Key point: Because the header is only 8 bytes versus TCP's 20 bytes, UDP has much lower overhead but offers no reliability guarantees.
Explain CIDR (Classless Inter-Domain Routing) with an example.
CIDR (Classless Inter-Domain Routing)
CIDR is an IP addressing and routing scheme (RFC 1519) that replaces the rigid Class A/B/C boundaries with a variable-length prefix. An address is written as IP/prefix-length (slash notation), where the prefix length states how many leading bits form the network portion. CIDR enables efficient use of the IPv4 address space and route aggregation (supernetting), which shrinks routing tables.
Notation
where = number of network bits, so host bits and usable hosts .
Example
Consider 192.168.1.0/26:
- Prefix length subnet mask =
255.255.255.192 - Host bits
- Usable hosts
- Network address: 192.168.1.0, Broadcast: 192.168.1.63
- Host range: 192.168.1.1 – 192.168.1.62
Supernetting Example
Four networks 200.1.0.0/24, 200.1.1.0/24, 200.1.2.0/24, 200.1.3.0/24 can be aggregated into a single CIDR route 200.1.0.0/22, advertised as one entry instead of four.
Advantages: flexible subnet sizing, reduced address wastage, smaller routing tables through aggregation.
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) |
| Forwarding basis | None – repeats bits to all ports | MAC address (MAC table) | IP address (routing table) |
| Addressing | No addressing | Physical/MAC address | Logical/IP address |
| Collision domain | Single (all ports share) | One per port | One per port |
| Broadcast domain | Single | Single (unless VLANs) | Separate per interface |
| Intelligence | Dumb broadcast | Learns MAC addresses, filters | Routes between networks, runs routing protocols |
| Connects | Devices in same LAN segment | Devices in same LAN | Different networks/LANs to WAN/Internet |
| Data unit | Bits | Frames | Packets |
Summary:
- A hub is a dumb Layer-1 repeater that floods incoming bits to every port (one collision domain).
- A switch is an intelligent Layer-2 device that learns MAC addresses and forwards frames only to the destination port (separate collision domain per port).
- A router is a Layer-3 device that forwards packets between different IP networks using routing tables and separates broadcast domains, connecting LANs to the Internet.
What is ARP? Explain how ARP resolves a logical address to a physical address.
ARP (Address Resolution Protocol)
ARP is a protocol that maps a known logical (IP) address to its corresponding physical (MAC) address on a local network. It operates between the network and data-link layers, because frames on a LAN are delivered using MAC addresses, while hosts are addressed logically by IP.
How ARP Resolves IP to MAC
- Check ARP cache: When host A wants to send a packet to IP address on the same LAN, it first checks its ARP cache (table of IP→MAC mappings). If found, it uses it directly.
- ARP Request (broadcast): If not cached, A broadcasts an ARP Request frame to the MAC broadcast address
FF:FF:FF:FF:FF:FF, asking "Who has IP ? Tell A." This reaches every host on the LAN. - ARP Reply (unicast): Only the host owning IP responds with an ARP Reply (unicast back to A) containing its MAC address.
- Update cache: Host A stores the IP→MAC mapping in its ARP cache (with a timeout) and uses the MAC address to build and send the frame.
A --- broadcast ---> "Who has 192.168.1.5?" (ARP Request)
B --- unicast -----> "192.168.1.5 is at 00:1A:2B:3C:4D:5E" (ARP Reply)
Related: RARP / DHCP do the reverse (MAC→IP). The cache avoids repeating ARP for every packet. If the destination is on a different network, ARP resolves the default gateway's IP instead.
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 hypertext (web pages, images, etc.) between a client (browser) and a web server. It runs over TCP, typically on port 80 (HTTPS uses TLS on port 443), and is stateless — each request is independent (state is maintained 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 consisting of:
- a request line — method + URL + version, e.g.
GET /index.html HTTP/1.1 - headers (Host, User-Agent, Accept, etc.)
- an optional body (for POST/PUT).
- a request line — method + URL + version, e.g.
- Server processing: The server locates/generates the requested resource.
- Response: The server returns an HTTP response with:
- a status line — version + status code, e.g.
HTTP/1.1 200 OK - headers (Content-Type, Content-Length, Date)
- the body (the requested HTML/data).
- a status line — version + status code, e.g.
- Render/Close: The browser renders the content. In HTTP/1.0 the connection closes per request; HTTP/1.1 uses persistent (keep-alive) connections for multiple requests.
Common Methods & Status Codes
- Methods: GET, POST, PUT, DELETE, HEAD.
- Status codes: 200 OK, 301 Moved, 404 Not Found, 500 Internal Server Error.
Client: GET /index.html HTTP/1.1
Host: www.example.com
Server: HTTP/1.1 200 OK
Content-Type: text/html
<html>...</html>
What is NAT? Explain its types and uses.
NAT (Network Address Translation)
NAT is a technique implemented on a router/firewall that translates private IP addresses (used inside a LAN) into one or more public IP addresses (used on the Internet), and vice versa. It conserves the limited IPv4 public address space and hides the internal network structure, adding a layer of security.
Types of NAT
- Static NAT (one-to-one): A fixed, permanent mapping of one private IP to one public IP. Used when an internal server must be reachable from outside.
- Dynamic NAT: Maps private IPs to public IPs from a pool on a first-come, first-served basis. Mappings are temporary; the number of simultaneous users is limited by the pool size.
- PAT / NAT Overload (many-to-one): 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 — many hosts share a few public IPs.
- Security/privacy — internal addresses are hidden from the outside.
- Flexibility — internal addressing can change without affecting public addresses.
- Enables multiple devices on a home/office LAN to access the Internet through a single public IP.
Disadvantage: Breaks end-to-end connectivity and complicates some protocols (e.g., requires ALGs for FTP/SIP).
Explain the FTP protocol and its working.
FTP (File Transfer Protocol)
FTP is an application-layer, client-server protocol used to transfer files between a client and a server over a TCP/IP network. It runs over TCP and is reliable. A distinctive feature is that FTP uses two separate connections:
- Control connection (port 21): carries commands and replies; stays open for the whole session.
- Data connection (port 20 in active mode): carries the actual file data; opened/closed for each transfer.
Working of FTP
- Connection & login: The client opens a control connection to the server on port 21 and authenticates with a username and password (anonymous FTP allows guest login).
- Commands: Over the control channel the client sends commands such as
USER,PASS,LIST,RETR(download),STOR(upload),CWD,QUIT. - Data transfer modes:
- Active mode: server initiates the data connection from port 20 to a client-specified port.
- Passive mode: server opens a port and the client initiates the data connection (firewall-friendly).
- File transfer: Data is sent over the separate data connection in ASCII or binary mode; the control connection remains open to issue further commands.
- Termination: The client sends
QUITand the connections close.
Client --(control, port 21)--> Server : USER, PASS, RETR file.txt
Client <==(data, port 20)===== Server : file contents
Note: FTP transmits credentials in plaintext, so secure variants FTPS (FTP over TLS) and SFTP (over SSH) are preferred for security.
What is the purpose of ICMP? List some common ICMP message types.
ICMP (Internet Control Message Protocol)
ICMP is a network-layer protocol of the TCP/IP suite (IP protocol number 1) used to send error-reporting and control/diagnostic messages about the operation of IP. Because IP is unreliable and connectionless, ICMP feeds back information when packets cannot be delivered or when network conditions need to be reported. ICMP messages are encapsulated inside IP datagrams.
Purpose
- Report errors (e.g., destination unreachable, time exceeded).
- Provide diagnostics and reachability testing — used by tools like ping (Echo) and traceroute (Time Exceeded).
- Flow/redirect control between routers and hosts.
Common ICMP Message Types
| Type | Message | Meaning |
|---|---|---|
| 0 | Echo Reply | Reply to a ping |
| 3 | Destination Unreachable | Host/network/port not reachable |
| 5 | Redirect | Use a better route/gateway |
| 8 | Echo Request | Ping request |
| 11 | Time Exceeded | TTL expired (used by traceroute) |
| 12 | Parameter Problem | Bad IP header field |
| 13/14 | Timestamp Request/Reply | Time synchronization |
In short: ICMP is the troubleshooting and error-signalling companion of IP; without it, hosts would have no standard way to learn why a packet failed to reach its destination.
Frequently asked questions
- Where can I find the BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) question paper 2081?
- The full BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) 2081 (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) 2081 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) 2081 paper?
- The BSc CSIT (TU) Computer Networks (BSc CSIT, CSC258) 2081 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.