--检查有几个pci网卡
[root@db01 ~]# lspci |grep Ethernet
04:00.0 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
04:00.1 Ethernet controller: Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet (rev 20)
13:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
13:00.1 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
13:00.2 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
13:00.3 Ethernet controller: Broadcom Corporation NetXtreme BCM5719 Gigabit Ethernet PCIe (rev 01)
18:00.0 Ethernet controller: ServerEngines Corp. Emulex OneConnect 10Gb NIC (be3) (rev 02)
18:00.1 Ethernet controller: ServerEngines Corp. Emulex OneConnect 10Gb NIC (be3) (rev 02)
95:00.0 Ethernet controller: Broadcom Corporation Device 165f
95:00.1 Ethernet controller: Broadcom Corporation Device 165f
--检查有驱动的网卡
[root@db01 ~]# ifconfig
eth0 Link encap:Ethernet HWaddr 5C:F3:FC:DC:1C:C8
inet addr:10.208.0.30 Bcast:10.255.255.255 Mask:255.255.255.0
inet6 addr: fe80::5ef3:fcff:fedc:1cc8/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2238 errors:0 dropped:0 overruns:0 frame.:0
TX packets:1398 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:227872 (222.5 KiB) TX bytes:249685 (243.8 KiB)
Interrupt:28 Memory:94000000-94012800
eth1 Link encap:Ethernet HWaddr 5C:F3:FC:DC:1C:CA
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame.:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:40 Memory:92000000-92012800
eth2 Link encap:Ethernet HWaddr 00:10:18:DB:F3:64
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame.:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:30
eth3 Link encap:Ethernet HWaddr 00:10:18:DB:F3:65
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame.:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:37
eth4 Link encap:Ethernet HWaddr 00:10:18:DB:F3:66
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame.:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:30
eth5 Link encap:Ethernet HWaddr 00:10:18:DB:F3:67
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame.:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:37
eth6 Link encap:Ethernet HWaddr 00:90:FA:05:B2:3C
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame.:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
eth7 Link encap:Ethernet HWaddr 00:90:FA:05:B2:40
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame.:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:107 errors:0 dropped:0 overruns:0 frame.:0
TX packets:107 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:7770 (7.5 KiB) TX bytes:7770 (7.5 KiB)
usb0 Link encap:Ethernet HWaddr 5E:F3:FD:37:1C:7B
inet6 addr: fe80::5cf3:fdff:fe37:1c7b/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:5783 errors:0 dropped:0 overruns:0 frame.:0
TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:376435 (367.6 KiB) TX bytes:468 (468.0 b)
--查看网卡的总线信息(bus-info)
[root@db01 ~]# ethtool -i eth0
driver: bnx2
version: 2.0.8-j15
firmware-version: bc 6.2.0 NCSI 2.0.11
bus-info: 0000:04:00.0
[root@db01 ~]# ethtool -i eth1
driver: bnx2
version: 2.0.8-j15
firmware-version: bc 6.2.0 NCSI 2.0.11
bus-info: 0000:04:00.1
[root@db01 ~]# ethtool -i eth2
driver: tg3
version: 3.108
firmware-version: 5719-v1.29
bus-info: 0000:13:00.0
[root@db01 ~]# ethtool -i eth3
driver: tg3
version: 3.108
firmware-version: 5719-v1.29
bus-info: 0000:13:00.1
[root@db01 ~]# ethtool -i eth4
driver: tg3
version: 3.108
firmware-version: 5719-v1.29
bus-info: 0000:13:00.2
[root@db01 ~]# ethtool -i eth5
driver: tg3
version: 3.108
firmware-version: 5719-v1.29
bus-info: 0000:13:00.3
[root@db01 ~]# ethtool -i eth6
driver: be2net
version: 2.102.426r
firmware-version: 4.0.1062.0
bus-info: 0000:18:00.0
[root@db01 ~]# ethtool -i eth7
driver: be2net
version: 2.102.426r
firmware-version: 4.0.1062.0
bus-info: 0000:18:00.1
--确定95:00.1,95:00.0没有驱动
--google 关键字:Broadcom 165f 或者 Broadcom Corporation Device 165f
找到网址http://pci-ids.ucw.cz/read/PC/14e4 对应的 165f 对应 NetXtreme BCM5720 Gigabit Ethernet PCIe
--到http://www.broadcom.com/support/ethernet_nic/netxtreme_server.php 下载5720驱动
--安装驱动
The following are general guidelines for installing the driver.
-
Install the source RPM package:
rpm -ivh tg3-.src.rpm
-
CD to the RPM path and build the binary driver for your kernel:
cd /usr/src/{redhat,OpenLinux,turbo,packages,rpm ..}
========
在过去RHEL5以及之前的版本会在/usr/src/redhat下SOURCE 和SPECS这两个目录
现在rhel6是找不到这个目录的
默认情况下会在/root/下生成一个rpmbuild的目录这个下面就有SOURCE 和SPECS着两个目录
安装软件包后就会到这两个目录中去
rpm -bb SPECS/tg3.spec
or
rpmbuild -bb SPECS/tg3.spec (for RPM version 4.x.x)
Note that the RPM path is different for different Linux distributions.
The driver will be compiled for the running kernel by default. To build
the driver for a kernel different than the running one, specify the
kernel by defining it in KVER:
rpmbuild -bb SPECS/tg3.spec --define "KVER "
where in the form. of 2.x.y-z is the version of another
kernel that is installed on the system.
- Install the newly built package (driver and man page):
(/root/rpmbuild/RPMS/x86_64)
rpm -ivh RPMS//tg3-..rpm
is the architecture of the machine, e.g. i386:
rpm -ivh RPMS/i386/tg3-.i386.rpm
Note that the --force option may be needed on some Linux distributions
if conflicts are reported.
The driver will be installed in the following path:
2.6.x/3.x kernels:
/lib/modules//kernel/drivers/net/tg3.ko
-
Load the driver:
insmod tg3.o
or
insmod tg3.ko (on 2.6.x/3.x kernels)
or
modprobe tg3 -
To configure network protocol and address, refer to various Linux
documentations.
This version of the tg3 driver supports one module parameter that is
not available in the in-kernel driver. The parameter is named tg3_disable_eee.
To disable Energy Efficient Ethernet (EEE) support, set this module parameter
to 1.
The rest of the sections below apply to both the in-kernel tg3
driver and the tg3 driver package from Broadcom.
Driver settings can be queried and changed using ethtool. The latest ethtool
can be downloaded from ftp://ftp.kernel.org/pub/software/network/ethtool if
it is not already installed. The following are some common examples on how to
use ethtool. See the ethtool man page for more information. ethtool settings
do not persist across reboot or module reload. The ethtool commands can be put
in a startup script. such as /etc/rc.local to preserve the settings across a
reboot. On Red Hat distributions, "ethtool -s" parameters can be specified
in the ifcfg-ethx scripts using the ETHTOOL_OPTS keyword. The specified
ethtool parameters will be set during ifup. Example:
/etc/sysconfig/network-scripts/ifcfg-eth0:
ETHTOOL_OPTS="wol g speed 100 duplex half autoneg off"
Some ethtool examples:
-
Show current speed, duplex, and link status:
ethtool eth0
- Change speed, duplex, autoneg:
Example: 100Mbps half duplex, no autonegotiation:
ethtool -s eth0 speed 100 duplex half autoneg off
Example: Autonegotiation with full advertisement:
ethtool -s eth0 autoneg on
Example: Autonegotiation with 100Mbps full duplex advertisement only:
ethtool -s eth0 speed 100 duplex full autoneg on
-
Show flow control settings:
ethtool -a eth0
- Change flow control settings:
Example: Turn off flow control
ethtool -A eth0 autoneg off rx off tx off
Example: Turn flow control autonegotiation on with tx and rx advertisement:
ethtool -A eth0 autoneg on rx on tx on
Note that this is only valid if speed is set to autonegotiation.
-
Show offload settings:
ethtool -k eth0
- Change offload settings:
Example: Turn off TSO (TCP segmentation offload)
ethtool -K eth0 tso off
-
Get statistics:
ethtool -S eth0
-
Perform. self-test:
ethtool -t eth0
Note that the interface (eth0) must be up to do all tests.
-
Show number of channels (rings):
ethtool -l eth0
Note that this is only supported on newer MSI-X capable devices (e.g.
57765, 57766, 5717, 5719, 5720) and available on 3.x kernels and 3.x
ethtool only.
源博文地址:
http://blog.itpub.net/25027760/viewspace-750870/