


先日、最新のハードウェアに動作させるアプリケーションの都合でCentOS 5.5 32bit版をインストールしたらLANカードを認識していない
久しぶりにハードウェアを認識しない状況を体験しました
ネットワークが使えないのは致命傷なので早々にLANを認識させる作業に取り掛かりました
- lspciコマンドでpciを調べる
- /proc/bus/pci/devicesを確認
- Vendor IDを調べる
- LANドライバダウンロード
- LANドライバインストール
lspciコマンドでpciデバイスに一覧を出力して確認します。Ethernet controllerが2つ表示されていました。
これはLANポートが2つあるハードウェアだからです
1 2 |
06:00.0 Ethernet controller: Intel Corporation Unknown device 1521 (rev 01) 06:00.1 Ethernet controller: Intel Corporation Unknown device 1521 (rev 01) |
/proc/bus/pci/devicesを表示させてPCI Vendor IDとPCI Device IDを確認します。
Ethernetが06でしたのでその行を確認すると80861521と表示されています。
ここで8086がVendor IDで1521がDevice IDになります
1 2 |
0600 80861521 b fb920000 0601 80861521 5 fb900000 |
※説明に必要なところを抜粋しています
私はいつも下記のサイトで調べています
PCI Vendor and Device Lists
http://www.pcidatabase.com/
Vendor Searchの欄に8086を入力してサーチをかけるとIntel CorporationとでたのでインテルのLANチップを搭載していることがわかります
さらにIntelから1521を調べるとLANチップの詳細が調べられます。
i350 Gigabit Network Connectionであることがわかりました
1 2 3 4 |
0x1521 Chip Number:I350 Chip Description:i350 Gigabit Network Connection Notes:donwload link at Intel : https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=18725 |
インテルのサイトからLinux用のLANドライバを探してダウンロードしてきます
もちろんCentOSはLANが認識しないのでPCでダウンロード、USBメモリにコピーしてからCentOSにコピーしました
今回は下記のドライバになります
Network Adapter Driver for 82575/6, 82580, I350, and I210/211-Based Gigabit Network Connections for Linux*
https://downloadcenter.intel.com/Detail_Desc.aspx?DwnldID=13663
1 2 3 4 5 6 7 |
ファイル名:igb-4.3.0.tar.gz バージョン:4.3.0 日付:2013/06/14 ステータス:最新 サイズ:0.28 MB 言語:英語 オペレーティング・システム:Linux* |
igb-4.3.0.tar.gzを解凍してできたREADMEを読めばインストール方法が書いてありました。
私はいつも開発環境もインストールしているのでrpmパッケージを作成してrpm でインストールして無事に認識しました
1 |
rpmbuild -tb igb-4.3.0.tar.gz |
【README(インストールの部分だけ抜粋)】
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
Building and Installation ========================= To build a binary RPM* package of this driver, run 'rpmbuild -tb <filename.tar.gz>'. Replace <filename.tar.gz> with the specific filename of the driver. NOTE: For the build to work properly, the currently running kernel MUST match the version and configuration of the installed kernel sources. If you have just recompiled the kernel reboot the system now. RPM functionality has only been tested in Red Hat distributions. 1. Move the base driver tar file to the directory of your choice. For example, use /home/username/igb or /usr/local/src/igb. 2. Untar/unzip archive: tar zxf igb-x.x.x.tar.gz 3. Change to the driver src directory: cd igb-x.x.x/src/ 4. Compile the driver module: make install The binary will be installed as: /lib/modules/<KERNEL VERSION>/kernel/drivers/net/igb/igb.[k]o The install locations listed above are the default locations. They might not be correct for certain Linux distributions. 5. Load the module using the modprobe command: modprobe igb With 2.6 based kernels also make sure that older igb drivers are removed from the kernel, before loading the new module: rmmod igb; modprobe igb 6. Assign an IP address to the interface by entering the following, where x is the interface number: ifconfig ethx <IP_address> 7. Verify that the interface works. Enter the following, where <IP_address> is the IP address for another machine on the same subnet as the interface that is being tested: ping <IP_address> TROUBLESHOOTING: Some systems have trouble supporting MSI and/or MSI-X interrupts. If you believe your system needs to disable this style of interrupt, the driver can be built and installed with the command: make CFLAGS_EXTRA=-DDISABLE_PCI_MSI install Normally the driver will generate an interrupt every two seconds, so if you can see that you're no longer getting interrupts in cat /proc/interrupts for the ethX igb device, then this workaround may be necessary. |