KEMBAR78
CAT2! Computer Network Answer Key | PDF | Routing | I Pv6
0% found this document useful (0 votes)
32 views15 pages

CAT2! Computer Network Answer Key

Uploaded by

athirayanpericse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
32 views15 pages

CAT2! Computer Network Answer Key

Uploaded by

athirayanpericse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

PERI INSTITUTE OF TECHNOLOGY (AUTONOMOUS) Set.

No:
B
Mannivakkam, Chennai-48

B.E./B.Tech.DEGREE CAT -II EXAMINATION MARCH 2025


DEPARTMENT OF ARTIFICIAL INTELLIGENCE AND DATA SCIENCE
Regulations 2021
Semester: IV Date: 24-04-25
SubjectCode: CS3591 Time: Three Hours
Subject Name: Computer Networks Maximum Marks: 100
Answer all Questions
PART-A (10x 2=20Marks)
Q. No. CO CL
1 What do you meant by switching. 3
Switching is the process of transferring data packets from one device to another in a network, or
from one network to another, using specific devices called switches. A computer user experiences U
switching all the time for example, accessing the Internet from your computer device, whenever a
user requests a webpage to open, the request is processed through switching of data packets only.
2 What is the network address in a class a subnet with the ip addresses of one of the hosts as 3
25.34.12.56 and mask255.255.0.0?
To find the network address in a class A subnet, we need to perform a bitwise AND operation
R
between the IP address and the subnet mask. In this case, the IP address is 25.34.12.56 and the
subnet mask is 255.255.0.0. Therefore, the first address (network address) in this subnet is
25.34.0.0.
3 Can you discover the sketch of ipv6 packet header. 3 R

4 What is the need of ARP? 3 U


ARP is necessary because the software address (IP address) of the host or computer connected to the
network needs to be translated to a hardware address (MAC address). Without ARP, a host would not
be able to figure out the hardware address of another host.
5 When is ICMP redirect message is used. 3
When a host sends a packet to a router (Router1) as its default gateway, and Router1 determines that
another router (Router2) on the same subnet is a better next hop for the destination network, Router1 U
sends an ICMP Redirect message to the host. This message advises the host to send future packets
directly to Router2 instead of Router1
6 What are the metrics used by routing protocols? 4
Routing protocols are essential for determining the optimal path between source and destination
U
systems in a network. They operate at the network layer of the OSI reference model and use metrics
to evaluate and select the best route among multiple available paths.
7 Define Open Shortest Path First (OSPF). 4
Open Shortest Path First (OSPF) is a widely used link-state routing protocol designed for Internet
Protocol (IP) networks. It operates within a single autonomous system (AS) and is classified as R
an Interior Gateway Protocol (IGP)12. OSPF uses a link-state routing algorithm to determine the
shortest path for data packets based on the network topology.
4

Write the difference between Distance vector routing and Link state routing
8 Distance Vector Link State

Algorithm Bellman-Ford Dijkstra’s algorithm

Algorithm characteristics Slower but more versatile Faster but less versatile

Routers share Routing tables Link State Advertisements

Knows only information from Maintains a complete map of the


Network
directly connected routers network topology

Best path calculated Based on shortest distance Based on cost (link state) R

Resource usage Low High

9 What are the contents of a link state packet (LSP)? 4


An LSP is packed with useful information to help routers make smart routing decisions. You'll find
data about the router's identity, its neighboring routers, the cost associated with using certain links
over others, and the overall network topology. Essentially, it's like giving the router a U
comprehensive understanding of the network's layout, allowing it to choose the most efficient paths
for data transmission.

10 Develop the value of importance of congestion control? 4


An important network operation is congestion control, which helps to increase the speed of number
of packets, which are entered in the network. It ensures the stabilization of network, acceptable packet
loss ratio, and efficient resource utilization
R

