Skip to content

docs: document mDNS dual-interface hostname conflict#19

Merged
mairas merged 2 commits into
mainfrom
docs/mdns-dual-interface-conflict
May 29, 2026
Merged

docs: document mDNS dual-interface hostname conflict#19
mairas merged 2 commits into
mainfrom
docs/mdns-dual-interface-conflict

Conversation

@mairas

@mairas mairas commented May 29, 2026

Copy link
Copy Markdown
Contributor

Why

A HaLOS device connected to the same network over both Ethernet and WiFi at once can have halos.local stop resolving, with the device renaming itself to halos-2.local. Avahi hears its own mDNS announcements echoed between the two interfaces and reads them as a foreign host claiming the name, so it defensively renames.

This is a standard Avahi/mDNS limitation on multi-homed hosts on a single subnet — it can't be enforced or fixed in software, so it needs to be a documented operational constraint for users.

(This also corrects an earlier mis-diagnosis that assumed a second physical device was holding the name; the actual cause is the device's own cross-interface echo.)

What

  • user-guide/troubleshooting.md — new symptom-driven entry "Device disappears or shows up as halos-2.local": symptom, cause, and the fix (one interface per network, or separate subnets), plus an avahi-daemon restart to re-register the original name.
  • user-guide/networking.md — short "One interface per network" note under Hostname and mDNS, cross-linked to the troubleshooting entry.

Verification

uv run mkdocs build --strict passes (no broken anchors / link warnings).

🤖 Generated with Claude Code

Connecting a device to the same network over both Ethernet and WiFi
makes Avahi hear its own announcements echoed between interfaces and
rename itself (halos-2.local), after which halos.local stops resolving.
This can't be fixed in software while both interfaces share a subnet, so
document the constraint and recovery for users.

Add a symptom-driven troubleshooting entry and a cross-linked note under
Hostname and mDNS in the networking guide.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Comment thread docs/user-guide/networking.md Outdated

### One interface per network

Don't connect the device to the same network over both Ethernet and WiFi at the same time. On a multi-homed host, Avahi hears its own mDNS announcements echoed between interfaces and renames the device (e.g. to `halos-2.local`), after which `halos.local` stops resolving. If you need both interfaces active, put them on different networks. See [Troubleshooting — Device disappears or shows up as `halos-2.local`](troubleshooting.md#device-disappears-or-shows-up-as-halos-2local).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wording is a bit strong; sometimes the user has good reasons for doing that, and normally it won't break anything. Renaming the device only happens during some corner cases (mDNS hostname is connected to the wifi interface which then gets disabled, for example). It's enough to just state that it may happen.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Softened in b0833f5 — now says connecting both usually works fine, and the rename "may" happen in some cases rather than stating it as a rule.

Comment thread docs/user-guide/troubleshooting.md Outdated

**Symptom**: `halos.local` stops resolving, or the device starts appearing under a numbered name like `halos-2.local`. This often happens after connecting the device to the same network over both Ethernet and WiFi at once.

**Cause**: When a device is on the same network through two interfaces (wired and wireless) at the same time, its mDNS announcements sent on one interface are heard back on the other. Avahi reads its own echo as a second device claiming the same name, and defensively renames itself by appending a number. The original `.local` name is then claimed by nobody and no longer resolves.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not what actually happens.

  1. Let's say wlan0 gets halosdev.local
  2. eth0 gets halosdev-1.local
  3. wlan0 is disabled
  4. Only halosdev-1.local remains

No need to go deeply into specifics; better to just note that Avahi may act up if multiple interfaces are connected to the same network.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rewrote the cause in b0833f5. Dropped the self-echo explanation; it now says the hostname is registered per interface, the later one falls back to a numbered name, and the plain name disappears only when the interface holding it is disabled. Kept it brief per your note.

Review feedback: the rename only happens in corner cases, and the
described cause was wrong. The hostname is registered per interface; the
later one falls back to a numbered name, and the plain name disappears
only when the interface holding it is disabled. Reword to "may happen"
and drop the inaccurate self-echo mechanism.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@mairas

mairas commented May 29, 2026

Copy link
Copy Markdown
Contributor Author

Review feedback addressed in b0833f5.

  • networking.md (thread): softened — connecting both interfaces usually works fine; the rename "may" happen in some cases rather than being stated as a rule. Heading changed to "Multiple interfaces on the same network".
  • troubleshooting.md (thread): corrected the cause. Removed the inaccurate self-echo mechanism; now states the hostname is registered per interface, the later one falls back to a numbered name, and the plain name disappears only when the interface holding it is disabled. Kept brief.

Verification: uv run mkdocs build --strict passes (no broken anchors).

@mairas mairas merged commit 7b74454 into main May 29, 2026
@mairas mairas deleted the docs/mdns-dual-interface-conflict branch May 29, 2026 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant