June

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 17

1.(a) Differentiate between private key and public key cryptography.

Give
suitable example of each.
ANS:- Private Key Cryptography (Symmetric Cryptography) - In private key
cryptography, the same
key is used for both encryption and decryption of data. This means that
both the sender and the
receiver must share the same key and keep it secret from everyone else.
Characteristics:
Key Management: Both parties must securely share and manage a single
key.
Security: The security depends on the key remaining secret. If the key is
exposed, the encrypted
data can be easily decrypted.
Example Scenario:
1. Rahul and Raj agree on a secret key.
2. Rahul uses the secret key to encrypt a message and sends the ciphertext
to Raj.
3. Raj uses the same secret key to decrypt the ciphertext and read the
original message.
Public Key Cryptography (Asymmetric Cryptography) - In public key
cryptography, two different but
mathematically related keys are used: a public key and a private key. The
public key is used for
encryption(transforms the message into an unreadable format), while the
private key is used for
decryption or signing .
Characteristics:
Key Distribution: The public key can be openly shared with anyone, while
the private key must be
kept secret.
Security: The system is secure as long as the private key remains secret.
Example Scenario:
1. Anjali generates a pair of keys: a public key and a private key.
2. Anjali shares her public key with Taarak.
3. Taarak uses Anjali's public key to encrypt a message and sends the
ciphertext to Anjali.4. Anjali uses her private key to decrypt the ciphertext
and read the original message.
(b) Briefly discuss the concept of frequency shift
keying and phase shift keying. Give an application
of each. (6)
ANS:- Frequency Shift Keying (FSK) - Frequency Shift
Keying (FSK) is a method of transmitting digital
data by changing the frequency of a carrier signal. For
instance, a higher frequency might represent a
"1" and a lower frequency a "0".
Application: FSK is commonly used in low-bandwidth
applications due to its simplicity and robustness
against noise. Examples include:
Garage door openers: The remote control transmits a
specific FSK signal to unlock the door.
Phase Shift Keying (PSK) - Phase Shift Keying (PSK)
is a method of transmitting digital data by
changing the phase of a carrier signal. Common
variations include Binary PSK (BPSK) using two
phases
(0, 1) and Quadrature PSK (QPSK) using four phases
(00, 01, 10, 11) for data transmission.
Application: PSK offers better data efficiency
compared to FSK as it can encode more information
per
symbol (using multiple phases). Examples include:
Wi-Fi: Modern Wi-Fi networks use PSK to send data
wirelessly. This method helps to send data
faster and more reliably.
(c) What is count to infinity problem in distance
vector routing protocol ? How does it happen ?
Explain with an example. (10)
ANS:- The count-to-infinity problem happens in
distance vector routing when routers keep increasing
the distance to a particular destination that has
become unreachable. This can cause delays and
inefficient routing.
How It Happens -
In distance vector protocols, routers share their
routing tables with neighboring routers periodically.
These tables contain information about reachable
destinations and the number of "hops" (metric) to
get there.
When a router receives an updated routing table
from a neighbor, it updates its own table based on
the new information. The count-to-infinity problem
occurs when a network becomes unreachable
(e.g., due to a link failure) and the routers do not
recognize this immediately. Instead, they increment
the distance metric for the unreachable network
gradually until it reaches an arbitrary "infinity" value.
(d) Briefly discuss the functions of Layer-2 switch and Layer-3 switch.
Compare Switch with Hub. (6)
ANS:- Layer-2 Switch -
Function: Operates on Layer 2 (Data Link Layer) of the OSI model.
Functionality: Learns and forwards packets based on Media Access
Control (MAC) addresses.
Use Case: Suitable for connecting devices within the same local area
network (LAN) segment.
Limitations: Cannot route packets between different subnets
(networks with different IP address
ranges).
Layer-3 Switch -
Function: Operates on Layer 3 (Network Layer) of the OSI model,
offering functionalities of a
Layer-2 switch along with routing capabilities.
Functionality: Learns and forwards packets based on MAC addresses,
but can also route packets
between different subnets based on IP addresses.
Use Case: Ideal for complex networks with multiple subnets, allowing
for efficient traffic
management between them.
Switch - A switch is a smart network device that sends data only to
the intended device, reducing
congestion and collisions. It learns device addresses and provides
dedicated bandwidth to each port.
Switches also support VLANs for better network segmentation and
security.
Hub - A hub is a basic device that broadcasts data to all connected
devices, causing potential
congestion and collisions. It does not learn addresses and shares
bandwidth among all ports. Hubs are
simple and suitable for small, basic networks.
Switches are more efficient and advanced, making them better for
modern networks, while hubs are
simpler and less efficient.
(e) How does pure ALOHA differ from slotted ALOHA ? Explain.
(6)
ANS:-
Pure ALOHA:
Transmission: Nodes send data whenever they have data to
send, without waiting for a specific
time.
Collisions: High chance of collisions because multiple nodes
might send data simultaneously.
Efficiency: Less efficient due to frequent collisions, with a
maximum throughput of about 18.4%.
Implementation: Simple to implement because it doesn't require
any synchronization of nodes.
Example: Imagine a network where computers send messages as
soon as they are ready, without
checking if another message is being sent at the same time.
Slotted ALOHA:
Transmission: Time is divided into equal slots, and nodes can
only start sending data at the
beginning of these slots.
Collisions: Lower chance of collisions since transmissions are
synchronized to time slots.
Efficiency: More efficient due to reduced collisions, with a
maximum throughput of about 36.8%.
Implementation: Requires nodes to be synchronized so that they
all start sending data at the
beginning of time slots.
Example: Picture a network where computers wait for the start of
a specific time slot before sending
their messages, reducing the likelihood of messages colliding.
(f) What are virtual circuits ? Discuss the effect of router failure in
virtual circuits. (6)
ANS:- Virtual circuits (VCs) are a communication method within
computer networks that provide a
connection-oriented service. They offer a reliable and ordered data
transfer experience, similar to a
dedicated physical connection, but operate on top of
packet-switching networks.
Concept:
VCs establish a logical connection between two network nodes before
data transmission begins.
This initial handshake sets up resource allocation (bandwidth,
buffers) along the chosen path.
Data is then broken into packets, each carrying a sequence number
for in-order delivery and error
checking.
VCs guarantee in-order delivery and error-free data transfer, making
them suitable for
applications requiring reliable data exchange like file transfers.
Impact of Router Failure: When a router failure occurs in a network
utilizing virtual circuits, several
effects may be observed:
Connection Disruption: If a router essential for the VC path fails, the
connection between the
sender and receiver is disrupted. Packets in transit might be lost or
delayed.
Retransmission: The network attempts to recover by rerouting the VC
through an alternative
path. However, this process takes time, leading to a period of data
transfer interruption.
Re-establishment: Depending on the specific protocol, the VC might
need to be completely re-
established, including negotiating a new path and resource allocation.
This can cause significant
Delays.
2. (a) Differentiate between ARP and RARP. Explain the working of ARP using a
diagram. (10)
ANS:- Difference Between ARP and RARP -
ARP (Address Resolution Protocol):
1. Purpose: ARP is used to find the MAC (Media Access Control) address of a
device when the IP
(Internet Protocol) address is known.
2. Usage: Commonly used in IPv4 networks.
3. Function: Maps an IP address to a MAC address.
4. Direction: IP address to MAC address.
RARP (Reverse Address Resolution Protocol):
1. Purpose: RARP is used to find the IP address of a device when the MAC
address is known.
2. Usage: Less commonly used today, replaced by DHCP (Dynamic Host
Configuration Protocol).
3. Function: Maps a MAC address to an IP address.
4. Direction: MAC address to IP address.
ARP Working Explained with a Diagram:
1. Initiation: A device (Host A) has data to send to another device (Host B) on the
same network.
Host A knows the destination's IP address (B's IP) but needs the MAC address for
actual data
transmission.
2. ARP Request Broadcast: Host A broadcasts an ARP request packet on the
LAN. This packet
contains Host A's MAC address and B's IP address.
3. Listening Devices: All devices on the network receive the ARP
request, including Host B.
4. Matching Destination IP: Only Host B recognizes its own IP
address (B's IP) within the ARP request.
5. ARP Reply: Host B sends an ARP reply packet back to Host A.
This reply packet contains Host B's MAC address and B's IP
address (confirmation).
6. ARP Cache Update: Host A receives the ARP reply and stores
the mapping between B's IP address and B's MAC address in its ARP cache for
future reference.
7. Data Transmission: With the destination's MAC address acquired, Host A can
now send its data
packets directly to Host B using B's MAC address.
(b) How does classful addressing differ from classless
addressing ? How does classless addressing
result in decrease in the table size ? (10)
ANS:-
Classful Addressing:
1. Fixed Classes: IP addresses are divided into five classes (A, B,
C, D, E) based on the leading bits.
o Class A: 0.0.0.0 to 127.255.255.255
o Class B: 128.0.0.0 to 191.255.255.255
o Class C: 192.0.0.0 to 223.255.255.255
o Class D: 224.0.0.0 to 239.255.255.255
o Class E: 240.0.0.0 to 255.255.255.255
2. Fixed Network and Host Portions: The division between the
network and host portions of the IP
address is fixed.
o Class A: First 8 bits for the network, remaining 24 bits for hosts.
o Class B: First 16 bits for the network, remaining 16 bits for
hosts.
o Class C: First 24 bits for the network, remaining 8 bits for hosts.
3. Dividing Networks: Dividing networks is less flexible because
it has to follow fixed class rules. This
makes it harder to create network segments that fit exact needs.
4. Inefficiency: Can waste IP addresses since the fixed class
sizes often don’t match the number of
devices needing addresses.
Classless Addressing (CIDR - Classless Inter-Domain Routing):
1. No Fixed Classes:
o IP addresses are not divided into fixed classes. Instead,
addresses are assigned based on
prefixes.
o Example: 192.168.1.0/24, where "/24" denotes the length of the
network prefix(portion).
2. Variable-Length Subnet Mask (VLSM):
o Allows more flexible division between network and host
portions.
o Network prefixes can vary in length, e.g., /8, /16, /24, providing
precise allocation of IP
addresses.
3. Efficient Use of Address Space: More efficient allocation of IP
addresses by allowing different-
sized networks. Reduces wastage of IP addresses.
4. Aggregation (Route Summarization): This handy process
combines several IP addresses into a
single, compact entry in the routing table. Instead of listing each
individual address separately,
aggregation bundles them up neatly, making the routing table
shorter and more efficient.

How Classless Addressing Decreases Table Size


1. Route Summarization:
o Classless addressing allows multiple IP address ranges to be
summarized into a single route
entry.
o For instance, four contiguous /24 networks (e.g., 192.168.0.0/24,
192.168.1.0/24,
192.168.2.0/24, 192.168.3.0/24) can be summarized as a single /22
network (192.168.0.0/22).
o This reduces the number of entries in the routing table.
2. Efficient Address Allocation:
o By allocating IP addresses based on actual need rather than fixed
class boundaries, classless
addressing minimizes unused addresses.
o This leads to fewer, more specific routes in the routing table.
3. (a) Explain the concept Go-Back-N sliding window protocol with a
suitable example and
diagram. (10)
ANS:- Go-Back-N Sliding Window Protocol
The Go-Back-N protocol is a method used in networking to ensure that data
packets are delivered
accurately and in order. It is a type of sliding window protocol where the
sender can send several
packets before needing an acknowledgment for the first one, but the
receiver only has to keep track
of the next expected packet.
Key Concepts:
1. Window Size: The sender can send several packets (up to the window
size) before needing an
acknowledgment.
2. Acknowledgment: The receiver acknowledges the last correctly received
packet.
3. Error Handling: If a packet has an error, the receiver ignores it and all
following packets. The
sender then has to resend the erroneous packet and all subsequent ones.
Steps in Go-Back-N Protocol:
1. Sending Packets:
o The sender can send multiple packets up to the window size without
waiting for an acknowledgment.
o Example: With a window size of 4, the sender can send packets 0, 1,
2, and 3 at once.
2. Receiving Packets:
o The receiver checks each packet for errors.
o If a packet is correct, the receiver sends an acknowledgment.
o If a packet has an error, the receiver ignores that packet and all following
ones.
3. Acknowledgment and Resending:
o The sender moves the window forward for each acknowledgment
received.
o If an acknowledgment is not received within a certain time, the sender
resends the problematic
packet and all that follow.
(b) What is Fragmentation ? Explain why IPv4 and IPv6 protocols need to
fragment some
packets. (10)
ANS:- Fragmentation is the process of breaking down a large data packet into
smaller packets to
ensure they can be transmitted over a network that has a maximum transmission
unit (MTU) smaller
than the original packet size.
Why IPv4 and IPv6 Need Fragmentation -
Each network segment has an MTU, which is the largest packet size that can be
transmitted without
fragmentation. If a packet exceeds this size, it must be fragmented.
In IPv4, when a packet is larger than the MTU, it is split into smaller fragments,
each with its own
header containing information for reassembly at the destination. This includes a
fragment offset, an
identification number, and flags indicating if more fragments follow. For example,
a 2000-byte packet
traveling through a network with a 1500-byte MTU would be split into two
fragments: one 1500-byte
and one 500-byte.
In IPv6, fragmentation is performed only by the source device, not by routers
along the path. This is
done to reduce processing load on routers and improve performance. IPv6 uses
an extension header
for fragmentation, which contains information for reassembly at the destination.
For instance, a 3000-
byte IPv6 packet traveling through a network with a 1500-byte MTU would be
fragmented at the
source into two smaller packets that fit within the MTU limits.
Why Fragmentation is Necessary -
1. Compatibility: Different networks have different size limits, so fragmentation
ensures packets can
travel through all networks without being dropped.
2. Efficiency: Fragmentation helps prevent packet loss, which would otherwise
waste bandwidth
and require retransmission.
3. Reliability: It ensures that even large packets can be delivered accurately
across various network types and sizes.
4. (a) Write the step-by-step working of link state routing. Also, compare it
with distance vector
routing. (10)
ANS:- Link State Routing: Step-by-Step
1. Discover Neighbors: Each router identifies its directly connected
neighbors and learns their
network addresses.
2. Measure Link Costs: Each router measures the cost (e.g., bandwidth,
delay) of the connection to
each of its neighbors.
3. Create Link State Packets (LSPs): Each router creates a packet
containing its identity, a list of its
neighbors, and the cost to reach each neighbor.
4. Flood LSPs: Each router sends its LSP to all other routers in the
network. This process is called
flooding, and it ensures that every router has a complete map of the
network.
5. Build Link State Database: Each router receives LSPs from all other
routers and builds a link state
database that represents the entire network. This database includes all
routers and their link cost.
6. Run Shortest Path Algorithm: Using the link state database, each router
runs Dijkstra's algorithm
to compute the shortest path to every other router in the network.
7. Update Routing Table: Each router updates its routing table based on the
shortest paths
calculated. This table dictates the best path to each destination in the
network.
(b) Discuss the concept of sliding window protocol with the help of an
example. Also, explain how
piggybacking technique works. (10)
ANS:- The sliding window protocol is a method used in data transmission
to manage the flow of
packets between two devices, ensuring efficient and reliable
communication. It allows multiple
packets to be sent before needing an acknowledgment, which can
significantly improve the
throughput of the network.
Key Concepts
1. Window Size: The number of packets that can be sent without waiting for
an acknowledgment.
2. Sender Window: The range of sequence numbers that the sender is
allowed to transmit before
requiring an acknowledgment.
3. Receiver Window: The range of sequence numbers that the receiver is
prepared to receive and
buffer.
Example: Go-Back-N Sliding Window Protocol - In the Go-Back-N protocol,
the sender can send
several frames before needing an acknowledgment for the first one, but the
receiver can only
acknowledge the last correctly received frame in order
Piggybacking Technique - Piggybacking is a technique used to improve the
efficiency of bidirectional
data transmission. Instead of sending separate acknowledgment frames,
the acknowledgment is included with the data frame that is being sent in
the opposite direction.
How Piggybacking Works:
1. Data and Acknowledgment Together: When the receiver sends its own
data back to the sender, it includes the acknowledgment of the
received data within the header of this data frame.
2. Efficiency: This reduces the number of frames sent over the network,
as each frame carries both data and acknowledgment, saving bandwidth
and reducing latency
5. (a) What is IGMP ? Draw the header fields of IGMP.
Also, explain the significance of each
field. (10)
ANS:- IGMP (Internet Group Management Protocol) is a
protocol used by devices on a network, like
computers and routers, to manage membership in
multicast groups. Multicast allows data to be sent
from one source to multiple destinations simultaneously,
which is useful for applications like live
video streaming, online gaming, and group video calls.
IGMP Header Fields:
Version: Specifies the IGMP version (usually
version 1 or 2).
Type: Specifies the purpose of the message,
such as a Membership Query (join request),
Membership Report (join confirmation), or Leave Group
(unsubscribe - only in IGMPv2).
Maximum Response Time: Specifies the maximum time a
device can wait before responding to a
query (optional in IGMPv1, mandatory in IGMPv2).
Checksum: Ensures the message hasn't been corrupted
during transmission.
Group Address: Identifies the multicast group related to
the message. It specifies which group
the device is interested in joining, leaving, or querying.
(b) Write the significance and usage of the following networking
devices : (2×5=10)
(i) Repeater
(ii) Bridges
(iii) Switches
(iv) Gateways
(v) Networks interface card
ANS:-
(i) Repeater: A repeater is used to amplify or regenerate signals
in a network, ensuring they can travel
longer distances without losing strength. It's significant for
extending the range of signals in Ethernet
or Wi-Fi networks. For instance, in a large office building where
the signal weakens over long
distances, repeaters ensure that the signal remains strong
throughout the network, allowing devices
to stay connected without interruption.
(ii) Bridges: Bridges are network devices that connect multiple
network segments and filter traffic
between them based on MAC addresses (Media Access Control).
They play a crucial role in dividing
large networks into smaller segments, improving overall network
performance by managing and
optimizing traffic flow. For example, in an office environment with
multiple departments, bridges help
to control network traffic and prevent unnecessary data
transmission across segments, ensuring
efficient communication within the network.
(iii) Switches: Switches are essential network devices that
connect multiple devices within a network
and direct data only to the intended recipient, providing faster
and more efficient data transfer. They
are widely used in Ethernet networks to replace hubs because
they offer higher bandwidth and better
security. For instance, in a home network with multiple devices
such as computers, printers, and
smart devices, switches ensure that data is delivered directly to
the intended device, reducing
network congestion and improving overall network performance.
(iv) Gateways: Gateways are network devices that link networks
with different protocols or
technologies, enabling communication between them. They
serve as entry and exit points for data
packets entering or leaving the network. Gateways are essential
for connecting local networks to the
internet or other external networks. For example, in a corporate
network, a gateway connects the
internal network to the internet, allowing users to access external
resources and services while
maintaining network security.
(v) Network Interface Card (NIC): A Network Interface Card (NIC)
is a hardware component that
connects devices, such as computers or servers, to a network,
providing the physical interface for
sending and receiving data over the network. NICs are installed
in computers, servers, printers, and
other devices to enable communication over a network, allowing
users to access shared resources
and services. For instance, in a home network, NICs enable
computers to connect to the internet and
communicate with other devices on the network, facilitating
activities such as file sharing and online browsing.

You might also like