はじめに
このUbuntuのネットワークって2.5Gのハブにつながっているけど、iperf3で1000Mしかでてない気がする。。。確認しよう。。。のメモ
確認方法
インターフェイスの名前を取得する
# ip a
:
:
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master ovs-system state UP group default qlen 1000
link/ether 7c:83:34:b9:b4:a9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::7e83:34ff:feb9:b4a9/64 scope link
valid_lft forever preferred_lft forever
:
ethtool で確認する
# ethtool enp1s0
Settings for enp1s0:
Supported ports: [ TP ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
2500baseT/Full
Supported pause frame use: Symmetric
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
2500baseT/Full
Advertised pause frame use: Symmetric
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: 1000Mb/s
Duplex: Full
Auto-negotiation: on
Port: Twisted Pair
PHYAD: 0
Transceiver: internal
MDI-X: off (auto)
Supports Wake-on: pumbg
Wake-on: g
Current message level: 0x00000007 (7)
drv probe link
Link detected: yes
読み方
Supported link modes
: サポートしているリンクモード
Advertised link modes
: Hubなどの対向機器に通知したリンクモード
Speed
: リンクスピード
Duplex
: Full なら全二重
Auto-negotiation
: 自動ネゴシエーション
Link detected
: リンクされているかどうか
設定方法
速度設定
- 2.5Gに設定
# ethtool -s enp1s0 speed 2500 duplex full autoneg on
- 1Gに設定
# ethtool -s enp1s0 speed 1000 duplex full autoneg on
- ネゴシエーションをOFFに設定
# ethtool -s enp1s0 speed 2500 duplex full autoneg off
よくわからずに autoneg off
にすると、たいてい繋がらなくなります
経験上、よくわからずにとりあえずで、1Gで自動的に設定されているのに2.5Gに無理やりすると、
対向の機器の設定、対向の機器の制限、対向の機器のスペック、ケーブルのスペック、自機のスペックなどでつながらなくなることがほとんどです。
さいごに
かんたんでしたね