In a local Ethernet network (IEEE 802.3), all network par­tic­i­pants usually meet on a common trans­mis­sion medium – a cable. This meeting must be regulated to avoid chaos during data trans­mis­sion, which could lead to data loss or damage. CSMA/CD offers a method that organizes data trans­mis­sion properly.

This technique isn’t suitable for WLAN. Therefore, the process has been adapted in the form of CSMA/CA. CSMA/CD is no longer important for most wired networks, since new cable tech­nol­o­gy offers other pos­si­bil­i­ties. However, it doesn’t hurt to be knowl­edge­able of this older procedure as well.

What is CSMA/CD?

CSMA/CD stands for Carrier Sense Multiple Access/Collision Detection, with collision detection being an extension of the CSMA protocol. This creates a procedure that regulates how com­mu­ni­ca­tion must take place in a network with a shared trans­mis­sion medium. The extension also regulates how to proceed if col­li­sions occur i.e. when two or more nodes try to send data packets via the trans­mis­sion medium (bus) si­mul­ta­ne­ous­ly and they interfere with one other.

De­f­i­n­i­tion

To un­der­stand how CSMA/CD works, it makes sense to break down the in­di­vid­ual com­po­nents of the term:

  • Carrier sense (CS): The carrier state detection makes sure that all network par­tic­i­pants check whether the medium is currently free – only then does the protocol initiate data trans­mis­sion
  • Multiple access (MA): Several par­tic­i­pants (computers connected to the network) share a trans­mis­sion medium
  • Collision detection (CD): The collision detection is an extension of the original protocol and regulates how to proceed in case data packets happen to collide

How the CSMA/CD process works

CSMA/CD is divided into several steps. The procedure is based on a normal group con­ver­sa­tion: for good com­mu­ni­ca­tion, it is important that the par­tic­i­pants don’t all speak at once, which can be confusing. Instead, they should speak one after the other, so that each par­tic­i­pant can fully un­der­stand what the others are con­tribut­ing to the dis­cus­sion. Without realizing, we actually behave like this ourselves in con­ver­sa­tions: When someone else is talking, we stand back and listen.

After the other par­tic­i­pant has finished their con­tri­bu­tion for the time being, we wait a short time and only start talking when the same par­tic­i­pant or another par­tic­i­pant in the con­ver­sa­tion doesn’t start to say anything else. If we happen to start talking to someone else at the same time, we stop our attempt, wait a bit, and then try again.

The CSMA/CD process is very similar. First, the station monitors the trans­mis­sion medium. As long as this is occupied, the mon­i­tor­ing will continue. Only when the medium is free and for a certain time (in in­ter­frame spacing), will the station send a data packet. Meanwhile, the trans­mit­ter continues to monitor the trans­mis­sion medium to see if it detects any data col­li­sions. If no other par­tic­i­pant tries to send its data via the medium by the end of trans­mis­sion, and no collision occurs, the trans­mis­sion has been a success.

Fact

Col­li­sions result in a voltage dis­place­ment on the cable. This makes it possible for the stations to detect the col­li­sions.

If, however, a collision is detected, the par­tic­i­pant im­me­di­ate­ly in­ter­rupts the trans­mis­sion and instead sends an in­ter­fer­ence signal (JAM signal) so that all other stations can also detect the collision. Now the par­tic­i­pant waits for a random amount of time (backoff) before trying the trans­mis­sion again. The backoff must be random so that the next collision doesn’t occur straight away. Since both stations select a random value, the prob­a­bil­i­ty that both of them will start a transport attempt at the same time is quite low.

The trans­mis­sion attempts are counted. If the following attempts also fail and the maximum number of attempts (16) is reached, the station reports the error to the next higher network layer and then ter­mi­nates the trans­mis­sion per­ma­nent­ly. Since it is highly unlikely that a network par­tic­i­pant will reach the maximum number of attempts during a normal process, it can be assumed that a system error has occurred.

Fact

