0% found this document useful (0 votes)
54 views28 pages

Bcs 041

The document discusses an assignment for a course on fundamentals of computer networks. It includes 8 questions covering topics like optical fibers, TCP/IP model, routing protocols, CRC, wireless networks, and more. Students need to answer all questions and submit their assignment by the given deadline.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views28 pages

Bcs 041

The document discusses an assignment for a course on fundamentals of computer networks. It includes 8 questions covering topics like optical fibers, TCP/IP model, routing protocols, CRC, wireless networks, and more. Students need to answer all questions and submit their assignment by the given deadline.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 28

BCA 4th SEM BCS-041

Course Code BCS-041


Course Title Fundamentals of Computer Networks
Assignment Number BCA (IV)/041/Assignment/2023-24
Maximum Marks 100
Weightage 25%
Last Date of Submission 31st October, 2023 (For July Session)
30th April, 2024 (For January Session)
This assignment has eight questions for a total of 80 marks. Answer all the questions.
Each question carries 10 marks. Rest 20 marks are for viva voce. You may use
illustrations and diagrams to enhance explanations. Please go through the guidelines
regarding assignments given in the Programme Guide for the format of presentation.

QI. (10)

(a) Differentiate between single mode and multi-mode optical fiber.


(b) Briefly discuss the functions of various layers involved in TCP/IP model, also mention the
protocols defined under each layer.
Q2.
(10)
(a) What is count-to-infinity problem in distance vector routing protocol? How does it happen? Explain
with an example.
(b) Define angle modulation. What are its types? Discuss the limitations of angle modulation. Q3.

(10)

(a) Calculate the CRC for bit sequence 1101011011 and generator polynomial is 10011. Note: Show all
steps and calculation.
(b) What is Ad hoc Wireless Communication System? Explain. Q4. (10)

(a) What is ICMP? Discuss the ICMP message categories. Also, give at least two examples of each
ICMP message category.
(b) What is NIC? Write the techniques used by NIC for data transfer. Q5. (10)

(a) Write the steps for Message Digest 5 (MD5) algorithm.


(b) Compare Hub and Switch. Give the advantages and disadvantages of both Hub and Switch.
Briefly discuss the functions of layer-2 switch and layer-3 switch. Q6. (10)

(a) Explain POP and IMAP. How does POP work? What are the advantages of IMAP over POP?
(b) Assume two prime numbers p and q are 3 and 5 respectively. Calculate private key and public
key using RSA algorithm.
7

Q7. (10)

(a) Compare between CSMA/CD and token passing methods in Ethernet. Also explain how collisions
are handled by CSMA/CD.
(b) What is round robin technique for transmission? How does polling differ from token passing?

Q8. (10)

(a) What is distance vector routing? Briefly discuss the problem of distance vector routing.
(b) What do you understand by the term Quality of Services (QoS). Discuss the techniques to
improve QoS.
8
Course Code: BCS-041
Course Title: Fundamentals of
Computer Networks
Assignment Number: BCA (IV)/
041/Assignment/2023-24

QI.
(a) Differentiate between single mode and multi-mode
optical fiber.
In the context of optical fiber, the terms "single-mode" and 'Inulti-mode" refer to the
way light propagates through the fiber core: The core is the central part of the optical
fiber where light travels, surrounded by the cladding that helps contain the light
within the core-The key difference between single-mode and multi-mode optical
fibers liey in the size of their respective cores and the wa the handle light i nals

1. Single-mode optical fiber:


Core size: The core of a single-mode fiber is much smaller, typically
around 9 microns in diameter.
Light propagation: In a single-mode fiber, only one mode (or path) of
light can propagate at a time. This means that light rays travel along a
single straight path without experiencing significant dispersion. This
property is achieved by using a small core size, which limits the number
of modes that can be supported.

Performance: Single-mode fibers have very low signal attenuation (loss


of signal strength) and can transmit data over long distances with
minimal signal degradation. They are primarily used for highbandwidth,
long-distance applications, such as telecommunications, long-haul data
transmission, and networking.

2. Multi-mode optical fiber:


Core size: The core of a multi-mode fiber is larger, typically ranging
from 50 to 62.5 microns in diameter.
Light propagation: Multi-mode fibers support multiple modes of light
propagation. When light enters a multi-mode fiber, it follows different
paths, resulting in mode dispersion. This means that different light rays
reach the receiver at different times, causing modal dispersion and
limiting the data-carrying capacity and maximum achievable distance.

Performance: Multi-mode fibers are more suitable for shorter-distance


