今天在虚拟机上安了个ubuntu7.10,默认是动态IP,静态IP需要手动设置,设置方法是:
sudovi/etc/network/interfaces:
autoeth0
#ifaceeth0inetdhcp
ifaceeht0inetstatic
address192.168.1.254
netmask255.255.255.0
gateway192.168.1.1
nameserver192.168.1.1
sudo/etc/init.d/networkingrestart
下载本文示例代码
阅读(228) | 评论(0) | 转发(0) |