《手順1》 キャプチャしたい特定のvSwitchポートのポートナンバーを調べる
[root@user:~] net-stats -l
PortNum Type SubType SwitchName MACAddress ClientName

〜中略〜

67108869 5 9 vSwitch2 00:0c:29:b3:ed:cf 01_CSR1000V(03.13.04.S)


《手順2》 手順1で調べた特定のvSwitchポートナンバーを指定してキャプチャする
※別途wiresharkでキャプチャファイルを見たいときは、-oオプションを付けて出力先ファイルを指定する。
例:pktcap-uw --switchport 67108869 -o /tmp/capture.cap


[root@user:~] pktcap-uw --switchport 67108869
The switch port id is 0x04000005
No server port specifed, select 60535 as the port
Output the packet info to console.
Local CID 2
Listen on port 60535
Accept...Vsock connection from port 1032 cid 2
08:53:30.888874[1] Captured at PortInput point, TSO not enabled, Checksum not offloaded and not verified, VLAN tag 24, length 76.
Segment[0] ---- 76 bytes:
0x0000: 0100 5e00 0002 000c 29b3 edcf 0800 45c0
0x0010: 003e 0000 0000 0111 0041 c0a8 1804 e000
0x0020: 0002 0286 0286 002a 2884 0001 001e 0404
0x0030: 0404 0000 0100 0014 0000 0000 0400 0004
0x0040: 000f 0000 0401 0004 0404 0404
08:53:31.224431[2] Captured at PortInput point, TSO not enabled, Checksum not offloaded and not verified, VLAN tag 14, length 76.
Segment[0] ---- 76 bytes:
0x0000: 0100 5e00 0002 000c 29b3 edcf 0800 45c0
0x0010: 003e 0000 0000 0111 0a41 c0a8 0e04 e000
0x0020: 0002 0286 0286 002a 3284 0001 001e 0404
0x0030: 0404 0000 0100 0014 0000 0000 0400 0004
0x0040: 000f 0000 0401 0004 0404 0404
08:53:31.304819[3] Captured at PortInput point, TSO not enabled, Checksum not offloaded and not verified, VLAN tag 14, length 94.
Segment[0] ---- 94 bytes:
0x0000: 0100 5e00 0005 000c 29b3 edcf 0800 45c0
0x0010: 0050 7f68 0000 0159 8a7b c0a8 0e04 e000
0x0020: 0005 0201 0030 0404 0404 0000 0000 453a
0x0030: 0000 0000 0000 0000 0000 ffff ff00 000a
0x0040: 1201 0000 0028 c0a8 0e01 c0a8 0e04 0101
0x0050: 0101 fff6 0003 0001 0004 0000 0001
08:53:32.676856[4] Captured at PortInput point, TSO not enabled, Checksum not offloaded and not verified, VLAN tag 34, length 94.
Segment[0] ---- 94 bytes:
0x0000: 0100 5e00 0005 000c 29b3 edcf 0800 45c0
0x0010: 0050 7f69 0000 0159 767a c0a8 2204 e000
0x0020: 0005 0201 0030 0404 0404 0000 0000 1934
0x0030: 0000 0000 0000 0000 0000 ffff ff00 000a
0x0040: 1201 0000 0028 c0a8 2203 c0a8 2204 0303
0x0050: 0303 fff6 0003 0001 0004 0000 0001
08:53:33.83841[5] Captured at PortInput point, TSO not enabled, Checksum not offloaded and not verified, VLAN tag 34, length 76.
Segment[0] ---- 76 bytes:
0x0000: 0100 5e00 0002 000c 29b3 edcf 0800 45c0
0x0010: 003e 0000 0000 0111 f640 c0a8 2204 e000
0x0020: 0002 0286 0286 002a 1e84 0001 001e 0404
0x0030: 0404 0000 0100 0014 0000 0000 0400 0004
0x0040: 000f 0000 0401 0004 0404 0404