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?

containerlabにおけるRouter(container)間通信のPacketをwireshark(GUI)で確認する方法

Last updated at Posted at 2025-08-30

containerlabにて構築したNW構成での挙動確認やトラブルシュートをする際にパケットを直接確認したい場面があるが、tcpdumpやtsharkによるCLIでの確認では少し見づらいところもあるので、リモートサーバ上のパケットをローカル上のwireshark(GUI)で確認する方法を記載

1. Wireshark(GUI)を起動してSSH remote capture: sshdumpの左にある設定マークを選択

image.png

2. ServerタブのRemote SSH server addressにcontainerlabが構築されているServerのアドレスを入力

スクリーンショット 2025-08-30 16.00.46.png

3.AuthenticationタブのRemote SSH server passwordにパスワードを入力

スクリーンショット 2025-08-30 16.03.20.png

4.CaptureタブのRemote capture commandにコマンドを入力

tsharkコマンドを使用するので、事前にサーバ上へのtsharkのインストールは実施しておく
入力するコマンドは以下

ip netns exec [container] tshark -i [interface] -w -

ex.
ip netns exec xr01 tshark -i any -w -

containerはcontainerlab inspect -aやdocker psで表示されるnameを指定
interfaceはXRdの場合は、Gi0-0-0-1等
ex.
ip netns exec xr01 tshark -i Gi0-0-0-1 -w -

cisco_c8000vの場合は、eth2等
ip netns exec xe02 tshark -i eth2 -w -

image.png

5. wiresharkにて該当containerのpacketがキャプチャできていることを確認

image.png

これでcontainerlabにおけるRouter間通信等をリアルタイムで確認しながらたくさん挙動確認をすることが出来る

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?