修改/etc/network/interfaces
最好先备份一下
cp/etc/network/interfaces/etc/network/interfacesbackup
ifaceeth0inetstatic
address192.168.0.16
netmask255.255.255.0
gateway192.168.0.1
/etc/resolv.conf里面设置DNS服务器,
nameserver192.168.0.1
#因为我这里网关就是DNS服务器所以是相同的
最后reboot或者#/etc/init.d/networkingrestart
下载本文示例代码
阅读(164) | 评论(0) | 转发(0) |