SeminarCarrier sense multiple accessCarrier Sense Multiple Access (CSMA) is a probabilistic Media Access Control (The media access control (MAC) data communication protocol sub-layer, also known as the medium access control, is a sublayer of the data link layer specified in the seven-layer OSI model (layer 2). It provides addressing and channel access control mechanisms that make it possible for several terminals or network nodes to communicate within a multiple access network that incorporates a shared medium, e.g. Ethernet. The hardware that implements the MAC is referred to as a medium access controller.)(MAC) protocol in which a node verifies the absence of other traffic before transmitting on a shared transmission medium, such as an electrical bus, or a band of the electromagnetic spectrum."Carrier Sense" describes the fact that a transmitter uses feedback from a receiver that detects a carrier wave before trying to send. That is, it tries to detect the presence of an encoded signal from another station before attempting to transmit. If a carrier is sensed, the station waits for the transmission in progress to finish before initiating its own transmission. In other words, CSMA is based on the principle "sense before transmit" or "listen before talk"."Multiple Access" describes the fact that multiple stations send and receive on the medium. Transmissions by one node are generally received by all other stations using the medium.Protocol modificationsCarrier sense multiple access with collision detection (CSMA/CD) is a modification of CSMA. CSMA/CD 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 retry.Carrier sense multiple access with collision avoidance (CSMA/CA) is a modification of CSMA. Collision avoidance is used to improve the performance of CSMA by attempting to be less "greedy" on the channel. If the channel is sensed busy before transmission then the transmission is deferred for a "random" interval. This reduces the probability of collisions on the channel.CSMA access modes1-persistent When the sender (station) is ready to transmit data, it checks if the physical medium is busy. If so, it senses the medium continually until it becomes idle, and then it transmits a piece of data (a frame). In case of a collision, the sender waits for a random period of time and attempts to transmit again. 1-persistent CSMA is used in CSMA/CD systems including Ethernet.P-persistent This is a sort of trade-off between 1 and non-persistent CSMA access modes. When the sender is ready to send data, it checks continually if the medium is busy. If the medium becomes idle, the sender transmits a frame with a probability p. If the station chooses not to transmit (the probability of this event is 1-p), the sender waits until the next available time slot and transmits again with the same probability p. This process repeats until the frame is sent or some other sender starts transmitting. In the latter case the sender monitors the channel, and when idle, transmits with a probability p, and so on. p-persistent CSMA is used in CSMA/CA systems including WiFi and other packet radio systems.Non-persistent Non persistent CSMA is less aggressive compared to P persistent protocol. In this protocol, before sending the data, the station senses the channel and if the channel is idle it starts transmitting the data. But if the channel is busy, the station does not continuously sense it but instead of that it waits for random amount of time and repeats the algorithm. Here the algorithm leads to better channel utilization but also results in longer delay compared to 1 –persistent.O-persistent Each station is assigned a transmission order by a supervisor station. When medium goes idle, stations wait for their time slot in accordance with their assigned transmission order. The station assigned to transmit first transmits immediately. The station assigned to transmit second waits one time slot (but by that time the first station has already started transmitting). Stations monitor the medium for transmissions from other stations and update their assigned order with each detected transmission (i.e. they move one position closer to the front of the queue. O-persistent CSMA is used by CobraNet, LonWorks and the controller area network.Types of CSMA1. CSMA/CD 2. CSMA /CA1. Carrier sense multiple access with collision detection:-Carrier sense multiple access with collision detection (CSMA/CD) is a Media Access Control method in which,• a carrier sensing scheme is used.• a transmitting data station that detects another signal while transmitting a frame, stops transmitting that frame, transmits a jam signal, and then waits for a random time interval before trying to resend the frame.CSMA/CD is a modification of pure carrier sense multiple access (CSMA). CSMA/CD is used to improve CSMA performance by terminating transmission as soon as a collision is detected, thus shortening the time required before a retry can be attempted.DIAGRAM :- Main procedure:-1. Is my frame ready for transmission? If yes, it goes on to the next point.2. Is medium idle? If not, wait until it becomes ready.3. Start transmitting.4. Did a collision occur? If so, go to collision detected procedure.5. Reset retransmission counters and end frame transmission.Collision detected procedure:-1. Continue transmission until minimum packet time is reached to ensure that all receivers detect the collision.2. Increment retransmission counter.3. Was the maximum number of transmission attempts reached? If so, abort transmission.4. Calculate and wait random backoff period based on number of collisions.5. Re-enter main procedure at stage 1.This can be likened to what happens at a dinner party, where all the guests talk to each other through a common medium (the air). Before speaking, each guest politely waits for the current speaker to finish. If two guests start speaking at the same time, both stop and wait for short, random periods of time (in Ethernet, this time is measured in microseconds). The hope is that by each choosing a random period of time, both guests will not choose the same time to try to speak again, thus avoiding another collision.Methods for collision detection are media dependent, but on an electrical bus such as 10BASE-5 or 10BASE-2, collisions can be detected by comparing transmitted data with received data or by recognizing a higher than normal signal amplitude on the bus.Jam signal:-The jam signal is a signal that carries a 32-bit binary pattern sent by a data station to inform the other stations that they must not transmit.The maximum jam-time is calculated as follows: The maximum allowed diameter of an Ethernet installation is limited to 232 bits. This makes a round-trip-time of 464 bits. As the slot time in Ethernet is 512 bits, the difference between slot time and round-trip-time is 48 bits (6 bytes), which is the maximum "jam-time".(ETHERNET- It is a family of computer networking technologies for local area networks (LANs) commercially introduced in 1980. Standardized in IEEE 802.3, Ethernet has largely replaced competing wired LAN technologies. In the OSI reference system, Ethernet is at the Data Link layer.)This in turn means: A station noting a collision has occurred is sending a 4 to 6 byte long pattern composed of 16 1-0 bit combinations. Note: The size of this jam signal is clearly beyond the minimum allowed frame-size of 64 bytes.The purpose of this is to ensure that any other node which may currently be receiving a frame will receive the jam signal in place of the correct 32-bit MAC CRC, this causes the other receivers to discard the frame due to a CRC error.Applications:-CSMA/CD was used in now obsolete shared media Ethernet variants (10BASE5, 10BASE2) and in the early versions of twisted-pair Ethernet which used repeater hubs. Modern Ethernet networks built with switches and full-duplex connections no longer utilize CSMA/CD though it is still supported for backwards compatibility. IEEE Std 802.3, which defines all Ethernet variants, for historical reasons still bears the title "Carrier sense multiple access with collision detection (CSMA/CD) access method and physical layer specifications".2. Carrier sense multiple access with collision avoidance.:-Carrier sense multiple access with collision avoidance (CSMA/CA), in computer networking, is a wireless network multiple access method in which:• a carrier sensing scheme is used.• a node wishing to transmit data has to first listen to the channel for a predetermined amount of time to determine whether or not another node is transmitting on the channel within the wireless range. If the channel is sensed "idle," then the node is permitted to begin the transmission process. If the channel is sensed as "busy," the node defers its transmission for a random period of time. Once the transmission process begins, it is still possible for the actual transmission of application data to not occur.CSMA/CA is a modification of carrier sense multiple access.Collision avoidance is used to improve CSMA performance by not allowing wireless transmission of a node if another node is transmitting, thus reducing the probability of collision due to the use of a random truncated binary exponential backoff time.Optionally, but almost always implemented, an IEEE 802.11 RTS/CTS exchange can be required to better handle situations such as the hidden node problem in wireless networking.Hidden node problem:-In wireless networking, the hidden node problem or hidden terminal problem occurs when a node is visible from a wireless access point (AP), but not from other nodes communicating with said AP. This leads to difficulties in media access control.Exponential backoffExponential backoff is an algorithm that uses feedback to multiplicatively decrease the rate of some process, in order to gradually find an acceptable rate.Binary exponential backoff / truncated exponential backoff:-In a variety of computer networks, binary exponential backoff or truncated binary exponential backoff refers to an algorithm used to space out repeated retransmissions of the same block of data, often as part of network congestion avoidance.Examples;- are the retransmission of frames in carrier sense multiple access with collision avoidance (CSMA/CA) and carrier sense multiple access with collision detection (CSMA/CD) networks, where this algorithm is part of the channel access method used to send data on these network. In Ethernet networks, the algorithm is commonly used to schedule retransmissions after collisions. The retransmission is delayed by an amount of time derived from the slot time and the number of attempts to retransmit.Diagram:- CSMA/CA is a layer 2 access method, not a protocol of the OSI model.Details:-The collision avoidance is used to improve the performance of CSMA by attempting to divide the wireless channel somewhat equally among all transmitting nodes within the collision domain. CSMA/CA differs from CSMA/CD due to the nature of the medium, the radio frequency spectrum. Collisions cannot be detected while occurring at the sending node, thus it is vital for CSMA/CA or another access method to be implemented. CSMA/CA is used in 802.11 based wireless LANs and other wired and wireless communication systems. One of the problems of wireless data communications is that it is not possible to listen while sending, therefore collision detection is not possible. Another reason is the hidden terminal problem, whereby a node A, in range of the receiver R, is not in range of the sender S, and therefore cannot know that S is transmitting to R. IEEE 802.11 RTS/CTS Exchange:-CSMA/CA can optionally be supplemented by the exchange of a Request to Send (RTS) packet sent by the sender S, and a Clear to Send (CTS) packet sent by the intended receiver R. Thus alerting all nodes within range of the sender, receiver or both, to not transmit for the duration of the main transmission. This is known as the IEEE 802.11 RTS/CTS exchange. Implementation of RTS/CTS helps to solve the hidden node problem that is often found in wireless networking. Performance:-CSMA/CA performance is based largely upon the modulation technique used to transmit the data between nodes. Studies show that under ideal propagation conditions (simulations), Direct Sequence Spread Spectrum (DSSS) provides the highest throughput for all nodes on a network when used in conjunction with CSMA/CA and the IEEE 802.11 RTS/CTS exchange under light network load conditions. Frequency Hopping Spread Spectrum (FHSS) follows distantly behind DSSS with regard to throughput with a greater throughput once network load becomes substantially heavy. However, the throughput is generally the same under real world conditions due to radio propagation factors. Usage:-• GNET - an early proprietary LAN protocol• Apple's LocalTalk implemented CSMA/CA on an electrical bus using a three-byte jamming signal.• 802.11 RTS/CTS implements virtual carrier sensing using short request to send and clear to send messages for WLANs (802.11 mainly relies on physical carrier sensing though).• IEEE 802.15.4 (Wireless PAN) uses CSMA/CA• NCR WaveLAN - an early proprietary wireless network protocol• HomePNA (The HomePNA Alliance (formerly the Home Phoneline Networking Alliance, also known as HPNA) is an incorporated non-profit industry association of companies that develops and standardizes technology for home networking over the existing coaxial cables and telephone wiring within homes)• Bus networks• The ITU-T G.hn standard, which provides a way to create a high-speed (up to 1 Gigabit/s) local area network using existing home wiring (power lines, phone lines and coaxial cables).