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

How do I get the correct dns1 and dns2? #8847

Closed
1 task done
hzhh110 opened this issue Nov 8, 2023 · 6 comments
Closed
1 task done

How do I get the correct dns1 and dns2? #8847

hzhh110 opened this issue Nov 8, 2023 · 6 comments
Assignees
Labels
Resolution: Expired More info wasn't provided Type: Question Only question

Comments

@hzhh110
Copy link

hzhh110 commented Nov 8, 2023

Related area

nodemcu-32s

Hardware specification

esp32

Is your feature request related to a problem?

How do I get the correct dns1 and dns2? Why are all the Intranet information such as 192.168.3.1 obtained? Even if my gateway is 192.168.2.1 but I get 192.168.3.1 or something like ETH.dnsIP(0).toString(); ETH.dnsIP(1).toString();

Describe the solution you'd like

How do I get the correct dns1 and dns2? Why are all the Intranet information such as 192.168.3.1 obtained? Even if my gateway is 192.168.2.1 but I get 192.168.3.1 or something like ETH.dnsIP(0).toString(); ETH.dnsIP(1).toString();

Describe alternatives you've considered

No response

Additional context

No response

I have checked existing list of Feature requests and the Contribution Guide

  • I confirm I have checked existing list of Feature requests and Contribution Guide.
@hzhh110 hzhh110 added the Type: Feature request Feature request for Arduino ESP32 label Nov 8, 2023
@SuGlider SuGlider added Type: Question Only question and removed Type: Feature request Feature request for Arduino ESP32 labels Nov 8, 2023
@SuGlider
Copy link
Collaborator

SuGlider commented Nov 8, 2023

Is it a question about how to set DNS server IP when using Ethernet?
@me-no-dev - Can you help it?

@me-no-dev
Copy link
Member

@hzhh110 I can help if you provide a proper explanation of how and what network interfaces you have configured on the ESP, what are active and maybe a small example sketch. As-is, you just shoot out some IP addresses, without any context on what they actually are.

As a simple answer: the ESP32 has global DNS servers for all interfaces, it does not allow for separate DNS servers for each interface, so whichever interface has the highest priority, is the one that provided the DNS servers.

@hzhh110
Copy link
Author

hzhh110 commented Nov 9, 2023

[E][WiFiGeneric.cpp:1438] hostByName(): DNS Failed for
And this is the most deadly, when I unplug the network cable on the router, and then plug it in,DNS will continue to fail, equivalent to the Internet completely failed, need to re-pull the device's network cable to restore normal

@mrengineer7777
Copy link
Collaborator

Possibly related #8672

@VojtechBartoska
Copy link
Contributor

Hello @hzhh110, did those answers help you or you are still looking for some help?

@VojtechBartoska
Copy link
Contributor

Hello, this issue is quite old and there is no answer for some time.

To keep the issue tracker of this project manageable, I am closing this ticket as expired.

If needed, you can reopen it.

Thanks for understanding. 👍

@VojtechBartoska VojtechBartoska closed this as not planned Won't fix, can't repro, duplicate, stale Sep 10, 2024
@VojtechBartoska VojtechBartoska added the Resolution: Expired More info wasn't provided label Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resolution: Expired More info wasn't provided Type: Question Only question
Projects
None yet
Development

No branches or pull requests

5 participants