The Ethernet collision res­o­lu­tion mechanism binary ex­po­nen­tial backoff is used to mitigate permanent col­li­sions. The par­tic­i­pant must wait a while before starting a new attempt after a collision. This duration is always a random multiple of the so-called slot time. The slot time depends on the trans­mis­sion rate and is a few mi­crosec­onds long. The range of possible multiples doubles with each failed attempt so that the prob­a­bil­i­ty of si­mul­ta­ne­ous trans­mis­sion becomes ex­po­nen­tial­ly lower.

Col­li­sions

To detect whether a collision has occurred, the station si­mul­ta­ne­ous­ly checks whether the trans­mit­ted signal is identical to that on the trans­mis­sion medium. If this is not the case, another station carries out a trans­mis­sion si­mul­ta­ne­ous­ly and falsifies the signal on the bus. Col­li­sions like these occur regularly and are part of the normal operation of a local area network (LAN). However, the size of the network also increases the prob­a­bil­i­ty of col­li­sions. In this case, size refers not only to the number of par­tic­i­pants, but also to the length of the trans­mis­sion paths.

Due to it taking a while, it could be that a par­tic­i­pant has already sent a signal, but it hasn’t yet been detected by another par­tic­i­pant. This also leads to more col­li­sions and slows down the network overall.

What is a collision domain?

A collision domain is the area of a network in which par­tic­i­pants share a trans­mis­sion medium. Par­tic­i­pants receive access via the CSMA/CD procedure. However, the collision domain must not exceed a certain size: Networks cannot be enlarged in­def­i­nite­ly if the collision procedure is to remain effective. The reason for this is the speed of the trans­mis­sion and the distance it must travel.

Fact

Network protocols can be divided into seven abstract layers according to the OSI reference model. The top layer (the ap­pli­ca­tion layer) provides features for ap­pli­ca­tions, allowing users to enter and output data. These include layers for transport (where you can find TCP, for example) and switching (where the internet protocol is located). In the lowest layer (the physical layer), the task is to translate the binary digits of the computer into a physical signal that matches the trans­mis­sion medium. The collision domain is also located at this level.

For CSMA/CD to work, error messages must reach all par­tic­i­pants in the collision domain within a certain time: a data package runs from one end of the domain to the other, where a collision may occur. The cor­re­spond­ing signal must reach the first station before it’s ready for the complete trans­mis­sion of the data packet. Otherwise the station will not realize that the trans­mit­ted data is already damaged and will consider the trans­mis­sion to be success, while the data packet will be lost. Incidents like these are called “late col­li­sions” and lead to the loss of data.

With this knowledge and the in­for­ma­tion about the network tech­nol­o­gy being used, the maximum size of a collision domain can be cal­cu­lat­ed. If you assume you’re dealing with a classic half-duplex Ethernet network, this has a data trans­mis­sion rate of 10 Mbps. The smallest data package, which ac­cord­ing­ly takes the shortest time for complete trans­mis­sion, and is the most extreme case, has a size of 512 bits (64 bytes). This results in a slot time of 51.2 μs (mi­crosec­onds). The slot time describes the length of time a signal may take to the end of the collision domain and back again.

Data in networks, however, is not sent through empty space at the speed of light. You’re bound to the physical con­di­tions of the trans­mis­sion medium. The nominal velocity of prop­a­ga­tion (NVP) is the per­cent­age of the speed of light that’s reached in the medium. For example, the twisted-pair cables that are typical for local networks have an NVP value of 0.6 and the slightly older coaxial cables a value of 0.77. Data can therefore reach 180,000 km/s (112.000 m/s) (60%) or approx. 230.000 km/s (143.000 m/s) (77%) of the speed of light.

All data is used to the purpose of max­i­miz­ing the avail­abil­i­ty of a col­lec­tion of data, to guarantee the accuracy of the CSMA/CD.

                Data man­age­ment x duration of trans­mis­sion = twice the maximum length

                230.000 km/s x 0.0000512 s = 11.776 km

                (143.000 m/s x 0.0000512 s= 7.32 m)