and lower-bandwidth applications. They are commonly used in local
area networks (LANs), data centers, and short-distance communications
within buildings.
In summary, single-mode fibers have a small core size, support a single mode of light
propagation, and are best suited for long-distance, high-bandwidth applications.
Multimode fibers have a larger core size, support multiple modes of light propagation,
and are more suitable for shorter-distance, lower-bandwidth applications. The choice
between single-mode and multi-mode fibers depends on the specific requirements of
the optical communication system.
(b) Briefly discuss thE Functions of various layers involved in TCP/IP model,
also mention the pro ocols defined under each layer.
The TCP/IP model, also known as the Internet Protocol Suiteas a conceptual
framework used for understanding and implementing network communication
protocols. It consists of four layers, each responsible for specific functions in the data
transmission process. Below are the functions and some ofthe protocols definedunder
each layer:

Application Layer:
Function: The application layer is the topmost layer and is responsible for
providing network services directly to user applications. It enables communication
between different software applications and manages user interfaces.
Protocols: HTTP (Hypertext Transfer Protocol), FTP (File Transfer
Protocol),
SMTP (Simple Mail Transfer Protocol), DNS (Domain Name System), DHCP
(Dynamic Host Configuration Protocol), POP3 (Post Office Protocol version
3), IMAP (Internet Message Access Protocol), etc.

2. Transport Layer:
Function: The transport layer ensures reliable data delivery between end
systems, handling end-to-end communication and flow control. It breaks data
into segments, reassembles them at the receiving end, and ensures data
integrity and error recovery.
Protocols: TCP (Transmission Control Protocol) - provides reliable,
connection-oriented communication, and UDP (User Datagram Protocol)
provides unreliable, connectionless communication.

3. Internet Layer (Network Layer):


Function: The internet layer handles the routing of data packets across
networks, enabling communication between different networks. It deals with
IP addressing, packet forwarding, and routing protocols.
Protocols: IP (Internet Protocol) - responsible for addressing and routing,
ICMP (Internet Control Message Protocol) - used for error reporting and
diagnostics, and IGMP (Internet Group Management Protocol) - used for
managing multicast group memberships.

4. Link Layer (Network Interface Layer):


Function: The link layer is responsible for the physical transmission of data
over the local network medium, such as Ethernet or Wi-Fi. It deals with
hardware addressing, frame creation, d error detection.
Protoc : Ethernet, Wi-Fi (IEEE 802.11) PPP (Point-to-Point Protocol), ARP
+ddress hpsolution Protpco!),etc

It's worth noting that the TCP/IP model is often compar to the OSI model (Open
Systems Interconnection), which has seven layers. While the OSI model is a
theoretical model, the TCP/IP model iS the practical and widely used framewor o
internet communication. The functions and protoeéls listeg
abOY919refundamental the TCP/IP model and form the basis of internet
communication.
Q2. (a) What is count-to-infinity problem in distance vector routing protocol?
How does it happen? Explain with an example.

In distance vector routing protocols, such as the Routing Information Protocol (RIP)
and Interior Gateway Routing Protocol (IGRP), routers exchange routing
information with their neighboring routers to learn about the best paths to reach
different destinations in a network. Each router maintains a routing table that
contains the distance (cost) and the next-hop router to reach each destination.
The "count-to-infinity" problem, also known as the "counting to infinity" problem, is a
fundamental issue that can occur in distance vector routing protocols. It arises when a
router's routing table contains incorrect or outdated information, leading to a situation
where routers endlessly increase the distance to a destination, creating a loop and
causing network instability. This can result in data packets being continuously
forwarded in circles between routers and never reaching their intended destinations.
To better understand the count-to-infinity problem, let's consider a simple example
using a small network topology:

Suppose the routers A, B, and C use a distance vector routing protocol to exchange
routing information. Initially, their routing tables look like this:

Now, let's imagine that the link between routers B and C fails. Router B will no longer
receive updates from router C and will remove the route to C from its routing table.
Router B's updated table after link failure:
Now comes the problem: Router A and router C are not aware of the link failure
between B and C, and their routing tables still contain entries for each other.

Router A's unchanged table:

Router A's unchanged table:

Since router B's link to C is down, router A and router C will consider the path to each
other through router B to be the shortest path. As a result, they will both update their
routing tables to reflect this new information:

Router A's updated table after considering the path via B:


Router C's updated table after considering the path via B:

This process will continue indefinitely with router? A and C continuously increasing
the distance to each other through router B. This situation creates a count-to-infinity
loop, and the routers' routing tables will never converge to a stable state.