PART-B (5 x 13 = 65Marks)
Q. No. Split up CO CL
11 (a) Explain any two-error detection mechanism in detail. 13 3
Basic Concepts of Error Detection
Error detection is a crucial aspect of data communication that ensures the integrity
and reliability of data transmitted across networks. It involves identifying errors
that may occur during data transmission due to noise, interference, or other
impairments.
Types of Errors
1. Single-Bit Error: This occurs when a single bit in the data unit is altered
during transmission. For example, a bit value of 0 may change to 1 or vice
versa.
2. Multiple-Bit Error: This type of error affects more than one bit in the
data unit. Although less common than single-bit errors, they can still occur
in high-noise environments2.
3. Burst Error: This occurs when several consecutive bits are altered during
transmission, resulting in a sequence of incorrect values 2.
Error Detection Methods
1. Simple Parity Check: This method involves adding an extra bit to the
data unit to make the total number of 1s either even (even parity) or odd
(odd parity). It is simple to implement but can only detect single-bit
errors2.
2. Two-Dimensional Parity Check: This method extends the simple parity
check by adding parity bits for both rows and columns of the data matrix.
It can detect and correct single-bit errors and detect multiple-bit errors2.
3. Checksum: In this method, the data is divided into segments, and a
checksum is calculated using 1's complement arithmetic. The checksum is
sent along with the data, and the receiver performs the same calculation to
verify the integrity of the data2. R
4. Cyclic Redundancy Check (CRC): CRC is a more robust method that
involves appending a sequence of redundant bits to the data unit. The data
unit is divided by a predetermined binary number, and the remainder is
used as the CRC. The receiver performs the same division to check for
errors2.
Advantages and Disadvantages
Advantages
• Increased Data Reliability: Error detection ensures that the data received
is accurate and reliable2.
• Improved Network Performance: Identifying and isolating errors can
enhance overall network performance2.
• Enhanced Data Security: Error detection helps ensure that the data has
not been tampered with during transmission2.
Disadvantages
• Overhead: Error detection requires additional resources and processing
power, leading to increased overhead2.
• False Positives: Error detection mechanisms can sometimes generate false
positives, resulting in unnecessary retransmissions2.
• Limited Error Correction: Error detection can only identify errors but
cannot correct them
[OR]
(b) Write short notes on i) DHCP ii) ICMP. 13 3
The Dynamic Host Configuration Protocol (DHCP) is a client/server protocol
designed to provide the four pieces of information for a diskless computer or a
computer that is booted for the first time.
DHCP operation:
The DHCP client and server can either be on the same network or on different
networks.
• Same Network :
Although the practice is not very common, the administrator may put the client and
the server on the same network as shown in Figure1.
Fig1: Client and server on the same network
In this case, the operation can be described as follows:
i. The DHCP server issues a passive open command on UDP port number 67 and
waits for a client.
ii. A booted client issues an active open command on port number 68. The message
is encapsulated in a UDP user datagram, using the destination port number 67 and
the source port number 68. The UDP user datagram, in turn, is encapsulated in an
IP datagram.
iii. The client uses all 0sas the source address and all 1s as the destination address.
iv. The server responds with either a broadcast or a unicast message using UDP
source port number 67 and destination port number 68. The response can be unicast
because the server knows the IP address of the client.
v. It also knows the physical address of the client, which means it does not need the
services of ARP for logical to physical address mapping
ICMP stands for Internet Control Message Protocol. It is a network layer
protocol used primarily for error handling and diagnostic purposes in network
communications12. R
Purpose and Functionality
ICMP is utilized by network devices, such as routers, to send error messages and
operational information. For instance, it can indicate that a requested service is not
available or that a host or router could not be reached 1. Unlike transport protocols
like TCP and UDP, ICMP is not typically used to exchange data between systems
but is essential for network diagnostics and error reporting 2.
Key Uses of ICMP
1. Error Reporting: ICMP is used to report errors when data packets cannot
reach their destination. For example, if a message is too large for the
receiver, the receiver will drop the message and reply with an ICMP error
message to the source1.
2. Network Diagnosis: ICMP is used in tools like ping and traceroute to
diagnose network issues. The ping utility uses ICMP echo request and
echo reply messages to measure the time taken for data to reach the
destination and return to the source13.
How ICMP Works
ICMP operates at the network layer and is a connectionless protocol, meaning it
does not establish a connection before sending messages. ICMP packets are
transmitted as datagrams containing an IP header followed by ICMP data 12. The
protocol is integral to the IP suite and is used for various control and error
messages2.
ICMP Packet Format
An ICMP packet consists of several fields:
• Type (8-bit): Indicates the type of message (e.g., echo reply, destination
unreachable).
• Code (8-bit): Provides additional information about the error message.
• Checksum (16-bit): Used to verify the integrity of the message12.
Common ICMP Message Types
• Echo Reply (Type 0): Used in response to an echo request (ping).
• Destination Unreachable (Type 3): Indicates that the destination cannot
be reached.
• Redirect Message (Type 5): Informs a host to send packets on an
alternate route.
• Echo Request (Type 8): Used to ping a device to check its availability.
• Time Exceeded (Type 11): Indicates that the time to live (TTL) of a
packet has expired12.
ICMP in DDoS Attacks
ICMP can be exploited in various types of Distributed Denial of Service (DDoS)
attacks, such as:
• Ping of Death: Sending oversized packets that cause buffer overflow.
• ICMP Flood Attack: Sending a large number of ICMP echo requests to
overwhelm the target.
• Smurf Attack: Sending ICMP packets with a spoofed source IP address
to flood the target1.
ICMP is a crucial protocol for maintaining and diagnosing network health,
providing essential feedback for error handling and network management

