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.

  • 相关阅读:
    纸壳CMS替换默认实现
    ASP.Net Core 2.2 InProcess托管的Bug:unable to open database file
    GitHub设置使用SSH Key,用TortoiseGit进行Clone仓库
    在Docker中运行纸壳CMS并配置使用MySql
    使用vs code开发纸壳CMS并启用Razor智能提示
    ASP .Net Core路由(Route)
    .Net Core在Middleware中解析RouteData
    纸壳CMS可视化建站系统搭建多语言网站
    Redis的初识
    C#/Java 动态生成电子发票
  • 原文地址:https://www.cnblogs.com/yongdaiblog-201409/p/6799351.html
Copyright © 2011-2022 走看看