Changes between Initial Version and Version 1 of GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopo/Execute


Ignore:
Timestamp:
08/13/14 11:15:15 (10 years ago)
Author:
xliu@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopo/Execute

    v1 v1  
     1[[PageOutline]]
     2
     3'''[http://groups.geni.net/syseng/wiki/XuanSandbox#ATutorialonSystematicExperimentalDesign A Tutorial on Systematic Experimental Design]'''
     4
     5'''[http://groups.geni.net/syseng/wiki/XuanSandbox/InstallSoftware Step I: Single Node]'''
     6
     7'''[http://groups.geni.net/syseng/wiki/XuanSandbox/SmallTopo Step II: Small Topology]'''
     8
     9 
     10{{{
     11#!html
     12
     13<div style="text-align:center; width:495px; margin-left:auto; margin-right:auto;">
     14<img id="Image-Maps_5201305222028436" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Tutorials/Graphics/Execute.jpg?format=raw" usemap="#Image-Maps_5201305222028436" border="0" width="495" height="138" alt="" />
     15<map id="_Image-Maps_5201305222028436" name="Image-Maps_5201305222028436">
     16<area shape="rect" coords="18,18,135,110" href="http://groups.geni.net/syseng/wiki/XuanSandbox/SmallTopo/DesignSetup" alt="" title=""    />
     17<area shape="rect" coords="180,18,297,111" href="http://groups.geni.net/syseng/wiki/XuanSandbox/SmallTopo/Execute" alt="" title=""    />
     18<area shape="rect" coords="344,17,460,110" href="http://groups.geni.net/syseng/wiki/XuanSandbox/SmallTopo/Finish" alt="" title=""    />
     19<area shape="rect" coords="493,136,495,138" href="http://www.image-maps.com/index.php?aff=mapped_users_5201305222028436" alt="Image Map" title="Image Map" />
     20</map>
     21<!-- Image map text links - End - -->
     22
     23</div>
     24}}}
     25
     26
     27
     28= 5. End-to-End Validation =
     29
     30We first validate end-to-end communication between `client` and server by running `ping` and `traceroute` at the `client`, and then run `iperf` on both `client` and `server`. 
     31
     32Open two terminals, and login to `client` and `server`, respectively.
     33
     34== a. End-to-End `traceroute` and `ping` ==
     35
     36 * Run `ping` from `client` to `server`.
     37
     38{{{
     39xuanliu@client:~$ ping 192.168.20.10
     40PING 192.168.20.10 (192.168.20.10) 56(84) bytes of data.
     4164 bytes from 192.168.20.10: icmp_req=1 ttl=61 time=3.28 ms
     4264 bytes from 192.168.20.10: icmp_req=2 ttl=61 time=2.69 ms
     4364 bytes from 192.168.20.10: icmp_req=3 ttl=61 time=2.73 ms
     44^C
     45--- 192.168.20.10 ping statistics ---
     463 packets transmitted, 3 received, 0% packet loss, time 2003ms
     47rtt min/avg/max/mdev = 2.696/2.905/3.282/0.273 ms
     48}}}
     49
     50
     51 * Run `traceroute` from `client` to `server`.
     52
     53{{{
     54xuanliu@client:~$ traceroute 192.168.20.10
     55traceroute to 192.168.20.10 (192.168.20.10), 30 hops max, 60 byte packets
     56 1  router-1-lan4 (192.168.10.10)  0.536 ms  0.596 ms  0.562 ms
     57 2  router-2-lan0 (192.168.1.2)  1.048 ms  0.994 ms  0.979 ms
     58 3  router-3-lan1 (192.168.2.2)  1.368 ms  1.328 ms  1.291 ms
     59 4  server-lan5 (192.168.20.10)  1.878 ms  1.790 ms  1.706 ms
     60}}}
     61
     62
     63== b. `iperf` Test ==
     64
     65 * `iperf` End-to-End TCP test
     66
     67   Server Side:
     68{{{
     69xuanliu@server:~$ iperf -s -t 10 -i 1
     70------------------------------------------------------------
     71Server listening on TCP port 5001
     72TCP window size: 85.3 KByte (default)
     73------------------------------------------------------------
     74[  4] local 192.168.20.10 port 5001 connected with 192.168.10.11 port 54611
     75[ ID] Interval       Transfer     Bandwidth
     76[  4]  0.0- 1.0 sec  12.0 MBytes   101 Mbits/sec
     77[  4]  1.0- 2.0 sec  11.9 MBytes  99.6 Mbits/sec
     78[  4]  2.0- 3.0 sec  11.9 MBytes   100 Mbits/sec
     79[  4]  3.0- 4.0 sec  11.9 MBytes   100 Mbits/sec
     80[  4]  4.0- 5.0 sec  12.0 MBytes   101 Mbits/sec
     81[  4]  5.0- 6.0 sec  11.9 MBytes   100 Mbits/sec
     82[  4]  6.0- 7.0 sec  11.9 MBytes   100 Mbits/sec
     83[  4]  7.0- 8.0 sec  12.0 MBytes   101 Mbits/sec
     84[  4]  8.0- 9.0 sec  11.9 MBytes   100 Mbits/sec
     85[  4]  9.0-10.0 sec  12.0 MBytes   101 Mbits/sec
     86[  4]  0.0-10.1 sec   120 MBytes   100 Mbits/sec
     87}}}
     88
     89   Client Side:
     90{{{
     91xuanliu@client:~$ iperf -c 192.168.20.10 -t 10 -i 1
     92------------------------------------------------------------
     93Client connecting to 192.168.20.10, TCP port 5001
     94TCP window size: 23.5 KByte (default)
     95------------------------------------------------------------
     96[  3] local 192.168.10.11 port 54611 connected with 192.168.20.10 port 5001
     97[ ID] Interval       Transfer     Bandwidth
     98[  3]  0.0- 1.0 sec  12.5 MBytes   105 Mbits/sec
     99[  3]  1.0- 2.0 sec  11.8 MBytes  98.6 Mbits/sec
     100[  3]  2.0- 3.0 sec  12.0 MBytes   101 Mbits/sec
     101[  3]  3.0- 4.0 sec  12.0 MBytes   101 Mbits/sec
     102[  3]  4.0- 5.0 sec  11.9 MBytes  99.6 Mbits/sec
     103[  3]  5.0- 6.0 sec  12.0 MBytes   101 Mbits/sec
     104[  3]  6.0- 7.0 sec  11.9 MBytes  99.6 Mbits/sec
     105[  3]  7.0- 8.0 sec  12.0 MBytes   101 Mbits/sec
     106[  3]  8.0- 9.0 sec  12.0 MBytes   101 Mbits/sec
     107[  3]  9.0-10.0 sec  12.0 MBytes   101 Mbits/sec
     108[  3]  0.0-10.0 sec   120 MBytes   101 Mbits/sec
     109}}}
     110
     111
     112 * `iperf` End-to-End UDP Test
     113
     114   Server Side:
     115{{{
     116xuanliu@server:~$ iperf -s -t 10 -i 1 -u
     117------------------------------------------------------------
     118Server listening on UDP port 5001
     119Receiving 1470 byte datagrams
     120UDP buffer size:  224 KByte (default)
     121------------------------------------------------------------
     122[  3] local 192.168.20.10 port 5001 connected with 192.168.10.11 port 33345
     123[ ID] Interval       Transfer     Bandwidth        Jitter   Lost/Total Datagrams
     124[  3]  0.0- 1.0 sec   128 KBytes  1.05 Mbits/sec   0.090 ms    0/   89 (0%)
     125[  3]  1.0- 2.0 sec   128 KBytes  1.05 Mbits/sec   0.219 ms    0/   89 (0%)
     126[  3]  2.0- 3.0 sec   128 KBytes  1.05 Mbits/sec   0.058 ms    0/   89 (0%)
     127[  3]  3.0- 4.0 sec   128 KBytes  1.05 Mbits/sec   0.050 ms    0/   89 (0%)
     128[  3]  4.0- 5.0 sec   128 KBytes  1.05 Mbits/sec   0.038 ms    0/   89 (0%)
     129[  3]  5.0- 6.0 sec   129 KBytes  1.06 Mbits/sec   0.058 ms    0/   90 (0%)
     130[  3]  6.0- 7.0 sec   128 KBytes  1.05 Mbits/sec   0.079 ms    0/   89 (0%)
     131[  3]  7.0- 8.0 sec   128 KBytes  1.05 Mbits/sec   0.030 ms    0/   89 (0%)
     132[  3]  8.0- 9.0 sec   128 KBytes  1.05 Mbits/sec   0.089 ms    0/   89 (0%)
     133[  3]  9.0-10.0 sec   128 KBytes  1.05 Mbits/sec   0.029 ms    0/   89 (0%)
     134[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec   0.028 ms    0/  893 (0%)
     135}}}
     136
     137   Client Side:
     138{{{
     139xuanliu@client:~$ iperf -c 192.168.20.10 -t 10 -i 1 -u
     140------------------------------------------------------------
     141Client connecting to 192.168.20.10, UDP port 5001
     142Sending 1470 byte datagrams
     143UDP buffer size:  224 KByte (default)
     144------------------------------------------------------------
     145[  3] local 192.168.10.11 port 33345 connected with 192.168.20.10 port 5001
     146[ ID] Interval       Transfer     Bandwidth
     147[  3]  0.0- 1.0 sec   129 KBytes  1.06 Mbits/sec
     148[  3]  1.0- 2.0 sec   128 KBytes  1.05 Mbits/sec
     149[  3]  2.0- 3.0 sec   128 KBytes  1.05 Mbits/sec
     150[  3]  3.0- 4.0 sec   128 KBytes  1.05 Mbits/sec
     151[  3]  4.0- 5.0 sec   128 KBytes  1.05 Mbits/sec
     152[  3]  5.0- 6.0 sec   128 KBytes  1.05 Mbits/sec
     153[  3]  6.0- 7.0 sec   129 KBytes  1.06 Mbits/sec
     154[  3]  7.0- 8.0 sec   128 KBytes  1.05 Mbits/sec
     155[  3]  8.0- 9.0 sec   128 KBytes  1.05 Mbits/sec
     156[  3]  9.0-10.0 sec   128 KBytes  1.05 Mbits/sec
     157[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec
     158[  3] Sent 893 datagrams
     159[  3] Server Report:
     160[  3]  0.0-10.0 sec  1.25 MBytes  1.05 Mbits/sec   0.028 ms    0/  893 (0%)
     161}}}
     162
     163
     164The `ping` and `iperf` results showed that the communication between the `client` and the `server` were good. Since the `client` and the server are not directly connected, they can communicate with each other means that the `OSPF` routing worked properly.
     165
     166The `traceroute` showed the hops from the `client` to the `server`, where the intermediate hops are `router-1`, `router-2` and `router-3`. This information also verified the routing path between the `client` and the `server`.
     167
     168= 6. Tracking Routing Table Updates =
     169
     170From the `traceroute` result above, we know that from `client` to `server`, the path is `client` --> `router-1` --> `router-2` --> `router-3` --> `server`
     171
     172Now let's try some failure events and see how many updates occurs at a particular router, and we select `router-1` to view the updates, and trigger the failures at `router-2`.
     173
     174 * Login to `router-1` and start the script (i.e., `xorp_run.sh`) that periodically tracking the routing table updates. If there is no change, you will see ''No Change'' from the terminal. Here we run the script for 60 seconds. The script captures the routing table every 1 second.
     175 
     176{{{
     177xuanliu@router-1:/local/xorp_run$ /bin/bash xorp_log.sh 60 1
     178/local/xorp_run/logs/rt-change.csv
     17907-01-2014-18-28-28
     180Create the folder for routing table logs
     181/local/xorp_run/logs/xorp-rtable_07-01-2014-18-28-28.txt
     18207-01-2014-18-28-28 1404239308
     183
     184No Change
     185
     186No Change
     187
     188No Change
     189
     190......
     191}}}
     192
     193 * Bring down the interface at router-2
     194
     195 We can make the link between `router-1` and `router-2` fail by bringing down the corresponding interface on `router-2`. While running `xorp_log.sh` at `router-2`, we disable the virtual interface (`eth2`) that is associated with the virtual link (`192.168.1.0/24`) to `router-2`. We can see one routing table update occurred at `router-1`:
     196
     197{{{
     198......
     199
     200No Change
     201
     202No Change
     203Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
     204routing table changed!
     205
     206No Change
     207
     208....
     209}}}
     210   
     211 When we bring up `eth2` at `router-2` again, we notice another routing table update at `router-1` immediately.
     212
     213  * Make `router-2` fails.
     214   
     215 As we mentioned before, to emulate a node failure, we can kill the `XORP` processes to disable the routing functionality at a router.  We can use the command
     216
     217{{{
     218ps -ef | grep xorp_ | /usr/bin/awk '{ if ( $1 == "root" ) {print "sudo kill -9 " $2}}' | sh
     219}}}
     220
     221 Now start `xorp_log.sh` again at `router-1`, and kill the `XORP` processes at `router-2`, the output from `router-1` is
     222
     223{{{
     224......
     225
     226No Change
     227Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
     228routing table changed!
     229
     230No Change
     231
     232No Change
     233......
     234
     235}}}
     236
     237 At this time, we can run `traceroute` from `client` to `server` again, and we see that the path is changed: `client` --> router-1 --> router-4 --> router-3 --> `server`.
     238
     239{{{
     240xuanliu@client:~$ traceroute 192.168.20.10
     241traceroute to 192.168.20.10 (192.168.20.10), 30 hops max, 60 byte packets
     242 1  router-1-lan4 (192.168.10.10)  0.668 ms  0.617 ms  0.584 ms
     243 2  router-4-lan3 (192.168.4.1)  1.279 ms  1.252 ms  1.220 ms
     244 3  router-3-lan2 (192.168.3.2)  1.753 ms  1.733 ms  1.700 ms
     245 4  server-lan5 (192.168.20.10)  2.680 ms  2.656 ms  2.624 ms
     246}}}
     247
     248 Rerun `xorp_log.sh` again at `router-1`, and start `XORP` on `router-2` again to enable `OSPF` routing at `router-2`. We see the `OSPF` routing table updates at `router-1` this time! This is because when the `XORP` processes were started again, it sent `OSPF` `hello` messages to other routers to notify that `router-2` was up, and the `OSPF` routing table was updated at each router afterwards.
     249
     250{{{
     251......
     252No Change
     253
     254No Change
     255Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
     256routing table changed!
     257
     258No Change
     259Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
     260routing table changed!
     261Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
     262routing table changed!
     263
     264No Change
     265Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
     266routing table changed!
     267
     268No Change
     269
     270No Change
     271......
     272
     273}}}
     274
     275  * CSV File at router-1
     276
     277  For research purposes, we would like to mark down the timestamp for every second when we capture the routing table. `xorp_log.sh` actually generates a `csv` log file that stores the timestamp (in UTC) and routing table update information. To simplify the log format, we use '''1''' to represent '''There is an Update!  ''', and '''0''' for '''No Update! '''.  A sample `csv` file can be like:
     278
     279{{{
     280router-1,1404240360,0
     281router-1,1404240362,1
     282router-1,1404240363,0
     283router-1,1404240365,1
     284router-1,1404240366,1
     285router-1,1404240368,0
     286router-1,1404240369,1
     287router-1,1404240371,0
     288}}}
     289
     290 In this way, we can plot figures for routing table updates over time.
     291
     292
     293
     294[http://groups.geni.net/syseng/wiki/XuanSandbox/SmallTopo/DesignSetup Small Topology: Design/Setup]
     295
     296[http://groups.geni.net/syseng/wiki/XuanSandbox/SmallTopo/Finish Small Topology: Finish]