Chapters

25 Collision Mitigation Strategies

networking-core
net
collision
birthday

25.1 Start With the Failure, Not the Protocol

Imagine two trackers appearing with the same name. Now imagine two radios speaking at the same time. Both are called collisions, but they need different fixes. IPv6 is a network addressing system with a very large address space.

First decide whether the clash is about identity, radio time, or shared capacity. More possible addresses can reduce random identity clashes. A wait-and-retry rule can spread radio messages. Neither fix solves the other problem. Test a duplicate address, a busy channel, and a large group recovering together. Record which limit the chosen control changes.

Use a three-column check. In the first column, name the thing that clashes. In the second, name the shared space or time. In the third, name the control. Unique assignment helps device names. Listening and waiting can help radio traffic. Smaller groups can reduce shared load. A schedule can reserve time. A retry cap can stop recovery from making the load worse.

Measure the failure before and after the control. Count repeats and lost work. Watch the busiest recovery period. Keep a clear rule for duplicate records. Reopen the design when the group size, traffic, or attacker model changes.

This opening uses simple random choices and clean failure types. Real systems mix assignment rules, attackers, retries, and changing radio load. The Practitioner section compares controls and evidence. Under the Hood derives the chance and recovery costs.

Two sensors can “collide” in two very different ways:

  • they can be given the same identity, so the system cannot tell them apart; or
  • their radio transmissions can overlap, so a receiver cannot decode one or both frames.

A larger identifier space helps the first problem. It does not create more airtime. Backoff helps spread retransmissions. It does not repair two records that share an identifier. Good collision design starts by naming the failure before choosing the control.

In 60 Seconds

Mitigation changes one or more of four things:

  1. choice space (m): use more possible identifiers, slots, or channels;
  2. population (n): partition devices into smaller collision domains;
  3. choice process: coordinate allocation or scheduling instead of relying on independent random choices;
  4. consequence and recovery: detect duplicates, back off, retry, reassign, repair state, and alert.

No probability is universally “safe.” Set an acceptance target from the consequence, then prove the allocator or medium-access control under the busiest credible event.

25.2 Learning Objectives

By the end of this chapter, you will be able to:

  • separate identity, airtime, and correlated-retry failure modes;
  • select a prevention and recovery pattern for each;
  • explain what IPv6 Duplicate Address Detection does and does not prove;
  • keep release evidence that can reveal scale drift.

25.3 Three Collision Problems

FailureWhat collides?Typical symptomUseful controls
Duplicate identityTwo devices use one value in the same namespacewrong ownership, merged history, ambiguous routingcoordinated allocation, larger space, partitioning, duplicate detection, reassignment
Airtime overlapFrames overlap at a receiverlost or corrupted frame, retry, higher delaycarrier sensing, scheduling, channel separation, load control, backoff
Correlated retryMany devices retry after the same triggersecond contention wave, battery drain, missed deadlinesrandomized backoff, admission control, staged reconnect, bounded retries

The same deployment can suffer all three. Keep separate metrics for duplicate identities, decode failures, retries, latency, and user-visible outcomes.

Packet PeteCheckpoint: Name the Failure

Before proposing a fix, complete this sentence: “Two ___ can choose or occupy the same ___ inside one ___, causing ___.” If the blanks are unclear, the control is premature.

25.4 Identity Assignment Patterns

25.4.1 Coordinated allocation

A trusted allocator selects a value that its current state says is unused. This removes the independent-with-replacement birthday model while the allocator state is correct.

The new risks are operational:

  • stale or split allocator state;
  • two allocators issuing from overlapping ranges;
  • restoration from an old backup;
  • exhaustion or reserved values being ignored;
  • device replacement leaving an old identity active.

Keep an allocation ledger, enforce uniqueness at the authoritative boundary, and test failover and restoration.

25.4.2 Random choice with detection

Independent generation can remove a central bottleneck, but it needs enough value space for the chosen risk target and a credible duplicate-detection path. Detection is useful only if the system also knows how to quarantine, reassign, repair caches or routes, and preserve audit history.

25.4.3 Partitioned or hierarchical assignment

Give sites, gateways, manufacturers, tenants, or PANs disjoint prefixes or ranges, then allocate locally. Partitioning reduces (n) within each collision domain and limits the blast radius of allocator failure. It also creates a governance task: prefixes must not overlap and devices must not cross domains with ambiguous identities.

25.4.4 Protocol mechanisms are evidence, not slogans

Named protocols have allocation and recovery rules that must be read before applying a generic birthday calculation. For example, NXP’s Zigbee network-addressing documentation describes address-allocation choices and conflict handling. That means a 16-bit random-choice calculation can be a stress screen for one stated allocator model; it is not a universal Zigbee capacity limit.

