• 服务器更换网卡不能通信等问题


    1.服务器更换网卡(服务器开机网卡的灯是不亮的)
    2.进系统进行网卡配置

    [root@bj ~]# cat /etc/udev/rules.d/70-persistent-net.rules 
    # This file was automatically generated by the /lib/udev/write_net_rules
    # program, run by the persistent-net-generator.rules rules file.
    #
    # You can modify it, as long as you keep each rule on a single
    # line, and change only the value of the NAME= key. 
    # PCI device 0x8086:0x1521 (igb)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:67:38:9b:23", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"
    # PCI device 0x8086:0x1521 (igb)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:67:38:9b:22", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
    # PCI device 0x8086:0x1521 (igb)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:67:38:9b:21", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
    # PCI device 0x8086:0x1521 (igb)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:1e:67:38:9b:24", ATTR{type}=="1", KERNEL=="eth*", NAME="eth3"
    # PCI device 0x14e4:0x168e (bnx2x)
    #SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:f7:5c:7a:50", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4"(这是旧网卡的信息)
    # PCI device 0x14e4:0x168e (bnx2x)
    #SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0a:f7:5c:7a:52", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5"(这是旧网卡的信息)
    # PCI device 0x8086:0x10fb (ixgbe)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e2:ba:00:1d:b0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth4" (这是新网卡的信息,
    把网卡名称换成旧网卡的名称)
    # PCI device 0x8086:0x10fb (ixgbe)
    SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="90:e2:ba:00:1d:b1", ATTR{type}=="1", KERNEL=="eth*", NAME="eth5" (这是新网卡的信息,
    把网卡名称换成旧网卡的名称)
    注意,网卡换过一次就会在这个文件中添加一条记录,这里我们把更换掉的网卡给注释掉了

    3.修改网卡的配置文件,把网卡的mac地址给注释掉了
    [root@bj ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth4

    DEVICE=eth4
    #HWADDR=00:0a:f7:5c:7a:50  把网卡的mac地址给注释掉了
    TYPE=Ethernet
    ONBOOT=yes
    NM_CONTROLLED=no
    BOOTPROTO=none
    BRIDGE=cloudbr0
    #IPADDR=
    #NETMASK=
    #GATEWAY=
    #DNS1=
    #DNS2=


    4.重启服务器(查看网卡是亮灯就成功连接到交换机)可以通信

  • 相关阅读:
    IDEA-各模块间引用出现问题的解决方法
    【MyBatis学习06】_parameter:解决There is no getter for property named in class java.lang.String
    《转载》JVM垃圾回收机制
    java面试复习题四
    Java中excel转换为jpg/png图片 采用aspose-cells-18.6.jar
    POI导出复杂的excel;excel公共样式类;excel拼接定制类;数据科学计数法转为普通值
    java发送邮件无法显示图片 图裂 的解决办法
    pom.xml文件最详细的讲解
    Tomcat启动报Error listenerStart错误 Context [] startup failed due to previous errors
    ora-01031:insufficient privileges解决方法
  • 原文地址:https://www.cnblogs.com/zhenhui/p/6179677.html
Copyright © 2020-2023  润新知