通过编辑 vi /etc/resolv.conf 设置首选DNS和次要DNS。如下,排在前面的就是首选DNS,后面一行就是次要的DNS服务器DNS

vi /etc/resolv.conf
nameserver 223.5.5.5
nameserver 223.6.6.6

检查配置是否生效:

#nslookup www.baidu.com

Server:         223.5.5.5
Address:        223.5.5.5#53

Non-authoritative answer:
www.baidu.com   canonical name = www.a.shifen.com.
Name:   www.a.shifen.com
Address: 61.135.169.125
Name:   www.a.shifen.com
Address: 61.135.169.121

 

相关文章:

  • 2021-05-14
  • 2022-02-07
  • 2021-06-16
  • 2022-02-28
  • 2022-12-23
  • 2022-12-23
  • 2022-02-10
  • 2022-12-23
猜你喜欢
  • 2021-04-02
  • 2022-12-23
  • 2022-12-23
  • 2021-07-14
  • 2021-06-25
  • 2021-10-25
  • 2022-12-23
相关资源
相似解决方案