BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) Question Paper 2079 Nepal
This is the official BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) question paper for 2079, as set in the regular annual examination. It carries 80 full marks and a time allowance of 180 minutes, across 12 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 2079 paper is a great way to practise under real exam conditions.
Section A: Long Answer Questions
Attempt all / any as specified.
Compare and contrast the OSI reference model and the TCP/IP protocol suite. (a) Draw both layered architectures side by side and clearly map the corresponding layers. (b) Explain the principal functions and the protocols/PDUs associated with each layer of the TCP/IP model. (c) Discuss why the OSI model, despite being more complete, was overtaken by TCP/IP in practical networking.
OSI Reference Model vs TCP/IP Protocol Suite
(a) Side-by-side layered architecture
| OSI Model (7 layers) | TCP/IP Suite (4 layers) |
|---|---|
| 7. Application | Application |
| 6. Presentation | (merged into Application) |
| 5. Session | (merged into Application) |
| 4. Transport | Transport |
| 3. Network | Internet |
| 2. Data Link | Network Access (Link) |
| 1. Physical | Network Access (Link) |
The OSI Application, Presentation and Session layers together correspond to the single TCP/IP Application layer; OSI Transport maps to TCP/IP Transport; OSI Network maps to the Internet layer; and OSI Data Link + Physical map to the TCP/IP Network Access layer.
(b) Functions, protocols and PDUs of TCP/IP layers
- Application layer – provides services directly to user processes; handles representation, encoding and dialog control. Protocols: HTTP, FTP, SMTP, DNS, DHCP, SNMP. PDU: message/data.
- Transport layer – end-to-end (process-to-process) delivery, segmentation/reassembly, port addressing, reliability and flow/congestion control. Protocols: TCP (reliable, connection-oriented), UDP (unreliable, connectionless). PDU: segment (TCP) / datagram (UDP).
- Internet layer – logical addressing and routing of packets across networks, fragmentation. Protocols: IP (IPv4/IPv6), ICMP, ARP, routing protocols (OSPF, BGP). PDU: packet/datagram.
- Network Access (Link) layer – framing, physical/MAC addressing, media access and transmission of bits over the medium. Protocols: Ethernet, Wi-Fi (802.11), PPP. PDU: frame (and bits on the medium).
(c) Why TCP/IP overtook OSI
- TCP/IP came first and had working implementations (running on ARPANET/the Internet) while OSI was still only a paper standard.
- OSI is more complex with seven layers and overlapping/under-used Session and Presentation layers, making it heavier to implement.
- TCP/IP was free, open and bundled with Unix/BSD, giving it a large installed base and momentum.
- OSI standardization was slow and committee-driven, so by the time products appeared the Internet's TCP/IP stack already dominated.
- OSI's strict layering is prescriptive, whereas TCP/IP is pragmatic and protocol-driven. Today OSI survives mainly as a teaching/reference model, while TCP/IP is the real operational stack.
An organization has been allocated the network block 192.168.10.0/24 and must accommodate four departments with 50, 25, 12 and 10 hosts respectively. (a) Apply Variable Length Subnet Masking (VLSM) to design an efficient addressing plan. For each subnet, give the subnet address, the subnet mask (in dotted-decimal and CIDR notation), the usable host range, and the broadcast address. (b) State how much address space remains unallocated. (c) Briefly explain the advantages of VLSM over fixed-length subnetting.
VLSM design for 192.168.10.0/24
Allocate subnets from the largest host requirement first (VLSM rule). Required usable hosts: 50, 25, 12, 10. Choose the smallest block of size that gives requirement.
| Dept | Hosts | Bits () | Block size | Prefix |
|---|---|---|---|---|
| A | 50 | 6 | 64 | /26 |
| B | 25 | 5 | 32 | /27 |
| C | 12 | 4 | 16 | /28 |
| D | 10 | 4 | 16 | /28 |
(a) Addressing plan
| Dept | Subnet address | Mask (dotted / CIDR) | Usable host range | Broadcast |
|---|---|---|---|---|
| A (50) | 192.168.10.0 | 255.255.255.192 (/26) | .1 – .62 | 192.168.10.63 |
| B (25) | 192.168.10.64 | 255.255.255.224 (/27) | .65 – .94 | 192.168.10.95 |
| C (12) | 192.168.10.96 | 255.255.255.240 (/28) | .97 – .110 | 192.168.10.111 |
| D (10) | 192.168.10.112 | 255.255.255.240 (/28) | .113 – .126 | 192.168.10.127 |
(b) Unallocated address space
Addresses 0–127 (128 addresses) are used. Addresses 192.168.10.128 – 192.168.10.255 remain free = 128 addresses (one unused /25, or equivalently 2 × /26). These can be further subnetted for future growth.
(c) Advantages of VLSM over fixed-length subnetting
- Efficient address utilisation – each subnet is sized to its actual need, minimising wasted host addresses.
- Flexible/hierarchical design – supports networks of very different sizes, and freed blocks can be route-summarised.
- Reduces routing-table size through summarisation, unlike FLSM which forces every subnet to the same size and wastes space.
Routing is a core function of the network layer. (a) Differentiate between distance-vector and link-state routing algorithms with respect to information exchanged, convergence and scalability. (b) Using a suitable example topology, illustrate one full iteration of the Bellman-Ford distance-vector update at a node. (c) Explain the count-to-infinity problem and describe two techniques used to mitigate it.
Routing algorithms
(a) Distance-Vector vs Link-State
| Aspect | Distance-Vector (e.g. RIP) | Link-State (e.g. OSPF) |
|---|---|---|
| Information exchanged | Entire distance/cost vector to neighbours only | Link-state advertisements (LSAs) flooded to all routers |
| Knowledge | Knows only distance + next hop ("routing by rumour") | Each router builds a full topology map |
| Algorithm | Bellman-Ford | Dijkstra's shortest-path |
| Convergence | Slow; prone to loops/count-to-infinity | Fast |
| Scalability | Limited (small networks) | Scales well (uses areas) |
| Resource use | Low CPU/memory | Higher CPU/memory |
(b) One Bellman-Ford iteration
Topology: node A has neighbours B (cost 1) and C (cost 4). B advertises its distance to destination D as ; C advertises .
Bellman-Ford update at A:
So A updates its cost to D as 3 via neighbour B (next hop = B).
(c) Count-to-infinity problem and mitigation
Problem: When a link or node fails, distance-vector routers may keep advertising stale routes to each other, each incrementing the metric by one in a slow loop, so the cost slowly "counts up" toward infinity before convergence. Example: if the route to a failed destination is lost, two routers can bounce an out-of-date route back and forth, each adding 1.
Two mitigation techniques:
- Split horizon – a router never advertises a route back out of the interface from which it learned that route (optionally with poison reverse, where it advertises the route back with metric = infinity).
- Route poisoning / hold-down timers – a failed route is immediately advertised with an infinite metric (e.g. 16 in RIP), and hold-down timers prevent accepting worse updates for a short period until the network stabilises. (Defining a small "infinity" value such as 16 also bounds the counting.)
Cryptography underpins modern network security. (a) Distinguish between symmetric-key and asymmetric-key (public-key) cryptography, stating the merits and limitations of each. (b) Explain how the RSA algorithm achieves confidentiality and digital signatures; show the key-generation, encryption and decryption steps. (c) Describe how a digital certificate and a Certificate Authority (CA) help establish trust in a public-key infrastructure (PKI).
Cryptography and PKI
(a) Symmetric vs Asymmetric cryptography
| Aspect | Symmetric-key | Asymmetric (public-key) |
|---|---|---|
| Keys | One shared secret key for encrypt & decrypt | Key pair: public + private |
| Examples | AES, DES, 3DES, RC4 | RSA, ECC, Diffie-Hellman |
| Speed | Fast, efficient for bulk data | Slow (heavy math) |
| Key distribution | Hard – secret must be shared securely | Easy – public key can be published |
| Scalability | Poor: keys for users | Good: keys |
| Services | Confidentiality | Confidentiality, digital signatures, key exchange |
Merits/limits: Symmetric is fast but suffers from the key-distribution problem and cannot natively provide non-repudiation. Asymmetric solves key distribution and enables signatures but is computationally expensive; in practice both are combined (hybrid: asymmetric to exchange a symmetric session key).
(b) RSA algorithm
Key generation:
- Choose two large primes ; compute .
- Compute Euler's totient .
- Choose public exponent with and .
- Compute private exponent .
- Public key = ; Private key = .
Encryption (confidentiality): sender uses receiver's public key: .
Decryption: receiver uses its private key: .
Digital signature: signer encrypts (signs) a message hash with its private key, ; anyone verifies with the signer's public key, . This proves authenticity, integrity and non-repudiation.
(c) Digital certificates and CA in PKI
A digital certificate (X.509) binds an identity to a public key and contains the subject name, public key, validity period, issuer, and the CA's digital signature. A Certificate Authority (CA) is a trusted third party that verifies an applicant's identity and signs its certificate with the CA's private key. Anyone holding the CA's public key (pre-installed in browsers/OS as a trusted root) can verify the certificate's signature, thereby trusting that the public key truly belongs to the named entity. This chain of trust (root CA → intermediate CAs → end-entity) prevents man-in-the-middle key substitution and underpins PKI and HTTPS/TLS.
Section B: Short Answer Questions
Attempt all / any as specified.
(a) Explain the TCP three-way handshake used for connection establishment, with a suitable diagram showing the SYN, SYN-ACK and ACK segments and the sequence/acknowledgement numbers. (b) Describe how TCP provides reliable, in-order delivery over an unreliable network.
TCP connection and reliability
(a) TCP three-way handshake
Client Server
| --- SYN, seq=x ------------------> | (1) client opens, ISN = x
| |
| <-- SYN, ACK, seq=y, ack=x+1 ----- | (2) server replies, ISN = y
| |
| --- ACK, seq=x+1, ack=y+1 --------> | (3) connection established
- SYN: client sends a segment with the SYN flag set and an initial sequence number
seq = x. - SYN-ACK: server responds with SYN+ACK, its own
seq = yandack = x+1(acknowledging the client's SYN). - ACK: client sends ACK with
seq = x+1,ack = y+1. The connection is now established and data transfer can begin. (SYN consumes one sequence number, hence the +1.)
(b) How TCP provides reliable, in-order delivery
- Sequence numbers – every byte is numbered, so the receiver can reorder out-of-order segments and detect duplicates.
- Acknowledgements (cumulative ACKs) – the receiver ACKs the next byte it expects; the sender knows what arrived.
- Retransmission on timeout / fast retransmit – if an ACK is not received before the RTO expires (or 3 duplicate ACKs arrive), the segment is retransmitted, recovering from loss.
- Checksum – detects corrupted segments, which are discarded and retransmitted.
- Flow control (sliding window / receiver advertised window) prevents overrunning the receiver, and congestion control prevents overloading the network.
Together these mechanisms turn the unreliable, unordered IP datagram service into a reliable, ordered byte stream.
Compare TCP and UDP in terms of connection orientation, reliability, header overhead, flow/congestion control and typical applications. For each protocol, name two real-world applications and justify why that transport protocol is suitable.
TCP vs UDP
| Feature | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented (handshake) | Connectionless |
| Reliability | Reliable, ordered, retransmits lost data | Unreliable, no retransmission, no ordering |
| Header size | 20 bytes (more overhead) | 8 bytes (lightweight) |
| Flow control | Yes (sliding window) | No |
| Congestion control | Yes | No |
| Speed | Slower (more overhead) | Faster, low latency |
TCP applications (and justification):
- HTTP/HTTPS (web) – web pages must arrive complete and in order; reliability matters more than a few ms of delay.
- Email (SMTP) / file transfer (FTP) – data must be delivered without loss or corruption.
UDP applications (and justification):
- VoIP / video conferencing – low latency is critical; an occasional lost packet is preferable to the delay of retransmission.
- DNS lookups – tiny single-request/response queries are faster without connection-setup overhead (retry handled by the application).
In short, choose TCP when correctness/ordering is essential, and UDP when speed/low latency matters and the application can tolerate or handle loss itself.
Explain the working of the Domain Name System (DNS). Describe the difference between iterative and recursive queries and trace the steps involved in resolving the name www.ioe.edu.np to an IP address using the DNS hierarchy.
Domain Name System (DNS)
Working: DNS is a hierarchical, distributed database (application-layer, UDP/TCP port 53) that translates human-readable domain names into IP addresses. The namespace is organised as a tree: root servers → Top-Level Domain (TLD) servers (.np, .com) → authoritative servers for the domain. Local resolvers (recursive servers) cache results to speed up future lookups.
Recursive vs Iterative queries:
- Recursive query: the client asks its local DNS server to do all the work and return the final answer (or an error). The burden of resolution is on the server.
- Iterative query: the queried server returns the best it knows — usually a referral to the next server to ask — and the requester continues querying itself.
Typically the host→local-resolver step is recursive, while the local resolver's queries to root/TLD/authoritative servers are iterative.
Resolving www.ioe.edu.np:
- Client sends a recursive query for
www.ioe.edu.npto its local DNS resolver. - If not cached, the resolver (iteratively) asks a root server, which refers it to the .np TLD server.
- Resolver asks the .np TLD server, which refers it to the edu.np / ioe.edu.np authoritative name server.
- Resolver asks the authoritative server for ioe.edu.np, which returns the A record (IP address) of
www.ioe.edu.np. - The resolver caches the answer (per its TTL) and returns the IP to the client, which then connects to the web server.
(a) Differentiate between persistent and non-persistent HTTP connections. (b) Explain the role of cookies in maintaining state in HTTP and how a web cache (proxy server) improves performance and reduces latency.
HTTP connections, cookies and web caching
(a) Persistent vs Non-persistent HTTP
- Non-persistent (HTTP/1.0 default): a separate TCP connection is opened and closed for each object (HTML, each image, etc.). Each object incurs one extra RTT for connection setup, so a page with many objects is slow and connection overhead is high.
- Persistent (HTTP/1.1 default, keep-alive): a single TCP connection is reused to fetch multiple objects back-to-back (and may use pipelining). This avoids repeated connection setup/teardown, reduces latency and load, and is the modern default.
(b) Cookies and web caching
Cookies: HTTP is stateless, so cookies let a server maintain state across requests. On the first response the server sends a Set-Cookie: header with a unique ID; the browser stores it and returns it in the Cookie: header on subsequent requests. The server uses this ID to look up a back-end record, enabling login sessions, shopping carts and personalisation.
Web cache (proxy server): a proxy sits between clients and the origin server and stores copies of recently requested objects. If a requested object is in the cache and still fresh (conditional GET / If-Modified-Since), it is served locally. This reduces latency (object served from nearby), cuts traffic on the access link / origin server, and lowers bandwidth cost — improving overall performance, especially for popular content.
(a) Differentiate between a packet-filtering firewall and a stateful (dynamic) inspection firewall. (b) Explain how a Virtual Private Network (VPN) provides secure communication over a public network, and state the role of tunnelling and IPSec in this context.
Firewalls and VPN
(a) Packet-filtering vs Stateful inspection firewall
- Packet-filtering (stateless) firewall: examines each packet independently against static rules (ACLs) based on source/destination IP, port and protocol. It keeps no memory of previous packets. It is fast and simple but cannot tell whether a packet belongs to a legitimate established session, so it is easier to spoof.
- Stateful (dynamic) inspection firewall: maintains a state table of active connections and tracks the full context (e.g. the TCP handshake state). It permits return traffic only if it matches an existing, legitimately established connection. It is more secure and intelligent, at the cost of more memory/processing.
(b) VPN, tunnelling and IPSec
A Virtual Private Network (VPN) creates a secure, private logical link over a shared public network (the Internet). It provides confidentiality, integrity and authentication so that data crossing the public network is protected as if on a private line.
- Tunnelling encapsulates an entire original IP packet inside a new outer packet, hiding the internal addresses and carrying the encrypted payload across the public network between two VPN endpoints.
- IPSec is the security framework that secures the tunnel: AH (Authentication Header) provides integrity/authentication, ESP (Encapsulating Security Payload) provides encryption (confidentiality) plus integrity, and IKE negotiates keys/SAs. In tunnel mode, IPSec encrypts the whole inner packet, giving a secure site-to-site or remote-access VPN.
(a) Define the security goals confidentiality, integrity, availability, authentication and non-repudiation. (b) For each of the following attacks, identify which security goal it primarily violates: a denial-of-service (DoS) attack, a man-in-the-middle attack, and message modification in transit.
Network security goals and attacks
(a) Definitions of security goals
- Confidentiality: ensuring information is accessible only to authorised parties; protection against disclosure/eavesdropping.
- Integrity: ensuring data is not altered (accidentally or maliciously) in storage or transit; the message received is exactly what was sent.
- Availability: ensuring systems, services and data are accessible to authorised users when needed.
- Authentication: verifying the claimed identity of a user, host or message source.
- Non-repudiation: ensuring a party cannot deny having sent or performed an action (e.g. via digital signatures).
(b) Which goal each attack violates
| Attack | Primary goal violated |
|---|---|
| Denial-of-Service (DoS) | Availability (legitimate users are denied access) |
| Man-in-the-middle | Confidentiality (and authentication/integrity) — attacker intercepts/reads traffic and may impersonate |
| Message modification in transit | Integrity (data is altered before delivery) |
(a) What is a cryptographic hash function? List the essential properties it must satisfy. (b) Explain how a Message Authentication Code (MAC) and a digital signature differ in the type of security service they provide.
Hash functions, MAC and digital signatures
(a) Cryptographic hash function
A cryptographic hash function maps an arbitrary-length input message to a fixed-length output (the hash/digest), e.g. SHA-256. Essential properties:
- Deterministic & fixed output length – same input always yields the same fixed-size digest.
- Preimage resistance (one-way) – given a hash , it is computationally infeasible to find any with .
- Second-preimage resistance – given , infeasible to find with .
- Collision resistance – infeasible to find any two distinct messages with the same hash.
- Avalanche effect – a small change in input produces a drastically different digest.
- Efficient to compute.
(b) MAC vs Digital signature
- Message Authentication Code (MAC): uses a shared symmetric secret key (, e.g. HMAC). It provides data integrity and authentication between two parties who share the key. Because both parties hold the same key, a MAC cannot provide non-repudiation — either party could have created it.
- Digital signature: uses asymmetric keys — the sender signs with its private key and anyone verifies with the public key. It provides integrity, authentication AND non-repudiation, since only the holder of the private key could have produced the signature, so the sender cannot deny it.
In short: a MAC = integrity + authentication (symmetric, no non-repudiation); a digital signature = integrity + authentication + non-repudiation (asymmetric).
An IPv4 address is given as 172.16.45.200 with subnet mask 255.255.240.0. Determine (a) the network address, (b) the broadcast address, (c) the number of usable hosts per subnet, and (d) whether the host 172.16.32.10 lies in the same subnet.
Subnetting: 172.16.45.200 / 255.255.240.0
Mask 255.255.240.0 = /20. The third octet mask is 240 (11110000), so the block size in the third octet = 256 − 240 = 16. Subnets in the third octet start at 0, 16, 32, 48, ...
Host's third octet = 45, which falls in the block 32–47.
(a) Network address
Third octet rounds down to 32 → 172.16.32.0.
(b) Broadcast address
Next subnet starts at 48, so broadcast = last address before it: third octet 47, host bits all 1 → 172.16.47.255.
(c) Usable hosts per subnet
Host bits = , so 4094 usable hosts.
(d) Is 172.16.32.10 in the same subnet?
The subnet range is 172.16.32.0 – 172.16.47.255 (usable 172.16.32.1 – 172.16.47.254). Since 32.10 lies within 32.0–47.255, yes, 172.16.32.10 is in the same subnet as 172.16.45.200.
Frequently asked questions
- Where can I find the BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) question paper 2079?
- The full BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) 2079 (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) 2079 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) 2079 paper?
- The BE Computer Engineering (IOE, TU) Computer Networks and Security (IOE, CT 703 / ENCT 304) 2079 paper carries 80 full marks and is meant to be completed in 180 minutes, across 12 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.