修改 /etc/network/interfaces
最好先备份一下
cp /etc/network/interfaces /etc/network/interfacesbackup
iface eth0 inet static
address 192.168.0.16
netmask 255.255.255.0
gateway 192.168.0.1
/etc/resolv.conf里面设置DNS服务器,
nameserver 192.168.0.1
nameserver 202.96.64.68
#因为我这里网关就是DNS服务器所以是相同的
最后reboot或者#/etc/init.d/networking restart
阅读(676) | 评论(0) | 转发(0) |