linux使用常見問題

出現RTNETLINK answers: File existsphp

同時出現connect:network is unreachable 和 Determining IP information for eth0... failed; no link present. Check cable?html

 

緣由一linux

network與NetworkManager衝突,關閉NetworkManager:網絡

service NetworkManager stop

  

緣由二測試

克隆的linux環境,生成了多個eth(eth0,eth1...)rest

編輯/對應文件:/etc/udev/rules.d/70-persistent-net.rulesorm

1.找到含NAME="eth0"的那行註釋掉,以下:server

#SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:ac:95:31", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

2.編輯含NAME="eth1"的那行:"eth1"更改成"eth0"htm

3.編輯/etc/sysconfig/network-scripts/ifcfg-eth0
更改HWADDR地址跟上面rules文件的MAC地址同樣。blog

 

緣由三

主機殺毒軟件清了VM服務,本人就是遇到這個問題

1.進入主機window的服務,而後選定那些VM系列,右鍵啓動

2.若是1無效,重啓電腦,再重啓VM試試,倒騰半天不是Linux的緣由...

記得檢查主機網絡鏈接的虛擬網卡是否打開了

 

緣由四

有帖子說是Redhat的一個bug

在/etc/sysconfig/network-scripts/ifcfg-eth0中添加如下script:

check_link_down() {
   return 1;
}

  

 

 

其餘方法:

臨時設置eth0的ip:ifconfig eth0 192.168.1.x

一條不知名帖子上的一條命令:ip addr flush dev eth0

 

網卡Mac地址錯誤:https://www.linuxidc.com/Linux/2014-01/95253.htm

 

測試

ifup eth0 //開啓網卡

ifdown eth0 //關閉網卡

service network start //啓動network

/etc/init.d/network restart //同上,啓動network

reboot //重啓系統

ping www.baidu.com //ping百度

ping 192.168.X.1 //ping同網段ip

ping 114.114.114.114 //ping網關

網絡配置詳解:http://www.cnblogs.com/wenanry/archive/2009/12/21/1629242.html

鳥哥——連上 Internet:http://cn.linux.vbird.org/linux_server/0130internet_connect_1.php

相關文章
相關標籤/搜索