| 64 | |
| 65 | == Setup == |
| 66 | |
| 67 | Divide the hosts that you want to use into pairs. You'll run a netcat listener on the server, and make a netcat connection to it from the client. |
| 68 | |
| 69 | Identify the precise IP address on each server that you'll want to connect to. Make a table to keep track of which server you'll want to connect to from each client, e.g. |
| 70 | |
| 71 | || '''client''' || '''server''' || '''server address''' || |
| 72 | || ganel.gpolab.bbn.com || planetlab5.clemson.edu || server=10.42.101.105 || |
| 73 | || planetlab4.clemson.edu || pl5.myplc.grnoc.iu.edu || server=10.42.101.73 || |
| 74 | || of-planet1.stanford.edu || wings-openflow-3.wail.wisc.edu || server=10.42.101.96 || |
| 75 | |
| 76 | You'll use the "server=<ipaddr>" parts when you run the experiment. |
| 77 | |
| 78 | Identify a port that you'd like to use for the connection; call it <port>, and use it below when you run the netcat server and client commands. |
| 79 | |
| 80 | Identify a file that you'd like to transfer from the servers to the clients; call it <file>. Find out how many times you'll need to copy it to get more than 1 GB: |
| 81 | |
| 82 | {{{ |
| 83 | echo $((10**9/$(du -b <file> | awk '{print $1;}')+1)) |
| 84 | }}} |
| 85 | |
| 86 | Divide that number by the number of host pairs you have (the number of rows in your table); call this number <count>, and use it below when you run the netcat client command. |
| 87 | |
| 88 | Copy the file to each of the servers. (When you run the experiment, you'll download it repeatedly from each of the clients.) |
| 89 | |
| 90 | On each client and server, install netcat: |
| 91 | |
| 92 | {{{ |
| 93 | sudo yum install nc |
| 94 | }}} |
| 95 | |
| 96 | == Execution == |
| 97 | |
| 98 | On each server, run |
| 99 | |
| 100 | {{{ |
| 101 | server=<ipaddr> |
| 102 | for i in {1..<count>} ; do nc -l $server <port> < <file> ; echo "completed transfer #$i" ; md5sum <file> ; done |
| 103 | }}} |
| 104 | |
| 105 | using the "server=<ipaddr>" line from your table, and the <count>, <port>, and <file> values you identified earlier. |
| 106 | |
| 107 | You won't seen any output immediately, but when you start running clients, as each transfer completes, you should see lines on your terminal that look like |
| 108 | |
| 109 | {{{ |
| 110 | completed transfer #1 |
| 111 | }}} |
| 112 | |
| 113 | and the md5sum checksum of the file. |
| 114 | |
| 115 | On each client, run |
| 116 | |
| 117 | {{{ |
| 118 | server=<ipaddr> |
| 119 | rm -rf ~/giganetcat |
| 120 | mkdir ~/giganetcat |
| 121 | cd ~/giganetcat |
| 122 | for i in {1..<count>} ; do nc $server <port> > <file> ; echo "completed transfer #$i" ; md5sum <file> ; mv <file> <file>.$i ; done |
| 123 | }}} |
| 124 | |
| 125 | You won't seen any output immediately, but as each transfer completes, you should see lines on your terminal that look like |
| 126 | |
| 127 | {{{ |
| 128 | completed transfer #1 |
| 129 | }}} |
| 130 | |
| 131 | and the md5sum checksum of the file (and the filename). |
| 132 | |
| 133 | ''FIXME: It would be better if this piped to 'tee', to make it easier to compare the output between client and server later.'' |
| 134 | |
| 135 | == Results == |
| 136 | |
| 137 | In each client-server pair, compare the output on the client and the server. They should be identical: Each should list the same set of transfers completed, and all of the md5sum lines should be identical on both. |
| 138 | |
| 139 | On each client, check the total size of the data transfered: |
| 140 | |
| 141 | {{{ |
| 142 | du -sb . |
| 143 | }}} |
| 144 | |
| 145 | Add up the results for all the clients; they should add up to 1 GB (or more). |
| 146 | |
| 147 | ''FIXME: If we had the output from both client and server in a file, we could diff them, and grep for anomalous md5sum lines.'' |
| 148 | |
| 149 | == Cleanup == |
| 150 | |
| 151 | On each client, remove the giganetcat directory: |
| 152 | |
| 153 | {{{ |
| 154 | cd |
| 155 | rm -rf ~/giganetcat |
| 156 | }}} |