{"id":6861,"date":"2020-01-14T16:44:20","date_gmt":"2020-01-14T22:44:20","guid":{"rendered":"https:\/\/www.poweradmin.com\/blog\/?p=6861"},"modified":"2020-01-16T09:46:21","modified_gmt":"2020-01-16T15:46:21","slug":"replaying-and-redirecting-a-network-capture-from-a-different-network","status":"publish","type":"post","link":"https:\/\/www.poweradmin.com\/blog\/replaying-and-redirecting-a-network-capture-from-a-different-network\/","title":{"rendered":"Replaying and Redirecting a Network Capture from a Different Network"},"content":{"rendered":"<p><span style=\"font-family: verdana, geneva, sans-serif;\">Recently we had a case where the <a href=\"https:\/\/www.poweradmin.com\/help\/latestsmhelp.aspx?page=monitor_snmp_traps.aspx?ref=blog\">SNMP Trap Monitor<\/a> was truncating text from the received trap.\u00a0 The customer captured some example SNMP Trap packets using <a href=\"https:\/\/www.wireshark.org\/\" target=\"_blank\" rel=\"nofollow\">Wireshark<img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a>, and then sent us the capture file.\u00a0 Wireshark is an awesome application to look at network traffic and we highly recommend it.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">But back to the network capture \u2013 we had to figure out how to replay it, and since it came from a different network, we needed to direct the SNMP Traps to our <a href=\"https:\/\/www.poweradmin.com\/products\/server-monitoring\/?ref=blog\">PA Server Monitor<\/a> server so it could receive and process them.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">It turns out the type of software to use is called a network traffic generator.\u00a0 \u00a0After looking at many options we settled on the <a href=\"https:\/\/ostinato.org\/\" target=\"_blank\" rel=\"nofollow\">Ostinato packet generator<img class=\"extlink-icon\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/plugins\/external-links-nofollow-open-in-new-tab-favicon\/images\/extlink.png\"><\/a>.\u00a0 It has a friendly GUI and lets you change any field in any protocol layer.\u00a0 It is very powerful yet still flexible and easy to use.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">In our case, we only needed to redirect a few individual UDP trap packets.\u00a0 \u00a0Before we could load the packet capture, which was in pcapng format (from the Next Generation PCap), we needed to convert it to the older pcap format.\u00a0 Luckily the pcapng.com website has a simple online converter for this.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">With our capture file in the correct format, it was time to load it.\u00a0 \u00a0You do that by selecting a network interface, and then going to the Streams tab and right-clicking to load a new stream.\u00a0 \u00a0When we were done, we had 10 SNMP Trap packets loaded (our customer did a nice job of filtering the capture in Wireshark to just the SNMP Trap packets that we needed).<\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><a href=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/open-capture.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6862\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/open-capture.png\" alt=\"\" width=\"626\" height=\"424\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/open-capture.png 626w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/open-capture-300x203.png 300w\" sizes=\"auto, (max-width: 626px) 100vw, 626px\"><\/a><\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Once we had the packets loaded we clicked the gear icon on the first one and went to the Protocol Data tab.\u00a0 \u00a0Here you can change fields for any layer of the protocol stack.\u00a0 In our case we wanted to point the packet to our own server when we replayed it, so we changed the following fields:<\/span><\/p>\n<p>\u00a0<\/p>\n<ul>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">On the \u201cMedia Access Protocol\u201d panel we changed the destination to Resolve, figuring it would pick up the IP address from the other protocol layers.<\/span><\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\"><a href=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/mac-resolve.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6863\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/mac-resolve.png\" alt=\"\" width=\"642\" height=\"228\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/mac-resolve.png 642w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/mac-resolve-300x107.png 300w\" sizes=\"auto, (max-width: 642px) 100vw, 642px\"><\/a><\/span><\/li>\n<li>\u00a0<\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">On the \u201cInternet Protocol ver 4\u201d panel we changed the Source and Destination IP addresses to be what we needed to target for our network.\u00a0 \u00a0<strong>Important<\/strong>: Be sure to uncheck the \u201cOverride checksum\u201d \u2013 you don\u2019t want the original checksum but rather want Ostinato to compute a new (correct) checksum for you.<\/span><\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\"><a href=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/ipv4-tab.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6864\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/ipv4-tab.png\" alt=\"\" width=\"649\" height=\"581\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/ipv4-tab.png 649w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/ipv4-tab-300x269.png 300w\" sizes=\"auto, (max-width: 649px) 100vw, 649px\"><\/a><\/span><\/li>\n<li>\u00a0<\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\">Similarly, on the \u201cUser Datagram Protocol\u201d panel, uncheck the Override Checksum box so the UDP layer also computes a correct checksum for you automatically.\u00a0<\/span><\/li>\n<li><span style=\"font-family: verdana, geneva, sans-serif;\"> <a href=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/udp-checksum.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6865\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/udp-checksum.png\" alt=\"\" width=\"646\" height=\"320\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/udp-checksum.png 646w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/udp-checksum-300x149.png 300w\" sizes=\"auto, (max-width: 646px) 100vw, 646px\"><\/a><\/span><\/li>\n<\/ul>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Now that we have our packet set up how we like, it\u2019s time to tell Ostinato what we want replayed.\u00a0 \u00a0We unchecked all but the first packet.\u00a0 \u00a0It probably wasn\u2019t necessary, but we double-clicked the Next drop down item and changed it to Stop.\u00a0 \u00a0And <strong>very importantly<\/strong>, click the Apply button.\u00a0 \u00a0Even though it was highlighted in red, we missed it the first few times and wondered where our packets were \ud83d\ude41<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\"><a href=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/replay-captured-packets.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-6866\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/replay-captured-packets.png\" alt=\"\" width=\"894\" height=\"343\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/replay-captured-packets.png 894w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/replay-captured-packets-300x115.png 300w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2020\/01\/replay-captured-packets-768x295.png 768w\" sizes=\"auto, (max-width: 894px) 100vw, 894px\"><\/a><\/span><\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">With that set, you press the standard play button, and Bob\u2019s your uncle!\u00a0 If you wanted to play multiple packets, you can control how often they are fired with the \u201cAvg pps\u201d setting.\u00a0 \u00a0Note that after changing ANYTHING, be sure to hit that Apply button!<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Once we could see the same packets that our customer was seeing, we were able to quickly see where the truncation was happening and get a fix out to them.<\/span><\/p>\n<p>\u00a0<\/p>\n<p><span style=\"font-family: verdana, geneva, sans-serif;\">Overall we\u2019re quite pleased with Ostinato for packet capture playback.<\/span><\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently we had a case where the SNMP Trap Monitor was truncating text from the received trap.\u00a0 The customer captured some example SNMP Trap packets using Wireshark, and then sent us the capture file.\u00a0 Wireshark is an awesome application to look at network traffic and we highly recommend it. \u00a0 But back to the network [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":6864,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,9,8],"tags":[],"class_list":["post-6861","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to","category-technical","category-windows"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/6861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/comments?post=6861"}],"version-history":[{"count":5,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/6861\/revisions"}],"predecessor-version":[{"id":6873,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/posts\/6861\/revisions\/6873"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media\/6864"}],"wp:attachment":[{"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/media?parent=6861"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/categories?post=6861"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.poweradmin.com\/blog\/wp-json\/wp\/v2\/tags?post=6861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}