{"id":1825,"date":"2018-04-08T19:25:41","date_gmt":"2018-04-08T16:25:41","guid":{"rendered":"http:\/\/avz.org.ua\/wp\/?p=1825"},"modified":"2018-04-04T19:50:46","modified_gmt":"2018-04-04T16:50:46","slug":"bonding-modes-and-speed","status":"publish","type":"post","link":"https:\/\/avz.org.ua\/wp\/2018\/04\/08\/bonding-modes-and-speed\/","title":{"rendered":"\u041e \u0440\u0435\u0436\u0438\u043c\u0430\u0445 bonding-\u0430 \u0432 linux"},"content":{"rendered":"<p>\u0414\u0430\u043d\u043e:<br \/>\n- \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 srv00 \u0432 \u043e\u0434\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u0435, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0441\u0435\u0442\u0438 \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 1Gbit\/sec<br \/>\n- \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 srv01 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u0435, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0441\u0435\u0442\u0438 \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 10Gbit\/sec, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f bonding.<br \/>\n\u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c:<\/p>\n<pre lang=\"bash\">\r\n[avz@srv00 ~]$ iperf3 -c srv01.my.zone\r\nConnecting to host srv01.my.zone, port 5201\r\n[  4] local xx.xxx.xx.xx port 27108 connected to yyy.yy.yy.yyy port 5201\r\n[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd\r\n[  4]   0.00-1.00   sec  5.21 MBytes  43.7 Mbits\/sec   40    130 KBytes\r\n[  4]   1.00-2.00   sec  2.45 MBytes  20.6 Mbits\/sec    5   79.8 KBytes\r\n[  4]   2.00-3.00   sec  2.02 MBytes  17.0 Mbits\/sec    3   52.8 KBytes\r\n[  4]   3.00-4.00   sec  1.96 MBytes  16.4 Mbits\/sec    8   51.3 KBytes\r\n[  4]   4.00-5.00   sec  1.96 MBytes  16.4 Mbits\/sec    0   68.4 KBytes\r\n[  4]   5.00-6.00   sec  1.53 MBytes  12.8 Mbits\/sec    1   65.6 KBytes\r\n[  4]   6.00-7.00   sec  1.96 MBytes  16.4 Mbits\/sec    3   67.0 KBytes\r\n[  4]   7.00-8.00   sec  1.53 MBytes  12.8 Mbits\/sec    2   47.1 KBytes\r\n[  4]   8.00-9.00   sec  1.47 MBytes  12.3 Mbits\/sec    3   51.3 KBytes\r\n[  4]   9.00-10.00  sec  1004 KBytes  8.22 Mbits\/sec   14   31.4 KBytes\r\n- - - - - - - - - - - - - - - - - - - - - - - - -\r\n[ ID] Interval           Transfer     Bandwidth       Retr\r\n[  4]   0.00-10.00  sec  21.1 MBytes  17.7 Mbits\/sec   79             sender\r\n[  4]   0.00-10.00  sec  20.1 MBytes  16.9 Mbits\/sec                  receiver\r\n<\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043f\u0440\u0438 \u0442\u0435\u0441\u0442\u0430\u0445 \u0441 \u0434\u0440\u0443\u0433\u0438\u043c \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u043c \u0434\u043b\u044f srv01 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c (\u0432 \u0442\u043e\u0439 \u0436\u0435 \u0441\u0442\u043e\u0439\u043a\u0435) \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043d\u0435 \u0431\u044b\u043b\u043e, \u0441\u0440\u0430\u0437\u0443 \u0432\u043e\u0437\u043d\u0438\u043a \u0432\u043e\u043f\u0440\u043e\u0441 \u0430 \u0447\u0435\u043c \u0436\u0435 \u043e\u043d\u0438 \u043e\u0442\u043b\u0438\u0447\u0430\u044e\u0442\u0441\u044f. \u0421\u0430\u043c\u044b\u043c \u0431\u0440\u043e\u0441\u0430\u044e\u0449\u0438\u043c\u0441\u044f \u0432 \u0433\u043b\u0430\u0437\u0430 \u043e\u0442\u043b\u0438\u0447\u0438\u0435\u043c \u0431\u044b\u043b\u043e \u0442\u043e, \u0447\u0442\u043e \u0443 srv01 bonding \u0435\u0441\u0442\u044c, \u0430 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0433\u043e (\u0443 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u0432\u0441\u0451 \u0445\u043e\u0440\u043e\u0448\u043e \u0441\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c\u044e) &ndash; bonding-\u0430 \u043d\u0435\u0442\u0443. <\/p>\n<p>\u0421\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u0440\u0435\u0436\u0438\u043c:<\/p>\n<pre lang=\"bash\">\r\n[root@srv01 ]# cat \/proc\/net\/bonding\/bond0\r\nEthernet Channel Bonding Driver: v3.7.1 (April 27, 2011)\r\n\r\nBonding Mode: load balancing (round-robin)\r\nMII Status: up\r\nMII Polling Interval (ms): 1   \r\nUp Delay (ms): 0\r\nDown Delay (ms): 0\r\n\r\nSlave Interface: enp2s0f0\r\nMII Status: up\r\nSpeed: 10000 Mbps\r\nDuplex: full\r\nLink Failure Count: 0\r\nPermanent HW addr: 00:01:02:a3:78:c0\r\nSlave queue ID: 0\r\n\r\nSlave Interface: enp2s0f1\r\nMII Status: up\r\nSpeed: 10000 Mbps\r\nDuplex: full\r\nLink Failure Count: 0\r\nPermanent HW addr: 00:01:02:a3:78:c4\r\nSlave queue ID: 0\r\n\r\n[root@srv01 ~]# ethtool bond0 | grep Speed\r\n        Speed: 20000Mb\/s\r\n<\/pre>\n<p>\u0412 \u043a\u043e\u043d\u0444\u0438\u0433\u0435<\/p>\n<pre lang=\"bash\">\r\n[root@srv01 ]# grep BONDING \/etc\/sysconfig\/network-scripts\/ifcfg-Bond_connection_1\r\nBONDING_OPTS=\"miimon=1 updelay=0 downdelay=0 mode=balance-rr\"\r\nBONDING_MASTER=\"yes\"\r\n<\/pre>\n<p>\u041d\u0430\u0447\u0438\u043d\u0430\u0435\u043c \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c, \u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0435\u0436\u0438\u043c \u0441 balance-rr \u043d\u0430 active-backup:<\/p>\n<pre lang=\"bash\">\r\n[root@srv01 ]# grep BONDING \/etc\/sysconfig\/network-scripts\/ifcfg-Bond_connection_1\r\nBONDING_OPTS=\"miimon=1 updelay=0 downdelay=0 mode=active-backup\"\r\nBONDING_MASTER=\"yes\"\r\n<\/pre>\n<p>\u0420\u0435\u0441\u0442\u0430\u0440\u0442\u0438\u043c \u0441\u0435\u0442\u044c, \u0441\u043c\u043e\u0442\u0440\u0438\u043c:<\/p>\n<pre lang=\"bash\">\r\n[root@srv01 ~]# cat \/proc\/net\/bonding\/bond0 \r\nEthernet Channel Bonding Driver: v3.7.1 (April 27, 2011)\r\n\r\nBonding Mode: fault-tolerance (active-backup)\r\nPrimary Slave: None\r\nCurrently Active Slave: enp2s0f0\r\nMII Status: up\r\nMII Polling Interval (ms): 1\r\nUp Delay (ms): 0\r\nDown Delay (ms): 0\r\n\r\nSlave Interface: enp2s0f0\r\nMII Status: up\r\nSpeed: 10000 Mbps\r\nDuplex: full\r\nLink Failure Count: 0\r\nPermanent HW addr: 00:01:02:a3:78:c0\r\nSlave queue ID: 0\r\n\r\nSlave Interface: enp2s0f1\r\nMII Status: up\r\nSpeed: 10000 Mbps\r\nDuplex: full\r\nLink Failure Count: 0\r\nPermanent HW addr: 00:01:02:a3:78:c4\r\nSlave queue ID: 0\r\n<\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u043e, \u0447\u0442\u043e \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043f\u043e \u0434\u0430\u043d\u043d\u044b\u043c ethtool \u0438\u0437\u043c\u0435\u043d\u0438\u043b\u0430\u0441\u044c \u0441 20-\u0442\u0438 \u043d\u0430 10\u0413\u0431\u0438\u0442\/\u0441\u0435\u043a:<\/p>\n<pre lang=\"bash\">\r\n[root@srv01 ~]# ethtool bond0 | grep Speed\r\n        Speed: 10000Mb\/s\r\n<\/pre>\n<p>\u0447\u0442\u043e \u0438 \u043b\u043e\u0433\u0438\u0447\u043d\u043e, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u0432 \u044d\u0442\u043e\u043c \u0440\u0435\u0436\u0438\u043c\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u0430\u043a\u0442\u0438\u0432\u0435\u043d \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u0438\u043d \u0441\u0435\u0442\u0435\u0432\u043e\u0439 \u0438\u043d\u0442\u0435\u0440\u0444\u0435\u0439\u0441, \u0430 \u0432\u0442\u043e\u0440\u043e\u0439 &ndash; \"\u043d\u0430 \u043f\u043e\u0434\u0445\u0432\u0430\u0442\u0435\".<\/p>\n<p>\u0422\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0435\u0449\u0435 \u0440\u0430\u0437:<\/p>\n<pre lang=\"bash\">\r\n[avz@srv00 ~]$ iperf3 -c srv01.my.zone\r\nConnecting to host srv01.my.zone, port 5201\r\n[  4] local xx.xxx.xx.xx port 27108 connected to yyy.yy.yy.yyy port 5201\r\n[ ID] Interval           Transfer     Bandwidth       Retr  Cwnd\r\n[  4]   0.00-1.00   sec  94.5 MBytes   793 Mbits\/sec    0   4.94 MBytes       \r\n[  4]   1.00-2.00   sec   114 MBytes   954 Mbits\/sec    0   4.94 MBytes       \r\n[  4]   2.00-3.00   sec   112 MBytes   944 Mbits\/sec    0   4.94 MBytes       \r\n[  4]   3.00-4.00   sec   110 MBytes   923 Mbits\/sec    8   2.56 MBytes       \r\n[  4]   4.00-5.00   sec  81.2 MBytes   682 Mbits\/sec    0   2.71 MBytes       \r\n[  4]   5.00-6.00   sec  86.2 MBytes   724 Mbits\/sec    0   2.83 MBytes       \r\n[  4]   6.00-7.00   sec  88.8 MBytes   744 Mbits\/sec    0   2.92 MBytes       \r\n[  4]   7.00-8.00   sec  92.5 MBytes   776 Mbits\/sec    0   2.99 MBytes       \r\n[  4]   8.00-9.00   sec  92.5 MBytes   776 Mbits\/sec    0   3.04 MBytes       \r\n[  4]   9.00-10.00  sec  95.0 MBytes   797 Mbits\/sec    0   3.07 MBytes       \r\n- - - - - - - - - - - - - - - - - - - - - - - - -\r\n[ ID] Interval           Transfer     Bandwidth       Retr\r\n[  4]   0.00-10.00  sec   967 MBytes   811 Mbits\/sec    8             sender\r\n[  4]   0.00-10.00  sec   959 MBytes   804 Mbits\/sec                  receiver\r\n\r\niperf Done.\r\n<\/pre>\n<p>\u041a\u0440\u0430\u0441\u043e\u0442\u0430, \u0432 \u0434\u0435\u0441\u044f\u0442\u043a\u0438 \u0440\u0430\u0437 \u043b\u0443\u0447\u0448\u0435. <\/p>\n<p>\u041e\u0442\u0441\u044e\u0434\u0430 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u044b\u0432\u043e\u0434 &ndash; \u043d\u0430 \u0441\u0442\u043e\u0440\u043e\u043d\u0435 \u043a\u043e\u043c\u043c\u0443\u0442\u0430\u0442\u043e\u0440\u0430 \u0440\u0435\u0436\u0438\u043c \u0431\u044b\u043b \u0441\u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0435\u043d \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e (\u043d\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u044b \u0441\u0435\u0440\u0432\u0435\u0440\u0430).<br \/>\n\u0418\u0437 <a href=\"https:\/\/www.kernel.org\/doc\/Documentation\/networking\/bonding.txt\" rel=\"nofollow\">\u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0438 \u043f\u043e linux-bonding-\u0443<\/a>:<\/p>\n<blockquote><p>The <strong>active-backup<\/strong>, balance-tlb and balance-alb modes do not require any specific configuration of the switch.<\/p>\n<p>The <strong>balance-rr<\/strong>, balance-xor and broadcast modes generally require that the switch have the appropriate ports grouped together. The nomenclature for such a group differs between switches, it may be called an \"etherchannel\" (as in the Cisco example, above), a \"trunk group\" or some other similar variation. For these modes, each switch will also have its own configuration options for the switch's transmit policy to the bond. Typical choices include XOR of either the MAC or IP addresses. The transmit policy of the two peers does not need to match. For these three modes, the bonding mode really selects a transmit policy for an EtherChannel group; all three will interoperate with another EtherChannel group.<\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>\u0414\u0430\u043d\u043e: - \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 srv00 \u0432 \u043e\u0434\u043d\u043e\u043c \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u0435, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0441\u0435\u0442\u0438 \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 1Gbit\/sec - \u0435\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 srv01 \u0432 \u0434\u0440\u0443\u0433\u043e\u043c \u0434\u0430\u0442\u0430\u0446\u0435\u043d\u0442\u0440\u0435, \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u043a \u0441\u0435\u0442\u0438 \u043d\u0430 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 10Gbit\/sec, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f bonding. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430: \u0430\u043d\u043e\u043c\u0430\u043b\u044c\u043d\u043e \u043d\u0438\u0437\u043a\u0430\u044f \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c: [avz@srv00 ~]$ iperf3 -c srv01.my.zone Connecting to host srv01.my.zone, port 5201 [ 4] local xx.xxx.xx.xx port 27108 connected to yyy.yy.yy.yyy port 5201 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[183],"class_list":["post-1825","post","type-post","status-publish","format-standard","hentry","category-nix","tag-bonding"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/avz.org.ua\/wp\/wp-json\/wp\/v2\/posts\/1825","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/avz.org.ua\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/avz.org.ua\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/avz.org.ua\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/avz.org.ua\/wp\/wp-json\/wp\/v2\/comments?post=1825"}],"version-history":[{"count":0,"href":"https:\/\/avz.org.ua\/wp\/wp-json\/wp\/v2\/posts\/1825\/revisions"}],"wp:attachment":[{"href":"https:\/\/avz.org.ua\/wp\/wp-json\/wp\/v2\/media?parent=1825"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/avz.org.ua\/wp\/wp-json\/wp\/v2\/categories?post=1825"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/avz.org.ua\/wp\/wp-json\/wp\/v2\/tags?post=1825"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}