-
-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added conflict handling for hostname. #39
Conversation
… the configuration.
This looks in general really good! What do you think about adding three last octets of MAC address instead to hostname in conflict resolution? I dunno if that's even included, but you've got it in your L1 cache right now and that's what we do at $DAYJOB currently with the Apple mDNSResponder. |
Hi Joachim,
sorry I'm late in answering. The reason why I append an index to the hostname is that the avahi-deamon behaves the same way.
It would also be possible to append the last three octets of the MAC address. In our case this would be difficult because our devices have 2 or 3 MAC addresses (Ethernet, Powerline, WiFi).
By default we will append the last 3 digits of the serial number. The conflict handling usually only becomes active if the customer assigns the same name on several devices.
Best regards
Peter
…________________________________
Von: Joachim Nilsson <notifications@github.com>
Gesendet: Montag, 25. Mai 2020 17:58
An: troglobit/mdnsd <mdnsd@noreply.github.com>
Cc: Peter Fleer <Peter.Fleer@devolo.de>; Author <author@noreply.github.com>
Betreff: Re: [troglobit/mdnsd] Added conflict handling for hostname. (#39)
This looks in general really good! What do you think about adding three last octets of MAC address instead to hostname in conflict resolution?
I dunno if that's even included, but you've got it in your L1 cache right now and that's what we do at $DAYJOB currently with the Apple mDNSResponder.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#39 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOPEI5CZBEEAF227XYBPCDLRTKITJANCNFSM4NJCNIEA>.
|
Aha, that was interesting, did not know that about Avahi. Thanks! We have a similar problem at Westermo, we have up to 32 MAC addresses per device. One per physical port. For a collection of ports (VLAN) one MAC us selected for that layer-3 interface which is used for management. This is what is announced by mDNS/SD: services reachable on that interface. An index is OK, but hard to identify using the production label (serial no + base MAC) on the outside when opening a cabinet. The last three octets though: weos-34-56-78.local and weos-9a-bb-a0 are a lot easier to spot when you know the OUI. Don't get me wrong, I like your patch. Just looking for a way to make it configurable. (And at the same time fit my use-case of course :-) |
We also have devices with Linux running the Avahi daemon. It has been requested that mDNS daemon behaves the same manner. For the customer, both devices should behave in the same way. This patch is just a suggestion to solve the problem. I had seen that the function mdnsd_conflict was still empty and a solution similar to ours was implemented. Unfortunately it is not configurable.
…________________________________
Von: Joachim Nilsson <notifications@github.com>
Gesendet: Dienstag, 2. Juni 2020 01:03
An: troglobit/mdnsd <mdnsd@noreply.github.com>
Cc: Peter Fleer <Peter.Fleer@devolo.de>; Author <author@noreply.github.com>
Betreff: Re: [troglobit/mdnsd] Added conflict handling for hostname. (#39)
Aha, that was interesting, did not know that about Avahi. Thanks!
We have a similar problem at Westermo, we have up to 32 MAC addresses per device. One per physical port. For a collection of ports (VLAN) one MAC us selected for that layer-3 interface which is used for management. This is what is announced by mDNS/SD: services reachable on that interface.
An index is OK, but hard to identify using the production label (serial no + base MAC) on the outside when opening a cabinet. The last three octets though: weos-34-56-78.local and weos-9a-bb-a0 are a lot easier to spot when you know the OUI.
Don't get me wrong, I like your patch. Just looking for a way to make it configurable. (And at the same time fit my use-case of course :-)
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#39 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AOPEI5AKR445JSUJQIKI6J3RUQXUZANCNFSM4NJCNIEA>.
|
I understand completely! :) I've just been dragging my feet merging this PR, sorry. Simply wanted to check myself if it's possible to add my/our own use-case. Let's put it like this; I'll add a TODO to support using MAC suffix for conflict resulution in the future, if so you may have to set this up in the configuration somehow to get your behavior. Is that OK? |
If the host name already exists on the local network, a suffix is appended to the name.