2009年10月15日 星期四

Ubuntu的網路卡設定

Ubuntu的網路卡設定檔為/etc/network/interfaces

一般單一網卡的電腦取得動態IP時,interfaces設定如下:
auto eth0
iface eth0 inet static
一般單一網卡的電腦設成固定IP時,interfaces設定如下:
auto eth0
iface eth0 inet static
address 140.111.152.77
netmask 255.255.255.0
gateway 140.111.152.254

重新啟動網路方式如下:

sudo /etc/init.d/networking restart

測試網路是否有連通,可以在終端機(指令)模式下,使用ping指令來測試,如:

ping www.hinet.net

沒有留言:

張貼留言