0% found this document useful (0 votes)
10 views

Lecture 2

Uploaded by

aizazalikhan817
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Lecture 2

Uploaded by

aizazalikhan817
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 46

Advanced Computer Networks

Medium Access Control (MAC)

Dr. Zulfiqar Ali

Comsats University,
Islamabad FALL, 2024
1
Medium Access Control

2
When do we need MAC?

3
Shared Links

4
Expanded Data Link Layer

5
Types of MAC

6
Types of MAC: Channel Access Policy

7
Another way to look at it…

8
Contention-Based Protocols

9
CSMA

10
CSMA Variants

11
CSMA/CD

12
CSMA/CD Algorithm:

1. Repeat until the frame is successfully transmitted:


a. Carrier Sense (CS):
i. Listen to the channel.
ii. If the channel is idle, proceed to step 2.
iii. If the channel is busy, continue listening until it becomes idle.

2. Frame Transmission:
a. Transmit the frame onto the network.
b. Simultaneously, listen to the channel to detect any collisions.

3. Collision Detection (CD):


a. If a collision is detected:
i. Stop transmitting the frame.
ii. Send a jamming signal to notify other devices of the collision.
iii. Proceed to step 4.
b. If no collision is detected:
i. The transmission is successful.
ii. Exit the loop.

4. Backoff:
a. Calculate a random backoff time.
b. Wait for the backoff time to expire.

5. Retry:
a. Return to step 1 to attempt to retransmit the frame.
Binary Exponential Backoff
Algorithm:
1. Initialize:
a. Set the collision count `n` to 0.

2. Collision Handling:
a. If a collision is detected:
i. Increment the collision count `n = n + 1`.
ii. If `n` exceeds the maximum number of retries (usually 16),
give up and abort the transmission.
iii. Calculate the maximum backoff time `K`:
K = min(2^n - 1, 1023) // 1023 is the upper limit in Ethernet standard
iv. Choose a random integer `r` in the range [0, K].
v. Compute the backoff time `T`:
T = r × slot_time
vi. Wait for the backoff time `T`.

3. Retry Transmission:
a. After waiting for the backoff time, attempt to retransmit the
frame by returning to the main CSMA/CD algorithm.
Security Issues in IEEE 802.11

IEEE 802.11-based wireless networks are being deployed in large


numbers in
home,
business, and
public environments but also in critical environments like
hospitals or production plants where reliance on their availability is
crucial.

The initial approach to WLAN security was called Wired Equivalent


Privacy (WEP) and proved to be insecure [2], [3].

Later, the amendment IEEE 802.11i [4] provided more substantial


authentication, integrity, and confidentiality protection.
Wired Equivalent Privacy
(WEP)
WEP was one of the first security protocols for wireless networks, and it
included some basic measures for integrity protection (validity of data), mainly
through the use of an Integrity Check Value (ICV). Here's how it worked:

1.Integrity Check Value (ICV) Before transmitting a data packet, WEP generates
a 32-bit checksum (ICV) from the data. This checksum is appended to the data.

2. Encryption The data, along with the ICV, is then encrypted using a stream
cipher called RC4, which uses a key that is shared between the sender and the
receiver.

3. Transmission and Verification When the receiver gets the encrypted packet,
it decrypts it using the same RC4 key. The receiver then checks the ICV by
recalculating it from the received data and comparing it with the ICV sent by the
sender.

If they match, the data is considered intact; otherwise, it is assumed that the
data has been tampered with.
Wired Equivalent Privacy
(WEP)
Collision Scenarios

Carrier Sense Problems in CSMA/CD and CSMA/CA


•Carrier Sense Multiple Access (CSMA)
In protocols like CSMA/CD (used in wired Ethernet) and CSMA/CA
(used in Wi-Fi), devices "listen" to the network to check if the
medium is free before transmitting.
If the signal from another device is attenuated and becomes too
weak to be detected, the listening device might incorrectly assume
the medium is idle and start transmitting, causing a collision.
•Hidden Node Problem In wireless networks, attenuation can
exacerbate the "hidden node problem," where two devices are
within range of a central access point but not within range of each
other due to signal attenuation. These devices might not detect
each other's transmissions and could transmit simultaneously,
leading to a collision at the access point.
Collision Avoidance (CA)

19
CSMA/
CA

20
Hidden-Terminal Problem

21
Hidden- and Exposed Terminals

22
CSMA/CA: RTS-CTS Solution
“Channel reservation”

23
CSMA-CA

24
How does CSMA-CA work?

NAV (Network Allocation Vector)

25
IEEE 802.11

26
IEEE 802.11 DCF

27
IEEE 802.11 MAC Protocol: CSMA (no CA)

28
IEEE 802.11 MAC Protocol: CSMA/CA

29
CSMA-CA Examples

30
IEEE 802.11 Wireless LAN

31
32
Solutions to Hidden/Exposed Nodes in CSMA

33
Dynamic Reservation Approaches:
Sender- vs. Receiver-initiated

34
Single vs. Multiple Channel Protocols

35
Other criteria for classification

36
Rivest Cipher 4 (RC 4)
2nd Step: Stream Generation
3rd Step: Encryption & Decryption
Wi-Fi Protected Access (WPA)

•Developed as an interim solution to replace WEP until


WPA2 was finalized.

•Uses the Temporal Key Integrity Protocol (TKIP) for


encryption, which dynamically changes the key with each
packet.

•Provides backward compatibility with WEP hardware but


adds enhancements like per-packet key mixing and
message integrity checks (MIC).
RADIUS server
(Remote Authentication Dial-In User Service) in the context of an access point is a
network service that provides centralized authentication, authorization, and
accounting (AAA) for users who want to connect to a wireless network. It is a crucial
component in enterprise-level wireless security, particularly in scenarios using WPA2-
Enterprise or WPA3-Enterprise.
Key Functions of a RADIUS Server:
1.Authentication:
1. When a user or device attempts to connect to a Wi-Fi network, the access
point forwards the login credentials (usually username and password) to the
RADIUS server.
2. The RADIUS server verifies the credentials against a database (like Active
Directory, LDAP, or a local database) to ensure that the user is authorized to
access the network.
2.Authorization:
1. Once authenticated, the RADIUS server determines the level of access or
permissions that the user has on the network. This might include which
network resources the user can access, bandwidth limits, or VLAN
assignments.
3.Accounting:
1. The RADIUS server can also track the duration of the session, data usage, and
other network activity for billing or monitoring purposes.

You might also like