Computer Networks Answer Key
Computer Networks Answer Key
o Latency: Refers to the delay before data begins to transfer after the instruction is
given. It is typically measured in milliseconds (ms).
o Marking Scheme: 1 mark for defining bandwidth, 1 mark for defining latency.
o LAN (Local Area Network): Covers a small area like a home, office, or building.
o WAN (Wide Area Network): Covers a large geographical area, connecting multiple
LANs (e.g., the Internet).
o MAN (Metropolitan Area Network): Spans a city or campus, larger than LAN but
smaller than WAN.
o Marking Scheme: 1 mark for explaining LAN, 1 mark for distinguishing MAN and
WAN.
o Payload: Refers to the actual data being transmitted in a network packet, excluding
headers and metadata. It is the core content of the message.
o Marking Scheme: 1 mark for listing at least two chunks, 1 mark for explaining their
purpose.
o Reliable Flooding: Ensures that all nodes in a network receive a copy of the message.
It uses mechanisms like sequence numbers to avoid duplication.
o Marking Scheme: 1 mark for defining the concept, 1 mark for explaining its
mechanism.
o Routing: The process of selecting paths in a network to send data packets from a
source to a destination.
9. Describe MAC.
o MAC (Media Access Control): A sublayer of the data link layer responsible for
controlling access to the physical transmission medium. It includes addressing (MAC
addresses) and methods like CSMA/CD.
o Marking Scheme: Full 2 marks for explaining MAC and its function.
o Brief explanation of OSI (Open Systems Interconnection) model and its purpose.
o Physical Layer: Transmits raw bit streams over a physical medium. (1 Mark)
o Data Link Layer: Responsible for node-to-node data transfer and error correction. (1
Mark)
o Transport Layer: Ensures reliable data transfer and error handling. (1 Mark)
o Diagram should clearly show all 7 layers in order with labels and short descriptions.
OR
Question 2: Explain how FTP has a message format for exchanges and responses during control
connection (13 Marks)
o FTP (File Transfer Protocol) is used for transferring files between a client and server.
Commands sent by the client, e.g., USER, PASS, LIST, RETR, STOR.
o Ensures clear communication between client and server for proper file transfer.
Q3 (b): How is congestion controlled? Explain in detail about congestion control mechanisms in the
transport layer.
Feedback mechanisms:
Slow start.
Congestion avoidance.
3. Conclusion (1 Mark)
Explain that having the same IP address assigned to two hosts on the same Ethernet leads
to an IP address conflict, causing communication disruptions.
Mention that ARP (Address Resolution Protocol) is used to map IP addresses to MAC
addresses on Ethernet networks.
o When Host B starts up with the same IP as Host A, it sends ARP announcements
(also called Gratuitous ARP) to inform other devices of its presence.
o These announcements update the ARP caches of all devices in the network,
replacing Host A’s MAC address with Host B’s.
o As a result, packets intended for Host A are now sent to Host B, causing A’s
connections to break.
o TCP connections on Host A might time out because it no longer receives packets.
o Self-ARP is when a host sends out ARP requests for its own IP address to detect
conflicts.
o When Host B starts up, it performs a Self-ARP (Gratuitous ARP) to check if another
device (Host A) is already using the same IP.
o If a conflict is detected (i.e., Host A responds to B’s ARP request with the same IP
but a different MAC address):
o Self-ARP ensures that hosts do not unknowingly disrupt each other’s connections,
preserving the stability of the network.
4. Conclusion (1 Mark)
Summarize that while IP conflicts disrupt communication, Self-ARP is a simple yet effective
mechanism to detect and resolve such conflicts.
Mention the two major IP versions: IPv4 (32-bit) and IPv6 (128-bit).
o Used in small networks or for devices like servers, printers, and routers.
o When no DHCP server is available, devices can self-assign an IP address from the
range 169.254.0.0/16.
o Public Addresses: Globally unique and used for internet communication. Managed
by ICANN.
o Private addresses require NAT (Network Address Translation) for internet access.
5. Subnetting (1 Mark):
3. Conclusion (1 Mark)
Highlight how methods like dynamic addressing and subnetting help in scalability and
flexibility of networks.
ii) Answer Key: Explain IPv6 and Compare IPv4 vs IPv6 (6 Marks)
1. Definition (1 Mark):
o IPv6 (Internet Protocol version 6) is the latest version of the Internet Protocol,
designed to replace IPv4.
o Simplified Header: IPv6 has a simpler and more efficient packet header, improving
performance.
o No NAT Required: Provides unique addresses for every device, eliminating the
need for NAT (Network Address Translation).
3. Conclusion (1 Mark)
IPv6 is designed to overcome the limitations of IPv4, especially with the increasing number
of devices on the internet.
Its advanced features, larger address space, and improved efficiency make it a critical
upgrade for modern networks.
Answer Key: Link State Routing Algorithm with Neat Sketch (13 Marks)
Definition:
Link State Routing is a dynamic routing algorithm that maintains a complete map of the
network topology. Each router calculates the shortest path to every other router using
Dijkstra's Algorithm.
Objective:
To provide efficient, loop-free routes and adapt quickly to network changes.
o Each router identifies its immediate neighbors and measures the cost (e.g., delay,
bandwidth) to each.
o Each router generates LSPs containing information about its neighbors and the
associated costs.
o LSPs are broadcast to all routers in the network to ensure all routers have the same
LSDB.
o Each router applies Dijkstra's Algorithm to compute the shortest path to every
other router.
o The resulting information is used to update the routing table with the next hop for
each destination.
Diagram Explanation:
3. Using Dijkstra's Algorithm, the shortest paths from a source router (e.g., A) to all other
routers are computed.
(A simplified graph and routing tree can be drawn showing the shortest paths and costs.)
1. Network Setup:
o Link costs: A-B (1), A-C (4), B-C (2), B-D (6), C-D (3).
Faster convergence.
Link State Routing provides a scalable, efficient, and reliable routing mechanism for large
networks.
Mark Split-Up
1. Introduction (2 Marks)
5. Conclusion (1 Mark)
15 a) PPP
Answer Key: Explain PPP and Its Services with Neat Diagram (13 Marks)
Definition:
Point-to-Point Protocol (PPP) is a data link layer protocol used for direct communication
between two network nodes over serial links, such as phone lines, ISDN, or fiber-optic
lines.
Purpose:
It provides encapsulation, authentication, error detection, and support for multiple
protocols like IP, IPv6, and others.
Multi-Protocol Support: Works with protocols like IP, IPv6, IPX, and others.
Error Detection: Uses Cyclic Redundancy Check (CRC) to detect transmission errors.
Link Management: Establishes, maintains, and terminates links using LCP (Link Control
Protocol).
1. Encapsulation (1 Mark):
o PPP encapsulates network-layer packets into frames for transmission over serial
links.
2. Authentication (2 Marks):
o PPP ensures data integrity using CRC, identifying and discarding corrupted frames.
Handles protocol-specific options for IP, IPv6, and others, enabling versatile
use.
Diagram Description:
(Draw a diagram with the PPP Frame format and communication flow for better clarity.)
6. Conclusion (1 Mark)
PPP is a versatile protocol that ensures reliable and secure data communication over serial links.
Its modular design supports multiple protocols and authentication mechanisms, making it an
integral part of network communication.
Mark Split-Up
1. Introduction (2 Marks)
4. Diagram (3 Marks)
5. Conclusion (1 Mark)
Answer Key: Differences Between Wired (IEEE 802.3) and Wireless (IEEE 802.11) LANs (13 Marks)
1. Introduction (2 Marks)
2. Key Differences Between Wired (802.3) and Wireless (802.11) LANs (9 Marks)
More secure due to physical Requires robust encryption (e.g., WPA3) to ensure
Security
control security
Power Lower power consumption Higher power consumption, especially for Wi-Fi-
Consumption for devices enabled devices
1. A wired LAN setup with devices connected to an Ethernet switch using cables.
2. A wireless LAN setup with devices connecting wirelessly to a Wi-Fi router or access point.
5. Conclusion (1 Mark)
Both IEEE 802.3 and IEEE 802.11 have unique advantages. Wired LANs provide better speed and
reliability, while wireless LANs offer flexibility and mobility. The choice depends on specific
network requirements.
Mark Split-Up
1. Introduction (2 Marks)
4. Conclusion (1 Mark)
PART-C
16 a) Question Breakdown:
You are tasked with sending a 3500-byte datagram from one router (R1) to another router (R2)
over two links, with varying Maximum Transmission Unit (MTU) sizes. You need to analyze how the
datagram is fragmented as it passes through these two links.
Key Information:
Steps to Solve:
o Data Payload: The maximum data size that can fit into a single datagram when the
MTU is 1000 bytes is: 1000−20=980 bytes of data1000 - 20 = 980 \text{ bytes of
data}1000−20=980 bytes of data
First Fragment:
Second Fragment:
o Header: 20 bytes
Third Fragment:
o Header: 20 bytes
Fourth Fragment:
o Header: 20 bytes
So, after the first link (MTU = 1000 bytes), we have 4 fragments.
Now, the 4 fragments that were created in the first step need to traverse a link with an MTU of 600
bytes. Let's analyze each fragment:
Maximum data size that can fit into the 600-byte MTU:
600−20=580 bytes of data600 - 20 = 580 \text{ bytes of
data}600−20=580 bytes of data
This fragment will be divided into two smaller fragments:
o This fragment is small enough to fit directly into the 600-byte MTU without further
fragmentation.
After traversing both links, the original 3500-byte datagram is divided into 10 fragments:
First Link (MTU = 1000 bytes): 4 fragments (1000, 1000, 1000, 520 bytes)
Mark Breakdown:
o Ensuring that the entire fragmentation process is described clearly and accurately.
Total Marks: 15
You are tasked with explaining the operation of the Transmission Control Protocol (TCP) with a
neat sketch. The question is worth 8 marks, so the answer should cover the key operations of TCP
in a structured and clear manner.
o It ensures that data is delivered in order, error-free, and without loss, by managing
the data flow between sender and receiver.
o Reliable delivery: Ensures all data is received in order and retransmits lost data.
o Step 1: SYN: The client sends a SYN (synchronize) packet to the server to initiate
the connection.
o Step 3: ACK: The client sends an ACK (acknowledgment) packet to confirm the
connection.
4. Data Transfer (Sliding Window and Acknowledgment) (2 marks)
o Sliding Window Protocol: TCP uses the sliding window mechanism to control the
flow of data. The window size determines the amount of data the sender can
transmit before needing an acknowledgment.
o FIN: The termination process starts with a FIN (finish) packet from the sender to
terminate the connection.
o ACK: The receiver responds with an ACK to acknowledge the termination request.
o The process involves four steps (initiator sends FIN, receiver sends FIN after
acknowledging, and the connection is fully closed).
Neat Sketch:
The flow of data during the three-way handshake for connection establishment.
Mark Breakdown:
o Discuss the core features like reliability, flow control, and error control.
o Provide a clear explanation of the three-way handshake with the necessary steps.
o Describe how TCP manages data transfer and handles flow control and
acknowledgments.
Answer:
Reliable: Data delivery is guaranteed. TCP provides mechanisms for acknowledgment and
retransmission of lost data.
Flow Control: TCP uses a sliding window to control the amount of data the sender can
transmit before receiving an acknowledgment.
Error Control: Each packet sent contains a checksum to verify data integrity. If errors are
detected, the packet is retransmitted.
The Three-Way Handshake is used to establish a connection between the sender and the receiver.
o The client (sender) sends a SYN (synchronize) message to the server indicating the
start of the connection and proposing a sequence number.
o The client sends an ACK (acknowledgment) message back to the server, completing
the handshake. The connection is now established, and data transfer can begin.
Sliding Window Protocol: TCP uses a sliding window mechanism for flow control. The
sender can transmit data up to the window size, and the receiver acknowledges received
data. The window slides forward after each acknowledgment.
When the communication is complete, the connection is terminated using a four-way handshake:
Step 1: FIN (Sender to Receiver): The sender sends a FIN (finish) packet to the receiver,
indicating the sender wants to terminate the connection.
Step 2: ACK (Receiver to Sender): The receiver acknowledges the FIN packet by sending an
ACK back to the sender.
Step 3: FIN (Receiver to Sender): The receiver sends a FIN packet to the sender to indicate
it is also ready to close the connection.
Step 4: ACK (Sender to Receiver): The sender sends an ACK to acknowledge the receiver's
FIN packet, and the connection is closed.
Neat Sketch:
Data Transfer: Show a series of data packets being sent with corresponding ACKs.
Four-Way Handshake: Show the termination sequence: FIN → ACK → FIN → ACK
Total Marks: 8
Question Breakdown:
You are asked to explain the Sliding Window Protocol in detail for 7 marks. The explanation should
cover the core concepts and working of the sliding window protocol, its types, and how it is
implemented in practice.
o Brief explanation of what the sliding window protocol is and why it is used.
o Explanation of window size, sender and receiver roles, and the flow control
mechanism.
o How the sender and receiver interact using the sliding window.
o Discuss why sliding window is efficient in terms of handling flow control, error
recovery, and utilizing bandwidth.
Mark Breakdown:
o Explanation of window size, sender and receiver's role, flow control, and the use of
sequence numbers.
Answer:
The Sliding Window Protocol is a flow control technique used in data communication to manage
the transmission of data between sender and receiver. It is primarily used to prevent congestion,
optimize bandwidth, and ensure reliable data transfer. It allows the sender to send multiple
packets before needing an acknowledgment, thus improving throughput and minimizing idle time.
The sliding window protocol works by controlling the flow of data between the sender and
receiver. It uses a window (a set of packets) to manage how much data can be in transit at any
given time.
Window Size: The window size determines how many frames (or packets) can be sent
without waiting for an acknowledgment. It is a crucial parameter that impacts the flow
control. If the window size is small, fewer packets are in transit at once, leading to lower
throughput. Conversely, a larger window size can increase throughput, but it may also
cause congestion if the receiver cannot handle the incoming data.
Sender’s Role: The sender is responsible for sending data packets and maintaining a record
of which packets have been sent but not yet acknowledged. The sender is allowed to
transmit up to the number of packets specified by the window size before waiting for an
acknowledgment from the receiver.
Receiver’s Role: The receiver is responsible for acknowledging received packets. The
receiver does not immediately process all packets, only those within the range of the
current window size. The receiver can also buffer out-of-order packets and deliver them in
the correct order once the missing ones arrive.
Flow Control: The sliding window protocol ensures that the sender does not overwhelm
the receiver by sending too many packets at once. The window "slides" forward when the
sender receives an acknowledgment, allowing more data to be sent.
Sequence Numbers: To keep track of the data, each packet in the sliding window has a
sequence number. These numbers are used to ensure that the packets are processed in the
correct order and to detect lost or duplicate packets.
The sliding window protocol works by allowing the sender to transmit multiple packets before
needing an acknowledgment. As the sender sends packets, the window "slides" forward, and new
packets can be transmitted, while the receiver acknowledges those packets as they are received.
Step-by-Step Process:
1. Initialization:
o The sender has a window that can hold N packets. It begins by sending the first N
packets.
o The receiver has a window that determines how many packets it can accept at
once.
2. Sending Data:
o The sender transmits the first N packets (within the window size).
o The sender keeps track of which packets have been sent and is waiting for
acknowledgments for these packets.
3. Acknowledgment:
o The receiver receives packets and sends acknowledgments (ACKs) back to the
sender, indicating that it has received the packets.
o If a packet is lost or corrupted, the receiver does not acknowledge it, causing the
sender to retransmit the missing packet.
o In case of Go-Back-N, the sender retransmits all packets starting from the lost
packet. In Selective Repeat, only the lost packet is retransmitted.
Example:
Assume the sender has a window size of 4, and the packets are numbered 1, 2, 3, 4, 5, 6. The
sender sends packets 1, 2, 3, and 4. After receiving acknowledgment for packet 1, the window
slides and the sender can send packet 5. If the receiver acknowledges packet 2 next, the sender
slides the window further and sends packet 6.
1. Go-Back-N (GBN):
o In GBN, the receiver only sends an acknowledgment for the last correctly received
packet.
o In Selective Repeat, only the lost or erroneous packet is retransmitted. The receiver
can buffer out-of-order packets and deliver them in the correct order once the
missing packets are received.
o The sender only retransmits the specific packet that was lost, rather than
retransmitting all subsequent packets.
Efficient Bandwidth Utilization: By allowing multiple packets to be sent without waiting for
each acknowledgment, the sliding window protocol optimizes the use of the available
bandwidth.
Flow Control: It ensures that the sender does not overwhelm the receiver, especially when
the receiver has limited buffer space.
Reliable Communication: It provides error recovery and ensures that lost or corrupted
packets are retransmitted.
Total Marks: 7
o Reverse Path Forwarding (RPF): Ensures loops are avoided during multicast
forwarding. (2 Marks)
o Creation of Multicast Trees: Maintains shortest path trees for routing multicast
packets. (1 Mark)
Q4 (b): ii. Describe in detail the operation of OSPF protocol by considering a suitable network. (6
Marks)
o Areas and Hierarchy: OSPF divides the network into areas to optimize routing.
Q15 (b): Use IEEE 802.3 and IEEE 802.11 to generalize the differences between wired and wireless
LANs. (13 Marks)
o Medium (2 Marks):
o Speed (2 Marks):
o Range (2 Marks):
Wired has limited range due to cable length restrictions.
o Reliability (2 Marks):
o Security (2 Marks):
3. Conclusion (1 Mark):