如果要自己设置dns的话就要取消dhcp 使用静态ip
在/etc/network/interfaces 里面修改
auto lo
iface lo inet loopback
# 首选网卡
auto eth0
iface eth0 inet static
address 192.168.1.58
gateway 192.168.1.1
network 192.168.1.0
broadcast 192.168.1.255
dns-nameservers 66.212.63.228 66.212.48.10
改好后重启网络服务
/etc/init.d/networking restart
建议在修改文件前备份文件
cp /etc/network/interfaces /etc/network/interfaces.copia