25.5 Choose the Probability Target Explicitly

For (n) independent uniform choices from (m) values, the birthday approximation is

P(at least one duplicate)1en(n1)/(2m).P(\text{at least one duplicate})\approx1-e^{-n(n-1)/(2m)}.

Solving for the population at a chosen probability (p) gives

n2mln(1p).n\approx\sqrt{-2m\ln(1-p)}.

For a 10% reference contour, the multiplier is about (0.459\sqrt{m}). Ten percent is not a general safety limit; it is simply a visible contour learners can compare. An identity used for billing, safety, or actuation may need a much tighter target and coordinated prevention. A recoverable laboratory token might accept more.

25.5.1 Worked decision: 200 local random identifiers

A custom commissioning tool chooses 16-bit local identifiers independently for 200 devices. The approximation gives

P1e200×199/(2×65,536)26.2%.P\approx1-e^{-200\times199/(2\times65{,}536)}\approx26.2\%.

That is not proof that 26.2% of devices fail. It means there is about a one-in-four chance of at least one duplicate in that commissioning domain under the stated model.

Possible decisions include:

  • make the tool choose from known-unused values;
  • increase the random identifier space;
  • partition sites into disjoint prefixes;
  • reject duplicate registration atomically and generate a new value;
  • stress-test a simultaneous commissioning burst and retain the logs.

The best choice depends on packet overhead, governance, offline operation, recovery cost, and the consequence of a temporary duplicate.

Packet PeteCheckpoint: Match Control to Variable
  • Larger space increases (m).
  • Partitioning reduces (n) per domain.
  • Coordinated allocation changes the choice process.
  • Detection and reassignment reduce duration and consequence; they do not erase the original event.

25.6 IPv6 Duplicate Address Detection

IPv6 does not “remove” address collisions. It supplies a very large address architecture and a link-scoped verification procedure.

RFC 4862 defines Duplicate Address Detection (DAD):

  1. the candidate address is tentative;
  2. the node sends Neighbor Solicitation messages for that address;
  3. evidence that another node is using or testing it makes DAD fail;
  4. the duplicate address must not be assigned to the interface.

DAD verifies uniqueness on the link according to the messages observed during the procedure. It is not a mathematical guarantee against every failure: packet loss, disabled DAD, non-conforming nodes, link partition, or later misconfiguration can undermine the result. Release evidence should include DAD configuration, duplicate outcomes, and the recovery path—not only the size “128 bits.”

Scope check: Birthday probability for an interface-identifier generation scheme belongs to the link and the usable random bits of that scheme. It is not computed by putting every IPv6 device on Earth into one 128-bit lottery.

25.7 Shared-Medium Controls

ControlWhat it changesCost or limitationEvidence to measure
Carrier sensingavoids some transmissions while the channel is sensed busyhidden nodes and simultaneous backoff expiry remainclear-channel failures, retries, delivery ratio
Random backoffdecorrelates retriesadds delay and energy; cannot create airtimeretry distribution, p95 latency, energy per delivery
Schedulingassigns non-overlapping opportunitiesneeds time coordination and schedule maintenanceclock error, missed slots, utilization
Channel separationreduces contenders per channelchannels may interfere or differ in qualityper-channel load and decode success
Admission/load controlbounds offered trafficmay defer or reject workqueue age, dropped work, deadline misses
Acknowledgement and retryrecovers some lossesadds traffic and can amplify congestionattempt count and final outcome

Avoid absolute statements such as “TDMA eliminates collisions” or “CSMA prevents collisions.” A schedule can still fail through clock error, hidden interference, reuse, or configuration mistakes. Carrier sensing reduces some overlaps but does not hear every contender. The release test should reproduce hidden-node, burst, and recovery conditions expected in the deployment.

25.8 Knowledge Check: Assignment Strategy

25.9 Knowledge Check: DAD Evidence

25.10 Collision-Control Record

One release record should connect failure, model, control, and observation.

Record fieldExample—not a universal prescriptionRelease evidence
Failureduplicate local identity during a commissioning burstduplicate registration test and audit trail
Domainone site allocator and 200 simultaneous joinsfinal and burst population counts
Assignment16-bit random candidates, rejected atomically if already usedallocator code path and concurrency test
Modelindependent uniform candidates; birthday estimate 26.2% for at least one first-attempt duplicatecalculation with assumptions
Recoverygenerate a new candidate with bounded attempts; quarantine on exhaustionretry histogram and failure alert
Escalationduplicate/retry rate exceeds the team’s recorded operational targetdashboard and runbook