The count-to-infinity problem can lead to network congestion, increase latency, and
potential data loss due to routing loops: To mitigate this issue, modern distance vector
routing protocols implement various techniques, suc as split horizon, poison reverse,
and hold-down timers, toprevent count-to-infinity loops and improve convergence
speed. Additionally, link-state routing protocols like OSPF (Open Shortest Path First)
have been developed to overcome the count-to-infinity problem altogether by using
more sophisticated algorithms.
(b) Define angle modulation. What are its types? Discuss the limitations of
angle modulation.
Angle modulation is a method of encoding information onto a carrier wave by varying
the phase or frequency of the carrier signal in proportion to the modulating signal.
The primary advantage of angle modulation over amplitude modulation (AM) is that
it is less susceptible to noise interference, making it suitable for high-fidelity
communication systems.
There are two main types of angle modulation:
1. Frequency Modulation (FM): In frequency modulation, the frequency of the
carrier wave is varied in accordance with the instantaneous amplitude of the
modulating signal. As the amplitude of the modulating signal increases, the
frequency of the carrier signal deviates from its center frequency. The
relationship between the modulating signal and the carrier frequency is
governed by the modulation index, which determines the extent of frequency
deviation.
2. Phase Modulation (PM): In phase modulation, the phase of the carrier wave is
varied in response to the instantaneous amplitude of the modulating signal.
The phase change is directly proportional to the amplitude of the modulating
signal at any given time. Phase modulation is closely related to frequency
modulation, and in fact, the two are often used interchangeably in certain
communication systems.
Limitations of Angle Modulation:
1. Bandwidth Requirements: Angle modulation, especially frequency modulation,
requires a significantly larger bandwidth compared to amplitude modulation
for the same information transmission. The wider bandwidth can lead to
channel congestion and limit the number of available communication channels.

2. Complexity and Cost: Angle modulation techniques are more complex to


implement and require sophisticated modulation and demodulation
circuits. This complexity can result in higher costs for the design and
implementation of angle-modulated systems.
3. Non-linear Distortions: Angle modulation systems are more susceptible o
nonlinear distortions, especially m the case f FM, to the581 introduction
of harmonics and intermodulation products. These distortions can degrade the
quality of the transmitted signal.
4. Noise Susceptibility: Although angle modulation is less susceptible to noise
than amplitude modulation, it is still affected by noise and interference to some
extent. In high-noise environments, the performance of angle-modulated
systems may be compromised.
5. Phase Noise: In phase modulation, phase noise can introduce errors and affect
the demodulation process, particularly in high-frequency communication
systems.
6. Frequency Drift: Frequency modulation can be affected by frequency drift,
which can be problematic in certain applications where precise frequency
control is essential.
Despite these limitations, angle modulation remains widely used in various
communication systems, especially in radio and broadcasting applications where
higher fidelity and noise resistance are critical factors. Advances in technology
have mitigated some of the limitations, making angle modulation a versatile and
reliable method for transmitting information.
Q3.
(a) Calculate the CRC for bit sequence 1101011011 and generator polynomial is
10011.
Note: Show all steps and calculation.
To calculate the CRC (Cyclic Redundancy Check) for a given bit sequence using a
specified generator polynomial, follow these steps:
Step 1: Append zeros to the input bit sequence
Pad the input bit sequence with zeros, where the number of zeros is equal to the
degree of the generator polynomial. In this case, the generator polynomial is 10011,
Input
which is of degree 4. So, we will append four zeros to the end of the
Padded

Step

Generator polynomiaW10011

i
nput sequence.
The first five bits of the padded input sequence are 11010. We will perform modulo-2
division as follows:

10011 | 1101011010000
- 10011 (Subtracting multiples of the generator polynomial)

101001000
- 10011

11101000
- 10011

10111
-
10011
1000

Step 3: The result of the division is the remainder.


The remainder after performing the division is 1000.

Step 4: Append the remainder to the original .input sequence

So, the CRC for the given bit sequence (1101011011) with the generator polynomial
(10011) is 11010110111000.
(b) What is Ad hoc Wireless Communication System? Explain.
Ad hoc Wireless Communication System, often referred to simply as Ad hoc
networks, is a type of decentralized wireless communication network. In these
networks, devices communicate directly with each other without relying on a fixed
infrastructure, such as a centralized access point or base station. Ad hoc networks are
designed to establish temporary communication links between devices in close
proximity, forming a dynamic and self-configuring network on the fly.
Key characteristics of Ad hoc Wireless Communication Systems:
1. Decentralization: Ad hoc networks do not have a central controlling entity.
Each device in the network acts as both a node and a router, enabling data
packets to be forwarded through other devices to reach their destination.
2. Dynamic topology: The network topology changes frequently as devices join
or leave the network or as they move within the communication range of other
devices. This adaptability allows ad hoc networks to be flexible and resilient in
dynamic and mobile environments.
3. Self-configuring: Ad hoc networks automatically form connections and
configure themselves without requiring any pre-existing network
infrastructure. Devices use protocols such as the Ad hoc On-Demand Distance
Vector (AODV) or Dynamic Source Routing (DSR) to establish routes and
discover neighboring nodes.
4. Limited range: The range of communication between devices in an ad hoc
network is typically limited to a few hundred meters, depending on the
technology used and environmental factors. Thus, the network's coverage is
localized and may span only a small geographical area.
5. Wireless communication: Ad hoc networks rely on wireless communication
technologies, such as Wi-Fi (IEEE 802.11) or Bluetooth, for data transmission
between device .

