How does the CSMA-CD protocol work

Access method in the Ethernet

The stations connected in a network use hardware that is comparable in terms of network infrastructure. This makes it easier to send and receive the data. The network nodes do not need to coordinate with a specific transmitting node, but rather they receive all data traffic and only use the data addressed to it. In return, each station can send data into the network in the hope that the recipient will overhear.

This method has the disadvantage that when two or more stations are sending data at the same time, data is superimposed and the message content is destroyed. Access procedures had to be developed for the most effective and undisturbed data transport possible. Two types of procedure are used:

Nondeterministic or stochastic method
All stations have equal rights and can randomly send data to the network at any time. If interference occurs due to overlapping, the attempt to send is repeated after a certain waiting time. The more active stations there are in the network, the more disruptions can be expected. The waiting times and repetitions worsen the transmission rate and thus the network performance.
Deterministic procedure
There is a special assignment of rights in which only one station that has received the right to transmit can also transmit. After receiving the data, a new authorization will be granted. The hardware and control effort increases the costs. The network can be expanded to the maximum number of nodes without any loss of performance. The transmission time is predictable and determinable.
Carrier Sense Multiple Access
The CSMA method is the best known and probably the most widely used nondeterministic method in Ethernet. A very similar predecessor method was used by the Hawaiian ALOHA island radio network. Each transmitter station could send a data packet via radio at any time. If the receiver has received it without errors, it will send a confirmation on a different fixed channel frequency. If this was missing, the station could send the data again after a randomly generated waiting time or another station would try to send it. With a ratio of transmission time to total time of around 1/5, the maximum data throughput was reached.

The effectiveness for CSMA could be almost doubled through timing control. All network stations are synchronized to a time stamp generator. Each station was allowed to send a data packet within its fixed time window, the time slot. A method still used today in communication by satellite. The time division multiplex method of ISDN telecommunication is comparable with it.

The CSMA / CD method used in the Ethernet works with every network topology. If a station wants to send data, it checks whether the line is free, using the Carrier Sense (CS) method. If it detects data traffic based on a voltage value, it waits for the end of the transmission and an additional 9.6 μs. This period of time is called the inter frame gap.

If the channel is de-energized at this point in time, it sends its addressed data packet to the line. If a more distant station, known as the Multiple Access (MA) method, sends data shortly afterwards to the line that is still recognized there, then the data is superimposed. It causes data levels that are too high and too low. They are recognized by the sending stations because they continuously check the channel during the sending process. In the case of a star topology, the components of the network center such as hub, switch ... recognize the collision.

The method is called Collision Detect (CD). It generates and sends a 32-bit long sequence of 1010 ... level changes as a unique JAM signal, that is 4 bytes in the hexadecimal code AAAAAAAA. The attempt to send the data is aborted and all stations ready to send wait a randomly generated time, which also depends on the number of previous unsuccessful attempts by the station. Then a new test process begins for sending. If there was no collision, only the station addressed in the data frame accepts the data.

Signal delay

A collision can only be recognized by the transmitting station if it is within its transmission time. This depends on the package size. The shortest data packet as an Ethernet frame is set to a length of 64 bytes or 512 bits. At a data rate of 10 Mbit / s, the transmission time for this packet is 51.2 μs. If the most distant station in the network were to transmit at the same time, its signal must be recognized by the primary transmitting station within 51.2 μs or 512 bit times. The maximum signal propagation time, known as Round Trip Delay (RTD), must be below 512 bit times.

Each network component contributes to the signal delay. The sum of all values, some of which can only be estimated, must be smaller than the RTD value, otherwise the CSMA / CD protocol cannot be executed correctly. Late collisions occur. They place an unnecessary load on the data traffic, since they later have to be recognized as defective packets by higher-level protocols and then requested again.

The CSMA / CD method was initially developed for smaller networks with a bus topology. In the Ethernet, it is currently also in use in large and fast networks. The method does not allow the determination of an exact transmission time. Since the Ethernet is based on a logical bus structure, the data packets are picked up at the end of the bus by the terminating resistor, which means that the line is always voltage-free.

APPLE uses a modified CSMA method in the Apple Talk protocol. The station wishing to send checks whether the line is free and then sends a clear distant signal. This "Attention broadcast" must be received and observed by all other stations. You then wait for the sending process. The CSMA / CA procedure, the Collision Avoid (CA), thus avoids any collision, but can reduce the overall data transmission rate.

Token Passing

Token ring

The process was developed for ring networks. At least the network card with the transceiver is permanently active in all network stations. A special data packet, called a token or free token, runs on the line from station to station. As a rule, it is generated by a network node designated as a monitor station and sent to the neighboring station. She receives the token and passes it on to the nearest neighbor. The station that receives the free token is authorized to send. Token passing is a deterministic process where only one station is allowed to send. The data throughput can be determined in terms of time through a fixed holding time of the token in the station and a defined size of the data frame.

The station authorized to send with the free token sets the occupancy bit in the token and adds the data packet with the recipient address. It is sent to the neighboring network node as an occupancy or busy token. The data packet passes through all stations to the recipient. This confirms correct receipt with a confirmation character, the acknowledge, and sends the busy token on. If the original sender receives this token, he deletes it and sends a new free token into the ring.

The token passing process works as long as all stations are active and working properly. If a network node fails or generates errors, communication in the entire network breaks down. These errors can be avoided by expanding to a double ring system with an additional monitor station for monitoring the token and ring line distributors. Ring line distributors enable the number of stations in the ring to be changed during operation. Outwardly, such networks appear to have a star-ring structure. In addition to the higher hardware requirements, there is also a more extensive control system.

Token bus

The token procedure could be expanded for bus, star and tree topologies. The mode of operation corresponds to a logical ring. All stations on the line bus receive data and thus receive the token. The send release is determined by the node addresses. The authorization to send counts from the highest to the next lowest address. If the node with the lowest address has accepted the token, it enters the highest address and sends the token back. The token bus procedure is standardized according to IEEE 804.2.

The process is used in the industrial sector and in local networks with ARCNET technology. The transmission rate is lower than with the token ring and Ethernet method. A maximum of 20 Mbit / s can be achieved with the advantage of being collision-free, which partially eliminates the disadvantage of a lower speed.

The advantage of the deterministic token procedure is that the message traffic can be determined over time and that the network can be fully expanded without sacrificing the maximum possible transmission rate. The method is particularly suitable for networks with a continuously very high data flow in mainframe systems and network connections in long-distance traffic.