In a local Ethernet network (IEEE 802.3), all network par­ti­cipants 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 organises 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­no­logy offers other pos­sib­il­it­ies. However, it doesn’t hurt to be know­ledge­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­nic­a­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) sim­ul­tan­eously and they interfere with one other.

Defin­i­tion

To un­der­stand how CSMA/CD works, it makes sense to break down the in­di­vidu­al com­pon­ents of the term:

  • Carrier sense (CS): The carrier state detection makes sure that all network par­ti­cipants check whether the medium is currently free – only then does the protocol initiate data trans­mis­sion
  • Multiple access (MA): Several par­ti­cipants (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­nic­a­tion, it is important that the par­ti­cipants don’t all speak at once, which can be confusing. Instead, they should speak one after the other, so that each par­ti­cipant can fully un­der­stand what the others are con­trib­ut­ing to the dis­cus­sion. Without realising, 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­ti­cipant has finished their con­tri­bu­tion for the time being, we wait a short time and only start talking when the same par­ti­cipant or another par­ti­cipant 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­it­or­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­ti­cipant 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­ti­cipant im­me­di­ately 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­ti­cipant 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­ab­il­ity 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­min­ates the trans­mis­sion per­man­ently. Since it is highly unlikely that a network par­ti­cipant 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­ol­u­tion mechanism binary ex­po­nen­tial backoff is used to mitigate permanent col­li­sions. The par­ti­cipant 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­cro­seconds long. The range of possible multiples doubles with each failed attempt so that the prob­ab­il­ity of sim­ul­tan­eous trans­mis­sion becomes ex­po­nen­tially lower.

Col­li­sions

To detect whether a collision has occurred, the station sim­ul­tan­eously 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 sim­ul­tan­eously 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­ab­il­ity of col­li­sions. In this case, size refers not only to the number of par­ti­cipants, but also to the length of the trans­mis­sion paths.

Due to it taking a while, it could be that a par­ti­cipant has already sent a signal, but it hasn’t yet been detected by another par­ti­cipant. 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­ti­cipants share a trans­mis­sion medium. Par­ti­cipants receive access via the CSMA/CD procedure. However, the collision domain must not exceed a certain size: Networks cannot be enlarged in­def­in­itely 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­plic­a­tion layer) provides features for ap­plic­a­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­ti­cipants 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­res­pond­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 realise 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­form­a­tion about the network tech­no­logy being used, the maximum size of a collision domain can be cal­cu­lated. 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­ingly 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­cro­seconds). 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 propaga­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­im­ising the avail­ab­il­ity 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 dir­ec­tions need to be taken into account. The maximum size of a collision domain cannot be extended by in­ter­con­nect­ing signal amp­li­fi­ers (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­pletely 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­ti­cipants 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­nic­ate with each other often, are next to each other. This prevents bot­tle­necks on the bridges from can­cel­ling 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­no­logy. Both models are related to the tech­no­logy used. In the context of networks or other com­mu­nic­a­tion tech­niques, duplex basically describes the pos­sib­il­it­ies 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­no­logy. 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­res­ponds 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­men­ted to avoid col­li­sions. This becomes tangible if you imagine the trans­mis­sion channel as a single-lane road. If traffic comes sim­ul­tan­eously from both dir­ec­tions, it leads to a collision. Full-duplex, on the other hand, is always two-track. Traffic can flow past each other from both dir­ec­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 spe­cific­ally 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 fibre optic cables were in­tro­duced. At the same time, fast Ethernet (100 Mbps) and gigabit Ethernet (1 Gbit/s) were im­ple­men­ted 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­larly 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 recognise each other, but com­mu­nic­ate sim­ul­tan­eously with a third station in the middle – which in­ev­it­ably leads to col­li­sions.

CSMA/CA, however, aims to avoid col­li­sions (as the name suggests) instead of just re­cog­nising them. If a collision does occur, a cor­res­pond­ing protocol is es­tab­lished. In this respect, CSMA/CA is an ad­apt­a­tion of CSMA/CD to another trans­mis­sion medium.

Go to Main Menu