混水摸魚

[ LINUX ] – 設定固定IP

指令:vi /etc/network/interfaces
開啟後文件如下
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static //原本是(iface eth0 inet dhcp)自動取得ip 請將dhcp 改成 static 靜態
address 210.60.150.2 //你指定的固定ip
netmask 255.255.255.0 //子遮照
gateway 210.60.150.254 //閘道
修改完執行以下指令:
/etc/init.d/networking restart

Leave a Comment

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *