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


    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.重启服务器(查看网卡是亮灯就成功连接到交换机)可以通信

  • 相关阅读:
    js四舍五入
    文本框只能输入整数,输入其他的自动不显示
    [转]关于C#程序部署到Android
    ajax在火狐中传中文出现乱码的解决方法
    Vue 记录 Cannot read property '_withTask' of undefined
    vs中 VMDebugger未能加载导致异常
    System.InvalidOperationException: 支持“XXX”上下文的模型已在数据库创建后发生更改。请考虑使用 Code First 迁移更新数据库(http://go.microsoft.com/fwlink/?LinkId=238269)。
    eclipse中将java项目转换成javaweb项目
    Android之SOAP协议与WebService服务器交互,解决超时的问题
    SymmetricDS 快速和灵活的数据库复制
  • 原文地址:https://www.cnblogs.com/zhenhui/p/6179677.html
Copyright © 2020-2023  润新知