12 (a) Explain the Routing Information protocol/Distance vector routing in detail. 13 3


Routing Information Protocol (RIP)
Routing Information Protocol (RIP) is a dynamic routing protocol used to
determine the best path between the source and destination networks. It is a
distance-vector routing protocol that uses hop count as a routing metric. RIP
operates at the Network layer of the OSI model and uses port number 52012.
Key Features of RIP
1. Hop Count: The number of routers between the source and destination.
The path with the lowest hop count is considered the best route. The
maximum hop count allowed is 15, and a hop count of 16 is considered
unreachable1.
2. Periodic Updates: RIP exchanges network updates periodically,
broadcasting full routing tables to all neighboring routers 1.
3. Routing on Rumors: Routers trust the routing information received from
their neighbors1.
Versions of RIP
U
RIP has three versions: RIP Version 1 (RIPv1), RIP Version 2 (RIPv2), and RIPng.
• RIPv1: Classful routing protocol that does not support subnet masks in its
updates. It broadcasts updates to 255.255.255.255 12.
• RIPv2: Classless routing protocol that supports subnet masks and
authentication. It sends updates as multicast to 224.0.0.9 12.
• RIPng: Supports IPv6 and sends updates as multicast to FF02::9 12.
Configuration Example
To configure RIP on a router, you can use the following commands:
R1(config)# router rip
R1(config-router)# network 192.168.20.0
R1(config-router)# network 172.16.10.4
R1(config-router)# version 2
R1(config-router)# no auto-summary
This configuration sets up RIP Version 2 on router R1, specifying the networks to
be advertised and disabling auto-summarization1.
Timers in RIP
RIP uses several timers to manage routing information:
• Update Timer: Default is 30 seconds. Controls the interval between
routing updates12.
• Invalid Timer: Default is 180 seconds. Marks a route as invalid if no
updates are received12.
• Hold Down Timer: Default is 180 seconds. Prevents updates to a route
entry while it stabilizes12.
• Flush Timer: Default is 240 seconds. Removes an invalid route from the
routing table12.
Advantages and Disadvantages
Advantages
• Simplicity: Easy to configure and manage1.
• Compatibility: Works with many types of routers and network devices 1.
• Automatic Updates: Periodically updates routing tables1.
Disadvantages
• Limited Scalability: Supports a maximum of 15 hops12.
• Slow Convergence: Can be slower to adapt to network changes12.
• Security Vulnerabilities: Lacks native security features12.
RIP is suitable for small to medium-sized networks with simple routing
requirements. It is often used in lab environments for testing and learning purpose

Distance Vector Routing Algorithme Distance Vector Routing Algorithm is a


