1 of 62

THE MEDIUM ACCESS SUBLAYER

2 of 62

THE MEDIUM ACCESS SUBLAYER:

  • Channel allocations problem
  • Multiple access protocols
  • Ethernet -Data Link Layer switching
  • Wireless LAN
  • Broadband Wireless
  • Bluetooth.

3 of 62

Channel allocations problem

4 of 62

Channel allocations problem

  • It refers to the challenge of efficiently allocating a shared communication channel among multiple competing users or devices.

5 of 62

Channel allocations problem

  1. Shared Medium:
    • In many network scenarios (e.g., wireless networks, Ethernet), multiple devices share a single communication channel (e.g., a frequency band, a cable, or a wireless spectrum).
    • Since the channel is shared, only one device can successfully transmit data at a time without causing interference or collisions.
  2. Competition for Resources:
    • Devices compete for access to the channel to transmit their data.
    • Without proper coordination, simultaneous transmissions can lead to collisions, where data is corrupted and needs to be retransmitted, reducing overall efficiency.

6 of 62

Types of Channel Allocation:

Two types of Channel Allocation:

  1. Static Channel Allocation
  2. Dynamic Channel Allocation

7 of 62

1.Static Channel allocation

  • The channel is divided into fixed portions (e.g., time slots, frequency bands) and assigned to users in advance.
  • Examples:
    • Frequency Division Multiple Access (FDMA): The channel is divided into fixed frequency bands.
    • Time Division Multiple Access (TDMA): The channel is divided into fixed time slots.

8 of 62

FDMA and TDMA

  • If there are N users, the bandwidth is divided into N equal-sized portions, with each user being assigned one portion. Since each user has a private frequency band, there is now no interference among users
  • A wireless example is FM radio stations

9 of 62

1.Static Channel allocation

  • Advantages:
    • Simple to implement.
    • No collisions since each user has a dedicated slot.
  • Disadvantages:
    • Inefficient if some users are idle (wasted bandwidth).
    • Not scalable for dynamic networks with varying traffic.

10 of 62

2.Dynamic Channel allocation

  • The channel is allocated on demand based on current traffic and user needs.
  • Examples:
    • Carrier Sense Multiple Access (CSMA): Devices listen to the channel before transmitting to avoid collisions (used in Ethernet).
    • Token Passing: A token is passed among devices, and only the device holding the token can transmit.

11 of 62

2.Dynamic Channel allocation

  • Advantages:
    • More efficient use of bandwidth.
    • Adapts to changing traffic conditions.
  • Disadvantages:
    • More complex to implement.
    • Potential for collisions or delays in access.

12 of 62

Multiple access protocols

13 of 62

Multiple access protocols

Three main types:

  1. Random Access Protocols
  2. Controlled Access Protocols
  3. Channelization Protocols

14 of 62

1.Random Access Protocols

  • In random access protocols, devices transmit data whenever they have it, without coordinating with other devices.
  • Collisions can occur when two or more devices transmit simultaneously, and these protocols include mechanisms to detect and recover from collisions.

15 of 62

Random Access Protocols

  • ALOHA:
    • The simplest random access protocol.
    • Devices transmit data whenever they have it.
    • If a collision occurs, the device waits for a random time and retransmits.
    • Two types – 1)Pure ALOHA 2)Slotted ALOHA
    • Slotted ALOHA improves efficiency by dividing time into slots and requiring devices to transmit only at the beginning of a slot.

16 of 62

Random Access Protocols

  • CSMA (Carrier Sense Multiple Access):
    • Devices listen to the channel before transmitting (carrier sensing).
    • If the channel is busy, the device waits; if idle, it transmits.
    • Variants:
      • CSMA/CD (Collision Detection): Used in Ethernet. Devices detect collisions and stop transmission immediately, then retry after a random backoff time.
      • CSMA/CA (Collision Avoidance): Used in wireless networks (e.g., Wi-Fi). Devices avoid collisions by using techniques like RTS/CTS (Request to Send/Clear to Send) to reserve the channel.

17 of 62

Random Access Protocols

Advantages:

  • Simple to implement.
  • Efficient for low to moderate traffic.

Disadvantages:

  • Collisions can occur, especially under high traffic.
  • Performance degrades as the number of devices increases

18 of 62

2.Controlled Access Protocols

  • In controlled access protocols, devices coordinate with each other to avoid collisions.
  • Only one device is allowed to transmit at a time, ensuring orderly access to the channel.