For a shared medium, replace allocator evidence with a traffic trace: offered load, packet lengths, channel settings, received frames, retry count, p95 latency, and energy cost. Test power restoration or an alarm burst, not only steady-state traffic.

Packet PeteCheckpoint: Evidence Before Release
  • Prove uniqueness enforcement or duplicate recovery under concurrent joins.
  • Prove airtime recovery under the busiest credible burst.
  • Keep user-visible outcomes beside protocol counters.

25.11 Recovery Has a Load Limit

Recovery consumes the same constrained resources as useful work. Duplicate-address repair can require discovery, reassignment, route or cache updates, application reconciliation, and audit logging. Media recovery can require acknowledgements, backoff, retransmission, longer wake time, and application timeout handling.

Do not define a universal percentage at which recovery “works.” Instead, set measurable budgets:

  • maximum bounded assignment attempts;
  • p95 commissioning time;
  • retry count and airtime per delivered message;
  • p95 command or telemetry latency;
  • energy consumed per successful delivery;
  • stale, duplicated, or misattributed application records;
  • operator alerts and time to resolution.

If recovery becomes ordinary load, change the dominant variable: increase the value space, partition the domain, coordinate assignment, reduce offered traffic, schedule critical messages, stage reconnects, or add capacity supported by the protocol.

25.12 Knowledge Check: Recovery Pressure

Use this check to distinguish eventual delivery from acceptable recovery. First identify the outage-recovery burst, then compare p95 latency and radio energy with the control and battery budgets. A design can deliver every message and still fail its purpose if contention, backoff, and retries make commands late or drain the fleet. The defensible answer therefore changes offered load, scheduling, or retry correlation and records the new recovery evidence; it does not hide retry telemetry or treat identifier length as an airtime control.

Packet PeteCheckpoint: Recovery Is Capacity
  • Detection does not make a collision free.
  • Eventual success can still miss latency, energy, or correctness budgets.
  • Persistent recovery is an escalation signal, not normal background noise.

25.13 The Birthday Problem in IoT Networks

25.13.1 Start With Many Devices Choosing at Once

  1. Packet Pete watches a large warehouse-tag fleet choose from a short-name board that still has many empty slots.

    Many unused names do not make a match rare when many tags choose.

  2. Pete draws pair connections between tags and injects one known duplicate into the real name generator test.

    Count possible pairs and test the real name maker with a known match.

  3. Pete accepts the process only after the duplicate is detected, one new name is assigned, and one clear record is saved.

    Approve it only if it finds, replaces, and records the match safely.

Judge short random device names by pair risk and duplicate-handling tests, not by how many names appear unused.

Count Pairs Before Trusting a Random Choice

Picture 300 warehouse tags choosing short local names when they first wake. The fleet owner may see a large list of unused names and assume that a match is rare. Yet each new tag can match every tag already present, so the number of possible pairs grows much faster than the list of devices.

A protocol is a shared set of rules for exchanging data. Before using a birthday calculation in one, write the exact choice, the number of allowed values, the devices that share that space, and how each value is picked. Also name the decision that a duplicate could spoil.

Test the real name maker with many fixed runs. Include two devices that start from the same saved state, a weak source of random values, a restart, and a known duplicate. Check whether the system finds the match, assigns a new value, and keeps one clear record of what happened.

Keep urgent service safe while a duplicate is being fixed. A door, alarm, or local control should fail in a known way instead of trusting the wrong device name.

This opening does not prove that a named network will collide at one fixed fleet size. Practitioner turns the choice space and acceptable risk into a design record. Under the Hood compares the simple model with biased choices, reserved values, retries, and real traffic.

A numbered locker wall can look almost empty while two people still choose the same locker. The reason is not that any one person is especially unlucky. It is that every new person creates another set of pairs that might match.

IoT engineers meet the same pattern when devices independently choose random identifiers, join tokens, hash values, or discrete transmission windows. Birthday mathematics is useful only after the choice space and the devices sharing it have been named precisely.

In 60 Seconds

For (n) independent, uniformly random choices from (m) equally likely values, the probability of at least one duplicate is approximately

P(collision)1en(n1)/(2m).P(\text{collision}) \approx 1-e^{-n(n-1)/(2m)}.

The number of pairs grows approximately with (n^2), so collision risk becomes noticeable near (sqrt{m}), long before all (m) values are used. This is a model result—not automatically a protocol capacity limit. Coordinated allocation, reserved values, biased generators, conflict detection, retransmissions, and correlated traffic can all change the real system.

25.13.2 Learning Objectives