Applications of Ad hoc Wireless Communication Systems:


Emergency and disaster scenarios: Ad hoe networks can be quickly deployed in
disaster-stricken areas where the existing communication infrastructure is
damaged or unavailable. First responders and relief agencies can use these
network to coordinate efforts and share critical information.
2. Military operations: Ad hoc networks ar alua em milita environments where
communication infrastructure might be limited or compromised. They enable
soldiers and military equipment to communicate seamlessly during missions.
3. Internet of Things (IOT): Ad hoc networks are suitable for 10T applications,
where a large number of devices need to communicate with each other in a
flexible and decentralized manner.
4. Collaborative environments: Ad hoc networks are used in scenarios where
devices (such as smartphones or laptops) need to collaborate and share
resources like files, data, or internet access without relying on a centralized
access point.
However, Ad hoc Wireless Communication Systems also face challenges, such as
security concerns due to their decentralized nature and dynamic topology.
Nonetheless, they offer a versatile and efficient solution for various communication
needs in diverse settings.
Q4.
(a) What is ICMP? Discuss the ICMP message categories. Also, give at least
two examples of each ICMP message category.
ICMP stands for Internet Control Message Protocol. It is an integral part of the
Internet Protocol suite and is used to send error messages and operational
information related to IP packet processing. ICMP plays a crucial role in facilitating
communication and troubleshooting network issues by providing feedback about
network conditions, connectivity, and errors.
ICMP Message Categories:
1. Error Messages: These messages are sent by routers or hosts to indicate errors
in the processing of IP packets. They notify the source of the problem and
may include details about the error.

Examples:
Destination Unreachable: Senvyhen a router cannot forward a packet to
its destination due to reasons such as network unreachable, host
reachable, or protocol unreachab
Tinie Exceeded: sent unentårOUtef/disCåfds a packetbeCauS&it
ekCe the time to live TTL) value, which prevents packets from c•
culating definitely.
Query Messages: These messages are used to equest from routers or hosts.
The recipient is expecte to respond with the requested information. Examples:
Echo Request and Echo Reply: Commonly known as "ping," the
Echo Request is sent to check if a host is reachable, and the Echo
Reply is sent back by the host to indicate its reachability.
Address Mask Request and Address Mask Reply: Used to determine the
subnet mask of a network.
ICMP is vital for diagnosing network issues, detecting network failures, and
ensuring efficient communication across the internet. However, it's worth noting that
some ICMP messages, such as Echo Requests (pings), may be restricted or blocked
by firewalls or network administrators for security reasons.
(b) What is NIC? Write the techniques used by NIC for data transfer.
NIC stands for Network Interface Card. It is a hardware component that enables a
computer or other device to connect to a network and communicate with other devices
over that network. The NIC is responsible for handling the physical connection to the
network, as well as the necessary protocols and processes for data transfer.
Techniques used by NIC for data transfer:
1. Ethernet: Most NICs use Ethernet as the underlying technology for data
transfer. Ethernet is a set of standards defining how data packets are formatted
and transmitted over a wired local area network (LAN).
2. MAC Address: Each NIC is assigned a unique Media Access Control (MAC)
address, which serves as a hardware identifier for the device on the network.
MAC addresses are essential for identifying the source and destination of data
packets.
3. Packet Assembly and Disassembly: The NIC assembles outgoing data into
packets, which are small units of data, before transmitting them over the
network. On the receiving end, it disassembles incoming packets to extract the
original data.
4. Data Framin . ICs add frame hea ers and trailers to data packets, which
include information like source and destination MAC addresses, error
checking codes, and frame size. These frames help in the proper routing and
error detection during data transmission.
5. Carrier Sense Multiple Access/Collision Detection (CSMA/CD): For Ethernet
networks, NICs use CSMA/CD as a method to detect and handle collisions
that occur when two devices try t? transmit data imultaneously.un modern
Ethernet networks, the CSMA/CD technique as been largely replaced by full-
duplex communication and switches.

