0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

Ethernet FCSをWiresharkで確認

Posted at

EthernetのFCSをWiresharkで確認

小ネタではあるが興味あ理、タイトルのままである。偶然、下記サイトを見つけてトライした記録。ほぼそのまま。

ethtoolを使う。ただし、一部のOSでしか実現できず(とは言ってもそれほど多くのLinuxで試したわけではない)。WindowsもMac OSでもダメ。ただし、後述するが条件次第かもしれない。

antiXでOK

antiXは、Debian系の比較的軽量Linux。FCSを確認することができた。小生の環境は下記のとおり。

$ cat /etc/issue 
Welcome to antiX. Powered by Debian.
$
$ cat /etc/lsb-release 
PRETTY_NAME="antiX-23.1 Arditi del Popolo"
DISTRIB_ID=antiX
DISTRIB_RELEASE=23.1
DISTRIB_CODENAME=bookworm
DISTRIB_DESCRIPTION="antiX"
$
$ uname -a
Linux antix1 5.10.224-antix.1-amd64-smp #1 SMP Tue Aug 20 20:39:20 EEST 2024 x86_64 GNU/Linux

ただし、Virtualbox上のVM環境である。まずは、コマンド実行前の状況。

$ sudo ethertool -k eth0

Features for eth0:
...

rx-fcs: off
rx-all: off

次に、上記したURLにしたがって、ethtoolを実行し、FCS受信を有効化。

$ sudo ethtool -K eth0 rx-fcs on
$ sudo ethtool -K eth0 rx-all on

コマンド実行後の状況は下記。

$ sudo ethertool -k eth0

Features for eth0:
...

rx-fcs: on
rx-all: on

Wiresharkで確認

何かしら通信させる。設定前の状況は下記。

noFCSのコピー.PNG

FCSは見えていない。設定が必要。

Wireshark設定のコピー.PNG

Ethernetにて、”Validate the Ethernet checksum if possible”を有効化する。

correctFCSのコピー.PNG

データ解析(Correct FCS)および生データにてFCSが見える。

UbuntuではNGであった(ただし実機利用)

ほとんどのことがUbuntuでできるであるが、今回はNG。参考までに、小生の環境は下記。

$ uname -a
Linux LLLLL 6.8.0-51-generic #52-Ubuntu SMP PREEMPT_DYNAMIC Thu Dec  5 13:09:44 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$
$ cat /etc/issue
Ubuntu 24.04.1 LTS \n \l
$ 
$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.1 LTS"

ethtoolを実施した結果は下記。

$ sudo ethtool -K enp3s0f0 rx-fcs on
Actual changes:
rx-fcs: off [requested on]
Could not change any device features
$
$ sudo ethtool -K enp3s0f0 rx-all on
Actual changes:
rx-all: off [requested on]
Could not change any device features
$ 

上述の結果のとおりNGとなった。設定状況も確認。

$ sudo ethtool -k enp3s0f0
Features for enp3s0f0:
...

rx-fcs: off [fixed]
rx-all: off [fixed]

”off [fixed]”となっており、変更不可のようだ。ただし、これは実機上の話。前述のように、VM上で実施すれば、異なる結果が得られるのかもしれない、、、(未調査)。

最後に

正しくないFCSを送付して、Incorrect FCS表示を見たいのだが苦闘中。参考情報は下記。

こちらを参考にトライしているが、まだ実現できておらず。実現できたら紹介したい。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?