zoukankan      html  css  js  c++  java
  • 服务器更换网卡不能通信等问题

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

  • 相关阅读:
    [题解]POJ_1417_(并查集背包
    [题解]POJ_2912_(带权并查集
    [题解]luogu_P1502_窗口的星星(扫描线
    [题解/模板]POJ_1733_Pairty game(带权并查集/扩展域
    [题解/模板]悬线法luogu_P1169_棋盘制作(悬线法
    [题解]luogu_P2059_卡牌游戏(状态设计/概率dp
    [题解]luogu_P2467_地精部落(思维dp
    「CJOJ2439」军队
    「LG2397」yyy loves Maths VI (mode)
    「LG2114」起床困难综合症
  • 原文地址:https://www.cnblogs.com/zhenhui/p/6179677.html
Copyright © 2011-2022 走看看