dynamic routing algorithm used in computer networks to determine the best path
for data packets to travel across a network. This algorithm is iterative,
asynchronous, and distributed, meaning each node in the network independently
updates its routing table based on information received from its neighbors1.
Key Principles
1. Knowledge Sharing: Each router shares its knowledge about the network
with its directly connected neighbors. This information includes the
distance to all other routers in the network.
2. Routing to Neighbors: Routers only send their distance vectors to their
immediate neighbors. These neighbors then use this information to update
their own routing tables and propagate the updated information further.
3. Regular Updates: Routers periodically send updates to their neighbors,
typically every 30 seconds, to ensure that all routers have the most current
information1.
Bellman-Ford Equation
The algorithm relies on the Bellman-Ford equation to calculate the shortest path to
each destination. The equation is as follows:
d_x(y) = min_v { c(x,v) + d_v(y) }
Where:
• d_x(y) is the cost of the least-cost path from node x to node y.
• c(x,v) is the cost from node x to its neighbor v.
• d_v(y) is the cost from neighbor v to destination y.
Each node x updates its distance vector by considering the minimum cost path
through each of its neighbors1.
Algorithm Steps
1. Initialization: Each router initializes its distance vector with the cost to
reach each destination. If a destination is not directly reachable, the cost is
set to infinity. Each router sends its initial distance vector to its neighbors.
2. Update: When a router receives a distance vector from a neighbor, it
updates its own distance vector using the Bellman-Ford equation. If the
distance vector changes, the router sends the updated vector to its
neighbors.
3. Iteration: This process continues iteratively until no more updates are
needed, meaning all routers have the most accurate distance vectors^1^.
Example
Consider a network with routers A, B, C, and D. Initially, each router knows the
distance to its directly connected neighbors. For example, router A might have the
following initial distance vector:
Destination | Distance | Next Hop
A|0|A
B|2|B
C|∞|-
D|1|D
After exchanging distance vectors with its neighbors, router A updates its distance
vector based on the information received. This process is repeated until the routing
tables converge and become stable3.
Advantages and Disadvantages
Advantages:
• Simplicity: Easy to implement and understand.
• Efficiency: Finds the shortest path for data to travel in a network.
Disadvantages:
• Slow Convergence: Takes longer to converge compared to other
algorithms like Link State Routing.
• Count-to-Infinity Problem: Can suffer from routing loops and slow
convergence in certain scenarios2.
In conclusion, the Distance Vector Routing Algorithm is a fundamental method for
routing data in computer networks, providing a balance between simplicity and
efficiency

[OR]
(b) Explain about IPv6? Compare IPv4 and IPv6 13 3
IPv6, or Internet Protocol version 6, is the latest version of the Internet Protocol
designed to replace IPv4. It addresses the limitations of IPv4, most notably its
shortage of available IP addresses. IPv6 uses a 128-bit address format, enabling a
practically limitless number of unique IP addresses, compared to IPv4's 32-bit
format.
IPv4 vs IPv6 Comparison
Aspect IPv4 IPv6
Address Length 32-bit (e.g., 192.168.1.1) 128-bit (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334)
Address Space ~4.3 billion addresses Virtually unlimited (~340 undecillion addresses)
Header Format Simpler, fewer fields Complex, more fields but optimized for better performance
U
Requires manual or DHCP
Configuration Supports auto-configuration
configuration
Security Basic (IPSec optional) Integrated IPSec for enhanced security
Quality of Service Limited Better support for QoS and prioritization
Routing Less efficient routing Improved routing with simpler packet processing
Compatibility Widely adopted Still in transition, but gaining traction globally
Benefits of IPv6:
1. Larger Address Space: Vastly more addresses for devices and networks.
2. Improved Security: IPSec is built-in for robust encryption and
authentication.
3. Enhanced Performance: Auto-configuration simplifies setup, and
efficient routing reduces latency.
4. Future Proof: Designed to support the growing needs of the internet as
more devices come online.
IPv4 is still prevalent due to legacy systems, but the transition to IPv6 is essential
as it ensures the scalability of the internet. If you're curious about any specific
aspect, I'd be happy to explore further!
13 (a) Discuss about address Resolution protocols 7 3
Address Resolution Protocols (ARP) are essential in computer networking. ARP
is responsible for mapping an IP address (logical address) to a physical address,
such as a MAC address, within a local network. This process enables devices to
communicate effectively across a network. Let's delve deeper:
How ARP Works
1. Broadcasting a Request: When a device wants to send data to another
device, it broadcasts an ARP request on the network, asking, "Who has
this IP address?"
2. Receiving a Response: The device with the matching IP address responds
with its MAC address.
3. Updating the ARP Table: The requesting device updates its ARP
cache/table with the IP-MAC pair for future communication.
Types of ARP
1. Normal ARP: Used for resolving MAC addresses in IPv4 networks.
2. Proxy ARP: Allows one device (like a router) to respond to ARP requests
on behalf of another device.
3. Reverse ARP (RARP): Maps a MAC address to an IP address, typically U
used by devices without an IP address.
4. Gratuitous ARP: Devices announce their presence on the network by
broadcasting their own IP-MAC mapping.