19 of 62

2.Controlled Access Protocols

  • Polling:
    • A central controller (e.g., a master device) polls each device in turn to check if it has data to transmit.
    • The device can transmit only when polled.
    • Commonly used in networks with a central authority (e.g., Bluetooth).
  • Token Passing:
    • A special frame called a token is passed among devices in a logical ring.
    • Only the device holding the token can transmit data.
    • After transmission, the token is passed to the next device.
    • Examples: Token Ring (IEEE 802.5) and FDDI (Fiber Distributed Data Interface).
  • Reservation-Based Protocols:
    • Devices reserve time slots in advance for transmission.
    • Example: Reservation ALOHA, where devices reserve slots in a frame.

20 of 62

2.Controlled Access Protocols

Advantages:

  • No collisions.
  • Fair and predictable access.

Disadvantages:

  • Overhead due to coordination (e.g., token passing or polling).
  • Centralized protocols (e.g., polling) have a single point of failure.

21 of 62

3. Channelization Protocols

  • Channelization protocols divide the shared channel into smaller sub-channels
  • Allows multiple devices to transmit simultaneously without interfering with each other.
  • Each device is allocated a dedicated portion of the channel.

22 of 62

3. Channelization Protocols

  • FDMA (Frequency Division Multiple Access):
    • The channel is divided into multiple frequency bands.
    • Each device is assigned a unique frequency band for transmission.
    • Used in analog systems (e.g., traditional radio and TV broadcasting).
  • TDMA (Time Division Multiple Access):
    • The channel is divided into time slots.
    • Each device is assigned a specific time slot for transmission.
    • Used in digital systems (e.g., GSM for cellular networks).
  • CDMA (Code Division Multiple Access):
    • All devices transmit simultaneously on the same frequency but use unique codes to differentiate their signals.
    • The receiver uses the code to extract the intended signal.
    • Used in 3G cellular networks.

23 of 62

3. Channelization Protocols

Advantages:

  • Efficient for networks with many devices.
  • No collisions.

Disadvantages:

  • Fixed allocation can lead to inefficiency if some devices are idle.
  • Complex implementation, especially for CDMA.

24 of 62

Comparison of Multiple Access Protocols

Protocol Type

Example

Collisions

Efficiency

Random Access

CSMA/CD, ALOHA

Yes

High (low traffic)

Controlled Access

Token Passing

No

Moderate

Channelization

FDMA, TDMA, CDMA

No

High

25 of 62

Ethernet

26 of 62

Ethernet

  • Ethernet is one of the most widely used technologies for local area networks (LANs)
  • Ethernet operates at the Data Link Layer (Layer 2) of the OSI model
  • It is responsible for framing, addressing, and controlling access to the shared communication medium.

27 of 62

Ethernet

  • Ethernet is standardized by the IEEE 802.3 committee.
  • It uses a broadcast medium, meaning all devices on the same Ethernet network share the same communication channel.
  • Originally, Ethernet used a bus topology (e.g., coaxial cable), but modern Ethernet networks typically use star topology with switches and twisted-pair cables (e.g., Cat5e, Cat6).

28 of 62

Ethernet

  • The Ethernet frame is the basic unit of data transmission in Ethernet networks.

29 of 62

Ethernet

  1. Preamble (7 bytes):
    • A sequence of alternating 1s and 0s used for synchronization.
  2. Start Frame Delimiter (SFD) (1 byte):
    • Marks the end of the preamble and the beginning of the frame.
  3. Destination MAC Address (6 bytes):
    • The physical address of the intended recipient.
  4. Source MAC Address (6 bytes):
    • The physical address of the sender.
  5. EtherType/Length (2 bytes):
    • Indicates the type of protocol encapsulated in the payload (e.g., IPv4, IPv6) or the length of the frame.
  6. Payload/Data (46–1500 bytes):
    • The actual data being transmitted.
    • If the data is less than 46 bytes, it is padded to meet the minimum frame size.
  7. Frame Check Sequence (FCS) (4 bytes):
    • A cyclic redundancy check (CRC) value used for error detection.

30 of 62

Ethernet

  • Each Ethernet device has a unique MAC (Media Access Control) address, a 48-bit identifier typically represented in hexadecimal (e.g., 00:1A:2B:3C:4D:5E).
  • MAC addresses are used to identify devices on the same local network.

