Skip to content
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

Search mDNS when resolving DNS names #2373

Closed
madpilot opened this issue Aug 8, 2016 · 11 comments
Closed

Search mDNS when resolving DNS names #2373

madpilot opened this issue Aug 8, 2016 · 11 comments
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.

Comments

@madpilot
Copy link

madpilot commented Aug 8, 2016

Feature request: When automatically resolving domain names, would it be possible to search using the mDNS broadcast address if the domain name ends with .local?

If the domain name ends with .local, using a DNS server ip of 224.0.0.251 and a port of 5353 is all that needs to happen, so there is minimal code change.

If someone wants to point the right file, I'm happy to change it and put it in a PR.

@n8henrie
Copy link

This would be great. I'm trying to get mdns to work right now just for this purpose but not having any luck.

@madpilot -- do you have a functioning hostname.local resolution workaround currently?

@madpilot
Copy link
Author

@n8henrie Not right now - I finally have master running in my IDE, so I'm hoping to have a poke around this week.

@railnerd
Copy link

Interesting lwip info here: http://savannah.nongnu.org/task/?10238

@railnerd
Copy link

railnerd commented Mar 18, 2017

should be possible to pull latest stable lwip (2_0_2) and add to options

#define LWIP_DNS_SUPPORT_MDNS_QUERIES 1

@me-no-dev
Copy link
Collaborator

we should actually port the mdns from ESP32. It has host and service queries and all. I need to add a couple of features before merging though.

@railnerd
Copy link

well, the root cause for not being able to resolve .local addresses lies in lwip, but certainly parity between ESP32 and ESP8266 would be nice.

@madpilot
Copy link
Author

I ended up writing a small library that does this: https://github.com/madpilot/mDNSResolver

@devyte
Copy link
Collaborator

devyte commented Oct 14, 2017

@me-no-dev will you be porting the esp32 mdns? no hurry. Also, it may make more sense after migrating to lwip2.

@devyte
Copy link
Collaborator

devyte commented Oct 14, 2017

@madpilot I assume from your last comment that your mDNSResolver addresses this issue?

@devyte devyte added the waiting for feedback Waiting on additional info. If it's not received, the issue may be closed. label Oct 14, 2017
@me-no-dev
Copy link
Collaborator

i hope some not so full version of it can be ported. 3 interfaces and IPv6 on ESP32 make things a bit intensive and i do not know how 8266 will coop even with v4 on 2 interfaces. But there is a way I imagine to port most of it (once done)

@devyte
Copy link
Collaborator

devyte commented Jan 11, 2019

Automatic switchover to MDNS lookup in HostByName() for .local hostnames would forcibly pull in the MDNS code for all users, which is undesirable. I suggest a simple app function along the lines of:

myLookup(hostname)
{
  if(hostname ends in .local)
    look up with MDNS lib
  else
    look up with hostByName()
}

Closing.

@devyte devyte closed this as completed Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for feedback Waiting on additional info. If it's not received, the issue may be closed.
Projects
None yet
Development

No branches or pull requests

5 participants