Changes between Initial Version and Version 1 of NspwUprouse/Agenda/PfsonarLab


Ignore:
Timestamp:
Sep 13, 2021, 6:39:30 PM (3 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NspwUprouse/Agenda/PfsonarLab

    v1 v1  
     1= perfSonar, BWCTL and iperf =
     2
     3== Setup Perfsonar ==
     4
     5Follow the setup steps from the perfSonar web site at
     6
     7 - http://docs.perfsonar.net/install_centos_fullinstall.html
     8 - http://docs.perfsonar.net/install_config_first_time.html
     9
     10
     11Once the configuration is finished, you can access the web interface.
     12
     13== Web interface ==
     14
     15 - Open a web browser in your host pc and give the IP address of your perfsonar VM. You will get the perfsonar toolkit.
     16
     17 - Log in to the toolkit by clicking the log-in button. Give username as '''admin''' and password as '''<your Password>'''
     18
     19 - Let set up the NTP. To do that, Click '''Configure''' button and Click the '''Host'''. Click the '''Select the closest servers''' and it will show you some closest servers. Click '''Save'''.
     20
     21[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/netmon2017perfsonar/ps1.png)]]
     22
     23 - Then Let's configure server details. Click the '''Administrative Information'''. Fill in the following details. and Click '''Save'''
     24
     25  -- Organization Name : LEARN
     26
     27  -- City : Peradeniya
     28
     29  -- Country : Sri Lanka
     30
     31  -- !State/Province : Kandy
     32
     33  -- !ZIP/Postal Code : 22000
     34
     35  -- Administrator Name : <your Name>
     36
     37  -- Administrator Email : <Your E mail>
     38
     39  -- Node Role : NREN
     40
     41  -- Node Access Policy : Private
     42 
     43  -- Communities : LEARN
     44
     45== Testing with Perfsonar ==
     46
     47Lets do a ping test with perfsonar.
     48
     49 - First Click '''Configure''' and click '''Test''' tab.
     50 - Then Click '''+Test''' button and you will get the '''Test parameters''' page .
     51
     52[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/netmon2017perfsonar/ps4.png)]]
     53
     54 - Select '''ping''' from '''Type''' drop down list.
     55 - Set the following details
     56     * Test name/description : Test with <Neighbor IP>
     57     * Interface : Default
     58     * Time between tests : 5
     59     * Units : minutes
     60     * Packets per test : 10
     61     * Hostname/IP : <Your Neighbor's IP Address>
     62     * Host description : <Neighbor's Name>
     63 - Click '''Ok'''
     64
     65[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/netmon2017perfsonar/ps3.png)]]
     66
     67 - Click '''Save'''
     68 - You will the created test now appears in the dashboard. Check for the values.
     69
     70== bwctl ==
     71
     72bwctl is a command-line client application that is used to initiate throughput tests. Let's measure throughput between your perfsonar node and your neighbors perfsonar node.
     73
     74 - ssh into your perfsonar node. Use your name (which you give when you set up perfsonar) and <your ssh password>
     75 - Give the following Command
     76{{{
     77bwctl -f m -t 10 -i 1 -c <your neighbors perfsonar IP address>
     78}}}
     79 - You will get an output as follows
     80
     81[[Image(https://ws.learn.ac.lk/raw-attachment/wiki/netmon2017perfsonar/ps2.png)]]
     82
     83 - Check the values in '''Bitrate'''
     84
     85
     86= iperf =
     87
     88Linux systems administrators and network administrators often find diagnosing network speed degradation complicated, as there are very few tools available to diagnose these issues. iperf is a command-line tool used in the diagnostics of network speed issues. iperf measures the maximum network throughput a server can handle. It is particularly useful when experiencing network speed issues, as you can use iperf to determine which server is unable to reach maximum throughput.
     89
     90== Installation ==
     91
     92You can use apt-get to install iperf on Debian and Ubuntu:
     93{{{
     94apt-get install iperf
     95}}}
     96
     97'''Note: Installation of perfsonar gives you iperf3 by default. Therefore you do not have to install iperf.'''
     98
     99== How to Use iperf ==
     100
     101iperf must be installed on both computers between which you are testing the connection. If you are using a Unix or Linux-based operating system on your personal computer, you may be able to install iperf on your local machine. If you are testing the throughput of your Linode, however, it’s better to use another server as the end point, as your local ISP may impose network restrictions that can affect the results of your test.
     102
     103== TCP Clients & Servers ==
     104
     105iperf requires two systems because one system must act as a server, while the other acts as a client. The client connects to the server you’re testing the speed of.
     106
     107 - On the node you wish to test, launch iperf3 in server mode:
     108{{{
     109iperf -s
     110}}}
     111   
     112You should see output similar to:
     113{{{
     114------------------------------------------------------------
     115Server listening on TCP port 5001
     116TCP window size:  128 KByte (default)
     117------------------------------------------------------------
     118}}}
     119
     120 - On your second node, connect to the first. Replace 192.168.1.1 with the first node’s IP address.
     121
     122{{{
     123iperf -c 192.168.1.1
     124}}}
     125   
     126The output should be similar to:
     127{{{
     128------------------------------------------------------------
     129Client connecting to 192.168.1.1, TCP port 5001
     130TCP window size: 85.0 KByte (default)
     131------------------------------------------------------------
     132[  3] local 192.168.1.2 port 45448 connected with 192.168.1.1 port 5001
     133[ ID] Interval       Transfer     Bandwidth
     134[  3]  0.0-10.0 sec   524 MBytes   439 Mbits/sec
     135}}}
     136   
     137You will also see the connection and results on your iperf server. This will look similar to:
     138{{{
     139------------------------------------------------------------
     140Server listening on TCP port 5001
     141TCP window size:  128 KByte (default)
     142------------------------------------------------------------
     143[  4] local 192.168.1.1 port 5001 connected with 192.168.1.2 port 45448
     144[ ID] Interval       Transfer     Bandwidth
     145[  4]  0.0-10.1 sec   524 MBytes   437 Mbits/sec
     146}}}
     147
     148- To stop the iperf server process, press CTRL + c.
     149
     150== UDP Clients & Servers ==
     151
     152Using iPerf, you can also test the maximum throughput achieved via UDP connections.
     153
     154- Start a UDP iperf server:
     155{{{
     156iperf -s -u
     157}}}
     158
     159The output will be similar to:
     160{{{
     161------------------------------------------------------------
     162Server listening on TCP port 5001
     163Receiving 1470 byte datagrams
     164UDP buffer size:  192 KByte (default)
     165------------------------------------------------------------
     166}}}
     167
     168- '''-u''' Connect your client to your iperf UDP server. Replace 192.168.1.1 with your IP address:
     169{{{
     170iperf -c 198.168.1.1 -u
     171}}}
     172
     173The -u option we’ve passed tells iperf3 that we are connecting via UDP. This is important, because we want to see the maximum throughput achieved via UDP. The output should be similar to:
     174{{{
     175------------------------------------------------------------
     176Client connecting to 192.168.1.1, UDP port 5001
     177Sending 1470 byte datagrams
     178UDP buffer size:  208 KByte (default)
     179------------------------------------------------------------
     180[  3] local 192.168.1.2 port 35650 connected with 192.168.1.1 port 5001
     181[ ID] Interval       Transfer     Bandwidth
     182[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec
     183[  3] Sent 893 datagrams
     184[  3] Server Report:
     185[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec   0.408 ms    0/  893 (0%)
     186
     187}}}
     188
     189- Looking at the output we have received, 1.05 Mbits/sec is considerably less than what we received on the TCP tests. It is also considerably less than the maximum outbound bandwidth cap provided by the 1GB Linode. This is because iperf limits the bandwidth for UDP clients to 1 Mbit per second by default.
     190
     191You can change this with the -b flag, replacing the number after with the maximum bandwidth rate you wish to test against. If you are testing for network speed, we recommend setting this number above the maximum bandwidth cap provided by link. For example, this test was run on a 100Mbps node:
     192{{{
     193iperf -c 192.168.1.1 -u -b 100m
     194}}}
     195   
     196This tells the client that we want to achieve a maximum of 100 Mbits per second if possible.
     197{{{
     198------------------------------------------------------------
     199Client connecting to 192.168.1.1, UDP port 5001
     200Sending 1470 byte datagrams
     201UDP buffer size:  208 KByte (default)
     202------------------------------------------------------------
     203[  3] local 192.168.1.29 port 57998 connected with 192.168.1.1 port 5001
     204[ ID] Interval       Transfer     Bandwidth
     205[  3]  0.0-10.0 sec   120 MBytes   101 Mbits/sec
     206[  3] Sent 85471 datagrams
     207[  3] Server Report:
     208[  3]  0.0-10.0 sec   120 MBytes   101 Mbits/sec   0.147 ms    1/85470 (0.0012%)
     209[  3]  0.0-10.0 sec  1 datagrams received out-of-order
     210
     211}}}
     212
     213Now that is considerably better than the 1.05 Mbits/sec we were seeing earlier!
     214
     215== Bidirectional Tests ==
     216
     217In some cases, you may want to test both servers for the maximum amount of throughput. This can easily be done using the built-in bidirectional testing feature iperf offers.
     218
     219Run the following command to test both connections:
     220{{{
     221iperf -c 192.168.1.1 -d
     222}}}
     223
     224The result is that iperf will start a server and a client connection on the original client server (192.168.1.2). Once this has been done, iPerf will connect the original iperf server to the client connection, which is now acting as both a server connection and a client connection. This will look similar to,
     225
     226{{{
     227------------------------------------------------------------
     228Server listening on TCP port 5001
     229TCP window size: 85.3 KByte (default)
     230------------------------------------------------------------
     231------------------------------------------------------------
     232Client connecting to 192.168.1.1, TCP port 5001
     233TCP window size:  170 KByte (default)
     234------------------------------------------------------------
     235[  5] local 192.168.1.2 port 45544 connected with 192.168.1.1 port 5001
     236[  4] local 192.168.1.2 port 5001 connected with 192.168.1.1 port 50048
     237[ ID] Interval       Transfer     Bandwidth
     238[  5]  0.0-10.0 sec   304 MBytes   255 Mbits/sec
     239[  4]  0.0-10.0 sec   236 MBytes   197 Mbits/sec
     240}}}
     241
     242On the original iPerf server, you will see:
     243{{{
     244------------------------------------------------------------
     245Client connecting to 192.168.1.2, TCP port 5001
     246TCP window size:  129 KByte (default)
     247------------------------------------------------------------
     248[  6] local 192.168.1.1 port 50048 connected with 192.168.1.2 port 5001
     249Waiting for server threads to complete. Interrupt again to force quit.
     250[ ID] Interval       Transfer     Bandwidth
     251[  6]  0.0-10.0 sec   236 MBytes   198 Mbits/sec
     252[  4]  0.0-10.1 sec   304 MBytes   253 Mbits/sec
     253}}}