LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 782|回复: 1

如何设置域名服务器

[复制链接]
发表于 2006-11-26 09:11:26 | 显示全部楼层 |阅读模式
我看到了/etc/resolv.conf 有一些域名地址
  1. joey@debian:~$ cat /etc/resolv.conf
  2. search
  3. nameserver 60.191.244.5
  4. nameserver 60.191.244.2
  5. nameserver 192.168.1.10
复制代码

在/etc/network/interfaces 的ifup static ip设置里面 有一个我自己设置的dns-nameservers 192.168.1.10
  1. # The primary network interface
  2. auto eth0
  3. iface eth0 inet static
  4.         address 192.168.1.37
  5.         netmask 255.255.255.0
  6.         network 192.168.1.0
  7.         broadcast 192.168.1.255
  8.         gateway 192.168.1.10
  9.         # dns-* options are implemented by the resolvconf package, if installed
  10.         dns-nameservers 192.168.1.10
复制代码

那么,我ifup eth0的时候,dns 服务器 到底是哪个??
如果我用dhcp (dhclient eth0) 动态分配ip的话,dns又是哪个??
如何设置像xp一样,有主用dns和备用dns??
发表于 2006-11-26 09:25:15 | 显示全部楼层
接口上可以配置dns吗?

如果接口设置了dhcp,那么dhcp得到的dns会修改/etc/resolv.conf,也就是说最终起作用的还是/etc/resolv.conf文件。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表