{"id":429,"date":"2018-06-29T16:55:00","date_gmt":"2018-06-29T09:55:00","guid":{"rendered":"https:\/\/lagonet.vn\/?p=429"},"modified":"2018-06-29T16:55:00","modified_gmt":"2018-06-29T09:55:00","slug":"check-network-settings-cua-dedicated-server","status":"publish","type":"post","link":"https:\/\/kb.lagonet.vn\/?p=429","title":{"rendered":"CHECK NETWORK SETTINGS C\u1ee6A DEDICATED SERVER"},"content":{"rendered":"<p>Req:<\/p>\n<p>Please<\/p>\n<ul>\n<li>Make sure that we have 200Mbit channel for eno1<\/li>\n<li>Configure static IP for eno2 ( I temporarily set it 192.168.1.0\/24 ) but you can change at will.<\/li>\n<\/ul>\n<p>Those servers are cb<a class=\"source\" href=\"https:\/\/trac.coccoc.com\/coccoc\/log\/?revs=1-2\">[1,2]<\/a>c.itim.vn, cb1c.dev.itim.vn, cb-inf1c.itim.vn.<br \/>\nI&#8217;ll ask you to make firewall for them soon.<\/p>\n<hr \/>\n<ul>\n<li>10.194.63.0\/24 &#8211; Tmp subnet for the first hosts in CMC DC (dev\/prod\/infra &#8211; due to unmanaged switch).<\/li>\n<li>let&#8217;s start to allocate ip from the next\u00a0<em>logical<\/em>\u00a0ranges (to have possibility to divide it in a future into smaller subnets; net mask still \/24!)\n<ul>\n<li>10.194.63.0\/25 &#8211; prod\n<ul>\n<li>10.194.63.16 &#8211;\u00a0<strong>cb1c<\/strong><\/li>\n<li>10.194.63.17 &#8211;\u00a0<strong>cb2c<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>10.194.63.128\/26 &#8211; infr\n<ul>\n<li>10.194.63.132 &#8211;\u00a0<strong>cb-inf1c<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>10.194.63.192\/26 &#8211; dev\n<ul>\n<li>10.194.63.196 &#8211;\u00a0<strong>cb1c.dev<\/strong><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>I created \/etc\/network\/interfaces.d\/eno2.conf files on each host.<\/p>\n<p>You can restart interfaces to implement new ip addresses.<\/p>\n<hr \/>\n<h1 id=\"Bandwidthtests\">Bandwidth tests<\/h1>\n<h2 id=\"Server\">Server<\/h2>\n<p>rb2v is iperf tcp server<\/p>\n<pre class=\"wiki\">iptables -I INPUT -s 103.21.149.128\/27 -p tcp --dport 35555 -j ACCEPT\niperf -p 35555 -s -b 600M\n<\/pre>\n<h2 id=\"Clients\">Clients<\/h2>\n<ul>\n<li>bandwidth limited to 600Mbps to see how shaper\/policer works on CMC device<\/li>\n<li>test time &#8211; 60s<\/li>\n<li>dual test &#8211; to measure in\/out bandwidth\n<pre class=\"wiki\">iperf -fm -i 10 -p 35555 -c 123.30.175.31 -t 60 -b 600M -d\n<\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>cb1c\n<pre class=\"wiki\">cb1c:~# iperf -fm -i 10 -p 35555 -c 123.30.175.31 -t 60 -b 600M -d\n------------------------------------------------------------\nServer listening on TCP port 35555\nTCP window size: 0.08 MByte (default)\n------------------------------------------------------------\n------------------------------------------------------------\nClient connecting to 123.30.175.31, TCP port 35555\nTCP window size: 0.20 MByte (default)\n------------------------------------------------------------\n[  4] local 103.21.149.155 port 59256 connected with 123.30.175.31 port 35555\n[  5] local 103.21.149.155 port 35555 connected with 123.30.175.31 port 60757\n[ ID] Interval       Transfer     Bandwidth\n[  4]  0.0-10.0 sec   715 MBytes   600 Mbits\/sec\n[  5]  0.0-10.0 sec   244 MBytes   205 Mbits\/sec\n[  4] 10.0-20.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 10.0-20.0 sec   255 MBytes   214 Mbits\/sec\n[  4] 20.0-30.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 20.0-30.0 sec   282 MBytes   236 Mbits\/sec\n[  4] 30.0-40.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 30.0-40.0 sec   268 MBytes   225 Mbits\/sec\n[  4] 40.0-50.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 40.0-50.0 sec   240 MBytes   201 Mbits\/sec\n[  4] 50.0-60.0 sec   715 MBytes   600 Mbits\/sec\n[  4]  0.0-60.0 sec  4292 MBytes   600 Mbits\/sec\n[  5] 50.0-60.0 sec   263 MBytes   221 Mbits\/sec\n[  5]  0.0-60.0 sec  1552 MBytes   217 Mbits\/sec\n<\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>cb2c\n<pre class=\"wiki\">cb2c:~# iperf -fm -i 10 -p 35555 -c 123.30.175.31 -t 60 -b 600M -d\n------------------------------------------------------------\nServer listening on TCP port 35555\nTCP window size: 0.08 MByte (default)\n------------------------------------------------------------\n------------------------------------------------------------\nClient connecting to 123.30.175.31, TCP port 35555\nTCP window size: 0.22 MByte (default)\n------------------------------------------------------------\n[  3] local 103.21.149.156 port 46868 connected with 123.30.175.31 port 35555\n[  5] local 103.21.149.156 port 35555 connected with 123.30.175.31 port 36936\n[ ID] Interval       Transfer     Bandwidth\n[  3]  0.0-10.0 sec   715 MBytes   600 Mbits\/sec\n[  5]  0.0-10.0 sec   261 MBytes   219 Mbits\/sec\n[  3] 10.0-20.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 10.0-20.0 sec   241 MBytes   202 Mbits\/sec\n[  3] 20.0-30.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 20.0-30.0 sec   285 MBytes   239 Mbits\/sec\n[  3] 30.0-40.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 30.0-40.0 sec   242 MBytes   203 Mbits\/sec\n[  3] 40.0-50.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 40.0-50.0 sec   298 MBytes   250 Mbits\/sec\n[  3] 50.0-60.0 sec   715 MBytes   600 Mbits\/sec\n[  3]  0.0-60.0 sec  4292 MBytes   600 Mbits\/sec\n[  5] 50.0-60.0 sec   280 MBytes   235 Mbits\/sec\n[  5]  0.0-60.0 sec  1608 MBytes   225 Mbits\/sec\n<\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>cb1c.dev\n<pre class=\"wiki\">cb1c:~# iperf -fm -i 10 -p 35555 -c 123.30.175.31 -t 60 -b 600M -d\n------------------------------------------------------------\nServer listening on TCP port 35555\nTCP window size: 0.08 MByte (default)\n------------------------------------------------------------\n------------------------------------------------------------\nClient connecting to 123.30.175.31, TCP port 35555\nTCP window size: 0.37 MByte (default)\n------------------------------------------------------------\n[  4] local 103.21.149.154 port 38430 connected with 123.30.175.31 port 35555\n[  5] local 103.21.149.154 port 35555 connected with 123.30.175.31 port 55618\n[ ID] Interval       Transfer     Bandwidth\n[  4]  0.0-10.0 sec   715 MBytes   600 Mbits\/sec\n[  5]  0.0-10.0 sec   285 MBytes   239 Mbits\/sec\n[  4] 10.0-20.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 10.0-20.0 sec   233 MBytes   196 Mbits\/sec\n[  4] 20.0-30.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 20.0-30.0 sec   288 MBytes   242 Mbits\/sec\n[  4] 30.0-40.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 30.0-40.0 sec   227 MBytes   190 Mbits\/sec\n[  4] 40.0-50.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 40.0-50.0 sec   287 MBytes   241 Mbits\/sec\n[  4] 50.0-60.0 sec   715 MBytes   600 Mbits\/sec\n[  4]  0.0-60.0 sec  4292 MBytes   600 Mbits\/sec\n[  5] 50.0-60.0 sec   261 MBytes   219 Mbits\/sec\n[  5]  0.0-60.0 sec  1582 MBytes   221 Mbits\/sec\n<\/pre>\n<\/li>\n<\/ul>\n<ul>\n<li>cb-inf1c\n<pre class=\"wiki\">cb-inf1c:~# iperf -fm -i 10 -p 35555 -c 123.30.175.31 -t 60 -b 600M -d\n------------------------------------------------------------\nServer listening on TCP port 35555\nTCP window size: 0.08 MByte (default)\n------------------------------------------------------------\n------------------------------------------------------------\nClient connecting to 123.30.175.31, TCP port 35555\nTCP window size: 0.23 MByte (default)\n------------------------------------------------------------\n[  4] local 103.21.149.153 port 45106 connected with 123.30.175.31 port 35555\n[  5] local 103.21.149.153 port 35555 connected with 123.30.175.31 port 39263\n[ ID] Interval       Transfer     Bandwidth\n[  4]  0.0-10.0 sec   715 MBytes   600 Mbits\/sec\n[  5]  0.0-10.0 sec   281 MBytes   236 Mbits\/sec\n[  4] 10.0-20.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 10.0-20.0 sec   255 MBytes   214 Mbits\/sec\n[  4] 20.0-30.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 20.0-30.0 sec   238 MBytes   199 Mbits\/sec\n[  4] 30.0-40.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 30.0-40.0 sec   253 MBytes   213 Mbits\/sec\n[  4] 40.0-50.0 sec   715 MBytes   600 Mbits\/sec\n[  5] 40.0-50.0 sec   233 MBytes   195 Mbits\/sec\n[  4] 50.0-60.0 sec   715 MBytes   600 Mbits\/sec\n[  4]  0.0-60.0 sec  4292 MBytes   600 Mbits\/sec\n[  5] 50.0-60.0 sec   251 MBytes   211 Mbits\/sec\n[  5]  0.0-60.0 sec  1511 MBytes   211 Mbits\/sec\n<\/pre>\n<\/li>\n<\/ul>\n<p><strong>Results:<\/strong><\/p>\n<ul>\n<li>CMC almost do not limit outbound traffic, but we can not reach 1Gbps due to the testing over internet<\/li>\n<li>we may have some packet loss, that triggers tcp congestion avoidance, but mss looks persistent\n<ul>\n<li>packet loss due to the problems on some hops in internet<\/li>\n<li>packet loss due to shaper\/policer on CMC device &#8211; it seems more real, if to look at the results of the next 2 tests<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<blockquote><p><strong>test with bandwidth limited to 1G<\/strong><\/p>\n<pre class=\"wiki\">cb-inf1c:~# iperf -fm -i 1 -p 35555 -c 123.30.175.31 -t 10 -b 1G -d -m -l 2M -e\n------------------------------------------------------------\nServer listening on TCP port 35555 with pid 11854\nTCP window size: 0.08 MByte (default)\n------------------------------------------------------------\n------------------------------------------------------------\nClient connecting to 123.30.175.31, TCP port 35555 with pid 11854\nTCP window size: 0.08 MByte (default)\n------------------------------------------------------------\n[  4] local 103.21.149.153 port 46612 connected with 123.30.175.31 port 35555\n[  5] local 103.21.149.153 port 35555 connected with 123.30.175.31 port 39360\n[ ID] Interval        Transfer    Bandwidth       Write\/Err  Rtry    Cwnd\/RTT\n[  4] 0.00-1.00 sec   108 MBytes   906 Mbits\/sec  54\/0          6      244K\/1933 us\n[  5] 0.00-1.00 sec  16.6 MBytes   139 Mbits\/sec  2181    2181:0:0:0:0:0:0:0\n[  4] 1.00-2.00 sec   106 MBytes   889 Mbits\/sec  53\/0          5      227K\/1767 us\n[  5] 1.00-2.00 sec  14.6 MBytes   122 Mbits\/sec  1668    1668:0:0:0:0:0:0:0\n[  4] 2.00-3.00 sec   106 MBytes   889 Mbits\/sec  53\/0          5      214K\/1898 us\n[  5] 2.00-3.00 sec  16.5 MBytes   138 Mbits\/sec  1797    1797:0:0:0:0:0:0:0\n[  4] 3.00-4.00 sec   108 MBytes   906 Mbits\/sec  54\/0          5      176K\/1334 us\n[  5] 3.00-4.00 sec  15.2 MBytes   128 Mbits\/sec  1632    1632:0:0:0:0:0:0:0\n[  4] 4.00-5.00 sec   108 MBytes   906 Mbits\/sec  54\/0          4      253K\/2019 us\n[  5] 4.00-5.00 sec  22.0 MBytes   184 Mbits\/sec  2155    2155:0:0:0:0:0:0:0\n[  4] 5.00-6.00 sec   108 MBytes   906 Mbits\/sec  54\/0          5      212K\/1682 us\n[  5] 5.00-6.00 sec  11.8 MBytes  98.8 Mbits\/sec  1334    1334:0:0:0:0:0:0:0\n[  5] 6.00-7.00 sec  11.4 MBytes  95.6 Mbits\/sec  1233    1233:0:0:0:0:0:0:0\n[  4] 6.00-7.00 sec   108 MBytes   906 Mbits\/sec  54\/0          4      255K\/1912 us\n[  4] 7.00-8.00 sec   108 MBytes   906 Mbits\/sec  54\/0          5      202K\/1575 us\n[  5] 7.00-8.00 sec  11.2 MBytes  94.1 Mbits\/sec  1153    1153:0:0:0:0:0:0:0\n[  4] 8.00-9.00 sec   106 MBytes   889 Mbits\/sec  53\/0          4      233K\/1779 us\n[  5] 8.00-9.00 sec  26.3 MBytes   221 Mbits\/sec  2724    2724:0:0:0:0:0:0:0\n[  5] 9.00-10.00 sec  18.9 MBytes   158 Mbits\/sec  2032    2032:0:0:0:0:0:0:0\n[  5] 0.00-10.00 sec   164 MBytes   138 Mbits\/sec  17911    17911:0:0:0:0:0:0:0\n[  5] MSS size 1448 bytes (MTU 1500 bytes, ethernet)\n[  4] 9.00-10.00 sec   110 MBytes   923 Mbits\/sec  55\/0          5      178K\/1947 us\n[  4] 0.00-10.01 sec  1076 MBytes   901 Mbits\/sec  538\/0         48      178K\/1947 us\n[  4] MSS size 1448 bytes (MTU 1500 bytes, ethernet)\n<\/pre>\n<\/blockquote>\n<blockquote>\n<blockquote><p><strong>test with bandwidth limited to 600M<\/strong><\/p>\n<pre class=\"wiki\">cb-inf1c:~# iperf -fm -i 1 -p 35555 -c 123.30.175.31 -t 10 -b 600M -d -m -l 2M -e\n------------------------------------------------------------\nServer listening on TCP port 35555 with pid 12039\nTCP window size: 0.08 MByte (default)\n------------------------------------------------------------\n------------------------------------------------------------\nClient connecting to 123.30.175.31, TCP port 35555 with pid 12039\nTCP window size: 0.09 MByte (default)\n------------------------------------------------------------\n[  4] local 103.21.149.153 port 46802 connected with 123.30.175.31 port 35555\n[  5] local 103.21.149.153 port 35555 connected with 123.30.175.31 port 39368\n[ ID] Interval        Transfer    Bandwidth       Write\/Err  Rtry    Cwnd\/RTT\n[  4] 0.00-1.00 sec  74.0 MBytes   621 Mbits\/sec  37\/0          0      644K\/2756 us\n[  5] 0.00-1.00 sec  26.5 MBytes   222 Mbits\/sec  3567    3567:0:0:0:0:0:0:0\n[  5] 1.00-2.00 sec  26.8 MBytes   225 Mbits\/sec  3631    3631:0:0:0:0:0:0:0\n[  4] 1.00-2.00 sec  72.0 MBytes   604 Mbits\/sec  36\/0          0      644K\/3006 us\n[  5] 2.00-3.00 sec  28.8 MBytes   242 Mbits\/sec  3765    3765:0:0:0:0:0:0:0\n[  4] 2.00-3.00 sec  72.0 MBytes   604 Mbits\/sec  36\/0          0      680K\/2323 us\n[  5] 3.00-4.00 sec  24.6 MBytes   206 Mbits\/sec  3104    3104:0:0:0:0:0:0:0\n[  4] 3.00-4.00 sec  72.0 MBytes   604 Mbits\/sec  36\/0          0      680K\/2701 us\n[  4] 4.00-5.00 sec  70.0 MBytes   587 Mbits\/sec  35\/0          0      680K\/2825 us\n[  5] 4.00-5.00 sec  28.5 MBytes   239 Mbits\/sec  3741    3741:0:0:0:0:0:0:0\n[  5] 5.00-6.00 sec  24.2 MBytes   203 Mbits\/sec  3430    3430:0:0:0:0:0:0:0\n[  4] 5.00-6.00 sec  72.0 MBytes   604 Mbits\/sec  36\/0          0      680K\/2907 us\n[  5] 6.00-7.00 sec  24.5 MBytes   205 Mbits\/sec  3464    3464:0:0:0:0:0:0:0\n[  4] 6.00-7.00 sec  72.0 MBytes   604 Mbits\/sec  36\/0          0      680K\/2389 us\n[  5] 7.00-8.00 sec  19.3 MBytes   162 Mbits\/sec  2708    2708:0:0:0:0:0:0:0\n[  4] 7.00-8.00 sec  72.0 MBytes   604 Mbits\/sec  36\/0          0      680K\/2833 us\n[  4] 8.00-9.00 sec  70.0 MBytes   587 Mbits\/sec  35\/0          0      680K\/2826 us\n[  5] 8.00-9.00 sec  20.8 MBytes   175 Mbits\/sec  3156    3156:0:0:0:0:0:0:0\n[  4] 0.00-10.00 sec   716 MBytes   601 Mbits\/sec  358\/0          0      680K\/3038 us\n[  4] MSS size 1448 bytes (MTU 1500 bytes, ethernet)\n[  5] 9.00-10.00 sec  21.6 MBytes   181 Mbits\/sec  3228    3228:0:0:0:0:0:0:0\n[  5] 0.00-10.00 sec   246 MBytes   206 Mbits\/sec  33796    33796:0:0:0:0:0:0:0\n[  5] MSS size 1448 bytes (MTU 1500 bytes, ethernet)\n<\/pre>\n<\/blockquote>\n<\/blockquote>\n<ul>\n<li>in the first test we can see re-transmits and lowed inbound speed (cwnd is lower)<\/li>\n<li>in the second test we can see that we don&#8217;t have re-transmits<\/li>\n<\/ul>\n<ul>\n<li>inbound traffic limited to 200Mbps + ~10% burst<\/li>\n<\/ul>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Req: Please Make sure that we have 200Mbit channel for eno1 Configure static IP for eno2 ( I temporarily set [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[22,8],"tags":[87,94,110,111],"class_list":["post-429","post","type-post","status-publish","format-standard","hentry","category-linux","category-system","tag-linux","tag-network-settings","tag-speed","tag-speedtest"],"_links":{"self":[{"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/posts\/429","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=429"}],"version-history":[{"count":0,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=\/wp\/v2\/posts\/429\/revisions"}],"wp:attachment":[{"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=429"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=429"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kb.lagonet.vn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=429"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}