Contention Resolution on the D channel for Point-to-Multipoint configuration

                  In a Point-to-Multipoint configuration, where multiple devices share a communications line, occurs a problem in determining which device is allowed to transmit next.  LAPD and the BRI physical layer implement a contention scheme for the D-channel in such point-to-multipoint configuration.
                  The solution is a contention-resolution scheme that uses perfect scheduling with prioritization and fairness. With this scheme, no data is ever lost due to a collision. Here, as long as any device has a frame to send , the bus will be active. So there are no wasted or lost time slots and the network resources are optimally used. Collisions will not destroy data because of the electronics of the station's passive connection to the bus and the line code used for signaling.
                  This contention-resolution scheme utilizes the mechanism by which the NT echoes back all D-channel bits sent in the TE-to-NT direction. so, all TEs can listen to the D-channel while they transmit. If multiple terminals transmit simultaneously on the D-channel, the only way that a 1-bit will be echoed back is if they all transmitted a 1; if any TE transmits a 0, a 0 will be echoed back. This phenomenon is due to the physical layer implementation mechanism employed by the ISDN.
                   All stations monitor the echoed D-channel by comparing the echo to their own transmission. If a TE detects an echo bit that is the same as the last bit it transmitted, it continues to transmit; if it detects a bit that is different, it stops its transmission.
 
                   There are two more issues involved in the contention scheme. First, to determine the type of transmissions that should have priority on the D-channel. Second, to prevent one or more TEs from monopolizing ; use of the D-channel.
                   Frames carrying signaling messages are given priority (priority class 1) over frames carrying nonsignaling messages (priority class 2). priority class 1 frames have a SAPI 0; frames with a nonzero SAPI are in ; priority class 2.
                   To ensure that no TE can dominate the D-channel, normal and lower priorities are defined within each class. The priorities are defined within each class. The priorities are enforced by the number of contiguous 1 bits that must be detected by a TE before it can start to transmit, given in the table below. After a TE transmits the final flag of  a frame, it will let the line become idle (i.e.., all 1s). since all TEs are monitoring the D-channel, they all know when the channel is available for use.
 
                                                                                                      ____
                    priority            class 1(SAPI =0)           class 2(SAPI #0)
                    Normal                       8                                  10
                    Lower                         9                                  11_______
 
                  All the stations start out in the normal priority level within their class. After detecting the required number of 1 bits, one or more TEs may begin to transmit. Although there may be collisions if more than one TE transmits, any TE sending a 0 sees its own data being successfully transmitted ; optionally, if all TEs send a 1, they all see their data being sent successfully. Even with collisions, only one station's frame will ultimately be successful.
                  When a TE successfully transmits a frame, it moves into the lower priority within that class (i.e., it must wait for a higher number of 1s before can transmit again). If a station is in the lower priority and detects the number of 1s associated with that priority class, it moves back to the normal priority (and, optionally, transmits). By this system, all TEs with signaling messages (SAPI 0) will have access to the D-channel before any TEs with nonsignaling messages. Furthermore, within each priority class all TEs wanting to transmit will get one opportunity to transmit on the D-channel before any TE gets a second opportunity.