Nothing Special   »   [go: up one dir, main page]

Question Bank - CN Solved

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

Question Bank

1. List and describe the different network connection


topologies.
Ans.
1. Star Topology: In this setup, all devices are connected to a central hub or switch.
This hub acts as a communication point, and data flows through it. It’s easy to
manage and identify faulty devices, but if the hub fails, the entire network can be
affected.

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.

4. Mesh Topology: Every device is connected to every other device, creating a


redundant network. This ensures high reliability and data redundancy, but it can be
complex and expensive to set up.
5. Tree Topology: Devices are organized in a hierarchy, like a tree, with a main root
device branching out to sub-branches of devices. It’s efficient for larger networks
and allows for easy expansion, but a failure in the root device can bring down the
entire network.

2. List and explain various Network devices


Ans.
1. Router: A router connects different networks together, directing data packets
between them. It typically connects a local network (LAN) to the internet or
another network, and it uses routing tables to determine the best path for data
transmission.
2. Switch: A switch operates within a single network (LAN) and forwards data
between devices based on MAC addresses. It creates a direct path between
sender and receiver, reducing network congestion and improving efficiency.

3. Hub: A hub is a basic device that connects multiple devices in a network.


Unlike switches, hubs broadcast data to all connected devices, leading to more
network congestion and reduced efficiency.

4. Modem: A modem (modulator-demodulator) converts digital data from a


computer into analog signals that can be transmitted over telephone or cable
lines. It also converts incoming analog signals back into digital data.

5. Gateway: A gateway connects different networks that use different


communication protocols. It translates data between the networks, ensuring
seamless communication.

6. Network Bridge: A network bridge connects two or more network segments,


forwarding data between them based on MAC addresses. It operates at the data
link layer of the OSI model.

7. Repeater: A repeater amplifies and retransmits network signals to extend the


coverage area of a network. It’s commonly used in wireless networks.

8. Network Interface Card (NIC):Network Interface Card (NIC) is like a


translator between your computer and the internet. It helps your computer talk
to other computers on the network by turning your data into signals that can
travel through cables or airwaves. It’s what lets you send emails, watch videos,
and do everything else online.
3. Describe Different types of Guided Transmission media in
detail
Ans.
Twisted Pair Cable:
Twisted pair cables consist of pairs of insulated copper wires twisted together. They
come in two main categories: unshielded twisted pair (UTP) and shielded twisted pair
(STP). UTP is commonly used for Ethernet connections, while STP offers better noise
protection due to its shielding. Twisted pair cables are affordable and easy to install,
but they have limitations in terms of data transfer rates and distance.

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.

Fiber optic Cable:


Optical fiber cables use light to transmit data through strands of glass or plastic fibers.
They offer extremely high bandwidth and are capable of transmitting data over long
distances without significant signal loss or interference. Optical fibers are used in
high-speed internet connections, telecommunications networks, and data centers.

4. Compare and Contrast between OSI and TCP/IP model.


5. Explain in detail OSI reference model with neat diagram.

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.

6. Explain Circuit and Packet Switched network in detail.


Ans.
Circuit-Switched Network:
In a circuit-switched network, a dedicated communication path (circuit) is established
between two communicating parties for the duration of their conversation. This
dedicated circuit remains open and exclusively reserved for their use until the
conversation ends. This type of network was prevalent in traditional telephone
systems.

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

Example: Telephone Network


Advantages:

Predictable and constant quality of service during the call.


Low latency since the circuit is always open.
Well-suited for real-time communication like voice calls.
Disadvantages:

Inefficient resource utilization since the circuit is reserved regardless of usage.


Limited scalability as resources need to be dedicated to each call.
Inflexible for transmitting various types of data.

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:

Efficient resource usage as network resources are shared dynamically.


Scalable and flexible for transmitting various types of data, including voice, video,
and text.
Robust in the face of network failures as packets can find alternative paths.
Disadvantages:

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.

7. A bit stream 10011101 is transmitting using CRC method the


