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.
mdns support alias name which can be searched by others.
sethostname("company.local");
setaliasname("company_macSuffix.local"); // feature request
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.
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.