The Media Access Control (MAC) data communication protocol sub-layer, also known as the Medium Access Control, is a sublayer of the data link layer specified in the seven-layer OSI model (layer 2). It provides addressing and channel access control mechanisms that make it possible for several terminals or network nodes to communicate within a multipoint network, typically a local area network (LAN) or metropolitan area network (MAN).
The MAC layer addressing mechanism is called physical address or MAC address. This is a unique serial number assigned to each network adapter, making it possible to deliver data packets to a destination within a subnetwork, i.e. a physical network consisting of one or several network segments interconnected by repeaters, hubs, bridges and switches, but not by routers. An example of a physical network is an Ethernet network.
The channel access control mechanisms provided by the MAC layer are also known as a multiple access protocol. This makes it possible for several stations connected to the same physical medium to share it. Examples of shared physical media are bus networks, ring networks, hub networks, wireless networks and half-duplex point-to-point links. The multiplex access protocol may detect or avoid data packet collisions if a packet mode contention based channel access method is used, or reserve resources to establish a logical channel if a circuit switched or channelization based channel access method is used.
A multiple access protocol is not required in a switched full-duplex network, but is often used for compatibility reasons. A MAC layer is not required in full-duplex point-to-point communication, but address fields are included in some point-to-point protocols for compatibility reasons.
The MAC sub-layer acts as an interface between the Logical Link Control sublayer and the network”s physical layer. The MAC layer emulates a full-duplex logical communication channel in a multipoint network. This channel may provide unicast, multicast or broadcast communication service.
Common Multiple Access Protocols
Examples of common packet mode multiple access protocols for wired multi-drop networks are:
- CSMA/CD (used in Ethernet and IEEE 802.3)
- Token bus (IEEE 802.4)
- Token ring (IEEE 802.5)
- Token passing (used in FDDI)
Examples of common multiple access protocols that may be used in packet radio wireless networks are:
- CSMA/CA (used in IEEE 802.11/WiFi WLANs)
- Slotted ALOHA
- Dynamic TDMA
- Reservation ALOHA (R-ALOHA)
- CDMA
- OFDMA