In CentOS6.5, ifconfig cannot find eth0, And the IP address cannot be found.

Source: Internet
Author: User

In CentOS6.5, ifconfig cannot find eth0, And the IP address cannot be found.

After CentOS6.5 is installed, you can use ifconfig to view the IP address and use putty software for remote connection. However, eth0 is not found, and only l0 is used.

Solution:

(1) Go to the following directory:/etc/sysconfig/network-scripts/

(2) create a file in the current directory named: ifcfg-eth0

(3) Now you can edit the new file and add the following content to it (each item needs to be modified)

DEVICE = eth0 physical DEVICE name

IPADDR = 192.168.1.x IP Address

NETMASK = 255.255.255.0 Subnet Mask

NETWORK = 192.168.1.0 indicates the NETWORK, which is automatically calculated using the IP address and subnet mask.

GATEWAY = 192.168.1.1 GATEWAY address

BROADCAST = 192.168.1.255 BROADCAST address, automatically calculated by IP address and subnet mask

ONBOOT = [yes | no] whether to activate the device during boot

USERCTL = [yes | no] Can a non-ROOT user control the device?

BOOTPROTO = [none | static | bootp | dhcp]

Protocol not used during boot | static allocation | BOOTP protocol | dhcp protocol

HWADDR = 00: 13: D3: 27: 9F: 80 MAC address

NAME = eth0 file NAME

Edited for my local computer:

(4) After editing, Press ESC and enter ": wq" and press enter to save the modification;

You can view the modified content through "more ifcfg-eth0"

(5) add the "ifup eth0" Statement to the last line of the "/etc/rc. d/rc. loacl" file.

(6) Save the settings in step 1 and restart.

Note: After the configuration is complete, you are advised to ping www.bkjia.com to check whether liunx can be connected to the Internet. If it cannot be connected, refer

Modify the following 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.