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.

  • 相关阅读:
    第二阶段每日总结10
    第二阶段每日总结09
    第二阶段每日总结08
    第二周总结站立会议07
    第二周总结站立会议06
    第二周总结站立会议05
    第二阶段站立会议04
    Beta阶段项目总结
    Alpha阶段项目总结
    软件说明书
  • 原文地址:https://www.cnblogs.com/yongdaiblog-201409/p/6799351.html
Copyright © 2011-2022 走看看