31 of 62

Ethernet

  • Ethernet uses the CSMA/CD (Carrier Sense Multiple Access with Collision Detection) protocol to manage access to the shared medium. Here’s how it works:
  • Carrier Sense:
    • Before transmitting, a device listens to the channel to check if it is idle.
    • If the channel is busy, the device waits.
  • Multiple Access:
    • Multiple devices share the same channel and can attempt to transmit simultaneously.
  • Collision Detection:
    • If two devices transmit at the same time, a collision occurs.
    • Devices detect collisions by monitoring the signal on the channel.
  • Backoff and Retransmission:
    • When a collision is detected, both devices stop transmitting and wait for a random amount of time (backoff) before retrying.

32 of 62

Ethernet Topologies

  • Bus Topology:
    • Early Ethernet networks used a single coaxial cable (e.g., 10Base5 or 10Base2) as a shared medium.
    • All devices were connected to the same cable, and collisions were common.
  • Star Topology:
    • Modern Ethernet networks use a star topology, where devices are connected to a central switch.
    • Switches eliminate collisions by providing dedicated channels for each device.

33 of 62

Ethernet Standards

Standard

Speed

Media

Topology

10Base5

10 Mbps

Thick coaxial cable

Bus

10Base2

10 Mbps

Thin coaxial cable

Bus

10Base-T

10 Mbps

Twisted-pair cable

Star

100Base-TX

100 Mbps

Twisted-pair cable

Star

1000Base-T

1 Gbps

Twisted-pair cable

Star

10GBase-T

10 Gbps

Twisted-pair cable

Star

40GBase-T

40 Gbps

Twisted-pair cable

Star

34 of 62

Switched Ethernet

  • Modern Ethernet networks use switches instead of hubs.
  • Switches operate at the Data Link Layer and use MAC addresses to forward frames only to the intended recipient.

35 of 62

Switched Ethernet

  • Benefits of switched Ethernet:
    • No collisions: Each device has a dedicated link to the switch.
    • Full-duplex communication: Devices can send and receive data simultaneously.
    • Improved performance: Switches reduce unnecessary traffic on the network.

36 of 62

Wireless LAN

37 of 62

Wireless LAN

  • Wireless LANs are used homes, offices, cafes etc
  • The main wireless LAN standard is 802.11.
  • 802.11 networks can be used in two modes.

38 of 62

Wireless LAN

  • In infrastructure mode, each client is associated with an AP (Access Point) that is in turn connected to the other network.
  • The client sends and receives its packets via the AP.
  • Several access points may be connected together, typically by a wired network called a distribution system,

39 of 62

Wireless LAN

  • Ad hoc network mode is a collection of computers that are associated so that they can directly send frames to each other.
  • There is no access point.

40 of 62

Wireless LAN

OFDM (Orthogonal Frequency Division Multiplexing)

41 of 62

Format of the 802.11 data frame

42 of 62

Format of the 802.11 data frame

  • The 802.11 standard defines three different classes of frames in the air: data,control, and management.
  • First comes the Frame control field, which is made up of 11 subfields.
  • The first of these is the Protocol version, set to 00. It is there to allow future versions of 802.11 to operate
  • Then come the Type (data, control, or management) and Subtype fields (e.g., RTS or CTS). For a regular data frame (without quality of service), they are set to 10 and 0000 in binary.

43 of 62

Format of the 802.11 data frame

  • The To DS and From DS bits are set to indicate whether the frame is going to or coming from the network connected to the APs, which is called the distribution system.
  • The More fragments bit means that more fragments will follow
  • The Retry bit marks a retransmission of a frame sent earlier.
  • The Power management bit indicates that the sender is going into power-save mode.
  • The More data bit indicates that the sender has additional frames for the receiver.

44 of 62

Format of the 802.11 data frame

  • The Protected Frame bit indicates that the frame body has been encrypted for security.
  • The Order bit tells the receiver that the higher layer expects the sequence of frames to arrive strictly in order.
  • The Duration field, tells how long the frame and it acknowledgement will occupy the channel, measured in microseconds
  • The first address is the receiver, and the second address is the transmitter. The third address is of the distant endpoint(AP)

45 of 62