Why ARP is Important


• Ensures smooth communication within a local network by resolving
address mappings.
• Plays a critical role in routing packets to the correct destination.
Challenges with ARP
• Vulnerable to attacks like ARP spoofing, which can compromise network
security.
• Inefficient in larger networks, especially when broadcasting overwhelms
the network.
Modern networks also employ Neighbor Discovery Protocol (NDP) in IPv6,
which replaces ARP for address resolution. If you'd like to explore specific
scenarios or technical aspects, feel free to ask

[OR]
(b) Explain DVMRP multicast routing in detail 7 3
DVMRP (Distance Vector Multicast Routing Protocol) is an interior gateway
protocol designed to support multicast data delivery within a network. It is based on
the distance-vector routing algorithm and operates similarly to the Routing
Information Protocol (RIP) but is specifically tailored for multicast traffic. DVMRP
plays a key role in enabling efficient multicast communication, such as video
U
streaming or live broadcasts, where data is sent to multiple recipients
simultaneously.
How DVMRP Works
1. Reverse Path Forwarding (RPF):
o DVMRP uses RPF to forward multicast packets. When a router
receives a multicast packet, it checks if the packet arrived on the
interface that is on the shortest path (reverse path) to the source.
If yes, it forwards the packet; otherwise, it discards it to prevent
loops.
2. Building a Multicast Tree:
o DVMRP constructs a multicast delivery tree using a technique
known as the flood-and-prune method:
▪ Flooding: Initially, multicast packets are flooded to all
routers in the network.
▪ Pruning: Routers that do not have any members in the
multicast group send "prune" messages upstream to stop
receiving the unwanted multicast traffic.
3. Periodic Updates:
o Similar to distance-vector protocols, DVMRP routers exchange
periodic routing updates to maintain an updated view of the
network topology and prune or build new branches as necessary.
Key Features of DVMRP
• Distance Vector Algorithm: Utilizes hop count as the metric to
determine the best path to the multicast source.
• Flood-and-Prune Mechanism: Ensures multicast traffic reaches all
interested receivers while removing unnecessary paths.
• Dense Mode Protocol: Designed for networks with densely distributed
multicast group members.
• Tunnel Support: In networks where multicast support is limited,
DVMRP can encapsulate multicast packets within unicast packets to
traverse non-multicast routers.
Challenges of DVMRP
• Scalability Issues: DVMRP is most suitable for smaller or densely
populated networks. In larger networks, the flood-and-prune approach
may lead to excessive overhead.
• Inefficiency in Sparse Networks: Flooding the entire network can be
resource-intensive in scenarios where multicast group members are
sparsely distributed.
• Compatibility: As the protocol predates IPv6, it is not natively
compatible with IPv6, which uses newer protocols like PIM (Protocol
Independent Multicast) for multicast routing.
Applications of DV

