Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I hope I'm in the right stackexchange subsite (can't seem to find a networking related subsite..).

I've got 2 questions concerning the CSMA/CD network protocol:

  1. Before sending some (say 5) messages over the bus, is there some kind of formula how long it will take to transmit all messages succesfully (so without collisions)? Or is the time unknown when starting to transmit?

  2. If (1) is no -> Is it possible to calculate the maximum time of the transmitting? So for example -> 'it'll take max. 10ms before all the messages are transmitted succesfully'.

I hope my questions are clear to you! If not, I'm glad to clearify when needed!

Thanks for your time!

share|improve this question
up vote 1 down vote accepted

In case you're on your own and otherwise empty collision domain the calculation should be the following for Ethernet:

Inter fram gap = 96 Bit / link speed (in MBit/s)
Packetsize = Preamble (8 bytes) + Ethernetframe (68-1522 bytes)
Time = Packetsize / Link speed (either 10 MBit/s, 100 MBit/s, 1 GBit/s, 10 GBit/s) + Inter frame gap

So to transfer a full size standard frame of

8 bytes preamble + 22 bytes header + 1500 bytes payload = 1530 bytes

over a 1 GBit/s connection

Time = 1530 bytes / 1 GBit/s = 12.24 µs

and the inter frame gap of 96 ns makes 12.336 µs.

Do this calculation for each packet and add the durations.

This is the minimum timespan needed as, as soon as you are not on your own collision domain, there is no way to calculate the time needed, as it could be that you are even unable to send it at all.

share|improve this answer
Thanks for your answer! – NickGreen Jun 7 '11 at 17:47
@NickGreen, note that you're almost always on an empty collision domain nowadays. Collisions can only happen on half-duplex links, and if you're on a switch, you're on a full-duplex link. Hubs fell out of use early in the 100 mbit days, and the GigE spec doesn't even allow hubs at all. It's very uncommon to find any hubs in use anymore. – Spiff Jun 7 '11 at 20:08
@Spiff, if you're on shared medium, like IEEE 802.11, you're in a collision domain quite often. – Max Ried Jun 7 '11 at 20:13
IEEE 802.11 is CSMA/CA (A = Avoidance), not CSMA/CD (D = Detection), so since he specifically asked about CSMA/CD, I don't think the 802.11 case applies. If it did, your calculations in your Answer would be woefully insufficient for 802.11, because an 802.11 TXOP and the inter-frame timing rules are far more complex than wired Ethernet. – Spiff Jun 7 '11 at 20:20

CSMA/CD is inherently not fully predictable, because you don't know what the other stations on the network will do. You can calculate the minimum time (as bot47 did) but max time is not known in advance.

share|improve this answer
Unfortunaly I haven't got enough rep. for giving you a +1, thx for your answer but I've accepted the more detailed answer as the 'accepted answer' – NickGreen Jun 7 '11 at 17:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .