This article provides information on how to use text2pcap to convert the output of > monitor traffic interface into a .pcap file for viewing in Wireshark.
How to use text2pcap to convert the output of > monitor traffic interface into a .pcap file for viewing in Wireshark:
user@switch> monitor traffic interface ae0.1241 size 9999 no-resolve print-ascii matching tcp 09:52:06.473671 In IP 1.2.4.2.63625 > 1.2.4.1.179: . ack 931 win 16384 0x0000 0000 0002 45c0 0034 69b1 0000 0106 454d ....E..4i.....EM 0x0010 0102 0402 0102 0401 f889 00b3 bb10 ca31 ...............1 0x0020 19da cef6 8010 4000 8475 0000 0101 [email protected]...... 0x0030 1dfc 82ae 1dfc 824a .......J
text2pcap requires the following changes to the above output:
The final text file is as follows:
C:\Program Files\Wireshark>more bgp.txt 0000 00 00 00 02 45 c0 00 34 69 b1 00 00 01 06 45 4d ....E..4i.....EM 0010 01 02 04 02 01 02 04 01 f8 89 00 b3 bb 10 ca 31 ...............1 0020 19 da ce f6 80 10 40 00 84 75 00 00 01 01 08 0a [email protected]...... 0030 1d fc 82 ae 1d fc 82 4a .......J
C:\Program Files\Wireshark>text2pcap.exe bgp.txt bgp.pcap -l l2 Input from: bgp.txt Output to: bgp.pcap Wrote packet of 56 bytes at 0 Read 1 potential packet, wrote 1 packet
Expert Info (Error/Malformed): Length field value goes past the end of the payload