A way data moves from one terminal to another and how the computer terminal on a network gains and controls the transfer of data packets over the network through the cables forming the communication link called Media Access Control Method. A collision can take place and data may be corrupted if two or more computers send data at the same time except a method resolve the collision gracefully. Media access control method makes the smooth flow of traffic on a network, and they also prevent or deal with collisions. Media access control methods implemented at the data-link layer of the Open Systems Interconnection (OSI) reference model. There are four main media access control methods in Networking:
- Carrier Sense Multiple Access with Collision Detection (CSMA/CD), used in Ethernet networking
- Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA), used in AppleTalk networking
- Demand priority, Uses in 100 BaseVG networking
- Token passing, Uses in Token Ring and Fiber Distributed Data Interface (FDDI) networking
Layer 2 protocols identify packet encapsulation into a frame as well as the method for getting the encapsulated packet on and off each medium. The method also used for getting the frame on and off the media is called the media access control method.
As packets travel from the source to the destination, they usually traverse over different physical networks. These physical networks can consist of different types of physical media such as copper wires, optical fibers, and wireless consisting of electromagnetic signals, microwave and radio frequencies, and satellite links.
Without the data link layer, network layer protocols such as IP would have to make provisions for connecting to every type of media that could exist along a delivery path. Moreover, IP would have to adapt every time a new network technology; or medium developed. This process would slow down protocol and network media innovation and development. This is also key reason for using a layered approach to networking.
Providing Access to Media
During a single communication, different media access control methods may be required. Every network environment has different characteristics. For example, Ethernet LAN, WLAN, and serial links have different characteristics.
Router interfaces encapsulate the packet into the suitable frame, and a proper media access control method to access each link. In any given exchange of network layer packets, there may be several data link layers and media transitions. At each hop along the path, a router does the following:
- Accepts a frame from a medium
- De-encapsulates the frame
- Re-encapsulates the packet into a new frame
- Forwards the new frame to the medium of that segment of the physical network
Controlling Access to The Media
Media access control layer (data link sub-layer) standardize the placement of data frames onto the media. Media access control is the same as traffic rules that control the entry of vehicles onto a roadway. The lack of any media access control would be the equivalent of vehicles ignoring all other traffic and entering the road without regard to the other vehicles. On the other hand, not all roads and entrances are the same. Traffic can enter the road by merging, by waiting for its turn at a stop sign, or by obeying signal lights. A driver follows a different set of rules for each type of entrance.
In the same way, there are different methods to control placing frames onto the media. The protocols at the data link layer define the rules for access to different media. These media access control techniques describe if and how the nodes share the media. The real media access control method used depends on the topology and media sharing.