Ethernet Tutorial

Medium access control

What is medium access control?

In terms of non-switched ethernet, medium access control (MAC) is an effective methodology that allows devices on a LAN to share their interconnecting media. A discussion on switching, and why it does not use the method outlined below, can be found here.

Due to the shared nature of the media, it is obvious that more than one device might send data at the same time, therefore ethernet MAC has to be able to:

What is CSMA/CD?

Carrier sensed multiple access with collision detection (CSMA/CD) is the MAC used by non-switched ethernet. It is easier to explain the CSMA/CD concept by looking at each phrase:

How does it work?

When a device transmits data, it encapsulates the data into a frame with the destination address at the head of the frame. The frame is then broadcast onto the media. All other connected devices detect the broadcast. Each device reads the address at the head of the frame, but will only read the whole frame if it recognises its own address in the header. Once the frame has been read, the device responds to the source (the source address is also in the frame header). The response could tell the source that the data was received successfully, or that it was corrupt and re-transmission is neccessary.

Once a device has transmitted data, it monitors its progress across the media. If the device detects that the transmitted data is different from the monitored data, a collision is assumed to have occurred. To ensure that other devices involved in the collision are aware that a collision has taken place, the detecting device transmits a random bit pattern. This random pattern is known as a jam bit or jam sequence and it effecively "kills" the corrupted frames. The devices involved in the collision then enter a randomly determined wait-state, sometimes referred to as a binary exponential back-off, prior to attempting the re-transmission of the affected frames. The back off is simply a randomly calculated period of time that can increase if successive collisions occur.

CSMA/CD is an excellent solution to the problems of shared media access, but its use is problematic when a network is heavily loaded. When the media is heavily congested, a higher proportion of frames can be corrupted. This is particularly noticeable in networks operating at a high bit rate (100BaseT). Switched ethernet technology has been developed to overcome the limitations of CSMA/CD.

Tell me more!

Comtec CSMA/CD applet Java applet simulation of CSMA/CD in action
Intel CSMA/CD tutorial Good commercial tutorial
Nottingham University MAC slide show Easy to follow slide show


Home Page Back One Page Contents Page Site Map