投げ銭

★当サイトへの投げ銭(PayPal)★

LINK


(無償、寄付歓迎) logo
世界中で使われるISO標準オフィスソフト(MSオフィス互換)

★LibreOfficeの導入事例★
詳細について

人気の投稿(1ヶ月間)

Ad

Ad

投げ銭

★当サイトへの投げ銭(PayPal)★

2010年4月28日水曜日

【Linux CentOS5.4】 usbインターフェースのNICを使う

CentOS 5.4で、usbインターフェースのNICを使う

今回もちいたのは、Corega K.K. FEther USB-TX Ethernetである。


■USBポートにNICを差込み、デバイスがどう認識されているか調べる

[root@localhost ~]# lsusb

Bus 001 Device 001: ID 0000:0000
Bus 001 Device 002: ID 054c:02a5 Sony Corp. MicroVault Flash Drive
Bus 002 Device 001: ID 0000:0000
Bus 003 Device 004: ID 07aa:0004 Corega K.K. FEther USB-TX Ethernet [pegasus] Bus 003 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000

■必要なドライバがCentOS5.4にあるか調べ、ドライバの組み込みを行う

[root@localhost ~]# modprobe -l | grep pegasus   ←該当のドライバがあるかどうか調べる
/lib/modules/2.6.18-164.15.1.el5/kernel/drivers/usb/net/pegasus.ko  ←ある!

[root@localhost ~]# modprobe pegasus   ←modprobeコマンドは依存関係をロードしてインストールする


◎modprobeが実行されると、どうやら /etc/modprobe.conf の内容が書き換わるようだ
[root@localhost ~]# less /etc/modprobe.conf

<前>
alias eth0 via-rhine
alias eth1 via-rhine
alias scsi_hostadapter sata_via
alias scsi_hostadapter1 usb-storage
alias snd-card-0 snd-via82xx
options snd-card-0 index=0
options snd-via82xx index=0
remove snd-via82xx { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-via82xx
<後>
alias eth0 via-rhine
alias eth1 via-rhine
alias scsi_hostadapter sata_via
alias scsi_hostadapter1 usb-storage
alias snd-card-0 snd-via82xx
options snd-card-0 index=0
options snd-via82xx index=0
remove snd-via82xx { /usr/sbin/alsactl store 0 >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-via82xx
alias eth2 pegasus


■NICが認識されて使用可能かどうか調べる

[root@localhost ~]# ifconfig -a
(略)
eth2   Link encap:Ethernet  HWaddr 
          inet addr:192.168.1.8  Bcast:192.168.126.255  Mask:255.255.255.0
          inet6 addr:   Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:264 errors:0 dropped:0 overruns:0 frame:0
          TX packets:133 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:49575 (48.4 KiB)  TX bytes:27809 (27.1 KiB)
(略)


しかし、modprobeによりドライバインストールを行ったから、上のように認識されたのかは不明。
なぜなら手順前には、ifconfigに-aスイッチをつけていなかったため、
すべてのネットワークインターフェイスが表示されていなかったからである。

リブートしても、そのままこのNICを使用し続けることができたが、
/etc/modprobe.conf の内容がmodprobeにより上記のように書き換えられたためなのかはわからない。

(参考)
http://www.linux-noob.com/forums/index.php?/topic/2631-problem-with-usb-ethernet-converter-of-fc5/

http://www.linuxlic.com/command/modprobe.html

投げ銭

★当サイトへの投げ銭(PayPal)★

Ad

Ad