Exercises — Ethernet (IEEE 802.3) — CSMA - CD, frame format
Parent: Ethernet (IEEE 802.3) — CSMA/CD & Frame Format
Symbols we reuse (all built in the parent, restated so line one stands alone):
Level 1 — Recognition
Exercise 1.1 (L1)
The bytes below are Ethernet fields shuffled. Order them from first-on-wire to last, and give each field's size in bytes:
FCS, Source MAC, Preamble, Data+Pad, Destination MAC, SFD, Length/Type.
Recall Solution 1.1
Wire order (mnemonic "Please Send Dad Some Lovely Data First"):
| Order | Field | Bytes |
|---|---|---|
| 1 | Preamble | 7 |
| 2 | SFD (Start Frame Delimiter) | 1 |
| 3 | Destination MAC (DA) | 6 |
| 4 | Source MAC (SA) | 6 |
| 5 | Length/Type | 2 |
| 6 | Data + Pad | 46–1500 |
| 7 | FCS (CRC-32) | 4 |
WHAT / WHY: Preamble+SFD lead so the receiver clock can lock on before real data arrives; FCS trails so it covers everything before it. See MAC Addresses for the two 6-byte address fields and CRC and Error Detection for the FCS.
Exercise 1.2 (L1)
State what each letter of CSMA/CD means, in one phrase each.
Recall Solution 1.2
- CS — Carrier Sense: listen before you talk.
- MA — Multiple Access: everyone shares one medium equally.
- CD — Collision Detection: keep listening while sending; abort on garble.
Exercise 1.3 (L1)
Fill the blanks: minimum Ethernet frame (DA→FCS) is ____ bytes; maximum is ____ bytes; the preamble+SFD are ____ counted in these limits.
Recall Solution 1.3
Minimum bytes, maximum bytes, and preamble+SFD are not counted (they sit before the frame proper).
Level 2 — Application
Exercise 2.1 (L2)
A Mbps Ethernet has worst-case round-trip time . Compute in bits and bytes.
Recall Solution 2.1
WHY the formula: to detect a collision, the sender must still be transmitting when the far-end echo returns; that echo takes the full round trip. So , i.e. (with in bits), giving . This is exactly the 64-byte minimum.
Exercise 2.2 (L2)
Cable length , signal speed , bandwidth Mbps. Find in bytes.
Recall Solution 2.2
Step 1 — one-way delay (why first: detection needs the round trip, built from the one-way): Step 2 — round trip (why : worst case is a collision at the far end echoing back): Step 3 — minimum length (result is in bits since is bits/s; then convert):
Exercise 2.3 (L2)
An application wants to send exactly bytes of payload. What must the sender do, and what is the resulting frame size (DA→FCS)?
Recall Solution 2.3
bytes is below the -byte data minimum. WHY: the header+trailer overhead is bytes (recall DA = Destination Address, SA = Source Address, FCS = Frame Check Sequence), so data must reach to hit the -byte floor. The sender pads the data field from up to bytes (adding pad bytes). (All quantities here are in bytes.)
Level 3 — Analysis
Exercise 3.1 (L3)
A 10 Mbps LAN gives 64-byte minimum frames. An engineer upgrades to 100 Mbps but keeps the same cable (same length, same ). If she keeps the 64-byte minimum frame, does collision detection still work? What are her two escape routes?
Recall Solution 3.1
The problem: . She multiplied by but left and fixed. Now the required minimum is bytes, but her frames are only bytes. A -byte (-bit) frame at Mbps finishes in , but the round trip still needs — she stops transmitting long before the collision echo returns, so CD silently fails. Two escape routes (both preserve ):
- Shrink the cable so drops by (round trip back to ) — this is exactly why Fast Ethernet has a smaller maximum segment length.
- Raise the minimum frame to bytes (carrier extension) so the sender stays on the wire long enough. Modern answer: go full-duplex/switched and abolish collisions altogether — see Switched vs Shared Ethernet.
Exercise 3.2 (L3)
Two stations A and B at opposite ends of a shared cable each want to send. A starts at time . The one-way delay is . Give the exact instants (in terms of ) at which: (a) B could still start and collide; (b) A learns of the collision.
The space–time diagram below carries the argument. The horizontal axis is space (station A at the left end of the cable, station B at the right); the vertical axis is time, increasing upward. A black line sloping up-and-right is A's signal travelling out toward B; the red line sloping up-and-left is B's colliding signal echoing back toward A. The three tick marks on A's world-line label the instants , , and .

