I know that coaxial cable can use CSMA/CD but can UTP used it also? and can you guys explain it how is it done or work? thank you so much for your answer
First a quick note on terminology. The Ethernet standards don't use the terms "hub" and "switch". What the market calls a hub is a multi-port repeater according to the standards and what the market calls a switch is a multi-port bridge according to the standards.
10BASE5 and 10BASE2 coaxial Ethernet used CSMA/CD to manage collisions on the coaxial cable segment. Repeaters could be used to join multiple segments. Repeaters were dumb low level devices, they had no packet buffers and were designed to ensure that if a collision happened on any connected segment it would be seen on every connected segment. This meant detecting collisions and when a collision was detected (either with the repeater or otherwise) on one port a "JAM signal" would be output to the other ports.
Bridges on the other hand operate at a higher level. They work with complete frames and have no need to repeat collisions between ports.
10BASE-T and 100BASE-TX have separate pairs for transmit and receive. With 1000BASE-T things get more complicated but fundamentally there is still a separate data channel in each direction.
These standards can operate in two modes known as "half duplex" and "full duplex". In half duplex mode the twisted pair cable essentially acts as a virtual coaxial cable. If transmission and reception happen at the same time then it is treated a collision even though no signals collided on the wire. The Ethernet controllers use CSMA/CD just as they would on a coaxial cable. Repeaters (hubs) forward collisions to other segments just as they did with coaxial Ethernet.
In full duplex mode transmission is allowed to happen in both directions at the same time and CSMA/CD is not used. Repeaters (hubs) cannot be used on links running in full duplex mode because they would have no way of handling conflicting transmissions.
It is important that both ends of a link are in the same duplex mode. If one end is set to full duplex while the other end is set to half duplex there will be massive packet loss and essentially unusable network performance. Nowadays this is normally handled through auto-negotiation but the system isn't perfect. In particular there are likely to be problems if one end is set to forced full duplex and the other end is set to autonegotiate.
On a modern network the vast majority of links should be running in full duplex mode. CSMA/CD should normally only be used on links to legacy equipment.
Yes, UTP permit it. In fact, this is the access mode with Ethernet works.
A collision occurs when two or more devices on a network attempt to transmit over a single data channel (e.g., a twisted pair copper wire cable or an optical fiber cable) simultaneously. It is detected by all participating devices, and, after a brief, random, and different interval of time (called a backoff delay) has elapsed for each device, the devices attempt to transmit again. If another collision occurs, the time intervals from which the random waiting times are selected are increased step-by-step in a process referred to as exponential back off.
CSMA/CD is a modification of pure CSMA. Carrier sense refers to the fact that a transmitting device listens for a carrier wave (i.e., a waveform that carries signals) before attempting to transmit. That is, it first tries to detect the presence of an encoded signal from another device. If a carrier is sensed, the device waits for the transmission in progress to finish before starting its own transmission.
Multiple access describes the fact that multiple devices send and receive on the medium. Transmissions by one node are generally received by all other nodes using the medium.
Collision detection is used to improve CSMA performance by terminating transmission as soon as a collision is detected, and reducing the probability of a second collision on the next try. The techniques used for detecting collisions depend on the type of media: in the case of electrical wires, for example, collisions are detected by comparing the transmitted data with the received data.
CSMA/CD operates at the physical layer is the bottom level in the OSI (open systems interconnection) seven layer model, which is used to standardize and simplify definitions with regard to computer networks. This layer defines all physical and electrical specifications for devices used to interface to the network, and it deals with data only in terms of raw bits (i.e., it does not recognize MAC addresses, IP addresses and packets).
A major feature of CSMA/CD is that it is simple to implement. This has helped make it an international standard and an important part of the ethernet, which is the most widely deployed architecture for LANs (local area networks).