A collision domain in a network based on coaxial cables may therefore have a maximum spread of 5.89 km (3.66 m). When cal­cu­lat­ing, the signals going in both di­rec­tions need to be taken into account. The maximum size of a collision domain cannot be extended by in­ter­con­nect­ing signal am­pli­fiers (repeaters) either, as these have no influence on the CSMA/CD procedure.

How can col­li­sions be prevented?

In general, col­li­sions cannot be com­plete­ly avoided with half-duplex systems. They are scheduled errors and CSMA/CD ensures that col­li­sions do not lead to problems during trans­mis­sion. However, this only applies to data loss. The trans­mis­sion speed decreases if there are too many col­li­sions. How do too many col­li­sions occur? If there are too many par­tic­i­pants in a collision domain, it increases the number of col­li­sions and with it the number of delays. In very bad cases, it could be that only 30% of the speed is reached.

So that is doesn’t go too far, it’s worth­while forming smaller collision domains. To do this, the network must be split up. Switches or bridges are used for this – both work on the basis of MAC. Media access control works on the second (i.e. the next highest) OSI layer, the backup layer (data link). It makes sense to form the sub networks in such a way that stations, which have to com­mu­ni­cate with each other often, are next to each other. This prevents bot­tle­necks on the bridges from canceling out the gain in speed.

Half-duplex vs. full-duplex

A dis­tinc­tion is made between half-duplex and full-duplex in network tech­nol­o­gy. Both models are related to the tech­nol­o­gy used. In the context of networks or other com­mu­ni­ca­tion tech­niques, duplex basically describes the pos­si­bil­i­ties with regard to data trans­mis­sion. Therefore, half-duplex only allows trans­mis­sion in one direction at a time. With full-duplex, however, a station can send and receive at any time.

In addition, there’s also simplex and dual-simplex when it comes to network tech­nol­o­gy. The former only allows trans­mis­sion in one direction at any time. Radio is a good example of this: It can send trans­mis­sions, but it can’t receive them. Dual-simplex, on the other hand, cor­re­sponds more to the principle of full-duplex, where both sending and receiving is possible. In contrast to full-duplex, however, this is done in two different ways.

The dis­tinc­tion between half-duplex and full-duplex has a clear effect on the CSMA/CD procedure: the fact that only one trans­mis­sion is possible with half-duplex means that a measure needs to be im­ple­ment­ed to avoid col­li­sions. This becomes tangible if you imagine the trans­mis­sion channel as a single-lane road. If traffic comes si­mul­ta­ne­ous­ly from both di­rec­tions, it leads to a collision. Full-duplex, on the other hand, is always two-track. Traffic can flow past each other from both di­rec­tions. Therefore, Carrier Sense Multiple Access with Collision Detection is not required in networks that use full-duplex: col­li­sions cannot occur.

The duplex type is linked to the technical con­di­tions and very specif­i­cal­ly to the types of cable used. Networks connected to coaxial cables can only run in half-duplex mode. Full-duplex was only possible after twisted-pair and fiber optic cables were in­tro­duced. At the same time, fast Ethernet (100 Mbps) and gigabit Ethernet (1 Gbit/s) were im­ple­ment­ed as full-duplex networks, so that CSMA/CD only plays a minor role in practice.

CSMA/CD vs. CSMA/CA

Besides the extension of Carrier Sense Multiple Access with Collision Detection, media access can also be provided with collision avoidance CSMA/CA. The latter is par­tic­u­lar­ly needed when it comes to wireless con­nec­tions; CSMA/CD doesn’t work well in radio networks for various reasons. The central problem here is the hidden station problem. This occurs when two stations do not recognize each other, but com­mu­ni­cate si­mul­ta­ne­ous­ly with a third station in the middle – which in­evitably leads to col­li­sions.

CSMA/CA, however, aims to avoid col­li­sions (as the name suggests) instead of just rec­og­niz­ing them. If a collision does occur, a cor­re­spond­ing protocol is es­tab­lished. In this respect, CSMA/CA is an adap­ta­tion of CSMA/CD to another trans­mis­sion medium.

Go to Main Menu