解决Ubuntu17.04升级到17.10后 DNS 无法正常解析的问题

1、现象

I’ve just upgraded my laptop from xubuntu 17.04 to 17.10. After the final reboot, DNS has stopped working. This is obviously a problem! I can ping known IP addresses; just no DNS resolution.

I were updating Ubuntu today form version 16.10 through 17.04 to 17.10. For me too DNS stopped working. The resolv.conf symlink was

2、分析

/etc/resolv.conf -> /run/NetworkManager/resolv.conf

This is apparently wrong for 17.10. The error message the previous poster got is from the output of resolvconf -service:

$ systemctl status resolvconf

resolvconf[623]: /etc/resolvconf/update.d/libc: Warning: /etc/resolv.conf is not a symbolic link to /run/resolvconf/resolv.conf

3、解决

By removing the original symlink, linking to /run/resolvconf/resolv.conf to /etc/resolv.conf and restarting the resolvconf -service DNS began working again:

$ sudo rm /etc/resolv.conf $ sudo ln -s /run/resolvconf/resolv.conf /etc/resolv.conf

$ systemctl restart resolvconf

4、测试

sudo /etc/init.d/network-manager restart

[ ok ] Restarting network-manager (via systemctl): network-manager.service.

cjx@york:~$ ping www.baidu.com

PING www.wshifen.com (103.235.46.40) 56(84) bytes of data.

64 bytes from 103.235.46.40: icmp_seq=1 ttl=38 time=310 ms

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 2,930评论 0 0
  • 安装k8s Master高可用集群 主机 角色 组件 172.18.6.101 K8S Master Kubele...
    jony456123阅读 8,096评论 0 9
  • 【前言】 我有一个罗里吧嗦的故事,因为它告诉我女生会自拍很重要,这技能杠杠的最好。 敏是我一个大学同学,为人谦逊内...
    鯨魚兒阅读 892评论 0 3
  • 曾经最美 我们总是期望美好的东西,比如初恋可以永远,一生一世一双人,白头到老永相随! 已经记不住,何时相遇,何时鼓...
    照亮Br阅读 268评论 0 2
  • 如果可以入围我就请全宿舍吃饭。50强就请
    楠风Dawn阅读 143评论 0 0