Solve CentOS eth0: Error: disconnect the device 'eth0'

Source: Internet
Author: User

Solve CentOS eth0: Error: disconnect the device 'eth0'
1. Problem Description

[Root @ pdshow ~] # Ping www.baidu.com
Connect: inaccessible Network
[Root @ pdshow ~] #

[Root @ pdshow ~] # Ping www.baidu.com
Connect: inaccessible Network
[Root @ pdshow ~] # Ifconfig eth0 192.168.121.51 netmask 255.255.255.0 broadcast 192.168.121.255
[Root @ pdshow ~] # Route add default gw 192.168.120.1
SIOCADDRT: No Process
[Root @ pdshow ~] #
Failed to set the network IP address.

2. network startup Error

Closing interface eth0: Error: disconnecting device 'eth0' (/org/freedesktop/NetworkManager/Devices/0) failed: This device is not active;

3. Disable NetworkManager.

NetworkManager affects/etc/init. d/network.
[Root @ 192 ~] # Service NetworkManager stop
Stop the NetworkManager daemon: [OK]
[Root @ 192 ~] #

Service network restart fails.

4. View ifcfg-eth0 configuration problems

[Root @ 192 ~] # Vim/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE = eth0
TYPE = Ethernet
UUID = fd7935ed-d944-4a1a-81eb-bf72b1e368c0
ONBOOT = no
NM_CONTROLLED = yes
BOOTPROTO = none
HWADDR = 00: 0c: 29: cd: 1f: 68
IPADDR = 192.168.121.52
PREFIX = 23
GATEWAY = 192.168.120.1
DNS1 = 192.168.121.212
DEFROUTE = yes
20174_failure_fatal = yes
IPV6INIT = no
NAME = "System eth0"

If ONBOOT = no is displayed, this configuration is invalid. You should set it to yes. no indicates that the NIC is not activated. Change to yes

5. Restart the network.

/Etc/init. d/network restart, which takes effect later and solves the network problem.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.