BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) Question Paper 2078 Nepal
This is the official BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) question paper for 2078, as set in the regular annual examination. It carries 80 full marks and a time allowance of 180 minutes, across 13 questions. On Kekkei you can attempt this Computer Networks and Security (IOE, CT 703 / ENCT 304) 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 BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) 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 all / any as specified.
(a) Compare and contrast the OSI reference model with the TCP/IP protocol suite, clearly mapping the layers of one model onto the other and identifying which OSI layers have no direct counterpart in TCP/IP. [7]
(b) Explain the concepts of encapsulation and de-encapsulation as a data unit travels down and up the protocol stack. Using a suitable diagram, show the Protocol Data Unit (PDU) name and the header information added at the Transport, Network and Data Link layers. [5]
(a) OSI vs. TCP/IP Model [7]
| Aspect | OSI Reference Model | TCP/IP Protocol Suite |
|---|---|---|
| Number of layers | 7 | 4 (sometimes shown as 5) |
| Development | Theoretical, model-first (ISO) | Protocol-first, built around working protocols |
| Layer coupling | Strict, well-separated layers | Layers more loosely defined |
| Transport reliability | Both connection-oriented & connectionless | TCP (reliable) and UDP (unreliable) |
| Usage | Mainly a teaching/reference model | The model actually used on the Internet |
Layer mapping (OSI -> TCP/IP):
| OSI Layer | TCP/IP Layer |
|---|---|
| 7 Application, 6 Presentation, 5 Session | Application |
| 4 Transport | Transport (TCP/UDP) |
| 3 Network | Internet (IP) |
| 2 Data Link, 1 Physical | Network Access / Link |
OSI layers with no direct counterpart in TCP/IP: The Presentation layer (encoding, encryption, compression) and the Session layer (dialog control, synchronization) have no dedicated layer in TCP/IP; their functions are handled inside the application layer (or by the application itself).
(b) Encapsulation and De-encapsulation [5]
Encapsulation is the process where each layer, as data travels down the stack on the sender, adds its own header (and sometimes a trailer) to the data unit received from the layer above. De-encapsulation is the reverse: as data travels up the stack on the receiver, each layer removes and processes its own header before passing the payload upward.
PDU names and headers added:
| Layer | PDU name | Header / control information added |
|---|---|---|
| Transport | Segment (TCP) / Datagram (UDP) | Source & destination port numbers, sequence/ack numbers, checksum |
| Network | Packet | Source & destination IP addresses, TTL, protocol field |
| Data Link | Frame | Source & destination MAC addresses, plus a trailer (FCS/CRC) |
Diagram (described): The application Data is wrapped by the Transport header to form a Segment; the Segment is wrapped by the IP header to form a Packet; the Packet is wrapped by the frame header + trailer to form a Frame, which is then sent as bits on the physical medium. Each successive box encloses the previous one, like nested envelopes.
An organization has been allocated the network address 192.168.10.0/24. The network must be divided to support four departments with the following host requirements: Department A = 60 hosts, Department B = 28 hosts, Department C = 12 hosts, Department D = 10 hosts.
(a) Using Variable Length Subnet Masking (VLSM), design the subnetting scheme. For each department give the subnet address, the subnet mask (in CIDR and dotted-decimal form), the usable host range and the broadcast address. [9]
(b) State how much of the address space remains unallocated after this design. [3]
(a) VLSM Design for 192.168.10.0/24 [9]
Allocate largest requirement first. Required hosts -> next power of two (usable = ):
- A: 60 hosts -> 62 usable -> (6 host bits)
- B: 28 hosts -> 30 usable -> (5 host bits)
- C: 12 hosts -> 14 usable -> (4 host bits)
- D: 10 hosts -> 14 usable -> (4 host bits)
| Dept | Subnet Address | CIDR | Mask (dotted-decimal) | Usable Host Range | Broadcast |
|---|---|---|---|---|---|
| A (60) | 192.168.10.0 | /26 | 255.255.255.192 | .1 – .62 | 192.168.10.63 |
| B (28) | 192.168.10.64 | /27 | 255.255.255.224 | .65 – .94 | 192.168.10.95 |
| C (12) | 192.168.10.96 | /28 | 255.255.255.240 | .97 – .110 | 192.168.10.111 |
| D (10) | 192.168.10.112 | /28 | 255.255.255.240 | .113 – .126 | 192.168.10.127 |
(b) Unallocated Address Space [3]
The four subnets consume addresses 192.168.10.0 – 192.168.10.127 (the first half of the /24).
Remaining: 192.168.10.128 – 192.168.10.255 = 128 addresses unallocated (a contiguous block equal to a 192.168.10.128/25). These can be used for future departments or further subnetting.
(a) Distinguish between Distance Vector routing and Link State routing with respect to the information exchanged, convergence speed and scalability. [5]
(b) Consider the network graph below where edge labels are link costs:
A --1-- B --3-- C
| | |
4 2 1
| | |
D --5-- E --1-- F
Apply Dijkstra's shortest-path algorithm to compute the shortest path tree and least-cost path from node A to every other node. Show the working at each iteration. [7]
(a) Distance Vector vs. Link State Routing [5]
| Criterion | Distance Vector | Link State |
|---|---|---|
| Information exchanged | Entire routing table (distances to all destinations) shared only with directly connected neighbors | Link-state advertisements (cost of its own links) flooded to all routers |
| Knowledge of topology | Each router knows only neighbor-reported distances ("routing by rumor") | Every router builds a complete map of the whole topology |
| Algorithm | Bellman-Ford | Dijkstra (SPF) |
| Convergence speed | Slow; prone to count-to-infinity / routing loops | Fast convergence |
| Scalability | Limited (e.g. RIP, hop limit 15) | Scales well (e.g. OSPF, IS-IS), uses more CPU/memory |
(b) Dijkstra from node A [7]
Edges: A-B=1, A-D=4, B-C=3, B-E=2, C-F=1, D-E=5, E-F=1.
Let = current least-cost estimate; N' = finalized set.
| Step | N' (finalized) | D(B) | D(C) | D(D) | D(E) | D(F) |
|---|---|---|---|---|---|---|
| Init | {A} | 1,A | ∞ | 4,A | ∞ | ∞ |
| 1 | {A,B} | – | 4,B | 4,A | 3,B | ∞ |
| 2 | {A,B,E} | – | 4,B | 4,A | – | 4,E |
| 3 | {A,B,E,C} | – | – | 4,A | – | 4,E |
| 4 | {A,B,E,C,D} | – | – | – | – | 4,E |
| 5 | {A,B,E,C,D,F} | – | – | – | – | – |
(At each step the unfinalized node with smallest D is added; ties broken arbitrarily.)
Shortest-path tree / least-cost paths from A:
| Destination | Cost | Path |
|---|---|---|
| B | 1 | A → B |
| E | 3 | A → B → E |
| C | 4 | A → B → C |
| D | 4 | A → D |
| F | 4 | A → B → E → F |
The shortest-path tree uses edges: A–B, A–D, B–C, B–E, E–F.
(a) Differentiate between symmetric-key and asymmetric-key (public-key) cryptography, mentioning one practical algorithm and one key-distribution challenge for each. [5]
(b) In the RSA algorithm, two primes are chosen as p = 7 and q = 11 and the public exponent is e = 13. Compute the value of n, the totient φ(n) and the private key d. Then show how the plaintext message M = 5 would be encrypted and decrypted. [7]
(a) Symmetric vs. Asymmetric Cryptography [5]
| Aspect | Symmetric-key | Asymmetric (Public-key) |
|---|---|---|
| Keys | Single shared secret key for encrypt & decrypt | Key pair: public key (encrypt) + private key (decrypt) |
| Speed | Fast, efficient for bulk data | Slow, computationally heavy |
| Example algorithm | AES (or DES/3DES) | RSA (or ECC, Diffie-Hellman) |
| Key-distribution challenge | Securely sharing the secret key with every party; keys for users | Authenticating that a public key truly belongs to its owner (needs a PKI / certificates to stop man-in-the-middle) |
(b) RSA with p = 7, q = 11, e = 13 [7]
Step 1 – Modulus: .
Step 2 – Totient: .
Step 3 – Private key d: find with , i.e. . . So .
- Public key =
- Private key =
Step 4 – Encryption of : . . .
Step 5 – Decryption: , recovering the original plaintext . ✓
Section B: Short Answer Questions
Attempt all / any as specified.
With the help of a diagram, explain the TCP three-way handshake used for connection establishment. State the role of the SYN, SYN-ACK and ACK segments and the purpose of the initial sequence numbers.
TCP Three-Way Handshake [6]
Before data transfer, TCP establishes a connection and synchronizes sequence numbers using three segments:
Client Server
| -------- SYN (seq=x) -------> | (1)
| <--- SYN-ACK (seq=y, ack=x+1) -| (2)
| -------- ACK (ack=y+1) ------->| (3)
ESTABLISHED ESTABLISHED
- SYN: The client sends a segment with the SYN flag set and an Initial Sequence Number (ISN) , requesting a connection.
- SYN-ACK: The server replies with both SYN and ACK flags set, its own ISN , and acknowledgement number (acknowledging the client's SYN).
- ACK: The client sends an ACK with acknowledgement number , confirming the server's SYN. The connection is now ESTABLISHED.
Purpose of initial sequence numbers (ISNs): Each side chooses a (random) ISN so both ends agree on the starting byte numbers used to order data, detect lost/duplicate segments, and reassemble the byte stream correctly. Randomizing the ISN also prevents old or spoofed segments from a previous connection being mistakenly accepted.
Compare TCP and UDP across at least five criteria (connection orientation, reliability, ordering, header size and overhead). Give one example application for which UDP is more suitable than TCP and justify your choice.
TCP vs. UDP [6]
| Criterion | TCP | UDP |
|---|---|---|
| Connection orientation | Connection-oriented (3-way handshake) | Connectionless |
| Reliability | Reliable – acknowledgements & retransmission | Unreliable – best-effort, no retransmission |
| Ordering | Guarantees in-order delivery (sequence numbers) | No ordering guarantee |
| Flow & congestion control | Yes (windowing, congestion control) | None |
| Header size | 20 bytes (min) | 8 bytes |
| Overhead / speed | Higher overhead, slower | Low overhead, fast |
Example where UDP is preferred: Real-time applications such as live video/voice (VoIP), online gaming, or DNS queries.
Justification: In live VoIP, low latency matters far more than perfect reliability. TCP's retransmission and ordering would introduce delay; a few lost packets cause only a tiny glitch, but waiting to retransmit them would stall the conversation. UDP's lightweight, connectionless delivery keeps latency low, making it the better fit.
Explain the working of the Domain Name System (DNS). Describe the difference between recursive and iterative DNS queries, and outline the steps involved in resolving the name www.example.com to an IP address.
Domain Name System (DNS) [6]
Working: DNS is a hierarchical, distributed database that translates human-readable domain names (e.g. www.example.com) into IP addresses. It uses a tree of servers: root servers → Top-Level Domain (TLD) servers (e.g. .com) → authoritative servers for each domain. Clients query through a local/recursive resolver which caches results to speed up future lookups. DNS normally runs over UDP port 53.
Recursive vs. iterative queries:
- Recursive query: The client asks the resolver for the final answer and the resolver does all the work, contacting other servers on the client's behalf and returning only the final IP (or an error).
- Iterative query: The queried server returns the best answer it has — typically a referral to the next server to ask — and the requester must follow up itself.
Resolving www.example.com:
- The client sends a recursive query to its local DNS resolver.
- The resolver sends an iterative query to a root server, which refers it to the
.comTLD server. - The resolver queries the
.comTLD server, which refers it to the authoritative server forexample.com. - The resolver queries the authoritative server, which returns the IP address of
www.example.com. - The resolver caches the result and returns the IP to the client.
(a) Differentiate between HTTP persistent and non-persistent connections. [3]
(b) Briefly describe the roles of SMTP, POP3 and IMAP in the electronic mail system. [3]
(a) HTTP Persistent vs. Non-Persistent Connections [3]
- Non-persistent (HTTP/1.0 default): A separate TCP connection is opened for each object (HTML page, each image, etc.) and closed after one request–response. Fetching a page with objects needs connections, incurring repeated handshake (and slow-start) overhead and extra RTTs.
- Persistent (HTTP/1.1 default): A single TCP connection is kept open to send multiple requests/responses, reducing connection-setup overhead and latency. It also supports pipelining. The connection is closed after an idle timeout.
(b) Roles of SMTP, POP3 and IMAP [3]
- SMTP (Simple Mail Transfer Protocol): A push protocol used to send mail — from the sender's client to the mail server and between mail servers (port 25/587).
- POP3 (Post Office Protocol v3): A pull/retrieval protocol that downloads mail from the server to the client, typically deleting it from the server afterwards; suited to single-device access (port 110).
- IMAP (Internet Message Access Protocol): A retrieval protocol that lets the client read and manage mail while it stays on the server, with folder sync across multiple devices (port 143).
Define the security goals of Confidentiality, Integrity and Availability (the CIA triad). For each goal, name one type of attack that threatens it and one countermeasure used to protect it.
CIA Triad [6]
The CIA triad defines the three fundamental security goals of an information system:
- Confidentiality: Ensuring information is accessible only to authorized parties — preventing unauthorized disclosure.
- Integrity: Ensuring information is accurate and unaltered — preventing unauthorized or accidental modification.
- Availability: Ensuring information and services are accessible when needed by authorized users.
| Goal | Example Attack (threat) | Countermeasure |
|---|---|---|
| Confidentiality | Eavesdropping / packet sniffing (interception) | Encryption (e.g. AES, TLS) and access control |
| Integrity | Message tampering / man-in-the-middle modification | Hashing, message authentication codes (MAC), digital signatures |
| Availability | Denial-of-Service (DoS/DDoS) attack | Firewalls, rate limiting, redundancy, load balancing |
What is a digital signature? Explain how a digital signature is generated and verified using a hash function and public-key cryptography, and state how it provides both authentication and non-repudiation.
Digital Signature [6]
A digital signature is a cryptographic value attached to a message that lets the receiver verify the message's origin (authenticity) and that it has not been altered (integrity), using a hash function and public-key cryptography.
Generation (by sender, using the sender's private key):
- Compute a fixed-length hash (digest) of the message: .
- Encrypt the hash with the sender's private key to form the signature: .
- Send the message together with the signature .
Verification (by receiver, using the sender's public key):
- Compute the hash of the received message: .
- Decrypt the signature with the sender's public key: .
- If , the signature is valid — the message is authentic and unmodified; otherwise it is rejected.
Authentication & non-repudiation: Because only the sender holds the private key, a valid signature proves the message came from that sender (authentication). Since no one else could have produced that signature, the sender cannot later deny having sent the message (non-repudiation). The hash comparison additionally guarantees integrity.
Explain the function of a firewall in a network. Differentiate between a packet-filtering firewall and a stateful inspection firewall, and discuss the role of a Demilitarized Zone (DMZ) in network design.
Firewall, Filtering Types and DMZ [6]
Function of a firewall: A firewall is a hardware/software security barrier placed between a trusted internal network and an untrusted external network (e.g. the Internet). It inspects incoming and outgoing traffic and permits or blocks it according to a configured security policy (rule set), protecting the network from unauthorized access and attacks.
Packet-filtering vs. stateful inspection firewall:
| Aspect | Packet-Filtering Firewall | Stateful Inspection Firewall |
|---|---|---|
| Basis of decision | Examines each packet's header in isolation (source/dest IP, ports, protocol) | Tracks the state of active connections and judges packets in the context of the whole session |
| Memory of connections | Stateless — no memory of prior packets | Maintains a state table of connections |
| Security | Weaker; can be fooled by spoofed/out-of-context packets | Stronger; only allows packets belonging to a valid established session |
| Speed | Fast, low overhead | More processing, slightly slower |
Demilitarized Zone (DMZ): A DMZ is a separate perimeter subnetwork that sits between the internal LAN and the external network and hosts public-facing servers (web, mail, DNS). Servers that must be reachable from the Internet are placed in the DMZ so that, even if one is compromised, the attacker is isolated from the internal trusted network. It is typically created between two firewalls (or two interfaces of one firewall), adding a layer of defense in depth.
What is a Virtual Private Network (VPN)? Explain the concept of tunneling and differentiate between the transport mode and tunnel mode of IPSec.
VPN, Tunneling and IPSec Modes [6]
Virtual Private Network (VPN): A VPN creates a secure, encrypted connection (a "private tunnel") over a shared public network such as the Internet, allowing remote users or sites to communicate as if they were on the same private network. It provides confidentiality, integrity and authentication for the traffic.
Tunneling: Tunneling is the technique of encapsulating an entire packet inside the payload of another packet. The original (inner) packet — often encrypted — is wrapped with a new outer header for transport across the public network, then de-encapsulated at the far end. This hides the inner addressing/contents and lets private traffic traverse untrusted networks securely.
IPSec transport mode vs. tunnel mode:
| Aspect | Transport Mode | Tunnel Mode |
|---|---|---|
| What is protected | Only the payload of the IP packet; original IP header kept | The entire original IP packet (header + payload) is encrypted and encapsulated |
| New header | Original IP header reused | A new outer IP header is added |
| Typical use | Host-to-host (end-to-end) communication | Gateway-to-gateway / site-to-site VPNs (e.g. router-to-router) |
| Header visibility | Original source/dest IP visible | Original IP addresses hidden inside the tunnel |
List four key differences between IPv4 and IPv6 addressing, including address length, header complexity and support for address autoconfiguration.
IPv4 vs. IPv6 [4]
| # | Feature | IPv4 | IPv6 |
|---|---|---|---|
| 1 | Address length | 32-bit ( addresses), written in dotted decimal | 128-bit (vastly larger space), written in hexadecimal colon notation |
| 2 | Header complexity | Variable-length header (20–60 bytes) with many fields incl. checksum | Simplified fixed 40-byte header; no header checksum, options moved to extension headers |
| 3 | Address autoconfiguration | Needs DHCP or manual configuration | Supports Stateless Address Autoconfiguration (SLAAC) — hosts self-configure |
| 4 | Security & broadcast | IPSec optional; uses broadcast | IPSec support built into the design; no broadcast, uses multicast/anycast instead |
Frequently asked questions
- Where can I find the BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) question paper 2078?
- The full BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) 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 and Security (IOE, CT 703 / ENCT 304) 2078 paper come with solutions?
- Yes. Every question on this Computer Networks and Security (IOE, CT 703 / ENCT 304) past paper includes a step-by-step solution, plus instant AI feedback when you attempt it on Kekkei.
- How many marks is the BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) 2078 paper?
- The BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) 2078 paper carries 80 full marks and is meant to be completed in 180 minutes, across 13 questions.
- Is practising this Computer Networks and Security (IOE, CT 703 / ENCT 304) past paper free?
- Yes — reading and attempting this Computer Networks and Security (IOE, CT 703 / ENCT 304) past paper on Kekkei is completely free.