Question Bank - CN Solved
Question Bank - CN Solved
Question Bank - CN Solved
2. Bus Topology: All devices are connected to a central cable (the bus). Data travels
along the bus, and each device listens for its address before capturing the data. It’s
simple but can experience issues if the cable breaks or if more devices are added,
causing data collisions.
3. Ring Topology: Devices are connected in a circular manner, with each device
connecting to exactly two other devices. Data travels in one direction around the
ring. It’s reliable, but a failure in one device can disrupt the whole network.
Coaxial Cable:
Coaxial cables consist of a central copper conductor surrounded by insulation, a
metallic shield, and an outer insulating layer. They offer better bandwidth and longer
distance capabilities compared to twisted pair cables. Coaxial cables were commonly
used for cable television and broadband internet connections.
Ans.
The OSI (Open Systems Interconnection) model is a conceptual framework that standardizes
the functions of a communication system into seven distinct layers. Each layer focuses on
specific tasks and provides a standardized way for different systems to communicate. Here's a
detailed explanation of each layer along with a neat diagram:
1. Physical Layer:
• This is the lowest layer and deals with the physical transmission of
raw bits over a physical medium such as cables, wires, or radio
waves.
• It defines characteristics like voltage levels, data rates, modulation,
and connectors.
• Devices: Hubs, Repeaters, Cables.
2. Data Link Layer:
• Responsible for framing raw bits into frames and ensuring reliable
transmission over the physical layer.
• It provides error detection and correction, as well as flow control to
manage the pace of data between sender and receiver.
• Devices: Switches, Bridges, NICs.
3. Network Layer:
• Focuses on logical addressing, routing, and forwarding of data
packets between different networks.
• It determines the best path for data to travel from the source to the
destination, often involving routers.
• Devices: Routers, Layer 3 Switches.
4. Transport Layer:
• Manages end-to-end communication, ensuring data integrity,
sequencing, and flow control.
• Breaks down larger messages into smaller segments and
reassembles them at the receiving end.
• Provides both connection-oriented (TCP) and connectionless
(UDP) protocols.
• Devices: Gateways, Firewalls.
5. Session Layer:
• Establishes, maintains, and terminates sessions or connections
between applications on different devices.
• Responsible for synchronization, checkpointing, and recovery of
data exchange.
• Not as commonly implemented as other layers in modern
networks.
6. Presentation Layer:
• Translates, encrypts, and compresses data to ensure it's in a usable
format for the Application layer.
• Handles data conversion between different data formats, character
sets, and encryption/decryption.
• Provides a common representation of data, regardless of the
underlying systems.
7. Application Layer:
• The topmost layer that interacts directly with users and application
processes.
• Provides network services directly to end-users, including
functions like file transfer, email, and remote access.
• Examples: HTTP, SMTP, FTP, Telnet.
How it works:
Call Setup: When a user initiates a call, the network establishes a dedicated circuit that
connects the calling and receiving parties.
Exclusivity: The circuit remains allocated exclusively to the call participants, even if
they’re not actively speaking. This guarantees consistent quality but is inefficient in
terms of resource usage.
Fixed Bandwidth: The dedicated circuit ensures a fixed bandwidth is available for the
duration of the call.
End of Call: Once the conversation ends, the dedicated circuit is released, and
resources are freed up for other calls.
Three Phases of Circuit Switching:
Connection Establishment
Data Transfer
Connection Disconnection
Packet-Switched Network:
In a packet-switched network, data is divided into smaller packets before
transmission. These packets are then individually routed through the network based on
the most efficient path available at that moment. This approach is the foundation of
the modern internet.
Two Approaches
Datagram
Virtual Circuit-Call Request and Call Accept
How it works:
Packetization: Data is divided into packets, each containing a portion of the message
along with addressing and control information.
Routing: Packets are sent independently and can take different paths through the
network based on congestion, availability, and other factors.
Dynamic Allocation: Resources are allocated on-demand, meaning multiple packets
from different sources can share the same network resources.
Reassembly: At the receiving end, packets are reassembled in the correct order to
reconstruct the original message.
Advantages:
Variable quality of service as packets can experience different latencies and routes.
Possibility of packet loss, which requires error checking and retransmission
mechanisms.
Complex mechanisms for managing data flow and ensuring proper reassembly.
In Go-Back-N ARQ, N is the sender’s window size. Suppose we say that Go-Back-3,
which means that the three frames can be sent at a time before expecting the
acknowledgment from the receiver.It uses the principle of protocol pipelining in
which the multiple frames can be sent before receiving the acknowledgment of the
first frame. If we have five frames and the concept is Go-Back-3, which means that
the three frames can be sent, i.e., frame no 1, frame no 2, frame no 3 can be sent
before expecting the acknowledgment of frame no 1.In Go-Back-N ARQ, the frames
are numbered sequentially as Go-Back-N ARQ sends the multiple frames at a time
that requires the numbering approach to distinguish the frame from another frame, and
these numbers are known as the sequential numbers.
10. What is channel allocation Problem? Explain in short Pure
and Slotted ALOHA.
Ans.Channel Allocation Problem:
The channel allocation problem refers to the challenge of efficiently sharing a
communication channel among multiple users or devices in a network. The goal is to
maximize the utilization of the channel while minimizing collisions and interference.
Different channel allocation techniques are used to address this problem, ensuring that
data can be transmitted and received without excessive contention.
Pure ALOHA:
Pure ALOHA is a simple random access protocol used in shared communication
networks, such as Ethernet. In Pure ALOHA, devices can transmit data at any time
without coordinating with other devices. However, collisions can occur when two or
more devices transmit simultaneously, resulting in data corruption.
Slotted ALOHA:
Slotted ALOHA is an improvement over Pure ALOHA that divides time into discrete
slots, synchronized across all devices. Devices are only allowed to transmit at the
beginning of each time slot. This reduces the probability of collisions compared to
Pure ALOHA
Backoff and Retransmission: After the jam signal is sent, the colliding devices wait
for a random period of time (backoff time) before attempting retransmission. This
randomization helps reduce the chances of another collision during retransmission.
Exponential Backoff: The backoff time is increased exponentially for each successive
collision. This prevents devices from repeatedly colliding and ensures a fair
opportunity for each device to transmit.
Retransmission Attempts: After waiting for the backoff time, the devices that collided
attempt retransmission. They listen for the channel to be idle again before
transmitting.
12. What is Routing? What are desirable characteristic of
routing algorithms? Explain Distance Vector Routing with
Suitable example
Ans.
Routing: Routing is the process of determining the optimal path for data packets to travel
from the source to the destination across a network. In other words, it involves making
decisions about how to forward data through a series of interconnected devices (routers or
switches) to reach its intended destination. Routing plays a crucial role in ensuring efficient
and reliable communication in networks.
1. Correctness: Routing algorithms should always find a valid path from source to
destination if one exists.
2. Optimality: Ideally, the selected path should be the shortest or most efficient route,
considering factors like distance, delay, or congestion.
3. Simplicity: Routing algorithms should be straightforward to understand and
implement.
4. Scalability: Algorithms should work effectively in networks of varying sizes without
a significant decrease in performance.
5. Robustness: The algorithms should adapt to network changes like link failures or
new connections and find alternative paths if needed.
6. Stability: Routing decisions should converge to a stable state without continuous
fluctuations.
7. Loop Prevention: Algorithms should prevent the creation of routing loops, where
packets keep circulating between routers indefinitely.
Distance Vector Routing: Distance Vector Routing is a type of routing algorithm that
calculates the best path for data packets based on distance or cost metrics. It uses information
about the number of hops or a cost metric associated with each link in the network. Each
router maintains a table that contains information about the shortest distance (cost) to reach
each destination. Routers periodically exchange this information with their neighbors to
update their routing tables.
Example: Consider a simple network with four routers: A, B, C, and D. The following table
shows the initial distance vector for Router A:
Operation:
After convergence, each router's table will contain the optimal paths to reach different
destinations. For instance, Router A will know that to reach Router D, it should go through
Router B and then Router C, with a total cost of 5.
While Distance Vector Routing is relatively simple to implement, it can suffer from slow
convergence and routing loops. These limitations led to the development of more advanced
routing algorithms like Link State Routing.
Step 1: Initialization
Create a set of vertices whose shortest distance from the source is not yet finalized.
Initially, all vertices except the source vertex are in this set.
Assign a tentative distance value to every vertex. Set the distance of the source vertex
to 0 and the distances of all other vertices to infinity.
Set the source vertex as the current vertex.
Step 2: Iterate
For the current vertex, consider all of its neighbors that haven’t been visited.
For each neighbor, calculate the tentative distance from the source through the current
vertex. Compare this calculated distance with the current assigned distance for the
neighbor. If the calculated distance is smaller, update the distance.
For example, if the current vertex is “A” and the neighbor is “B” with an edge weight
of 4, and the current distance to B is 10, the new tentative distance will be 10 (current
distance) + 4 (edge weight) = 14.
Step 3: Mark Visited
Once we’ve considered all the neighbors of the current vertex, mark the current vertex
as “visited.” A visited vertex will not be checked again.
Step 4: Select Next Vertex
Among the unvisited vertices, select the one with the smallest tentative distance and
set it as the new current vertex.
Step 5: Repeat
Go back to Step 2 and repeat the process until all vertices are marked as visited.
Termination:
The algorithm terminates when all vertices are visited or when the destination vertex
is visited.
c. Flooding:
Flooding is a fundamental network communication technique where a packet is sent to all
devices in a network, regardless of whether they are the intended recipients. This
technique is often used when the destination address is not known or to ensure that a
message reaches all devices in a network. However, flooding can lead to excessive
network traffic and is typically controlled using mechanisms like Time To Live (TTL) to
limit the propagation of flooded packets.
D. Deflection Routing:
Deflection Routing is a technique used in packet-switched networks to manage network
congestion. When a network node (router or switch) detects congestion on its outgoing
link, it might still forward the packet to the congested link but with a “deflection”
indicator. The packet then tries to find an alternative route around the congested area.
Deflection routing helps reduce the chance of packets getting stuck in a congested region,
improving the overall efficiency and reliability of network communication.
Route Calculation
Each node uses Dijkstra’s algorithm on the graph to calculate the optimal routes to all
nodes.
The Link state routing algorithm is also known as Dijkstra’s algorithm which is used to
find the shortest path from one node to every other node in the network.
The Dijkstra’s algorithm is an iterative, and it has the property that after kth iteration
of the algorithm, the least cost paths are well known for k destination nodes.
Advantages:
Requires more memory and computational resources due to LSDB maintenance and
Dijkstra’s algorithm.
Vulnerable to link or LSA spoofing if not properly secured.
Examples of Link-State Routing Protocols:
Open Shortest Path First (OSPF): A widely used interior gateway protocol for IP networks.
Intermediate System to Intermediate System (IS-IS): Another interior gateway protocol often
used in larger networks.
********************************************************
********************************************************
*****