1、配置靜態(tài)ip地址:
# vim /etc/network/interfaces
原內(nèi)容有如下4行:auto loiface lo inet loopback
auto eth0iface eth0 inet dhcp
以上表示默認(rèn)使用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
保存退出。注意:只需要設(shè)置address(IP地址)、netmask(子網(wǎng)掩碼)、gateway(網(wǎng)關(guān))這三項(xiàng)就OK,network和broadcast這兩項(xiàng)參數(shù)是可以不寫的。
新聞熱點(diǎn)
疑難解答