14 (a) Two hosts are in a CSMA/CD network and the medium has a data transfer 13 4
capacityof 1Gbps. The minimum frame length is fixed to 1,000 bits and the
propagation speed is 2 ×108 m/s. i) What will be the distance between the hosts? ii)
If it is an Ethernet network, what is the efficiency when the hosts have a maximum
distance between them? If the distance is reduced to 1 m, does it impact the
efficiency.
Let's break the problem into steps and solve it mathematically:
i) Distance Between Hosts
In a CSMA/CD network, for collision detection to work, the propagation delay A
must be less than or equal to the time required to transmit the smallest frame. The
propagation delay is given by:
[ \text{Propagation delay} = \frac{\text{Distance}}{\text{Propagation speed}} ]
And the transmission time for the smallest frame is:
[ \text{Transmission time} = \frac{\text{Minimum frame size}}{\text{Data
transfer capacity}} ]
For collision detection: [ 2 \times \text{Propagation delay} \leq \text{Transmission
time} ]
Given:
• Minimum frame size = 1,000 bits
• Data transfer capacity = 1 Gbps = (1 \times 10^9) bits per second
• Propagation speed = (2 \times 10^8) m/s
1. Calculate the transmission time: [ \text{Transmission time} = \frac{1,000
\ \text{bits}}{1 \times 10{-6} \ \text{seconds} ]
2. Using the collision detection condition: [ 2 \times
\frac{\text{Distance}}{\text{Propagation speed}} \leq \text{Transmission
time} ]

[OR]
(b) Given a remainder of 111, a data unit of 10110011 and a divisor of1001, is there 13 4 A
anerror in the data unit. Justify your answer with necessary principles.
To check if there is an error in the given data unit, we apply the Cyclic Redundancy
Check (CRC) principles. CRC works by performing binary division of the
transmitted data by the divisor and comparing the calculated remainder with the
given remainder. If the remainders match, the data is error-free; otherwise, an error
occurred during transmission.

Step-by-Step Process
1. CRC Overview
• Data Unit (Dividend): 10110011
• Divisor (Generator Polynomial): 1001
• Given Remainder: 111
2. Append Zero Bits to Data Unit
Before performing the division, the CRC algorithm appends three zero bits (equal to
the length of the divisor minus one) to the data unit: [ \text{Modified Data Unit
(Dividend)} = 10110011000 ]
3. Perform Binary Division
Perform XOR-based binary division of (10110011000) by (1001). This step mimics
long division in binary:
1. Align the divisor with the leftmost bits of the dividend.
2. Perform bitwise XOR between the dividend and divisor.
3. Bring down the next bit and repeat the process until all bits are processed.
After division, calculate the remainder.
4. Compare Remainders
• If the calculated remainder matches the given remainder (111), the data
unit is error-free.
• If the calculated remainder is different from 111, an error exists.

Conclusion
Manually performing the binary division or using a programmatic approach will
reveal whether the calculated remainder matches the given remainder. If you'd like,
I can walk you through the division steps or summarize the results for clarity! Let
me know.

15 (a) Explain various flow control mechanisms 13 4 U


. i) Stop Wait protocol
ii)Go Back-N
iii)Selective Repeat

Flow control mechanisms are essential in computer networks to regulate data flow
between sender and receiver, ensuring that the receiver is not overwhelmed by too
much data. Below are explanations of the three commonly used mechanisms:
i) Stop-and-Wait Protocol
• Working Principle:
o In this simplest flow control protocol, the sender transmits a data
frame and waits for an acknowledgment (ACK) from the receiver
before sending the next frame.
o If the ACK is received, the sender proceeds with the next frame. If
not (or if a timeout occurs), the sender retransmits the same frame.
• Advantages:
o Simple to implement.
o Ensures reliable delivery.
• Disadvantages:
o Inefficient for long-distance or high-bandwidth networks due to
idle waiting time.
o Limited throughput as only one frame can be in transit at a time.

ii) Go-Back-N Protocol


• Working Principle:
o The sender can transmit multiple frames (up to a predefined
window size, N) before needing an acknowledgment.
o If an error or loss occurs (e.g., frame 3 is lost), the receiver discards
subsequent frames and sends a negative acknowledgment
(NACK).
o The sender goes back and retransmits all frames from the lost one
(frame 3 onwards in this case), even if some were received
successfully.
• Advantages:
o Better utilization of the communication channel compared to Stop-
and-Wait.
o Increased efficiency for error recovery in moderately reliable
networks.
• Disadvantages:
o Wasteful retransmission as error-free frames are also
retransmitted.
o The channel can be underutilized during retransmission.

iii) Selective Repeat Protocol


