1.a) What is computer network? Describe the Network Criteria.
(3 Marks)
Computer Network:
A computer network is a group of computers connected together to share
information, resources (like printers), and data.
Network Criteria:
Three main criteria are needed for a good network:
Performance: How fast data moves. Depends on number of users,
transmission medium, and hardware/software.
Reliability: How often the network fails. Reliable networks have fewer
failures.
Security: Protects data from unauthorized access and attacks.
1.b) What are the advantages of a multi-point connection over a P2P
connection? (2 Marks)
Multi-point connection connects many devices through a single link.
Advantages:
o Saves cost because only one cable is used.
o Easy to add or remove devices.
o Good for group communication like conference calls.
In Point-to-Point (P2P), only two devices communicate.
1.c) Define Protocol and Standards in Computer Networks. (2 Marks)
Protocol:
A set of rules that defines how devices communicate on a network.
Example: TCP, IP.
Standards:
Guidelines developed by organizations to make sure devices from different
companies work together.
Example: IEEE, ISO.
1.d) What do you mean by ARPANET? Describe the physical topology of
computer networks. (4 Marks)
ARPANET:
ARPANET was the first network to use the Internet Protocol (IP). It started
in 1969 by the US Department of Defense.
Physical Topology:
The physical way in which computers and cables are arranged. Types:
o Bus Topology: Single cable, all devices connected to it.
o Star Topology: All devices connected to a central hub.
o Ring Topology: Devices connected in a circle.
o Mesh Topology: Every device connected to every other device.
2.a) In the Go-Back-N protocol... (5 Marks)
In Go-Back-N ARQ, the sender can send several frames before waiting for
acknowledgment.
The size of the send window is 2^m – 1, where m = number of bits used for
sequence numbers.
Here,
Send window = 2m – 1
Receive window = 1
Flow control problem:
If the sender sends many frames fast, but the receiver can’t keep up (because its
window size is only 1), data may be lost or rejected.
To solve this, the sender must wait for ACK (acknowledgement) before sending
more frames.
This keeps the flow in control and avoids overwhelming the receiver.
2.b) If data link layer can detect errors... why need checking at transport layer?
(4 Marks)
Even though the data link layer can detect errors (like damaged frames), it only
works between two directly connected devices (hops).
But the transport layer (like TCP) works end-to-end — from sender to receiver —
even if there are many hops.
So, the transport layer checks:
Missing data
Out-of-order data
Corrupted data after all hops
That’s why error checking is needed at the transport layer too — to make sure full
message is correct at the final receiver.
2.c) What do you mean by loopback interface? (3 Marks)
A loopback interface is a virtual network interface used to test the network on
the local machine.
It does not use any physical hardware.
IPv4 loopback address: 127.0.0.1
IPv6 loopback address: ::1
Given:
IEEE MAC: F5-A9-23-14-7A-D2
IPv6 block: 2000:1456:2474:48::/64
Step 1: Convert MAC to EUI-64 format by inserting FFFE in the middle:
→ F5A9:23FF:FE14:7AD2
Step 2: Flip the 7th bit of the first byte (F5 becomes F7)
Answer:
IPv6 = 2000:1456:2474:48:F7A9:23FF:FE14:7AD2
3.a) Given:
Network Address: 192.168.10.0
Subnet Mask: 255.255.255.252 → This is /30 (means only 2 bits left for
host)
i) How many subnets?
It's a Class C address (default mask: /24).
Given mask: /30 → means we borrowed 6 bits for subnetting (30 - 24 = 6).
So, number of subnets = 2⁶ = 64 subnets
Answer: 64 subnets
ii) How many hosts per subnet?
With /30, only 2 bits for host = 2² = 4
But we subtract 2 (1 for network address, 1 for broadcast)
Answer: 2 hosts per subnet
iii) What are the valid subnets?
Subnets go in steps of 4 (because last octet: 256 - 252 = 4)
Valid subnets (first few):
192.168.10.0
192.168.10.4
192.168.10.8
192.168.10.12
192.168.10.16
192.168.10.20
..
iv) Fill in the table below
(We'll fill for first 6 subnets)
Meaning Subnet 1 Subnet 2 Subnet 3 Subnet 4 Subnet 5 Subnet 6
Subnet 192.168.1 192.168.10 192.168.10. 192.168.10. 192.168.10. 192.168.10.
address 0.0 .4 8 12 16 20
Meaning Subnet 1 Subnet 2 Subnet 3 Subnet 4 Subnet 5 Subnet 6
First valid 192.168.1 192.168.10 192.168.10. 192.168.10. 192.168.10. 192.168.10.
host 0.1 .5 9 13 17 21
Last valid 192.168.1 192.168.10 192.168.10. 192.168.10. 192.168.10. 192.168.10.
host 0.2 .6 10 14 18 22
Broadcast 192.168.1 192.168.10 192.168.10. 192.168.10. 192.168.10. 192.168.10.
address 0.3 .7 11 15 19 23
3.b) If the data link layer can detect errors between hops, why do you think we
need another checking mechanism at the transport layer in OSI model? (3
Marks)
The data link layer checks for errors only between two directly connected devices
(like hop-to-hop).
But when data goes across the internet, it passes through many devices (routers,
switches). Errors can happen after the first check.
That’s why the transport layer (like TCP) also checks:
If all parts of the message arrived
If they are in the correct order
If any part is missing or damaged
So, transport layer ensures end-to-end delivery is correct, not just between hops.
3.c) How can NAT help in address depletion? Explain with necessary diagram. (5
Marks)
What is NAT?
NAT (Network Address Translation) is a method used in routers to allow many
private IP addresses to access the internet using just one public IP address.
Why is NAT needed?
There are not enough IPv4 public IPs for every device in the world.
But with NAT, many devices in a private network can share one public IP.
This helps reduce the problem of IP address depletion.
Example
In a home or office network:
PC1: 192.168.0.2
PC2: 192.168.0.3
Router:
o Private IP: 192.168.0.1 (inside network)
o Public IP: 100.1.2.3 (outside to internet)
When PC1 or PC2 wants to access the internet, the router uses NAT to send the
request using its public IP (100.1.2.3).
The router keeps track of who made the request, so the reply goes to the right
device.
Benefits of NAT:
Saves public IPs
Hides internal network (adds security)
Allows many devices to connect using one IP
�Diagram:
4.a) What are the responsibilities of network layer? Explain with example. (4
Marks)
The network layer is the 3rd layer of the OSI model.
Its main job is to move data from one computer to another across multiple
networks.
�Key Responsibilities:
1. Logical addressing:
o Assigns IP addresses to devices (like 192.168.1.1).
o Makes sure each device has a unique address.
2. Routing:
o Finds the best path for data to travel across networks.
o Uses routers to choose the route.
3. Packet forwarding:
o Sends data packets from one device to another using IP addresses.
4. Fragmentation and Reassembly:
o Breaks large data into smaller parts (packets) and reassembles them
at the destination.
Example:
When you open a website, the network layer decides:
How the data will travel from your device to the website server,
Which routers to pass through,
And how to return the response.
4.b) Define IPv4. What are the limitations of IPv4? (3 Marks)
IPv4 (Internet Protocol version 4):
IPv4 is a protocol used to assign addresses to devices so they can communicate
over the internet.
Format: 32-bit address, written as four numbers separated by dots
Example: 192.168.0.1
Limitations of IPv4:
1. Limited number of addresses:
o Only about 4.3 billion IPs. That’s not enough for all devices in the
world.
2. No built-in security:
o IPv4 doesn’t have encryption or authentication.
3. No support for auto-configuration:
o Devices need manual setup or DHCP.
4. Broadcasting creates traffic:
o Uses broadcasting which can slow down networks.
4.c) Consider IPv6 address: 2001:0db8:0000:0042:0000:8a2e:0370:7334
Write the compressed address and also show how you get it. (3 Marks)
Step-by-step compression:
Original:
2001:0db8:0000:0042:0000:8a2e:0370:7334
1. Remove leading zeros:
0db8 → db8
0042 → 42
0000 → 0
0370 → 370
So now:
2001:db8:0:42:0:8a2e:370:7334
2. Replace longest group of :0: with ::
There are two single zero groups, but only one can be replaced.
So:
2001:db8:0:42:0:8a2e:370:7334 → 2001:db8:0:42::8a2e:370:7334
Compressed IPv6 address:
2001:db8:0:42::8a2e:370:7334
5.a) What are the three types of addresses in a network layer? Explain. (3
Marks)
The network layer uses three main types of addresses:
1. IP Address (Logical Address):
Uniquely identifies each device on a network.
Used to send data from one network to another.
Example: 192.168.1.1
2. Physical Address (MAC Address):
Burned into the device’s hardware (like NIC).
Used for communication inside a local network (LAN).
Example: 00:1A:2B:3C:4D:5E
3. Port Address:
Identifies specific processes or services on a device.
Used at the transport layer (like port 80 for HTTP).
Example: 192.168.1.10:80
These addresses help in sending data to the right device and program.
5.b) Differentiate between circuit switching and packet switching. (4 Marks)
Feature Circuit Switching Packet Switching
Fixed path before
Path setup No fixed path; dynamic routing
communication
Resource
Reserved resources Shared resources
usage
Small delay due to packet
Delay Less delay once connected
routing
Data type Good for voice (e.g., phone calls) Good for data (e.g., internet)
Feature Circuit Switching Packet Switching
Example Telephone network Internet
Packet switching is more efficient for internet communication because it uses
resources only when needed.
6.a) Compare OSI model and TCP/IP model. (5 Marks)
Feature OSI Model TCP/IP Model
Transmission Control
Full form Open Systems Interconnection
Protocol/Internet Protocol
Number of
7 Layers 4 Layers
layers
Application, Presentation, Session,
Application, Transport,
Layer names Transport, Network, Data Link,
Internet, Network Access
Physical
ISO (International Organization for DARPA (U.S. Department of
Developed by
Standardization) Defense)
Protocol
Protocol-independent Protocol-based (TCP/IP)
dependency
Practical model used in real
Usage Theoretical model
networks
OSI is a reference model, while TCP/IP is used in real-world networking (like the
Internet).
6.b) What are the functions of the transport layer? (3 Marks)
The transport layer is the 4th layer of the OSI model.
It is responsible for reliable end-to-end communication between devices.
�Main Functions:
1. Segmentation and Reassembly:
o Breaks big messages into small parts (segments) at sender.
o Reassembles them at the receiver.
2. Reliable Data Transfer:
o Uses acknowledgements and retransmissions to ensure data is
received correctly (e.g., TCP).
3. Flow Control:
o Prevents sender from overwhelming the receiver.
4. Error Control:
o Detects and corrects errors in transmission.
5. Port Numbering:
o Uses port numbers to deliver data to the correct application.
Example: When you browse a website, the transport layer ensures the web page
is delivered fully and in order.
7.a) What is congestion control? Mention any two techniques. (3 Marks)
Congestion control means managing the flow of data in a network so that the
network does not get overloaded.
When too many packets are sent at once, the network gets congested — this
causes packet loss, delays, and poor performance.
�Two congestion control techniques:
1. Leaky Bucket Algorithm:
o Data flows out at a steady rate, like drops from a leaking bucket.
o Controls bursty traffic and prevents congestion.
2. Token Bucket Algorithm:
o Tokens are added at a fixed rate.
o A device must have a token to send data.
o Allows controlled bursts while avoiding overload.
7.b) Describe the concept of fragmentation and reassembly. (4 Marks)
Fragmentation happens when a large packet is broken into smaller pieces to fit
the network's Maximum Transmission Unit (MTU).
This is done because:
Some networks cannot handle large packets.
MTU limits the size of data that can be sent at once.
Reassembly is the process of putting those fragments back together at the
destination.
�Example:
1. A 3000-byte packet needs to travel through a network with MTU of 1000
bytes.
2. It is split into 3 fragments.
3. At the receiver side, the fragments are joined back into the full 3000-byte
message
8. Write short notes on any two of the following: (2×3 = 6 Marks)
Let’s choose: (a) DNS and (c) HTTP
a) DNS (Domain Name System):
DNS is like the phonebook of the internet.
It translates domain names (like www.google.com) into IP addresses (like
142.250.195.78).
This helps users access websites using easy names instead of numbers.
DNS has different parts:
o Root servers,
o Top-level domain servers (.com, .org, etc.),
o Authoritative servers (actual website data)
Without DNS, users would need to remember IP addresses of every website.
c) HTTP (HyperText Transfer Protocol):
HTTP is the protocol used by web browsers and web servers to
communicate.
It works on port 80 and uses a request-response model.
When you visit a website:
1. Browser sends an HTTP request to the server.
2. Server sends back an HTTP response with the web page data.
HTTP is stateless (doesn’t remember previous interactions).
Its secure version is HTTPS (uses encryption)