With the ifconfig command no eth0, only Lo's solution

Source: Internet
Author: User
Tags web services
Problem Description: Enter the Ifconfig command in the video, display the eth0 and lo, but you do not get the result in the virtual machine, but only lo, that is, the network card is not started, there is no IP, unable to connect remotely with Xshell.

Solution:

1. Enter the/etc/sysconfig/network-scripts directory and find that there is a ifcfg-eth0, that is, the network card (driver) is present but not enabled.

2. Enter the IFCONFIG-A command to display the eth0 and lo.

3. Enter ifconfig eth0 up to enable the NIC. With Ifconfig, you can only see the address of the Inet6 (IPv6?), without the inet address (that is, the IP of the Xshell connection input).

4. Modify the/etc/sysconfig/network-scripts/ifcfg-eth0 file to change the Onboot=no to Onboot=yes, but the results of ifconfig have not changed. (Omitting this step does not know whether it is valid)

5. Service network restart, restart. The shutdown eth0 ok,bring up eth0 ok,determine IP for eth0 OK appears.

6. Enter Ifconfig, and the inet address of the eth0 appears. Successful connection with Xshell.

PS: Supplemental video, Setup from Xshell and set IP, but if not set IP Xshell How to connect to the virtual machine ... Please ask the teacher and your classmates to answer. If you follow this step to do success or failure, please also bask in the following, we discuss together. 2014-12-05 from: Linux talent Formation Program I ... 2-8 32599 views 58 answer lestat613

1. Enter Cd/etc/sysconfig/network-scripts directory

2. Input ifconfig-a can display eth0 and lo.

3, 3. Input ifconfig eth0 up

4, vi Ifcfg-eth0 can this interface can put onboot=no,onboot=yes.

Here my onboot=yes has been changed.

5. After the change, enter: and Wq save and exit

6. Enter service network Restart to restart the Web services.

7, input ifconfig, should be able to see the changed IP, should be even if the configuration is complete.

PS: The above ideas are derived from the landlord and Hu000jun two tireless contributions, I thank you here first, because I understand the ability to repeatedly look at a number of times, but also in Baidu to find a good big strength finally understand and contribute to the solution. So caught dead to share what they have learned with you. Thanks again for two people hard.

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.