• Working Principle:
o Similar to Go-Back-N, but here, the receiver buffers out-of-order
frames.
o When a frame is lost or erroneous, the receiver sends a NACK for
the specific frame only.
o The sender retransmits only the erroneous frame instead of all
subsequent frames.
• Advantages:
o Highly efficient as only lost or damaged frames are retransmitted.
o Better throughput and resource utilization in unreliable networks.
• Disadvantages:
o More complex to implement as both sender and receiver must
maintain buffers for tracking frames.
o Requires more memory and processing.

Comparison of the Protocols


Protocol Efficiency Implementation Complexity Throughput
Stop-and-Wait Low Simple Poor (due to idle time)
Go-Back-N Moderate Medium Higher than Stop-and-Wait
Selective Repeat High Complex Highest among the three
Each protocol has its ideal use case depending on factors such as network reliability,
bandwidth, and processing power. Let me know if you'd like to explore these
mechanisms further!

[OR]
(b) Describe the CSMA/CD protocol and comment on its performance for medium 13 4 U
access
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) is a
network protocol used in shared media access environments like Ethernet to
manage data transmission efficiently. It ensures that only one device transmits data
at a time, reducing collisions on the network.

How CSMA/CD Works


1. Carrier Sense:
o A device listens to the transmission medium to check if it is idle
(no signal present).
o If the medium is busy, the device waits and retries after a random
backoff time.
2. Multiple Access:
o Multiple devices share the same transmission medium.
3. Collision Detection:
o If two or more devices transmit simultaneously, a collision
occurs.
o Devices detect the collision by monitoring the network for
anomalies (e.g., signal distortion).
4. Collision Handling:
o Upon detecting a collision, the device stops transmission and
sends a jamming signal to inform others about the collision.
o Each device waits for a random backoff period before retrying,
ensuring that retransmissions don't collide again.

Performance of CSMA/CD
1. Efficiency:
o CSMA/CD is highly efficient in low-traffic scenarios since
devices can easily sense and access the medium without much
delay.
o However, as the number of devices increases or the traffic load
becomes heavy, collisions become more frequent, reducing
overall efficiency.
2. Scalability:
o CSMA/CD does not scale well in large or high-traffic networks
because of the increased likelihood of collisions and
retransmissions, leading to significant delays.
3. Bandwidth Utilization:
o The performance of CSMA/CD is optimal when the network's
utilization is below 30–40%.
o Beyond this threshold, collisions and retransmission overhead
reduce throughput significantly.
4. Latency:
o With frequent collisions, the protocol introduces additional
latency due to retransmissions and backoff intervals.
5. Advantages:
o Simple and cost-effective to implement.
o Works well in small, lightly loaded networks.
6. Disadvantages:
o Poor performance in high-traffic or large-scale networks.
o Largely unsuitable for modern full-duplex Ethernet, which
eliminates collisions.
Modern Relevance
With the advent of switched Ethernet and full-duplex communication, the need
for CSMA/CD has declined, as collisions are no longer a concern in these setups.
However, understanding CSMA/CD remains important for legacy network
environments and as a foundational concept in networking.
If you'd like, I can further explore how CSMA/CD compares to other protocols or
its implementation in Ethernet networks!

PART-C (1 x 15 = 15Marks)
Q. No. Split up CO CL

16 (a) Explain Link state routing with Dijkstra's algorithm for the following graph 15 4 U

Link-state routing with Dijkstra's algorithm involves each node in a network


independently calculating the shortest path to every other node. This is achieved
through the following steps, using the provided graph as an example:
1. 1. Initialization:
• Each node starts with a distance of 0 to itself and infinity to all
other nodes.
• A set of visited nodes is initially empty.
2. 2. Iteration:
• The algorithm iteratively selects the node with the smallest
known distance from the source that has not yet been visited.
• For the selected node, it examines its neighbors and updates their
distances if a shorter path is found through the current node.
3. 3. Update:
• If a shorter path to a neighbor is found, the distance to that
neighbor is updated, and the current node is recorded as its
predecessor in the shortest path.
4. 4. Termination:
• The algorithm terminates when all nodes have been visited or
when the destination node is reached.
Applying Dijkstra's algorithm to the provided graph, assuming the node on the left
as the source:
N Initial Itera Itera Itera Itera Itera Itera Iterat
od Distanc tion tion tion tion tion tion ion 7
e e 1 2 3 4 5 6

