Changes between Version 28 and Version 29 of NikySandbox/SIGSCETutorial


Ignore:
Timestamp:
02/20/13 21:52:46 (7 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NikySandbox/SIGSCETutorial

    v28 v29  
    6767= 5. Run your experiment =
    6868
     69=== File Transfer Using UDT ===
     70
     71Follow these steps to perform a file transfer using UDT.
     72
     73 * Log into pc1 and pc2 in separate windows.
     74
     75 * On pc1, start a UDT file transfer server, using this command:
     76{{{
     77% pc1:~% /local/udt4/app/sendfile
     78server is ready at port: 9000
     79}}}
     80
     81 * On pc2, start a UDT file transfer client, using this command:
     82{{{
     83pc2:~% /local/udt4/app/recvfile pc1 9000 /local/datafiles/sm.10M /dev/null
     84}}}
     85You should see output like the following in your pc1 window, showing the results of the file transfer. Note the transfer rate.
     86{{{
     87new connection: 192.168.2.2:55839
     88speed = 7.14472Mbits/sec
     89}}}
     90
     91 * There are three data files available for transfer tests: '''/local/datafiles/sm.10M''' is 10MB, '''/local/datafiles/med.100M''' is 100MB, and '''/local/datafiles/lg.1G''' is 1000MB. Leave your transfer server running on pc1, and try transferring each of these files in turn by typing the appropriate commands on pc2. Keep track of the transfer rates in each case.
     92
     93 * You can leave your UDT server running or stop it with ctrl-C.
     94
     95=== File Transfer Using FTP ===
     96
     97Follow these steps to perform a file transfer using FTP.
     98
     99 * For a TCP-based (FTP) transfer, there's already a FTP server running on pc1. Log into pc2, and start an ftp client:
     100
     101(You type ''ftp pc1'', the user name ''anonymous'', and any password you want, although your e-mail address is traditional.)
     102
     103{{{
     104pc2:~% ftp pc1
     105Connected to PC1-lan1.
     106220 (vsFTPd 2.3.2)
     107Name (pc1:mberman): anonymous
     108331 Please specify the password.
     109Password:
     110230 Login successful.
     111Remote system type is UNIX.
     112Using binary mode to transfer files.
     113ftp>
     114}}}
     115
     116 * Still on pc2, request a file transfer. Note the reported file size, transfer time, and transfer rate.
     117
     118{{{
     119ftp> get med.100M /dev/null
     120local: /dev/null remote: med.100M
     121200 PORT command successful. Consider using PASV.
     122150 Opening BINARY mode data connection for med.100M (104857600 bytes).
     123226 Transfer complete.
     124104857600 bytes received in 8.91 secs (11491.9 kB/s)
     125}}}
     126
     127 * You can perform additional transfers with additional get commands. When you're done, exit the ftp client with the quit command.
     128
     129=== Viewing and Adjusting link characteristics ===
     130
     131In this experiment, you'll be changing the characteristics of the link and measuring how they affect UDT and TCP performance.
     132
     133 * Log into your delay node as you do with any other node. Then, on your delay node, use this command:
     134{{{
     135%sudo ipfw pipe show
     136}}}
     137
     138You'll get something like this:
     139{{{
     14060111: 100.000 Mbit/s    1 ms   50 sl. 1 queues (1 buckets) droptail
     141    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     142BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     143  0 ip    207.167.175.72/0       195.123.216.8/6        7     1060  0    0   0
     14460121: 100.000 Mbit/s    1 ms   50 sl. 1 queues (1 buckets) droptail
     145    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     146BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     147  0 ip   207.167.176.224/0         195.124.8.8/6        8     1138  0    0   0
     148}}}
     149
     150This information shows the internal configuration of the "pipes" used to emulate network characteristics.
     151(Your output may look different, depending on the version of ipfw installed on your delay node.
     152In any case, the information you need is on the first line of output for each pipe.)
     153
     154You'll want to make note of the two pipe numbers, one for each direction of traffic along your link.
     155In the example above, they are 60111 and 60121.
     156
     157There are three link characteristics we'll manipulate in this experiment: bandwidth, delay, and packet loss rate.
     158You'll find their values listed in the ipfw output above.
     159The link bandwidth appears on the first line immediately after the pipe number. It's 100Mbps in the example shown above.
     160The next value shown is the delay, 1 ms in the example above.
     161The packet loss rate (PLR) is omitted if it's zero, as shown above. If non-zero, you'll see something like '''plr 0.000100'''
     162immediately after the "50 sl." on the first output line.
     163
     164It is possible to adjust the parameters of the two directions of your link separately, to emulate asymmetric links.
     165In this experiment, however, we are looking at symmetric links, so we'll always change the settings on both pipes together.
     166
     167Here are the command sequences you'll need to change your link parameters.
     168In each case, you'll need to provide the correct pipe numbers, if they're different from the example.
     169
     170 * To change bandwidth (100M means 100Mbits/s):
     171{{{
     172sudo ipfw pipe 60111 config bw 100M
     173sudo ipfw pipe 60121 config bw 100M
     174}}}
     175
     176 * Request a bandwidth of zero to use the full capacity of the link (unlimited):
     177{{{
     178sudo ipfw pipe 60111 config bw 0
     179sudo ipfw pipe 60121 config bw 0
     180}}}
     181
     182 * To change link delay (delays are measured in ms):
     183{{{
     184sudo ipfw pipe 60111 config delay 10
     185sudo ipfw pipe 60121 config delay 10
     186}}}
     187
     188 * To change packet loss rate (rate is a probability, so 0.001 means 0.1% packet loss):
     189{{{
     190sudo ipfw pipe 60111 config plr .0001
     191sudo ipfw pipe 60121 config plr .0001
     192}}}
     193
     194 * You can combine settings for bandwidth, delay, and loss by specifying more than one in a single ipfw command. We'll use this form in the procedure below.
     195
     196== Experiment Procedure ==
     197
     198 * Set your link parameters to use maximum bandwidth, no delay, no packet loss:
     199
     200{{{
     201sudo ipfw pipe 60111 config bw 0 delay 0 plr 0
     202sudo ipfw pipe 60121 config bw 0 delay 0 plr 0
     203}}}
     204
     205 * Verify with
     206
     207{{{
     208sudo ipfw pipe show
     20960111: unlimited    0 ms   50 sl. 1 queues (1 buckets) droptail
     210    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     211BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     212  0 ip    207.167.175.72/0       195.123.216.8/6        7     1060  0    0   0
     21360121: unlimited    0 ms   50 sl. 1 queues (1 buckets) droptail
     214    mask: 0x00 0x00000000/0x0000 -> 0x00000000/0x0000
     215BKT Prot ___Source IP/port____ ____Dest. IP/port____ Tot_pkt/bytes Pkt/Byte Drp
     216  0 ip   207.167.176.224/0         195.124.8.8/6        8     1138  0    0   0
     217}}}
     218
     219Note that bandwidth is set to ''unlimited'', delay to ''0 ms'', and no PLR is shown.
     220
     221 * Using this initial setting, try a few UDT transfers, including the larger files. Now try FTP transfers. Record the transfer sizes and rates.
     222
     223 * Now change the link parameters to reduce the available bandwidth to 10Mbps:
     224
     225{{{
     226sudo ipfw pipe 60111 config bw 10M delay 0 plr 0
     227sudo ipfw pipe 60121 config bw 10M delay 0 plr 0
     228}}}
     229
     230 * Repeat your file transfers with the new settings. As before, note the transfer sizes and rates, as well as the link settings.
     231
     232 * Continue with additional trials, varying each of the three link parameters over a range sufficient to observe meaningful performance differences. Record your data.
     233
     234
    69235= 6. Delete your experiment =
    70236