Ubuntu 設定固定 IP
from http://tiebob.blogspot.com/2008/01/ubuntu-ip.html由於安裝的 Ubuntu 是Desktop的版本,所以,系統裝好了之後預設都是用 Dhcp來取得 IP,記錄一下用手動方式來設定IP# sudo vi /etc/network/interfaces一、單網卡單 IPauto eth0 ## 重要,這一行一定要設定iface eth0 inet staticaddress ## 請將 換成你要的 IPnetmask 255.255.255.0gateway 192.168.1.1二、單網卡多個 IP(直接在網卡後,加上 「:n「)auto eth0:0iface eth0:0 inet staticaddress netmask [遮罩]gateway [閘道]auto eth0:1iface eth0:1 inet staticaddress netmask [遮罩]gateway [閘道]設定好了之後,需要重新啟動網卡才會生效,可以利用下列指令來達到這個動作# sudo /etc/init.d/networking restart
页:
[1]