Collision ( collision - collision error, collision) - in the terminology of computer and network technologies, the superposition of two or more frames from stations trying to transmit a frame at the same time in a shared access transmission medium.
Reasons
In early modifications of Ethernet networks, a medium access method with a carrier sense and collision detection ( CSMA / CD ) was used. This method is used exclusively in networks with a logical common bus (which include the radio networks that generated this method). All computers of such a network have direct access to a shared bus, which could be implemented using a coaxial cable or hub , so it can be used to transfer data between any two network nodes. At the same time, all computers in the network have the ability to immediately (taking into account the propagation delay of the signal in the physical environment) receive data that any of the computers began to transmit to the common bus. The simplicity of the wiring diagram is one of the factors that determined the success of the Ethernet standard. It is believed that the cable to which all stations are connected operates in a multiple access mode (Multiple Access, MA).
Media Access Stages
All data transmitted over the network is placed in frames of a certain structure and supplied with a unique address of the destination station. To be able to transmit a frame, the station must ensure that the shared medium is free. This is achieved by listening to the fundamental harmonic of the signal, which is also called carrier-sense. A sign of an unoccupied environment is the absence of a carrier frequency on it, which, with the Manchester coding method, is 5-10 MHz, depending on the sequence of units and zeros being transmitted at the moment.
If the medium is free, then the node has the right to start transmitting the frame. All stations connected to the cable can recognize the fact of frame transmission, and that station that recognizes its own address in the frame headers, writes its contents to its internal buffer, processes the received data, transfers it up its stack, and then sends the frame via cable -answer. The address of the source station is contained in the original frame, so the recipient station knows who needs to send the answer. After the transmission of the frame, all network nodes are required to withstand a technological pause (Inter Packet Gap) of 9.6 ΞΌs. This pause, also called the inter-frame interval, is needed to bring the network adapters to their original state, as well as to prevent exclusive capture of the medium by one station. After the technological pause, the nodes have the right to start transmitting their frame, since the environment is free.
Collision occurrence
With the described approach, a situation is possible when two stations simultaneously try to transmit a data frame over a common medium. The mechanism for listening to the medium and the pause between frames do not guarantee protection against the occurrence of such a situation when two or more stations simultaneously decide that the medium is free and begin to transmit their frames. They say that this results in a collision, since the contents of both frames collide on a common cable and information is distorted - the encoding methods used in Ethernet do not allow the separation of the signals of each station from a common signal.
Collision is a normal situation in Ethernet networks. For a collision to occur, it is not necessary that several stations begin transmission absolutely simultaneously, such a situation is unlikely. It is much more likely that a collision arises due to the fact that one node starts transmitting earlier than the other, but the signals of the first one simply do not have time to get to the time when the second node decides to start transmitting its frame. That is, collisions are a consequence of the distributed nature of the network.
In order to correctly handle the collision, all stations simultaneously monitor the signals appearing on the cable. If the transmitted and observed signals are different, then collision detection (CD) is recorded. To increase the likelihood of early collision detection by all stations in the network, the station that detected the collision interrupts the transmission of its frame (in an arbitrary place, perhaps not at the byte boundary) and reinforces the collision situation by sending a special 32-bit sequence called a jam sequence to the network.
A clear recognition of collisions by all network stations was a prerequisite for the correct operation of the network of early Ethernet modifications. In modern switched wired Ethernet networks, only two network ports in duplex transmission mode are connected to each segment of the data line (twisted pair cable or optical cable) and collisions are fundamentally impossible.