Format of the 802.11 data frame

  • The Sequence field numbers frames so that duplicates can be detected.
  • The Data field contains the payload, up to 2312 bytes.
  • The first bytes of this payload are in a format known as LLC (Logical Link Control).
  • The Frame check sequence, which is the same 32-bit CRC

46 of 62

Wireless LAN-Services

  • The association service is used by mobile stations to connect themselves to APs.
  • Reassociation lets a station change its preferred AP. This facility is useful for mobile stations moving from one AP to another AP in the same extended 802.11 LAN
  • Either the station or the AP may also disassociate, breaking their relationship.
  • Stations must also authenticate before they can send frames via the AP

47 of 62

Wireless LAN-Services

  • Once frames reach the AP, the distribution service determines how to route them.
  • Integration service handles any translation that is needed for a frame to be sent outside the 802.11 LAN
  • 802.11 naturally provides a data delivery service
  • To handle traffic with different priorities, there is a QOS traffic scheduling service.

48 of 62

Broadband Wireless

49 of 62

Broadband Wireless

  • The 802.16 standard is WiMAX (Worldwide Interoperability for Microwave Access)
  • The first 802.16 standard was approved in December 2001
  • 802.16 was designed to carry IP packets over the air

50 of 62

The 802.16 architecture

51 of 62

The 802.16 protocol stack.

52 of 62

The 802.16 Frame Structure

53 of 62

The 802.16 Frame Structure

  • The EC bit tells whether the payload is encrypted.
  • The Type field identifies the frame type, mostly telling whether packing and fragmentation are present.
  • The CI field indicates the presence or absence of the final checksum.
  • The EK field tells which of the encryption keys is being used (if any).
  • The Length field gives the complete length of the frame, including the header.
  • The Connection identifier tells which connection this frame belongs to.
  • The Header CRC field is a checksum over the header only

54 of 62

Bluetooth

55 of 62

Bluetooth

  • Bluetooth is designed for low-power, low-cost communication between devices, typically within a range of 10 meters
  • It is used for connecting devices such as smartphones, headphones, keyboards, mice, and IoT devices.
  • It operates in the 2.4 GHz ISM (Industrial, Scientific, and Medical) band
  • It uses frequency-hopping spread spectrum (FHSS) to avoid interference.

56 of 62

Bluetooth Architecture

Bluetooth networks are organized into piconets and scatternets:

  1. Piconet:
    • A piconet is a small network of up to 8 devices.
    • One device acts as the master, and the others are slaves.
    • The master controls the communication and synchronizes the slaves.
    • All devices in a piconet share the same frequency-hopping sequence.
  2. Scatternet:
    • A scatternet is formed by connecting multiple piconets.
    • A device can be a slave in one piconet and a master in another, acting as a bridge between piconets.

57 of 62

Bluetooth Architecture

58 of 62

Bluetooth Protocol Architecture

Bluetooth

59 of 62

Bluetooth Protocol Architecture

  1. Radio Layer:
    • Handles the physical transmission of data over the 2.4 GHz band.
    • Uses frequency-hopping spread spectrum (FHSS) to avoid interference.
  2. Baseband Layer:
    • Manages the formation of piconets and the connection between devices.
    • Handles packet formatting, error correction, and retransmission.
    • Implements time-division duplexing (TDD), where the master and slaves take turns transmitting.
  3. Link Manager Protocol (LMP):
    • Establishes and manages logical links between devices.
    • Handles authentication, encryption, and power management.

60 of 62

Bluetooth Protocol Architecture

4.Logical Link Control and Adaptation Protocol (L2CAP):

    • Provides multiplexing, segmentation, and reassembly of packets.
    • Supports higher-layer protocols like RFCOMM (for serial communication) and SDP (Service Discovery Protocol).

5.Application Layer:

    • Includes profiles for specific use cases (e.g., Headset Profile, File Transfer Profile).

61 of 62

Bluetooth Data Frame

62 of 62

Bluetooth Data Frame

  • The Address field identifies which of the eight active devices the frame is intended for.
  • The Type field identifies the frame type (ACL, SCO, poll, or null), the type of error correction used in the data field, and how many slots long the frame is.
  • The Flow bit is asserted by a slave when its buffer is full and cannot receive any more data.
  • The Acknowledgement bit is used to piggyback an ACK onto a frame.
  • The Sequence bit is used to number the frames to detect retransmissions.
  • The protocol is stop-and-wait, so 1 bit is enough. Then comes the 8-bit header Checksum.