【openwrt】dns失效 出现 ping: bad address 错误 解决方法 现象 ping 命令 ping baidu.com ping: bad address 'baidu.com' 返回找不到主机 尝试 1、重新启动OpenWrt设备:在OpenWrt平台上进行一个简单的重启可能会解决问题。还是末解决 2、执行 ps 查看dns相关服务(默认是dnsmasq)有没有启动, 发现没有启动dns相关服务 手动启动dnsmasq ./etc/init.d/dnsmasq start 发现依然没有启动dnsmasq 判定为配置文件错误 解决方法 编辑dnsmasq配置文件/var/etc/dnsmasq.conf vim /var/etc/dnsmasq.conf # auto-generated config file from /etc/config/dhcp conf-file=/etc/dnsmasq.conf dhcp-authoritative domain-needed localise-queries read-ethers bogus-priv expand-hosts local-service domain=lan server=/lan/ dhcp-leasefile=/tmp/dhcp.leases resolv-file=/tmp/resolv.conf.auto addn-hosts=/tmp/hosts conf-dir=/tmp/dnsmasq.d stop-dns-rebind rebind-localhost-ok dhcp-broadcast=tag:needs-broadcast 手动启动dnsmasq ./etc/init.d/dnsmasq start 测试一下 ping baidu.com Pinging baidu.com [110.242.68.66] with 32 bytes of data: Reply from 110.242.68.66: bytes=32 time=33ms TTL=50 Reply from 110.242.68.66: bytes=32 time=32ms TTL=50 Reply from 110.242.68.66: bytes=32 time=32ms TTL=50 问题解决 |
|Archiver|手机版|深圳市光明谷科技有限公司|光明谷商城|Sunshine Silicon Corpporation ( 粤ICP备14060730号 ) |Sitemap
GMT+8, 2024-9-30 23:13 , Processed in 0.111922 second(s), 36 queries .
Powered by Discuz! X3.2 Licensed
© 2001-2013 Comsenz Inc.