CSMA/CD network protocol (Ethernet)

2

1

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!

NickGreen

Posted 2011-06-07T14:01:45.507

Reputation: 165

Answers

1

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.

Max Ried

Posted 2011-06-07T14:01:45.507

Reputation: 1 521

@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 – 2011-06-07T20:08:34.277

@Spiff, if you're on shared medium, like IEEE 802.11, you're in a collision domain quite often. – Max Ried – 2011-06-07T20:13:00.737

1IEEE 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 – 2011-06-07T20:20:12.467

1

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.

CarlF

Posted 2011-06-07T14:01:45.507

Reputation: 8 576

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 – 2011-06-07T17:47:13.307