CentOS etho 問題

來源:互聯網
上載者:User

標籤:centos etho networkmanager

裝了CentOS 6.4,但是發現

第一步,配置並啟用網上eth0網卡沒有ip,只有lo網卡有127.0.0.1,然後/etc/sysconfig/network-scripts/下面也沒有ifcfg-eth0檔案。

解決辦法:

新增ifcfg-eth0檔案:



[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0 #網卡裝置名稱
ONBOOT=yes #啟動時是否啟用 yes|no
BOOTPROTO=static #協議類型 dhcp bootp none
IPADDR=192.168.1.90 #網路IP地址
NETMASK=255.255.255.0 #網路子網地址
GATEWAY=192.168.1.1 #網關地址
BROADCAST=192.168.1.255 #廣播位址
HWADDR=00:0C:29:FE:1A:09#網卡MAC地址
TYPE=Ethernet #網卡類型為乙太網路


:wq 儲存配置

[[email protected] ~]#service network restart

結果報錯

[[email protected] ~]#service NetworkManager restart

也是報錯

bringing up interface eth0 error ... device not managed by networkmanager or unavailable


百度說network和NetworkManager 有衝突,停掉一個。


解決辦法:
1 chkconfig NetworkManager off
2 chkconfig network on
3 service NetworkManager stop
4 service network start


英文原文如下(大體意思是停掉NetworkManager,啟用預設的Manager):

=======================================================================
1. Remove Network Manager from startup Services.
chkconfig NetworkManager off
2. Add Default Net Manager
chkconfig network on
Stop NetworkManager first
service NetworkManager stop
and then start Default Manager
service network start
or you can change it easy:
system-config-network
uncheck the box that sets the eth0 as managed by NetworkManager and set IP info from there.
system-config-services
stop and disable NetworkManager , start and enable network
you have problem because both of NetworkManager and Network using same Network driver and default network blocking access for NetworkManager. if you disable NetworkManager your problem will disappeared after restart.


本文出自 “完美主義” 部落格,請務必保留此出處http://liangxueming.blog.51cto.com/3911546/1547023

CentOS etho 問題

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.