要約:
Amazonでお安く売られている
Intel X520なカード
を使って
SFP+module
を利用しようとしましたが、Linuxではうんともすんとも言わず
いろいろ調べた結果やっぱりひと手間が必要でしたので備忘録
前提:
- Ubuntu 22.04.1で実施
- ethtoolをaptで入れていること(入れ方は割愛)
- コマンドは基本sudoやrootで実施
免責:
壊れても泣かない、ベンダーロックというか保証ないんだし仕方がない。
1.ベンダーID等を取得
command
$ lspci -nn | grep X5
04:00.0 Ethernet controller [0200]: Intel Corporation Ethernet 10G 2P X520 Adapter [8086:154d] (rev 01)
04:00.1 Ethernet controller [0200]: Intel Corporation Ethernet 10G 2P X520 Adapter [8086:154d] (rev 01)
ここで8086:154dをめも
2.値を取得
command
# ethtool -e enp4s0f0 offset 0x58 length 1
Offset Values
------- ------
0x0058: fc
3.値を書き換え
magicに先ほど1.で取り出した値をいれ、value値を編集
command
root@murakumo:~# ethtool -E enp4s0f0 magic 0x154D8086 offset 0x58 value 0xff
と設定すると通りません、
error
offset & length out of bounds
正しくは
command
ethtool -E enp4s0f0 magic 0x154D8086 offset 0x58 value 0xff length 1
4.値を確認
command
root@murakumo:~# ethtool -e enp4s0f0 offset 0x58 length 1
Offset Values
------ ------
0x0058: ff
5.SFPを挿抜して、ログをみる
command
root@murakumo:~# dmesg | tail -n 2
[ 6032.666759] ixgbe 0000:04:00.0 enp4s0f0: WARNING: Intel (R) Network Connections are quality tested using Intel (R) Ethernet Optics. Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. Intel Corporation is not responsible for any harm caused by using untested modules.
[ 6032.722605] ixgbe 0000:04:00.0 enp4s0f0: detected SFP+: 5
ここで挿抜
command
root@murakumo:~# dmesg | tail -n 2
[ 6550.512942] ixgbe 0000:04:00.0 enp4s0f0: detected SFP+: 5
[ 6558.994506] ixgbe 0000:04:00.0 enp4s0f0: NIC Link is Up 10 Gbps, Flow Control: RX/TX
これでベンダーロックが解除されて利用できるようになります、