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

开启smartdns时候会修改DHCP时候的建议 #1968

Open
liyiranlab opened this issue Apr 9, 2025 · 12 comments
Open

开启smartdns时候会修改DHCP时候的建议 #1968

liyiranlab opened this issue Apr 9, 2025 · 12 comments

Comments

@liyiranlab
Copy link

liyiranlab commented Apr 9, 2025

需求应用场景
请描述需求应用的场景和方式。
op路由器使用,开启smartdns时候建议设置DHCP的dns服务器为:6,192.168.10.1,192.168.10.1(lan地址),由于手机什么的设备会自动补全dns服务器,比如手机会自己加一个8.8.8.8,导致网络dns奇怪

建议的方案
实现上述场景建议的方案。

@PikuZheng
Copy link
Contributor

没用,你给手机下发三个dns,它自己也会缀出第四个来 参考#712

@liyiranlab
Copy link
Author

liyiranlab commented Apr 9, 2025

是吗,但是手机就两个dns的位置呀。关键现在我一修改smartdns,我的dhcp设置就被加入了6,192.168.10.1的设置,我之前设置6,192.168.10.1,192.168.10.1,变成无效了。导致我手机第二个dns被自动补全为8.8.8.8

@liyiranlab
Copy link
Author

getprop | grep dns 用这个命令看见一堆dns,但是不知道起不起作用。

@PikuZheng
Copy link
Contributor

用analiti可以看到dns

@liyiranlab
Copy link
Author

用大佬推荐的这个apk查看,按照6,192.168.10.1,192.168.10.1设置,dns只有主路由lan ip,还有lan ipv6 ip。没有别的dns。

@PikuZheng
Copy link
Contributor

如果设置 6,192.168.10.1,0.0.0.0呢?理论上主和辅不能一样,没有应该填0.0.0.0

@liyiranlab
Copy link
Author

liyiranlab commented Apr 10, 2025

设置成这个 6,192.168.10.1,0.0.0.0 和 6,192.168.10.1,192.168.10.1在我手机上的效果一样,都是两个lan IP,我手机鸿蒙3.0。我个人觉得设置成这个 6,192.168.10.1,0.0.0.0 ,好点。

@liyiranlab
Copy link
Author

liyiranlab commented Apr 10, 2025

之前,dhcp被改了不知道,刷闲鱼时不时会卡住,一脸懵逼,昨天偶然看手机wifi配置才发现不对头,现在改回大佬推荐的设置做dns服务器,再没有卡住。之前一直用smartdns上游模式,端口用的6053,前不久发现有问题,dnsmasq套smartdns时不时报错,提示设置上游失败。现在直接设置替换53端口,才发现这个问题。

@PikuZheng
Copy link
Contributor

华为在某些情况下从4g/5g切入wifi时会导致dns被改成180.76.76.76,223.5.5.5。建议保留analiti观察

@liyiranlab
Copy link
Author

liyiranlab commented Apr 11, 2025

直接关闭自动切换,我手动切换流量和wifi,就不会有问题。自动切换会出现wifi的dns出问题时候,就会去连流量的,就会出现这个问题。wifi的dns断肯定是设置有别的问题要自己排查。

@liyiranlab
Copy link
Author

今天发现用有的app还是会出现卡住的情况,退出app,再进入也是卡住了,断开wifi再链接才能打开,我感觉和使用多dns服务器有关,如果只添加默认运营商dns,好像不会有这个问题,我一般只用三个dns,运营商,360 101.226.4.6,https://120.53.53.53/dns-query。大佬看看我这个有什么问题吗?

@PikuZheng
Copy link
Contributor

我直接卸载openwrt上的dnsmasq(别动我的dnsmasq!)
华为的,如果以下网站不通,可能会导致手机不使用dhcp指定的dns(我自己观测的,不确定准确)

connectivitycheck.cbg-app.huawei.com
connectivitycheck.platform.hicloud.com
logservice.hicloud.com
ulogs.umengcloud.com
pkginstaller-drcn.hispace.dbankcloud.cn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants