{"id":1122,"date":"2019-03-19T16:12:11","date_gmt":"2019-03-19T16:12:11","guid":{"rendered":"http:\/\/www.ankenbrand24.de\/?page_id=1122"},"modified":"2019-03-19T16:12:11","modified_gmt":"2019-03-19T16:12:11","slug":"tcpdump-vs-cppcap","status":"publish","type":"page","link":"https:\/\/www.ankenbrand24.de\/index.php\/articles\/check-point-articel\/performance-tuning\/tcpdump-vs-cppcap\/","title":{"rendered":"TCPDUMP vs. CPPCAP"},"content":{"rendered":"\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<h2 class=\"message-subject\" style=\"text-align: center;\"><span class=\"lia-message-read\">R80.x Performance Tuning and Debug \u2013 TCPDUMP vs. CPPCAP<\/span><\/h2>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<table style=\"border: 1px solid #c6c6c6; border-collapse: separate; border-radius: 5px; background-color: #e15180; padding: 6px; text-indent: 10px;\" width=\"100%\">\n<thead>\n<tr>\n<th align=\"left\"><span style=\"color: #ffffff; font-size: large;\">What is CPPCAP?<\/span><\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<p><img loading=\"lazy\" class=\"alignnone  wp-image-1119\" src=\"https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_1.png\" alt=\"\" width=\"281\" height=\"159\" srcset=\"https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_1.png 320w, https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_1-150x85.png 150w\" sizes=\"(max-width: 281px) 100vw, 281px\" \/><br \/>TCPDUMP is a Linux tool which at times is not suitable for use with Gaia. Running TCPDUMP causes a significant increase in CPU usage and as a result impact the performance of the device. Even while filtering by specific interface or port still high CPU occurs. Check Point created a tool which works better with Gaia OS.<\/p>\n<table style=\"border: 1px solid #c6c6c6; border-collapse: separate; border-radius: 5px; background-color: #e15180; padding: 6px; text-indent: 10px;\" width=\"100%\">\n<thead>\n<tr>\n<th align=\"left\"><span style=\"color: #ffffff; font-size: large;\">CPPCAP<\/span><\/th>\n<\/tr>\n<\/thead>\n<\/table>\n<p style=\"min-height: 8pt; padding: 0px;\"><span style=\"color: #33cccc; font-size: 22px;\"><strong>Tip 1<\/strong><\/span><\/p>\n<p>&#8220;CPPCAP&#8221; is a traffic capture tool which provides the most relevant outputs and is similar to Tcpdump. The tool is adjusted to Gaia operating system yet requires installation of an applicable RPM.<\/p>\n<p>The good news! <span style=\"color: #333333; background-color: #ffffff;\"><span style=\"color: #ff0000;\"><strong>SecureXL can be enabled<\/strong><\/span> or disabled to capture with CPPCAP.<\/span><\/p>\n<p>You can download this tool for R77.30, R80.10 and R80.20. Get more details here: <a href=\"https:\/\/supportcenter.checkpoint.com\/supportcenter\/portal?eventSubmit_doGoviewsolutiondetails=&amp;solutionid=sk141412\" target=\"_blank\" rel=\"noopener noreferrer\">sk141412<\/a><\/p>\n<p>Instal and use:<\/p>\n<ol>\n<li>Download the RPM package (<a href=\"https:\/\/supportcenter.checkpoint.com\/supportcenter\/portal?eventSubmit_doGoviewsolutiondetails=&amp;solutionid=sk141412\" target=\"_blank\" rel=\"noopener noreferrer\">sk141412<\/a>) and transfer the RPM package with winscp to appliance or open server.<\/li>\n<li>Install the RPM using the following command:<br \/><em>#<\/em> <strong>rpm -ivh &#8211;force &#8211;nodeps<\/strong> <em>&lt;RPM_FILE&gt;<\/em><br \/><em>#<\/em> <strong>\/etc\/init.d\/start_cppcap start<\/strong><\/li>\n<li>Start cppcap to sniffing packages (for example on interface eth0 with parameter &#8220;N&#8221;):<em><br \/><\/em><strong><br \/>On internal Interface (example &#8220;ping 8.8.8.8&#8221; from client IP 10.1.2.1 to server IP 8.8.8.8)<\/strong>:<em><br \/>#<\/em> <strong><span style=\"color: #000000;\">cppcap -i eth0 -N<\/span> |grep ICMP<\/strong><\/li>\n<\/ol>\n<p><strong><img loading=\"lazy\" class=\"alignnone size-full wp-image-1120\" src=\"https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_2.png\" alt=\"\" width=\"1118\" height=\"59\" srcset=\"https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_2.png 1118w, https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_2-150x8.png 150w, https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_2-768x41.png 768w\" sizes=\"(max-width: 1118px) 100vw, 1118px\" \/><\/strong><\/p>\n<p><strong>On external Interface<\/strong><em>:<\/em><\/p>\n<p># <strong><span style=\"color: #000000;\">cppcap -i eth2 -N<\/span> |grep ICMP<\/strong><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-full wp-image-1121\" src=\"https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_3.png\" alt=\"\" width=\"1124\" height=\"60\" srcset=\"https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_3.png 1124w, https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_3-150x8.png 150w, https:\/\/www.ankenbrand24.de\/wp-content\/uploads\/2019\/03\/CPPCAP_3-768x41.png 768w\" sizes=\"(max-width: 1124px) 100vw, 1124px\" \/><\/p>\n<p><strong>Notes:<\/strong><\/p>\n<p>&#8211; To have all verbos information add &#8220;-DNT&#8221; to the syntax to filter out specific interface or VS by using capital letters.<br \/>&#8211; It will provide outputs on ARP IPV4\/IPV6, TCP and UDP traffic. Dynamic routing information will not show all verbose information.<\/p>\n<p><span style=\"color: #33cccc; font-size: 22px;\"><strong>Tip 2<br \/><\/strong><\/span><\/p>\n<p>In and out (see red marked point in picture):<\/p>\n<p><span style=\"color: #ff0000;\"><strong>In<\/strong><\/span> &#8211; Is the incoming packet on the firewall on the inbound interface from the point of view of the first packet. It is simalary to fw monitor inspection point &#8220;<strong>i<\/strong>&#8221; client to server packet.<\/p>\n<p><span style=\"color: #ff0000;\"><strong>Out<\/strong> <\/span> &#8211; Is the outgoing packet on the firewall on the inbound interface from the point of view of the first packet. It is simalary to fw monitor inspection point &#8220;<strong>O<\/strong>&#8221; server to client packet.<\/p>\n<p>On the outgoing interface (see blue marked point in picture), the view is exactly inverse.<\/p>\n<p><span style=\"color: #33cccc; font-size: 22px;\"><strong>Tip 3<br \/><\/strong><\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td style=\"text-align: left; border: 1px solid #dbdbdb; background-color: lightgray;\"><strong>Flag<\/strong><\/td>\n<td style=\"text-align: left; border: 1px solid #dbdbdb; background-color: lightgray;\"><strong>Explanation<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-vV VSID<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">lowercase to capture only from specific VSID, uppercase for all exec pt VSID<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-iI DEVICE<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">lowercase to capture only from specific DEVICE, uppercase for all execpt DEVICE<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-d DIR<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">capture specific direction (&#8216;in&#8217; for inbound, &#8216;out&#8217; for outbound)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-f &#8220;EXPR&#8221;<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">filter specific expression, for syntax, see pcap-filter(7)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-o FILE<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">save capture to a FILE<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-c NUM<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">capture up to NUM bytes of frame (default 96, &#8216;0&#8217; for any size)<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-p NUM<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">capture NUM frames before stopping<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-b NUM<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">capture NUM bytes before stopping<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-D<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">verbose datalink layer<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-N<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">verbose network layer<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-T<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">verbose transport layer<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">-Q<\/td>\n<td style=\"border: 1px solid #dbdbdb; background-color: #ffffff;\">omit time from output<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Copyright by Heiko Ankenbrand 1994-2019<\/p>\n","protected":false},"excerpt":{"rendered":"<p>R80.x Performance Tuning and Debug \u2013 TCPDUMP vs. CPPCAP What is CPPCAP? TCPDUMP is a Linux tool which at times is not suitable for use with Gaia. Running TCPDUMP causes a significant increase in CPU usage and as a result impact the performance of the device. Even while filtering by specific interface or port still<\/p>\n<p><a class=\"button\" href=\"https:\/\/www.ankenbrand24.de\/index.php\/articles\/check-point-articel\/performance-tuning\/tcpdump-vs-cppcap\/\" title=\"More\">  Read More \u2192<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":1068,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/www.ankenbrand24.de\/index.php\/wp-json\/wp\/v2\/pages\/1122"}],"collection":[{"href":"https:\/\/www.ankenbrand24.de\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.ankenbrand24.de\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.ankenbrand24.de\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ankenbrand24.de\/index.php\/wp-json\/wp\/v2\/comments?post=1122"}],"version-history":[{"count":1,"href":"https:\/\/www.ankenbrand24.de\/index.php\/wp-json\/wp\/v2\/pages\/1122\/revisions"}],"predecessor-version":[{"id":1123,"href":"https:\/\/www.ankenbrand24.de\/index.php\/wp-json\/wp\/v2\/pages\/1122\/revisions\/1123"}],"up":[{"embeddable":true,"href":"https:\/\/www.ankenbrand24.de\/index.php\/wp-json\/wp\/v2\/pages\/1068"}],"wp:attachment":[{"href":"https:\/\/www.ankenbrand24.de\/index.php\/wp-json\/wp\/v2\/media?parent=1122"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}