升级生产环境服务器 网卡驱动,解决断线无法重连问题

  最近发现公司线上生产环境服务器外网网线插拔无法重连:即拔掉外网网线,之后再插上后,该台服务器外网Iping不通,只能通过内网重启NetworkManager以及重启network才能ping通外网IP。根据网上和同事的建议,决定给某一台服务器做网卡升级,没想到升级网卡后,这个问题就解决了,特此记录下升级网卡的全过程,也给有需要的伙伴参考下,哈哈。

  服务器网卡升级具体步骤如下:

    

  1. 网卡类型确认

[root@localhost ~]# ethtool -i  em1

driver: tg3

version: 3.137

firmware-version: FFV20.2.17 bc 5720-v1.39

bus-info: 0000:02:00.0

supports-statistics: yes

supports-test: yes

supports-eeprom-access: yes

supports-register-dump: yes

supports-priv-flags: no

上述所示:得知网卡类型driver: tg3, 驱动版本version: 3.137。

 

 

  1. tg3网卡驱动更新方法

a.新驱动版本安装:

       [root@localhost ~]# pwd

/root

[root@localhost ~]# ls

anaconda-ks.cfg  tg3-3.137o-5.rhel6u6.src.rpm

 

[root@localhost ~]# rpm -Uvh tg3-3.137o-5.rhel6u6.src.rpm

警告:tg3-3.137o-5.rhel6u6.src.rpm: 头V4 DSA/SHA1 Signature, 密钥 ID 29a6a44a: NOKEY

正在升级/安装...

   1:tg3-3.137o-5.rhel6u6             ################################# [100%]

b.卸载、重新加载

[root@localhost ~]# depmod -a

[root@localhost ~]# modprobe tg3

 

 

c.配置文件添加,如果已经添加,不用修改,需要编辑/etc/modprobe.conf文件,增加下面内容,如果是多块相同的网卡,请同样再添加em3,以此类推,我这服务器是两块网卡。具体添加内容如下:

[root@localhost ~]# cat /etc/modprobe.conf

alias em1 tg3

alias em2 tg3

   d.保存退出, 重启网络。

       [root@localhost ~]# /etc/init.d/network restart

 

注意:如果重启网络不生效,如果允许,重新启动服务器试试,线上环境请慎重哈。

posted on 2017-12-21 17:23  永远的大空翼  阅读(1026)  评论(0编辑  收藏  举报