6. Data Link Layer Protocols: NICs implement data link layer protocols like
Address Resolution Protocol (ARP) to map IP addresses to MAC addresses,
and Internet Control Message Protocol (ICMP) for network diagnostics and
error reporting.
7. Buffering: NICs often have built-in memory buffers that temporarily store
incoming and outgoing data packets. This buffering helps in managing data
flow and ensures smooth communication between the device and the network.
8. Duplex Modes: NICs support different duplex modes, including half-duplex
and full-duplex. Half-duplex allows communication in both directions but not
simultaneously, while full-duplex enables simultaneous two-way
communication.
9. Flow Control: NICs use flow control mechanisms like Pause frames or IEEE
802.3x flow control to manage data transmission rates and avoid data loss due
to data overflow.
10. Link Speed Negotiation: NICs negotiate the link speed with the connected
network device, such as a switch or a router, to determine the highest speed
supported by both devices for optimal data transfer rates.
11. Wake-on-LAN Some NICs support the Wake-on-LAN feature, allowing a
computer to be woken up from a low-power state remotely over the network
by sending a special "magic packet. '
Overall, the NIC plays a crucial role in enabling communication between devices
within a network, and its performance and capabilities impact the efficiency and
reliability of data transfer over the network.
Q5.
(a) Write the steps for Message Digest 5 (MD5) algorithm.
The Message Digest 5 (MD5) algorithm is a widely used cryptographic hash function
that takes an input message and produces a fixed-size 128-bit hash value, typically
represented as a 32-character hexadecimal number. Below are the steps for the MD5
algorithm:
1. Padding the Message:
Theinput message IS padded to make its length congruent to 448
modulo 512. This ensures that the message can be divided into 512-bit
blocks, as MD5 processes the data in blocké
ppending the Length:
AYCALL US:- 8006184581
dded message. This step is necessary to maintain the integrity of the
original message length.

3. Initializing Variables:
MD5 uses four 32-bit variables (A, B, C, and D) to process the data.
These variables are initialized to predefined values, typically
represented as 32-bit hexadecimal numbers.
4. Dividing the Message into Blocks:
The padded message is divided into 512-bit blocks. If the message
length is not a multiple of 512 bits, additional blocks are created. Each
block is further divided into sixteen 32-bit words (W[O], W[l], .
W[15]).

5. Main Compression Loop:


MD5 performs a series of rounds (typically 64 rounds) for each block.
In each round, the values of A, B, C, and D are updated based on the
current block's data.

6. Round Functions:
Each round consists of four different logical functions: F, G, H, and I.
These functions apply bitwise logical operations (AND, OR, XOR,
NOT) and simple arithmetic operations to the values of A, B, C, and D,
as well as the current block's data.
7. Updating Variables:
After each round, the values of A, B, C, and D are updated based on
the results of the round functions.
8. Final Hash Value:

Once all blocks have been processed, the final hash value is obtained
by concatenating the values of A, B, C, and D, resulting in a 128-bit
hash.
9. Hexadecimal Representation:
The 128-bit hash value is typically represented in hexadecimal
format„ resulting in a 32-character string (usually 0-9 and A-F). I l

Ill¯
It is important to note that MD5 has been considered cryptographically broken and
unsuitable for further use due to vulnerabilities and collision attackk discovered ove
the yeark. As a result, it is no longer recommendéd'fo secure applications 'AloreJ81
modern and secure hash functions, such as SHA-256 or SHA-3, are preferred for
cryptographic purpose .
(b) Compare Hub and Switch. Give the advantages and disadvantages of
both Hub and Switch. Briefly discuss the functions of layer-2 switch and
layer-3 switch.
Comparison of Hub and Switch:
Hub:
1. A hub is a simple networking device that operates at the Physical Layer (Layer
1) of the OSI model.
2. It broadcasts data to all connected devices on the network, regardless of the
destination.

3. All devices connected to a hub share the available bandwidth, leading to


potential collisions and increased network congestion.

4. It is not intelligent and lacks the ability to manage traffic efficiently.


5. Hubs are now considered outdated and rarely used in modern networks.
Switch:
1. A switch is a more advanced networking device that operates at the Data Link
Layer (Layer 2) or Network Layer (Layer 3) of the OSI model.
2. Unlike hubs, switches use MAC addresses to determine the destination of the
data and forward packets only to the intended device, reducing unnecessary
traffic.
3. Switches provide dedicated bandwidth for each connected device, improving
network performance and reducing collisions.
4. They are capable of managing traffic, which leads to better efficiency and
increased security.
5. Switches are widely used in modern networks due to their superior

Advantages

Disadvantages

Lacks intelligence and cannot prioritize or manage traffic effectivel


Broadcasts data to all devices, which can lead to privacy and security concerns.