generator polynomial is x3+1
a. what is the actual bit stream transmitted.
b. Verify that receiver had received the correct bit stream
Ans.
8. Obtain the 4 bit CRC Code for the data bit sequence
10011011100 using the polynomial x4+x2+1
Ans.
9. Explain Go back N Protocol.
Ans.

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

11. Explain CSMA Protocol. Explain how collisions are handled


in CSMA/CD
Ans.CSMA Protocol (Carrier Sense Multiple Access):
CSMA (Carrier Sense Multiple Access) is a network protocol used to manage access
to a shared communication channel in networks such as Ethernet. It helps avoid
collisions by requiring devices to listen to the channel before transmitting data. The
primary idea is to “sense” the carrier (i.e., the channel) for ongoing transmissions
before attempting to transmit.
Handling Collisions in CSMA/CD:
In CSMA/CD, if a collision is detected during transmission, the protocol follows these
steps to handle it:

Collision Detection: When a device senses a collision (typically by detecting a higher


voltage level on the line due to signal overlap), it immediately stops transmitting and
sends a “jam signal” to alert other devices about the collision.

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.

Desirable Characteristics of Routing Algorithms:

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:

1. Periodically, routers exchange their distance vectors with neighbors.


2. Upon receiving a distance vector from a neighbor, a router updates its
own table by considering the minimum cost paths from its neighbors'
tables.
3. Routers repeat the exchange and update process until convergence is
achieved, and no further changes occur in the distance vectors.

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.

13. Explain in detail Dijkastra’s Algorithm.


Ans.
Dijkstra’s algorithm is a graph search algorithm that finds the shortest path from a
single source vertex to all other vertices in a weighted graph. It works for graphs with
non-negative edge weights and is particularly useful for finding the shortest paths in
networks, such as road networks or computer networks. Here’s a step-by-step
explanation of how Dijkstra’s algorithm works:

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.

14. Write Short note on


a. Sliding Window Protocol
b. NAT
c. Flooding
d. Deflection Routing.
Ans.
a. Sliding Window Protocol:
The Sliding Window Protocol is a flow control method used in data communication to
efficiently transmit data between sender and receiver. It allows multiple frames (data
packets) to be in transit simultaneously, improving the utilization of the communication
channel. The sender maintains a “window” of sequence numbers, and the receiver
acknowledges correctly received frames within the window. As the sender receives
acknowledgments and frees up space in the window, it can send new frames. This
protocol ensures efficient data transmission by reducing the time spent waiting for
acknowledgments
.
b. Network Address Translation (NAT):
Network Address Translation (NAT) is a technique used in networking to enable multiple
devices within a private network to share a single public IP address for communication
with external networks, such as the internet. NAT works by mapping the private IP
addresses of devices within the local network to the single public IP address when traffic
passes through the NAT router. This helps conserve the limited pool of public IP
addresses and provides an additional layer of security by hiding the internal network
structure from external entities.

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.

15. Explain Link state Routing Protocol in detail.


Ans.Link state routing is a technique in which each router shares the knowledge of its
neighborhood with every other router in the internetwork.

The three keys to understand the Link State Routing algorithm:


Knowledge about the neighborhood: Instead of sending its routing table, a router
sends the information about its neighborhood only. A router broadcast its identities
and cost of the directly attached links to other routers.
Flooding: Each router sends the information to every other router on the internetwork
except its neighbors. This process is known as Flooding. Every router that receives the
packet sends the copies to all its neighbors. Finally, each and every router receives a
copy of the same information.
Information sharing: A router sends the information to every other router only when
the change occurs in the information.
Link State Routing has two phases:
Reliable Flooding
Initial state: Each node knows the cost of its neighbors.
Final state: Each node knows the entire graph.

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:

Provides accurate and current network topology information.


Enables efficient and optimal routing decisions.
Supports faster convergence than Distance Vector Routing.
Minimizes unnecessary data transmission due to targeted routing decisions.
Disadvantages:

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.
********************************************************
********************************************************
*****

You might also like