sudo vi /etc/network/interfaces
(1) 動態 (dynamic) IP
auto eth0
iface eth0 inet dhcp
(2) 固定 (Static) IP
auto eth0
iface eth0 inet static
address 192.168.1.90
netmask 255.255.255.0
gateway 192.168.1.254
2. 設定 DNS
sudo vi /etc/resolv.conf
輸入
nameserver 168.95.1.1
3. 重啟網路服務
sudo /etc/init.d/networking restart
4. 測試可否連外
ping www.google.com
(1) 動態 (dynamic) IP
auto eth0
iface eth0 inet dhcp
(2) 固定 (Static) IP
auto eth0
iface eth0 inet static
address 192.168.1.90
netmask 255.255.255.0
gateway 192.168.1.254
2. 設定 DNS
sudo vi /etc/resolv.conf
輸入
nameserver 168.95.1.1
3. 重啟網路服務
sudo /etc/init.d/networking restart
4. 測試可否連外
ping www.google.com
參考資料:xuite
沒有留言:
張貼留言