1、配置靜態ip地址:
# vim /etc/network/interfaces
原內容有如下4行:auto loiface lo inet loopback
auto eth0iface eth0 inet dhcp
以上表示默認使用DHCP分配IP,修改為如下:auto loiface lo inet loopback
# The PRimary network interfaceauto eth0#iface eth0 inet dhcp
iface eth0 inet staticaddress 192.168.80.129netmask 255.255.255.0gateway 192.168.80.2
保存退出。注意:只需要設置address(IP地址)、netmask(子網掩碼)、gateway(網關)這三項就OK,network和broadcast這兩項參數是可以不寫的。
新聞熱點
疑難解答