Advantages of Switch:
Efficient data forwarding to specific devices using MAC addresses.
Dedicated bandwidth for each connected device, reducing collisions and
congestion.
Provides increased network security as data is sent only to the intended
recipient.
Offers better performance and scalability for larger networks.
Disadvantages of Switch:
More expensive than hubs.
Layer-2 switches may have limitations in handling complex network
configurations.
Layer-3 switches can be costlier and may require additional configuration for
advanced routing.
Functions of Layer-2 Switch:
Operates at the Data Link Layer (Layer 2) of the OSI model.
Uses MAC addresses to forward data frames to the appropriate destination
device within the same local network.
Improves network performance by reducing collisions and efficiently
managing traffic.
Provides basic network segmentation, isolating traffic between different
network segments (VLANs).
Suitable for local area networks (LANs).
Functions of Layer-3 Switch:
Operates at the etwork Layer (Layer 3) of the OSI model.
Perform uting functions in addition to the features of a layer-2 switch.
Uses IP addresses to make forwarding@ec• •o nabJinysommunicatio between
different networks or subnet
Can perform complex routing protocols like OSPF (Open Shortest Path Firs
and BGP (Border Gåteway Protocol).
Suitable for larger networks with multiplesubnetsor or connecting multiple LANs
together.
Q6,
(a) Explain POP and IMAP. How does POP work? What are the advantages
of IMAP over POP?
POP and IMAP are two different protocols used to retrieve email messages from a
mail server to a client email application (such as Microsoft Outlook, Apple Mail, or
Thunderbird).
1. POP (Post Office Protocol): POP is an email protocol designed to download
email messages from the mail server to the client device. When an email client
using POP connects to the server, it downloads all the messages from the
server to the local device. By default, POP removes the messages from the
server after downloading them, which means the messages are stored locally
on the client and no longer accessible on the server. However, some POP
clients can be configured to leave a copy of the messages on the server for a
specified duration.
How POP works:
The email client connects to the mail server using the POP protocol.
The server validates the client's credentials (username and password).
The client requests to download new messages.
The server responds by sending the entire content of the messages to the
client.
After the messages are downloaded, the server typically deletes them,
depending on the client's configuration.
2. IMAP (Internet Message Access Protocol): IMAP is another email protocol
that allows the client to access and manage emails directly on the mail server
without downloading them to the local device. When an email client using
IMAP connects to the server, it synchronizes with the server and displays the
email messages, but the messages remain stored on the server. This means that
multiple access the same email account and see the same
messages because the messages are stored centrally on the server.

How

server

Actions such as deleting, moving, or marking emails as read are


performed on the server directly.

Advantages of IMAP over POP:


1. Centralized email storage: IMAP stores all email messages on the server,
allowing users to access their emails from multiple devices. This ensures
consistency across devices, and changes made on one device (e.g., marking
an email as read) are reflected on all devices.
2. Email management: IMAP supports server-side email management, which
means actions like deleting, moving, and organizing emails are done directly
on the server. This enables users to maintain a consistent email organization
regardless of the device they use.
3. Offline access: IMAP clients can cache a copy of email headers and body
previews, enabling users to access these cached emails even when they are
offline. Full email content is fetched from the server on-demand.
4. Backup and data loss prevention: Since emails remain on the server with
IMAP, there is a reduced risk of data loss in case of a device failure or loss,
as all emails are stored centrally on the server.
In summary, while POP downloads emails to the client device and removes them from
the server, IMAP keeps emails on the server and synchronizes changes across
multiple devices, providing more flexibility and convenience for users who access
their emails from different devices.
(b) Assume two prime numbers p and q are 3 and 5 respectively. Calculate
private key and public key using RSA algorithm.
To calculate the private and public keys using the RSA algorithm, we need to follow
these steps:
1. Choose two distinct prime numbers, p and q.
2. Calculate n = p * q, where n is the modulus for both the public and private
keys.
Calcu ate the OfnJVSVhéi€cp'* - I),
. Choose an integer e such that 1 < e < (P and ill be the public exponent.
Calculate the odu r multiplicati€e iii€erge oféånOdulO , deiiOted ås d. d will
be the private exponent. US:- 8006184581

Let's calculate the private and public keys step by step:

Given:

p=3,q=5

Step 1: Calculate n

n=p * q=3 * 5= 15

Step 2: Calculate (P(n)

Step 3: Choose the public exponent, e


We can choose e to be any integer such that 1 < e < (P(n) and gcd(e, (P(n)) = 1. Let's
choose e = 3.

Step 4: Calculate the private exponent, d


To calculate d, we need to find the modular multiplicative inverse of e modulo (P(n).
d eA(-l) (mod (P(n))
Using the extended Euclidean algorithm:

3 +2

Step 5: Public Key and Private Key


The public key is (n, e): (15, 3)
The private key is (n, d): (15, 3)

So, the public key is (15, 3) and the private key is also (15, 3).

(a) Compare between CSMA/CD and token passing methods in Ethernet. Also
explain how collisions are handled by CSMA/CD.
CSMA/CD (Carrier Sense Multiple Access with Collision Detection) and token
passing are two different methods of medium access control used in Ethernet
networks.
1. CSMA/CD (Carrier Sense Multiple Access with Collision Detection):
CSMA/CD is a contention-based access control method used in early Ethernet
networks. In CSMA/CD, devices share the same network medium and contend
for transmission opportunities. The steps involved in CSMA/CD are as follows:
a. Carrier Sense: Before attempting to transmit data, a device listens to the network
to check if the channel is idle (i.e., no other device is transmitting). If the channel
is busy, it waits for the channel to become idle before attempting to transmit.
b. Multiple Access: Once the channel is idle, the device starts transmitting its data.
c. Collision Detection: While transmitting, the device continues to monitor the
channel to detect collisions. Collisions occur when two or more devices transmit
data simultaneously, causing the data to corrupt and collide in the network
medium.

d. Handling Collisions: If a collision is detected, the transmitting device stops


transmitting immediately and sends a jam signal inform all other devices on the
network that a collision has occurred, After sending the jam signal, the device
wait for a random amount of time (known as the backoff period) before
attempting to retransmit the data. The random backoff period is used to reduce the
chances of another collision.
CSMÄ/CD is suitable for shared EthemetÅiélWorkÅ, såcfras„thos€pased On
coaxi@1 cables. However, with the widespread adoption of modern Ethernet
technology (e.g., twisted-pair copper and fiber optics), CSMA/CD is rarely used
today as it has limitations in terms of speed, scalability, and efficiency.
2. Token Passing:
Token passing is a deterministic access control method used in some token ring
networks. In token passing, a special frame called the "token" circulates around the
network in a unidirectional manner. The token serves as a permission mechanism, and
only the device possessing the token is allowed to transmit data. The steps involved in
token passing are as follows:

a. Token Circulation: A token circulates on the network, passing from one device
to another in a predefined order (e.g., a ring topology). Only the device that possesses
the token can transmit data.
b. Data Transmission: When a device receives the token and has data to transmit,
it seizes the token, attaches its data to the token frame, and then releases the token
back onto the network.
c. Token Release: Once the data transmission is complete, the device releases the
token back onto the network, allowing other devices to access the token and transmit
their data.
Token passing ensures fair access to the network and prevents collisions. However, it
may introduce higher latency and complexity, especially in larger networks.
In summary, CSMA/CD is a contention-based method where devices listen and
attempt to transmit on the network medium, while token passing is a deterministic
method where devices must wait for a token to access the network. CSMA/CD
handles collisions by detecting them and employing a random backoff period before
retransmitting, while token passing avoids collisions altogether by using a token to
control network access.
(b) What is round robin technique for transmission? How does polling differ
from token passing?
Round-robin technique for transmission:
Round-robin is a method used in computer networking to schedule and control data
transmission between multiple devices or nodes on a shared network medium. In this
technique, each device or node takes turns to transmit data in a cyclic manner,
ensuring that all devices get a fair opportunityto send their data packets. It ISO •
commonly used in shared network environments where multiple devices contend for

cess to the transmission medium.


Here's how the round-robin technique works.

US:- 8006184581
1. All devices are placed in a queue, and each device is assigned a time slot.
2. - When it's a evice's turn, it gains access to the transmission medium and can
transmit its data during its allocated time slot.
3. After the time slot expires, the next device in the queue gets its turn, and the
process repeats.
Round-robin helps prevent certain devices from monopolizing the network and
ensures equitable access for all devices, even in high-traffic scenarios. However,
it may not be the most efficient method for networks with varying data
transmission requirements or where some devices have higher priority than
others.
How polling differs from token passing:
Polling and token passing are both methods used in network communication to
control access to the transmission medium in shared network environments, but they
differ in their approach.

1. Polling:
• In polling, a central controlling device (usually referred to as the master
or controller) actively queries each device connected to the network to
check if it has data to transmit.

• The master sends out polling messages to each device in a


predetermined sequence.

• Each device, when polled, can either send its data if it has any or simply
respond with a "no data" message.
• The master then moves on to the next device and continues the polling
process.

• This continues in a cyclic manner, ensuring that each device gets a


chance to transmit data when its turn comes.

2. Token Passing:
Token passing involves the use of a special control packet called a "token"
tha circulates among the devices on the network in a predefined orde .
nly the device that possesses the token is allowed to transmit data.
When a device has data to send, it waits until it receives the token.

Ill-'
Upon receiving the token, the device attaches its data to it and then
eleases the token back onto the network, allowinÅ it to circulate to the

next device in line. US:- 8006184581


The process continues, and each device gets a chance to transmit when
it possesses the token.
The key difference between polling and token passing lies in the control mechanism.
Polling involves a central controlling device that actively queries devices, while token
passing uses a token that circulates to grant permission for data transmission. Both
methods have their advantages and disadvantages, and the choice between them
depends on the specific requirements and characteristics of the network.

(a) What is distance vector routing? Briefly discuss the problem of distance
vector routing.
Distance Vector Routing is a type of routing algorithm used in computer networks to
determine the best path for data packets to travel from the source to the destination. It
works by exchanging routing information among neighboring routers, allowing each
router to build and maintain a table that contains the distance (metric) to reach all
known destinations in the network.
Here's how Distance Vector Routing works:
1. Initialization: Each router creates its routing table with entries for all directly
connected neighbors and sets the distance to them as the cost of the link.
2. Exchange of Information: Routers periodically send their entire routing table to
their neighboring routers. This information includes the distance to known
destinations and the next hop (neighbor) to reach each destination.
3. Update and Convergence: Upon receiving a routing table from a neighboring
router, a router compares the information with its own table. If it discovers a
shorter path to a destination, it updates its table and propagates the changes to
its neighbors. This process continues until all routers have consistent and
updated routing tables. The network has converged when no more changes
occur.
The problem with distance vector routing is the "count-to-infinity" problem. It arises
in scenarios where there is a link failure or a change in the network topology. When a
router detects a link failur , it updates its routing table and informs its neighbors.
However, neighboring routers may not immediately detect the link failure, and they
still believe the failed route is available but with a higher cost. These neighboring
routers will forward packets through the failed link causing loops and increased
distances. Il
To solve the count-to-infinity problem, various techniques have been developed, such
as split horizon (not advertising routes back to the neighbor from which they were
learned) and poison reverse (advertising faded roufes ith an infimt metric 5) 81
Additionally, modern routing protocols like OSPF (Open Shortest Path First) and ISIS
(Intermediate System to Intermediate System) have replaced distance vector routing in
many scenarios due to their faster convergence and loop prevention mechanisms.

(b) What do you understand by the term Quality of Services (QoS). Discuss
the techniques to improve QoS.
Quality of Service (QoS) refers to the overall performance and reliability of a network
or service. It is a set of techniques and mechanisms that ensure the network can meet
specific requirements regarding the delivery of data, such as bandwidth, latency, jitter,
and packet loss. QoS is crucial for providing a predictable and satisfactory user
experience, especially in real-time applications like voice and video communications
or online gaming.
The primary goals of QoS are to:
1. Ensure Resource Availability: Allocate and manage network resources
efficiently to avoid congestion and guarantee that critical applications receive
the necessary bandwidth.
2. Minimize Latency: Reduce the time it takes for data packets to travel from
source to destination, ensuring responsiveness and real-time performance.
3. Control Packet Loss: Prevent the loss of data packets, which can lead to
retransmissions and degraded performance.
4. Manage Jitter: Jitter is the variation in packet delay. QoS mechanisms aim to
keep jitter within acceptable limits to maintain consistent data delivery.
5. Prioritize Traffic: Give priority to certain types of traffic or applications over
others based on their importance and requirements.
Now, let's discuss some techniques to improve Quality of Service (QoS):
1. Traffic Shaping/Policing: Traffic shaping and policing control the rate of data
flow to match the available network bandwidth. Traffic shaping smooths the
data flow to avoid sudden bursts that can cause congestion. Traffic policing, on
the other hand, drops or marks packets that exceed defined bandwidth limits.
2. Quality of Service lassifiers: Packets can be classified based on their
characteristics, such as source/destinatlon IP, port number, protocol, or DSCP
(Differentiated Services Code Point) markings. Once classified, QoS policies
can be applied to prioritize or treat packets differently

3. Buffer Management: Well-managed buffers can help control congestion and


reduce packet loss. By implementing techniques like Random Early Detection
(RED) or Weighted RED (WRED), the network can intelligentl drop or mark
packets before the buffer becomes overwhelmedUS:- 8006184581
4. Priority Queuing: In priority queuing, packets are placed into different queues
based on their priority levels. High-priority traffic gets served first, ensuring
critical data is delivered promptly.
5. Class-Based Queuing (CBQ): CBQ allows different traffic classes to be
assigned specific amounts of bandwidth. It ensures that each class receives its
guaranteed bandwidth, and unused bandwidth is allocated to other classes.
6. Resource Reservation Protocol (RSVP): RSVP is a signaling protocol that
enables hosts to request specific Quality of Service from the network. It sets up
reserved paths for data flows to ensure guaranteed resources along the route.
7. DiffServ (Differentiated Services): DiffServ is a QoS model that categorizes
traffic into different classes and applies per-hop behaviors based on these
classes. It enables scalable and efficient QoS implementation.
8. Traffic Engineering: Traffic engineering involves the optimization of network
paths and resource allocation to improve QoS. It can help route traffic through
less congested paths and avoid network bottlenecks.
9. Multiprotocol Label Switching (MPLS): MPLS is a technique that allows the
creation of label-switched paths through the network. It enables traffic
engineering and QoS implementation by providing traffic with specific
treatment based on MPLS labels.
10. Congestion Avoidance: Congestion avoidance mechanisms, such as Explicit
Congestion Notification (ECN), help routers and hosts detect and signal
congestion early, allowing for appropriate actions to mitigate congestion.
By employing these techniques and QoS mechanisms, network administrators
can optimize the use of available resources, improve performance, and ensure a
better overall user experience for critical applications.

You might also like