Esp-idf: [TW#27250] [feature request] mDNS support alias name

Created on 7 Nov 2018  路  6Comments  路  Source: espressif/esp-idf

Environment

  • Development Kit: [ESP32-DevKitC]
  • Kit version (for WroverKit/PicoKit/DevKitC): [v4]
  • Core (if using chip or module): [ESP-WROOM-32D]
  • IDF version (3276a1316):
  • Development Env: [Make]
  • Operating System: [Ubuntu]
  • Power Supply: [USB]

Problem Description

mDNS not support alias name.

It will benefit for device management in the local network if supported.
We can access device with both unify name(company.local) and alias name(company_macSuffix.local) in different scene.

It is hard to distinguish many devices in the same local network.
For example, there are three devices in the local network.
If I want to login with http://company.local/ then I maybe login the random device(maybe power on firstly).
But if I can login with another alias name(http://company_macSuffix.local/) then I can login the specify device.

Expected Behavior

mdns support alias name which can be searched by others.
sethostname("company.local");
setaliasname("company_macSuffix.local"); // feature request

Most helpful comment

@outermanle This functionality is really out of spec and could cause issues on the network. Our mDNS server is required to pass Apple Bonjour certification, which is a really rigorous test. Sorry but we can not implement this feature and break specs.

All 6 comments

Hi @outermanle

Although, It is possible (and in fact quite easy) to add another A/AAA answer in the response packet and thus having an alias hostname resolved, it may not conform to mDNS standards. @me-no-dev Can you please comment?

Maybe you can address the issue by setting up some aliases locally using avahi-alias service? Having your hostname company_macSuffix.local and create an alias for each macSuffix to company.local?

@david-cermak
Q: Having your hostname company_macSuffix.local and create an alias for each macSuffix to company.local?
A: Not yet, but it is convenient for us to manage devices in local network.

@david-cermak
Any plan to support this feature?

@outermanle
No, we most likely will not implement this, have started an internal discussion about mDNS with multiple A records, but that does not seem to fit into esp32 mdns component.

More importantly, your use case is clearly against the spec, as it imposes multiple non-unique host names on local network; mdns employs mechanisms to solve these conflicts (see https://tools.ietf.org/html/rfc6762 -- see chapter 8 -- probing, conflicts; perhaps still acceptable after conflicts resolve...?)

Generally having multiple address records might not be directly in conflict with the RFC, this however is not a clean solution and not a way how mdns should be used (my view).
@me-no-dev Please comment!

@david-cermak
I got it, Thanks a lot!

@outermanle This functionality is really out of spec and could cause issues on the network. Our mDNS server is required to pass Apple Bonjour certification, which is a really rigorous test. Sorry but we can not implement this feature and break specs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

okasha55 picture okasha55  路  3Comments

feelfreelinux picture feelfreelinux  路  4Comments

LosDeiblos picture LosDeiblos  路  4Comments

hex007 picture hex007  路  4Comments

me21 picture me21  路  3Comments