unit 3,4
unit 3,4
The Medium Access Control (MAC) sublayer is a part of the data link layer in the OSI
model. It is responsible for controlling how devices in a network gain access to the medium
and permission to transmit data. The MAC sublayer ensures that signals from different
stations on a network do not interfere with each other.
Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is a network protocol
for carrier transmission that operates in the Medium Access Control (MAC) layer.
Carrier Sense:
Definition: Carrier sense refers to the mechanism by which a device listens to the
network medium before transmitting data. It ensures that the medium is free from
other traffic before sending a signal.
Purpose: This helps in reducing collisions by preventing multiple devices from
transmitting simultaneously.
1. Fixed Allocation:
o Frequency Division Multiple Access (FDMA): Each user is assigned a
unique frequency band.
Time Division Multiple Access (TDMA): Each user is assigned a unique
o
time slot.
2. Dynamic Allocation:
o Code Division Multiple Access (CDMA): Users are assigned unique codes to
differentiate their transmissions.
o Dynamic Channel Allocation (DCA): Channels are allocated on demand
based on current network conditions.
Pure ALOHA:
Operation: Transmissions are made randomly without checking the channel's status.
Collisions: High probability of collisions as devices may transmit at any time.
Efficiency: Low efficiency (maximum throughput is 18.4%).
Slotted ALOHA:
Operation: Time is divided into discrete slots, and transmissions can only begin at
the start of a slot.
Collisions: Reduced probability of collisions as devices synchronize their
transmissions to time slots.
Efficiency: Higher efficiency than Pure ALOHA (maximum throughput is 36.8%).
Diagram:
Slotted ALOHA:
Synchronization: By dividing the channel into time slots and allowing transmissions
to occur only at the beginning of these slots, Slotted ALOHA ensures that collisions
are limited to the time slot boundaries.
Efficiency: This synchronization mechanism reduces the number of collisions
compared to Pure ALOHA, thereby improving the channel utilization and throughput.
Example: If a device wishes to send data, it waits until the start of the next time slot,
reducing the likelihood of overlapping with another device's transmission.
a) Switch:
Function: Operates at the data link layer (Layer 2) to connect devices within the same
network. It uses MAC addresses to forward data to the correct destination.
Benefit: Reduces collisions and increases bandwidth by creating separate collision
domains for each connected device.
b) Router:
Function: Operates at the network layer (Layer 3) to route data between different
networks. It uses IP addresses to determine the best path for data packets.
Benefit: Facilitates communication between different networks, including different
subnets and the internet.
c) Bridge:
Function: Connects two or more network segments, operating at the data link layer
(Layer 2). It filters traffic based on MAC addresses and reduces network collisions.
Benefit: Extends the network by connecting different segments, allowing for better
traffic management and segmentation.
d) Gateway:
e) Repeater:
Function: Operates at the physical layer (Layer 1) to amplify and regenerate signals
over long distances, ensuring data integrity.
Benefit: Extends the reach of the network by boosting signal strength, allowing for
longer cable runs without data loss.
f) Hub:
Diagram:
Diagram:
Physical Layer (PHY): Responsible for transmission and reception of data over the
wireless medium.
Medium Access Control (MAC) Layer:
o Distributed Coordination Function (DCF): Basic access method using
CSMA/CA.
o Point Coordination Function (PCF): Optional access method using polling
by the AP.
Logical Link Control (LLC) Layer: Provides addressing and data link control.
Diagram:
These answers and diagrams should help provide a comprehensive understanding of the
topics related to Medium Access Control and various networking concepts.
1 Write about the design issues of Network Layer. Remembering (L1) CO4 4M 2 Explain the
differences between congestion control & flow control. Remembering (L1) CO4 4M 3
Explain Connection oriented vs Connection less services Remembering (L1) CO4 4M 4
Explain the open loop and closed loop congestion control approaches in detail.
Understanding (L2) CO4 7M 5 Write about Comparison of Virtual Circuit and Datagram
Networks Understanding (L2) CO4 7M 6 Define a routing algorithm and mention the
properties of routing algorithms Understanding (L2) CO4 7M 7 Explain the concept of
Dijkstra’s routing algorithm with a neat diagram to compute the shortest path between source
and destination nodes with a neat diagram Applying/Analyzing(L3/L4) CO4 10M
ChatGPT
Sure, let's go through each of these questions one by one, providing detailed answers and any
relevant diagrams where applicable.
The network layer is responsible for routing packets from the source to the destination across
multiple networks. Key design issues include:
1. Routing:
o Static vs. Dynamic Routing: Static routing involves manual configuration,
while dynamic routing uses algorithms to adjust paths based on network
conditions.
o Optimality: Choosing the best path for packet delivery based on criteria like
shortest path, least cost, or fastest route.
2. Packet Forwarding:
o Addressing: Assigning unique network addresses to devices to ensure correct
packet delivery.
o Fragmentation and Reassembly: Dividing large packets into smaller
fragments for transmission and reassembling them at the destination.
3. Congestion Control:
o Preventive and Reactive Measures: Techniques to avoid network congestion
and methods to handle congestion when it occurs.
4. Quality of Service (QoS):
o Traffic Prioritization: Ensuring critical data (like real-time video) receives
higher priority over less critical data.
o Resource Allocation: Allocating bandwidth and managing delays to meet
application requirements.
5. Security:
o Data Integrity and Privacy: Protecting data from unauthorized access and
ensuring it is not altered during transmission.
o Authentication: Verifying the identity of communicating devices to prevent
malicious activity.
Objective: Prevents the network from becoming overwhelmed with too much traffic.
Scope: Network-wide issue; affects multiple nodes and links within the network.
Methods: Techniques like traffic shaping, load balancing, and congestion avoidance
algorithms (e.g., RED).
Example: TCP congestion control adjusts the rate of data transmission based on
network congestion signals.
Flow Control:
Objective: Ensures a sender does not overwhelm a receiver with too much data at
once.
Scope: End-to-end issue; involves communication between two devices.
Methods: Techniques like sliding window protocol and acknowledgment
mechanisms.
Example: TCP flow control uses a sliding window mechanism to manage the data
flow between sender and receiver.
Connection-oriented Services:
Connection-less Services:
4. Explain the open loop and closed loop congestion control approaches in
detail.
Datagram Networks:
Routing Algorithm:
Objective: Finds the shortest path from a source node to all other nodes in a weighted
graph.
Algorithm Steps:
1. Initialization: Set the distance to the source node to 0 and to all other nodes to
infinity. Mark all nodes as unvisited.
2. Visit Node: Select the unvisited node with the smallest distance. Mark it as
visited.
3. Update Distances: For the current node, update the distance to its neighboring
nodes if a shorter path is found.
4. Repeat: Repeat steps 2-3 until all nodes are visited or the smallest distance
among the unvisited nodes is infinity.
scss
Copy code
(A)
/ | \
1 2 4
/ | \
(B) (C) (D)
| | / \
6 3 5 1
| | / \
(E) (F)------(G)
2
Step-by-Step Calculation:
1. Start at node A:
o Distance to A = 0 (source)
o Distance to B = 1
o Distance to C = 2
o Distance to D = 4
2. Visit node B (smallest distance):
o Distance to E = 1 + 6 = 7
o No updates to A, C, D as they are already shorter.
3. Visit node C (next smallest distance):
o Distance to F = 2 + 3 = 5
o No updates to A, B, D, E as they are already shorter.
4. Visit node D (next smallest distance):
o Distance to G = 4 + 1 = 5
o No updates to A, B, C, E, F as they are already shorter.
5. Visit node F (next smallest distance):
o No updates as all neighbors have shorter paths already.
6. Visit node G (next smallest distance):
o No updates as all neighbors have shorter paths already.
7. Visit node E (last node):
o No updates as all neighbors have shorter paths already.
To B: A -> B (Distance = 1)
To C: A -> C (Distance = 2)
To D: A -> D (Distance = 4)
To E: A -> B -> E (Distance = 7)
To F: A -> C -> F (Distance = 5)
To G: A -> D -> G (Distance = 5)
Diagram:
This example illustrates the step-by-step process of Dijkstra's algorithm in finding the
shortest paths from a source node to all other nodes in a network.
Sure, let's dive into each of these topics with detailed explanations and diagrams.
css
Copy code
2
A ------- B
| \ |
1 | \3 | 1
| \ |
C ------- D
1
A: {A: 0, B: ∞, C: 1, D: ∞}
B: {A: ∞, B: 0, C: ∞, D: 1}
C: {A: 1, B: ∞, C: 0, D: 1}
D: {A: ∞, B: 1, C: 1, D: 0}
Step-by-Step Updates:
1. A to B Update:
o Distance from A to B through C: 1+3=41 + 3 = 41+3=4
o Distance from A to B through D: ∞∞∞
o New distance vector for A: {A: 0, B: 4, C: 1, D: ∞}
2. B to A Update:
o Distance from B to A through C: ∞∞∞
o Distance from B to A through D: 1+∞=∞1 + ∞ = ∞1+∞=∞
o New distance vector for B: {A: 2, B: 0, C: ∞, D: 1}
3. C to D Update:
o Distance from C to D through A: 1+2=31 + 2 = 31+2=3
o Distance from C to D through B: ∞∞∞
o New distance vector for C: {A: 1, B: ∞, C: 0, D: 1}
4. D to A Update:
o Distance from D to A through B: 1+2=31 + 2 = 31+2=3
o Distance from D to A through C: 1+1=21 + 1 = 21+1=2
o New distance vector for D: {A: 2, B: 1, C: 1, D: 0}
After several iterations, the tables will converge to the shortest paths:
A: {A: 0, B: 2, C: 1, D: 2}
B: {A: 2, B: 0, C: 3, D: 1}
C: {A: 1, B: 3, C: 0, D: 1}
D: {A: 2, B: 1, C: 1, D: 0}
Diagram:
css
Copy code
Initial State:
A: {0, ∞, 1, ∞}
B: {∞, 0, ∞, 1}
C: {1, ∞, 0, 1}
D: {∞, 1, 1, 0}
After Updates:
A: {0, 2, 1, 2}
B: {2, 0, 3, 1}
C: {1, 3, 0, 1}
D: {2, 1, 1, 0}
Concept: Controls the rate at which data packets are sent into the network, ensuring a
steady flow and preventing bursts that can cause congestion.
Mechanism:
o A "bucket" with a fixed capacity is used to hold packets.
o Packets arrive at varying rates and are placed in the bucket.
o Packets are sent out of the bucket at a constant rate.
o If the bucket is full, incoming packets are discarded (dropped).
Steps:
Example:
Scenario:
Diagram:
bash
Copy code
Packets arriving
_____________
| | 4 packets/sec
| |----------------->
| |