A 0 0 0 0 0 0 0 0

B ∞ 4 4 4 4 4 4 4

C ∞ ∞ 12 12 12 12 12 12
D ∞ 8 8 8 8 8 8 8

E ∞ ∞ 10 10 10 10 10 10

F ∞ ∞ ∞ 16 16 16 16 16

G ∞ ∞ ∞ ∞ 26 26 26 26

Note:
• Node labels are assumed from left to right and top to bottom as A, B, C,
D, E, F, and G.
• This table shows the progressive update of shortest distances from node A.
• In a real network scenario, each node would perform this calculation
independently to determine its routing table.
• The link state routing protocol ensures that each router has a consistent
view of the network topology, allowing for accurate shortest-path
calculations.
• Dijkstra's algorithm efficiently computes the shortest paths from a source
node to all other nodes in the network.

[OR]
(b) Explain Distance Vector Routing Algorithm for the graph given below 15 4 U

The Distance Vector Routing Algorithm is a distributed, iterative, and asynchronous


algorithm used in network routing. Each node maintains a distance vector, which is
an estimate of the cost to reach every other node in the network. The algorithm
operates as follows:
1. 1. Initialization:
Each node initializes its distance vector with the cost to reach its directly connected
neighbors and infinity for all other nodes.
2. 2. Iteration:
Periodically, or when a node detects a change in its link cost to a neighbor, it sends
its distance vector to all its neighbors.
3. 3. Update:
When a node receives a distance vector from a neighbor, it updates its own distance
vector by considering the cost to reach the neighbor plus the neighbor's cost to reach
other nodes. The node applies the Bellman-Ford equation to calculate the new
distances:
1. Termination: The algorithm continues to iterate until the distance vectors
converge, meaning no node updates its distance vector after receiving
updates from its neighbors.
For the given graph, the steps of the Distance Vector Routing Algorithm are
illustrated below:
No Initial 1st 2nd 3rd Final
de Distance Exchange Exchange Exchange Distance
Vector Vector

A A:0, B:∞, A:0, B:12, A:0, B:12, A:0, B:12, A:0, B:12,
C:2, D:10, C:2, D:10, C:2, D:10, C:2, D:10, C:2, D:10,
E:∞, F:∞ E:21, F:28 E:13, F:16 E:13, F:16 E:13, F:16

B A:∞, B:0, A:12, B:0, A:12, B:0, A:12, B:0, A:12, B:0,
C:∞, D:2, C:12, D:2, C:3, D:2, C:3, D:2, C:3, D:2,
E:1 E:1, F:8 E:1, F:8 E:1, F:8 E:1, F:8

C A:2, B:∞, A:2, B:12, A:2, B:3, A:2, B:3, A:2, B:3,
C:0, D:1, C:0, D:1, C:0, D:1, C:0, D:1, C:0, D:1,
E:∞, F:18 E:12, F:18 E:12, F:7 E:12, F:7 E:12, F:7

D A:10, B:2, A:10, B:2, A:10, B:2, A:10, B:2, A:10, B:2,
C:1, D:0, C:1, D:0, C:1, D:0, C:1, D:0, C:1, D:0,
E:11, F:6 E:3, F:6 E:3, F:6 E:3, F:6 E:3, F:6

E A:∞, B:1, A:21, B:1, A:13, B:1, A:13, B:1, A:13, B:1,
C:∞, C:12, D:3, C:12, D C:12, D:3, C:12, D:3,
D:11, E:0, E:0, F:2 Brown:3, E:0, F:2 E:0, F:2
F:2 E:0, F:2

F A:∞, B:∞, A:28, B:8, A:16, B:8, A:16, B:8, A:16, B:8,
C:18, D:6, C:18, D:6, C:7, D:6, C:7, D:6, C:7, D:6,
E:2, F:0 E:2, F:0 E:2, F:0 Easp:2, F:0 E:2, F:0

After the third exchange, the distance vectors converge, and the final distance
vectors represent the shortest paths between all pairs of nodes.

You might also like