By the end of this chapter, you will be able to:

  • calculate pair count and approximate duplicate probability;
  • state the uniformity, independence, and collision-domain assumptions;
  • interpret a probability threshold without calling it universally “safe”;
  • choose evidence that tests whether a real deployment follows the model.

25.13.3 The Surprise Is Pair Counting

With 23 people and 365 equally likely birthdays, there are

(232)=23×222=253\binom{23}{2}=\frac{23\times22}{2}=253

pairs that could match. The exact probability that at least one pair shares a birthday is about 50.7%.

For an IoT choice space, the same pair count applies:

pairs=(n2)=n(n1)2.\text{pairs}=\binom{n}{2}=\frac{n(n-1)}{2}.

If each pair has probability (1/m) of matching, the expected number of matching pairs is

λ=n(n1)2m.\lambda=\frac{n(n-1)}{2m}.

When choices are independent and uniform, a useful approximation is

P(at least one duplicate)1eλ.P(\text{at least one duplicate})\approx1-e^{-\lambda}.

The approximation is most useful when (n) is much smaller than (m). The exact no-collision probability is

P(no collision)=k=0n1(1km),P(\text{no collision})= \prod_{k=0}^{n-1}\left(1-\frac{k}{m}\right),

so the exact collision probability is one minus that product.

Packet PeteCheckpoint: Pair Counting
  • A population of (n) creates (n(n-1)/2) possible pairs.
  • Pair opportunities grow approximately with (n^2).
  • Compare the population with (sqrt{m}), not with half of (m), for an early warning.

25.13.4 A 16-bit Worked Model

Suppose a custom local allocator lets every device choose one of (2^{16}=65{,}536) values independently and uniformly, with replacement. This is a deliberately simplified model—not a claim about how a named protocol allocates addresses.

At (n=250):

λ=250×2492×65,5360.475,\lambda=\frac{250\times249}{2\times65{,}536}\approx0.475, P(collision)1e0.47537.8%.P(\text{collision})\approx1-e^{-0.475}\approx37.8\%.

The continuous 50% approximation is

n50%2mln2301.4.n_{50\%}\approx\sqrt{2m\ln2}\approx301.4.

Because devices come in whole numbers, 302 is the first population for which the approximation exceeds 50%. The exact result is also just above 50% at 302.

Random choicesApproximate chance of at least one duplicate
260.49%
1179.84%
25037.81%
30250.02%
50085.10%

These percentages answer one question: “If every choice were independent and uniform in this 16-bit domain, how likely is at least one duplicate?” They do not answer how many devices a real network supports, whether a duplicate is detected, or whether traffic capacity is adequate.

Protocol Reality Changes the Model

Real address assignment can select from known-unused values, reserve parts of the space, partition the network, or detect and resolve conflicts. Those mechanisms break the simple “independent draws with replacement” assumption.

For example, NXP’s Zigbee documentation describes both address-allocation methods and conflict handling. That evidence supports modelling the actual allocator and recovery behavior; it does not support deriving a universal Zigbee device limit from the 16-bit birthday threshold alone. See NXP MCUXpresso SDK: Network addressing.

25.13.5 Try It: Random-Choice Calculator

The calculator uses the (n(n-1)) approximation. Change one input at a time and describe the model before interpreting the percentage.

Packet PeteCheckpoint: Model Boundary

Before using the calculator, write down:

  1. what value is chosen;
  2. why choices are uniform and independent;
  3. which devices share one collision domain;
  4. what happens if two choices match.

25.13.6 Thresholds Are Inputs, Not Safety Labels

For a chosen probability (p), solve the approximation for (n):

n2mln(1p).n\approx\sqrt{-2m\ln(1-p)}.

For (p=10%), the multiplier is about (0.459\sqrt{m}). For (p=50%), it is about (1.177\sqrt{m}). These are probability contours under the model, not universal safe counts.

Random-choice bitsValues (m)About 10%About 50%
8256719
1665,536118302
2416,777,2161,8814,824
324,294,967,29630,08577,164
48281,474,976,710,6567.70 million19.75 million
6418,446,744,073,709,551,6161.97 billion5.06 billion

Choose (p) from the consequence. A duplicate that merges device histories or misroutes a command may require a much tighter target and strong prevention. A recoverable experimental token may tolerate more. In both cases, test detection and recovery rather than treating the calculation as proof of safety.

25.13.7 From Identifier Choices to Airtime Overlap

Birthday-style pair counting can also be an early screen for random arrivals, but a radio collision is not simply an address duplicate.

Imagine 250 independent starts distributed uniformly through one hour. If each packet occupies 0.19 seconds, two equal-duration transmissions overlap when their start times are within a vulnerable interval of about 0.38 seconds. A first pair-counting estimate is