Recall Solution 3.2
Trace the red signal path in the figure.
- A's first bit reaches B at .
- (a) B collides if it starts any time in the window — i.e. before A's signal has reached it, so B senses idle. The latest disaster is B starting at (just before arrival).
- (b) B's colliding signal, launched at , travels back and reaches A at . So A only learns of the collision at . Conclusion: A must still be transmitting at , hence . This is the geometric root of the whole minimum-frame rule.
Level 4 — Synthesis
Exercise 4.1 (L4)
Two stations collide twice in a row. Using binary exponential backoff (slot time ), give the range of after the 2nd collision and the expected wait. Then compute the probability that both stations pick the same and collide a third time.
Recall Solution 4.1
After the -th collision is uniform on . Here (four values). Expected wait: Same- probability: B independently picks one of the values; probability it matches A is WHY doubling helps: at the window was and ; doubling the window halves the collision chance. That geometric decay is the point of exponential backoff.
Exercise 4.2 (L4)
Sketch (as a table) how the backoff window grows from up to , and identify where and why it stops changing and where the station gives up.
Recall Solution 4.2
Window size after collision is values, i.e. .
| window size | range | ||
|---|---|---|---|
| 1 | 2 | 0–1 | |
| 2 | 4 | 0–3 | |
| 3 | 8 | 0–7 | |
| 4 | 16 | 0–15 | |
| 5 | 32 | 0–31 | |
| 6 | 64 | 0–63 | |
| 7 | 128 | 0–127 | |
| 8 | 256 | 0–255 | |
| 9 | 512 | 0–511 | |
| 10 | 1024 | 0–1023 | |
| 11 | 1024 | 0–1023 | (capped) |
| 12 | 1024 | 0–1023 | (capped) |
| 16 | 1024 | 0–1023 | give up: abort, report to upper layer |
- Cap at : the window freezes at ; growing forever would make waits absurdly long for no extra benefit.
- Give up at : after 16 attempts the station reports failure to the upper layer — the medium is presumed hopelessly congested or broken. (The window is still frozen at from onward; the give-up is a separate rule about retry count.)
Level 5 — Mastery
Exercise 5.1 (L5)
You are designing a new shared-medium LAN. Requirements: bandwidth Gbps ( bits/s), signal speed m/s, and you insist on keeping the classic 64-byte (512-bit) minimum frame for backward compatibility. Derive the maximum cable length that still permits reliable CSMA/CD collision detection. Then argue what real Gigabit Ethernet did instead.
Recall Solution 5.1
Restate the underlying constraint first (why it still applies here): CSMA/CD only works if the sender is still transmitting when the worst-case collision echo returns — otherwise it finishes, believes success, and never sees the collision. That echo takes the full round trip . So exactly as in the parent, we demand Now solve for ( in bits, = cable length, = signal speed): Plug in bits, m/s, bits/s: Interpretation: at Gigabit speed a 512-bit frame drains off the wire so fast that the collision domain must be under ≈51 m — uselessly short for a building. What real Gigabit Ethernet did:
- Carrier extension — pad the minimum transmission to bytes bits (not 512 bits), so grows by and grows by the same : But is the one-way cable length that consumes the entire round-trip budget with zero margin, and it also ignores real-world delays inside repeaters/transceivers and safety margin. The IEEE budget spends roughly half of that theoretical reach on those fixed overheads, leaving a practical half-duplex segment of ≈200 m — which is why Gigabit's carrier-extended collision domain is quoted at about that, not 409.6 m.
- Abandon CSMA/CD entirely — run full-duplex over switches, where each link is point-to-point and collisions are impossible (Switched vs Shared Ethernet). This is what everyone actually deploys; CSMA/CD is now historical.
Exercise 5.2 (L5)
Compare CSMA/CD (wired) with the wireless approach in CSMA-CA: in one crisp sentence each, say why detection-during-transmission works on a cable but not on radio, and what CA does instead.
Recall Solution 5.2
- CSMA/CD (cable): a station can compare the voltage it sends with the voltage it reads; a mismatch = collision — so it detects collisions while transmitting.
- CSMA/CA (radio): its own transmit power drowns out any faint colliding signal, so it cannot listen-while-sending — instead it avoids collisions using inter-frame spacing, random backoff before every send, and optional RTS/CTS handshakes.
- Ancestor of both: ALOHA and Slotted ALOHA, which had no carrier sensing at all.
Connections
- Propagation Delay vs Transmission Delay — the two delays every problem here balances.
- Switched vs Shared Ethernet — why modern Ethernet retires CSMA/CD.
- CSMA-CA · ALOHA and Slotted ALOHA · CRC and Error Detection · MAC Addresses