25 Collision Mitigation Strategies
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.
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
| Failure | What collides? | Typical symptom | Useful controls |
|---|---|---|---|
| Duplicate identity | Two devices use one value in the same namespace | wrong ownership, merged history, ambiguous routing | coordinated allocation, larger space, partitioning, duplicate detection, reassignment |
| Airtime overlap | Frames overlap at a receiver | lost or corrupted frame, retry, higher delay | carrier sensing, scheduling, channel separation, load control, backoff |
| Correlated retry | Many devices retry after the same trigger | second contention wave, battery drain, missed deadlines | randomized 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.
Checkpoint: 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
Solving for the population at a chosen probability (p) gives
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
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.
Checkpoint: 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):
- the candidate address is tentative;
- the node sends Neighbor Solicitation messages for that address;
- evidence that another node is using or testing it makes DAD fail;
- 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
| Control | What it changes | Cost or limitation | Evidence to measure |
|---|---|---|---|
| Carrier sensing | avoids some transmissions while the channel is sensed busy | hidden nodes and simultaneous backoff expiry remain | clear-channel failures, retries, delivery ratio |
| Random backoff | decorrelates retries | adds delay and energy; cannot create airtime | retry distribution, p95 latency, energy per delivery |
| Scheduling | assigns non-overlapping opportunities | needs time coordination and schedule maintenance | clock error, missed slots, utilization |
| Channel separation | reduces contenders per channel | channels may interfere or differ in quality | per-channel load and decode success |
| Admission/load control | bounds offered traffic | may defer or reject work | queue age, dropped work, deadline misses |
| Acknowledgement and retry | recovers some losses | adds traffic and can amplify congestion | attempt 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 field | Example—not a universal prescription | Release evidence |
|---|---|---|
| Failure | duplicate local identity during a commissioning burst | duplicate registration test and audit trail |
| Domain | one site allocator and 200 simultaneous joins | final and burst population counts |
| Assignment | 16-bit random candidates, rejected atomically if already used | allocator code path and concurrency test |
| Model | independent uniform candidates; birthday estimate 26.2% for at least one first-attempt duplicate | calculation with assumptions |
| Recovery | generate a new candidate with bounded attempts; quarantine on exhaustion | retry histogram and failure alert |
| Escalation | duplicate/retry rate exceeds the team’s recorded operational target | dashboard 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.
Checkpoint: 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.
Checkpoint: 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
-
Many unused names do not make a match rare when many tags choose.
-
Count possible pairs and test the real name maker with a known match.
-
Approve it only if it finds, replaces, and records the match safely.
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.
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
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:
If each pair has probability (1/m) of matching, the expected number of matching pairs is
When choices are independent and uniform, a useful approximation is
The approximation is most useful when (n) is much smaller than (m). The exact no-collision probability is
so the exact collision probability is one minus that product.
Checkpoint: 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):
The continuous 50% approximation is
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 choices | Approximate chance of at least one duplicate |
|---|---|
| 26 | 0.49% |
| 117 | 9.84% |
| 250 | 37.81% |
| 302 | 50.02% |
| 500 | 85.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.
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.
Checkpoint: Model Boundary
Before using the calculator, write down:
- what value is chosen;
- why choices are uniform and independent;
- which devices share one collision domain;
- 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):
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 bits | Values (m) | About 10% | About 50% |
|---|---|---|---|
| 8 | 256 | 7 | 19 |
| 16 | 65,536 | 118 | 302 |
| 24 | 16,777,216 | 1,881 | 4,824 |
| 32 | 4,294,967,296 | 30,085 | 77,164 |
| 48 | 281,474,976,710,656 | 7.70 million | 19.75 million |
| 64 | 18,446,744,073,709,551,616 | 1.97 billion | 5.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
Under an additional Poisson approximation, the chance of at least one overlapping pair is
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.
| Quantity | Birthday-style screen | Deployment evidence |
|---|---|---|
| Identifier duplicate | Same random value in one namespace | allocator logs, duplicate alerts, reassignment audit |
| Airtime overlap | Starts within one vulnerable period | packet timestamps, channel/SF settings, receiver outcomes |
| User-visible failure | Not predicted by pair count alone | delivery ratio, latency, stale data, duplicate commands |
Checkpoint: 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 field | Question | Evidence |
|---|---|---|
| Choice space | What exactly is selected, and how many usable values exist? | specification, reserved-range list, allocator configuration |
| Collision domain | Which simultaneous devices or events can conflict? | namespace, PAN, subnet, channel, or time-window definition |
| Choice process | Are choices independent, uniform, and with replacement? | generator test, allocator design, traffic trace |
| Consequence | What breaks if a match or overlap occurs? | failure analysis and learner-visible or operator-visible symptom |
| Control | Increase (m), reduce (n), coordinate, partition, schedule, detect, or reassign? | design and stress-test output |
| Field signal | How 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).
Checkpoint: 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
| Topic | Chapter | Why it follows |
|---|---|---|
| Collision controls | Collision Mitigation Strategies | Change the choice space, assignment process, collision domain, or recovery behavior |
| Bandwidth and load | Bandwidth Requirements | Separate aggregate capacity from burst and contention behavior |
| IPv6 addressing | IPv6 Addressing | Examine 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
- RFC 4862: IPv6 Stateless Address Autoconfiguration—tentative addresses, Duplicate Address Detection, and failure handling.
- NXP MCUXpresso SDK: Zigbee network addressing—examples of real allocation and conflict-handling behavior that changes the generic random-choice model.
25.16 What’s Next
| Topic | Chapter | Why it follows |
|---|---|---|
| Bandwidth requirements | Bandwidth Requirements | Connect offered traffic and bursts to capacity evidence |
| IPv6 addressing | IPv6 Addressing | Study address scope, assignment, and DAD in context |
| MAC behavior | Medium Access Control | Revisit 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.
