Home  >  Q&A  >  body text

网络 - 为什么linux的ip地址变成了127.0.0.1?

怪我咯怪我咯2742 days ago734

reply all(3)I'll reply

  • 迷茫

    迷茫2017-04-17 13:37:59

    lo is the loopback network card, and 127.0.0.1 is the loopback address.

    reply
    0
  • 伊谢尔伦

    伊谢尔伦2017-04-17 13:37:59

    There may be a problem with the network configuration file.
    Check the mac address of the eth0 network card

    ifconfig eth0 

    (The hexadecimal information after HWaddr is the mac address)

    Then take a look at the corresponding configuration file, /etc/sysconfig/network-scripts/ifcfg-eth0

    more /etc/sysconfig/network-scripts/ifcfg-eth0

    If the mac address obtained in the first step is not consistent with the one in the configuration file, you can try to modify the configuration file.
    Then, delete /etc/udev/rules.d/70-persistent-net.rules.
    (For the function of /etc/udev/rules.d/70-persistent-net.rules, please refer to udev)

    Restart the system and check whether eth0 is loaded normally.

    The above is my centos method. I have not tried it on other Linux. If it does not work, please understand.

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 13:37:59

    Agree with the above, add a new network card, and then start it again.

    reply
    0
  • Cancelreply