Path: utzoo!attcan!uunet!mcsun!unido!fauern!tumuc!guug!rup From: rup@guug.guug.de Newsgroups: comp.dcom.lans Subject: Re: CSMA/CD algorithm/code needed Message-ID: <116@guug.guug.de> Date: 4 Jul 90 11:57:45 GMT References: <1990Jun25.182126.12942@brutus.cs.uiuc.edu> <1990Jun25.190243.13144@brutus.cs.uiuc.edu> Sender: rup@guug.guug.de Reply-To: rup@guug.UUCP (Rupert Grafendorfer) Distribution: comp Organization: GUUG e.V., Munich, W. Germany Lines: 52 In article <1990Jun25.190243.13144@brutus.cs.uiuc.edu> cattanac@casca.cs.uiuc.edu (Scott Cattanach) writes: >cattanac@clitus.cs.uiuc.edu (Scott Cattanach) writes: > > >I forgot to be clearer, I am really looking for the way to determine >how long to wait to retrans after a collision. IEEE 802.3 states: Collision Backoff and Retransmission When a transmission attempt has terminated due to a collision, it is retried by the transmitting CSMA/CD MAC sublayer until either it is successful or a maximum number of attempts (attemptLimit) have been made and all have terminated due to collisions. Note that all attempts to transmit a given frame are completed before any subsequent outgoing frames are transmitted. The scheduling of the retransmission is determined by a controlled randomization process called "truncated binary exponential backoff". At the end of enforcing a collision (jamming), the CSMA/CD sublayer delays before attempting to retransmit the frame. The delay is an integer multiple of slotTime. The number of slot times to delay before the nth retransmission attempt is chosen as a uniformly distributed random integer r in the range 0 <= r < 2**k where k= min (n, 10) If all attemptLimit attempts fail, this event is reported as an error. Algorithms used to generate the integer r should be designed to minimize the correlation between the numbers generated by any two stations at any given time. Note that the values given above define the most aggressive behavior that a station may exhibit in attempting to retransmit after a collision. In the course of implementing the retransmission scheduling procedure, a station may introduce extra delays which will degrade its own throughput, but in no case may a station's retransmission scheduling result in a lower average delay between retransmission attempts than the procedure defined above. (Quoted from IEEE 802.3) Parameters: slotTime 512 bit times attemptLimit 16 backoffLimit 10 ... If you want to have the algorithms in pseudo-code purchase the IEEE 802.3 specs. Rup Grafendorfer BICC Data Networks