zoukankan      html  css  js  c++  java
  • No eth0 in redhat

    After install redhat7 os ,wo can use ifconfig command to find out the network connection.However ,sometimes eth0 ethernet port  is not in the list.

     

    Solution:

    (1)Enter the directory:

    #cd /etc/sysconfig/network-scripts/

    (2)Create or copy a file:

    #vim /etc/sysconfig/network-scripts/ifcfg-eth0

    or

    #cp ifcfg-l0 ifcfg-eth0

     

    (3)Copy the setting from ifcfg-l0,then modify the setting

    -----------------------------------------------------------------------------------------------

    DEVICE=eth0           

    IPADDR=192.168.1.110     

    NETMASK=255.255.255.0 

    NETWORK=192.168.1.0   

    GATEWAY=192.168.1.1   

    BROADCAST=192.168.1.255  

    ONBOOT=[yes]       

    BOOTPROTO=[none|static|bootp|dhcp]

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

    NAME=eth0 

    -----------------------------------------------------------------------------------------------

    (4)Create  a file [70-persistent-net.rules ], modify the setting

    Note:the most important is the MAC address setting

    # vim /etc/udev/rules.d/70-persistent-net.rules  

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    # PCI device 0x10ec:0x8168 (r8169) (custom name provided by external tool) 

    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:13:D3:27:9F:80", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"  

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

    (5)Restart your OS in order to make it effective.

  • 相关阅读:
    Simple Microservices Architecture on AWS
    信封加密 Envelope
    AWS::Serverless::Application
    API Gateway Stage variables
    重新开始继续准备AWS Dev认证考试:AWS Lambda 环境变量
    MXnet 转 OpenVino,在树莓派上做的图片推理
    OpenVino的MXnet模型转换
    Grafana 6.3.3发布 系统指标监控与分析平台
    【小工具】鼠标右键 图片转文字
    【Shiro】Shiro登录验证失败问题
  • 原文地址:https://www.cnblogs.com/yongdaiblog-201409/p/6799351.html
Copyright © 2011-2022 走看看