Media Access Control (MAC) English

Media access control is a sublayer of Layer 2 of the OSI model, which defines when data is transferred from a network element to the network environment, for example cable. It is used to prevent possible collisions in the network.

At the same time, the MAC sublayer is in the task of isolating the complexity of the physical network from the layers above it and keeping the upper layers away from the complexity of the physical network.

In the MAC sublayer, the frames coming from the upper layer are encapsulated and, if necessary, padding processes are applied to make them able to be transmitted from the network environment.

Finally, to diagnose the problems that may occur in the transmission of the frame, it adds a frame control sequence and waits its turn according to the access control method in the environment.

Media access control is generally divided into 2;

• Distributed Media Access Control: We can compare this method to waiting for a short moment of silence before speaking in a meeting room.

• Central Access Control: We can think of this method as the 'microphone right' in a conference. If the network element has the microphone right at that moment, it will start data transfer, if not, it will start waiting for its turn by taking a sequence number.

In topologies that contain collision domains (for example, topologies such as path, ring, and mesh), although the MAC wants to prevent collisions, it tries to retransmit the frame in order to preserve the integrity of the data in case of collisions.

The information whether data integrity is preserved in terms of MAC can be understood by examining the frame control sequence of the incoming frame.

According to IEEE Std 802-2001, Basic Functions Performed by MAC Sublayer are as follows;

• Frame limitation and recognition

• Addressing of target stations (both as individual stations and groups of stations)

• Transmission of source station addressing information

• Transparent data transfer of LLC PDUs or equivalent information on the Ethernet sublayer

• Protection against errors in general through the creation and checking of frame check sequences

• Control of access to the physical transmission medium

MAC Addresses

Local network addresses used in FDDI networks in IEEE 802 networks are called media access control addresses (MAC Address). The MAC address is intended to be completely unique.

The MAC address is usually engraved on the network interface hardware at the time of manufacture by the manufacturer.

The first 24 bits of this 48-bit address are defined by IANA specifically for the manufacturer. The last 24 bits are defined by the hardware manufacturer.

The MAC address enables communication between network elements in cases where the network layer is not reached.

In order to help a packet accessing the subnet with the MAC address to reach the IP address it wants to reach, it supports the frames to reach the correct network element by providing IP and MAC address matching with NDP (Neighbor Discovery Protocol) in ARP (Address Resolution Protocol) and IPv6 applications in IPv4 applications.

Media Access Control Methods

• Carrier-detection multiple access and collision avoidance (CSMA/CA)

• Carrier-detection multiple access and collision detection (CSMA/CD)

• Request priority

• Token pass

Carrier-sensing multiple access and collision avoidance (CSMA/CA);

In this method, the device that wants to use the network environment first sends a signal. Thanks to this signal, other network elements in the network environment go into a waiting state for a certain period of time and frame transmission avoids collision.

Carrier-detection multiple access and collision detection (CSMA/CD);

In this method, the device that wants to use the network environment observes the network environment and decides whether there is a signal transmission. If there is no signal transmission, it starts data transmission. In the event of a collision, data transmission is restarted.

Request priority;

In this method, the device that wants to use the network environment waits to be authorized by the 'active center' structure. It starts the data transmission after the authorization has taken place.

Token pass;

In this method, the device that wants to use the network environment should have a small frame called 'free token'. After the data transmission is complete, the next free token holder gains the authorization to use the network environment.