Debian 網絡設置以及非法關機后無法聯網 connect: network is unreachable
Posted on 2014-01-24 10:50 IceWee 閱讀(905) 評論(0) 編輯 收藏 所屬分類: Others
網絡配置:
臨時(重啟丟失)
ifconfig eth0 192.168.1.xxx netmask 255.255.xxx.0
永久(重啟有效)
vi /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet static
address 192.168.1.xxx
netmask 255.255.xxx.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 202.106.196.115

ifconfig eth0 192.168.1.xxx netmask 255.255.xxx.0
route add default gw 192.168.1.1
重啟后配置丟失,所以必須在重啟之前執行:
apt-get update
apt-get install ifupdown
不能聯網是因為非法關機導致ifup腳本丟失
臨時(重啟丟失)

永久(重啟有效)



















由于非法關機導致重啟后無法聯網


重啟后配置丟失,所以必須在重啟之前執行:


不能聯網是因為非法關機導致ifup腳本丟失