E(overlapping pairs)(2502)0.3836003.28.E(\text{overlapping pairs})\approx \binom{250}{2}\frac{0.38}{3600}\approx3.28.

Under an additional Poisson approximation, the chance of at least one overlapping pair is

1e3.2896.2%.1-e^{-3.28}\approx96.2\%.

That result is not a packet-loss rate. Turning overlap into loss needs a radio model: channel selection, bandwidth, modulation, capture effect, coding, receiver count, interference, packet lengths, acknowledgements, retry policy, and whether starts are really independent. Correlated alarm bursts can be worse than the uniform model; scheduling can be much better.

QuantityBirthday-style screenDeployment evidence
Identifier duplicateSame random value in one namespaceallocator logs, duplicate alerts, reassignment audit
Airtime overlapStarts within one vulnerable periodpacket timestamps, channel/SF settings, receiver outcomes
User-visible failureNot predicted by pair count alonedelivery ratio, latency, stale data, duplicate commands
Packet PeteCheckpoint: Collision Domain
  • Address collisions and transmission overlaps can share pair-counting mathematics but have different consequences.
  • “At least one overlap” is not the same metric as “percentage of packets lost.”
  • If traffic is synchronized, independent-uniform assumptions are not credible.

25.13.8 Knowledge Check: Interpret the Number

25.13.9 Knowledge Check: When the Model Stops

25.13.10 Collision Release Budget

A release record turns the calculation into an auditable engineering decision.

Record fieldQuestionEvidence
Choice spaceWhat exactly is selected, and how many usable values exist?specification, reserved-range list, allocator configuration
Collision domainWhich simultaneous devices or events can conflict?namespace, PAN, subnet, channel, or time-window definition
Choice processAre choices independent, uniform, and with replacement?generator test, allocator design, traffic trace
ConsequenceWhat breaks if a match or overlap occurs?failure analysis and learner-visible or operator-visible symptom
ControlIncrease (m), reduce (n), coordinate, partition, schedule, detect, or reassign?design and stress-test output
Field signalHow will drift be noticed?duplicate count, retry rate, latency, delivery ratio, alert

Test the busiest credible window, not only the daily average. Commissioning, power restoration, a firmware rollout, or an alarm burst can make choices correlated and expand the effective (n).

Packet PeteCheckpoint: Release Evidence
  • Keep the model inputs and acceptance target with the release record.
  • Stress duplicate detection or airtime recovery under the busiest credible event.
  • Compare the estimate with field evidence and revise the model when they disagree.

25.13.11 Summary

  • Collision opportunity comes from pairs: (n(n-1)/2).
  • The birthday approximation assumes independent, uniform choices in one bounded domain.
  • A 16-bit random-choice model reaches roughly 50% near 302 choices; that is not a universal protocol limit.
  • Airtime overlap estimates do not become packet-loss rates without a radio and recovery model.
  • A useful release decision records assumptions, consequence, controls, and measured evidence.

25.13.12 What’s Next

TopicChapterWhy it follows
Collision controlsCollision Mitigation StrategiesChange the choice space, assignment process, collision domain, or recovery behavior
Bandwidth and loadBandwidth RequirementsSeparate aggregate capacity from burst and contention behavior
IPv6 addressingIPv6 AddressingExamine subnet scope, interface identifiers, and duplicate-address detection

25.13.13 Key Takeaway

Birthday mathematics is an early-warning model. Name the random choice and its collision domain first; then verify the real allocator, radio behavior, and recovery path before making a deployment claim.

25.14 Summary

  • Separate duplicate identity, airtime overlap, and correlated retry before choosing a control.
  • Coordinated allocation, larger spaces, partitioning, and detection change different parts of the risk.
  • A birthday contour is a model output, not a universal protocol limit or safety label.
  • IPv6 DAD checks a tentative address on a link; it does not make every future configuration failure impossible.
  • Release evidence must include peak-event behavior, recovery cost, and application outcomes.

25.15 Engineering References

25.16 What’s Next

TopicChapterWhy it follows
Bandwidth requirementsBandwidth RequirementsConnect offered traffic and bursts to capacity evidence
IPv6 addressingIPv6 AddressingStudy address scope, assignment, and DAD in context
MAC behaviorMedium Access ControlRevisit how shared-medium access changes collision likelihood

25.17 Key Takeaway

Choose collision controls by the failure they prevent, then prove the busiest assignment or traffic path with measurements. “Large address,” “DAD,” “CSMA,” and “retry” are mechanisms—not release evidence by themselves.