Changes between Version 3 and Version 4 of GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopoQuagga/Execute


Ignore:
Timestamp:
06/27/16 18:39:26 (8 years ago)
Author:
pjayanth@bbn.com
Comment:

--

Legend:

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

    v3 v4  
    178178From the `traceroute` result above, we know that from `client` to `server`, the path is `client` --> `router-1` --> `router-2` --> `router-3` --> `server`
    179179
    180 Now 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`.
    181 
    182  * Login to `router-1` and start the script (i.e., `xorp_log.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.
    183  
    184 {{{
    185 xuanliu@router-1:~$ cd /local/xorp_run
    186 xuanliu@router-1:/local/xorp_run$ /bin/bash xorp_log.sh 60 1
    187 /local/xorp_run/logs/rt-change.csv
    188 07-01-2014-18-28-28
    189 Create the folder for routing table logs
    190 /local/xorp_run/logs/xorp-rtable_07-01-2014-18-28-28.txt
    191 07-01-2014-18-28-28 1404239308
    192 
    193 No Change
    194 
    195 No Change
    196 
    197 No Change
    198 
    199 ......
    200 }}}
     180Now let's try some failure events and see how many updates occurs at a particular router, and we select `Client` to view the updates, and trigger the failures at `router-2`.
     181
    201182
    202183 * Bring down the interface at router-2
    203184
    204  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-1`, we disable the virtual interface at `router-2`, which is associated with the virtual link (`192.168.1.0/24`) to `router-1`. 
    205  Use `/sbin/ifconfig` to find the name of that interface.
    206 
    207 {{{
    208 xuanliu@router-2:~$ /sbin/ifconfig
    209 eth0      Link encap:Ethernet  HWaddr 02:6c:4e:0a:be:dc 
    210           inet addr:172.17.1.19  Bcast:172.31.255.255  Mask:255.240.0.0
    211           inet6 addr: fe80::6c:4eff:fe0a:bedc/64 Scope:Link
    212           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    213           RX packets:1298 errors:0 dropped:0 overruns:0 frame:0
    214           TX packets:1309 errors:0 dropped:0 overruns:0 carrier:0
    215           collisions:0 txqueuelen:1000
    216           RX bytes:153645 (153.6 KB)  TX bytes:116549 (116.5 KB)
    217           Interrupt:25
    218 
    219 <snip>
    220 
    221 eth2      Link encap:Ethernet  HWaddr 02:4a:cc:17:60:44 
    222           inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
    223           inet6 addr: fe80::4a:ccff:fe17:6044/64 Scope:Link
    224           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
    225           RX packets:3401 errors:0 dropped:0 overruns:0 frame:0
    226           TX packets:2551 errors:0 dropped:0 overruns:0 carrier:0
    227           collisions:0 txqueuelen:1000
    228           RX bytes:127175180 (127.1 MB)  TX bytes:177712 (177.7 KB)
    229           Interrupt:26
    230 
    231 <snip>
    232 
    233 lo        Link encap:Local Loopback 
    234           inet addr:127.0.0.1  Mask:255.0.0.0
    235           inet6 addr: ::1/128 Scope:Host
    236           UP LOOPBACK RUNNING  MTU:16436  Metric:1
    237           RX packets:8368 errors:0 dropped:0 overruns:0 frame:0
    238           TX packets:8368 errors:0 dropped:0 overruns:0 carrier:0
    239           collisions:0 txqueuelen:0
    240           RX bytes:895016 (895.0 KB)  TX bytes:895016 (895.0 KB)
    241 }}}
    242 
    243  For example, in the above the appropriate interface is `eth2`.  So the command to bring down the interface to `router-1` is:
    244 {{{
    245 xuanliu@router-2:$ sudo ifconfig eth2 down
    246 }}}
    247 
    248  We can see one routing table update occurred at `router-1`:
    249 
    250 {{{
    251 ......
    252 
    253 No Change
    254 
    255 No Change
    256 Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
    257 routing table changed!
    258 
    259 No Change
    260 
    261 ....
    262 }}}
    263    
     185 We can make the link between `router-1` and `router-2` fail by bringing down the corresponding interface on `router-2`. We disable the virtual interface at `router-2`, which is associated with the virtual link (`192.168.1.0/24`) to `router-1`. 
     186 Use `show ip ospf interface` to find the name of that interface.
     187
     188{{{
     189router-2.quagga.ch-geni-net.instageni.rnoc.gatech.edu(config-router)# do show ip ospf  interface 
     190eth0 is up
     191  ifindex 2, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
     192  OSPF not enabled on this interface
     193eth1 is up
     194  ifindex 3, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
     195  Internet Address 192.168.1.2/24, Broadcast 192.168.1.255, Area 0.0.0.0
     196  MTU mismatch detection:enabled
     197  Router ID 192.168.5.1, Network Type BROADCAST, Cost: 10
     198  Transmit Delay is 1 sec, State Backup, Priority 1
     199  Designated Router (ID) 192.168.10.10, Interface Address 192.168.1.1
     200  Backup Designated Router (ID) 192.168.5.1, Interface Address 192.168.1.2
     201  Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
     202  Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
     203    Hello due in 5.658s
     204  Neighbor Count is 1, Adjacent neighbor count is 1
     205eth2 is up
     206  ifindex 4, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
     207  Internet Address 192.168.2.1/24, Broadcast 192.168.2.255, Area 0.0.0.0
     208  MTU mismatch detection:enabled
     209  Router ID 192.168.5.1, Network Type BROADCAST, Cost: 10
     210  Transmit Delay is 1 sec, State DR, Priority 1
     211  Designated Router (ID) 192.168.5.1, Interface Address 192.168.2.1
     212  Backup Designated Router (ID) 192.168.20.11, Interface Address 192.168.2.2
     213  Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
     214  Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
     215    Hello due in 0.410s
     216  Neighbor Count is 1, Adjacent neighbor count is 1
     217eth3 is up
     218  ifindex 5, MTU 1500 bytes, BW 0 Kbit <UP,BROADCAST,RUNNING,MULTICAST>
     219  Internet Address 192.168.5.1/24, Broadcast 192.168.5.255, Area 0.0.0.0
     220  MTU mismatch detection:enabled
     221  Router ID 192.168.5.1, Network Type BROADCAST, Cost: 10
     222  Transmit Delay is 1 sec, State DR, Priority 1
     223  Designated Router (ID) 192.168.5.1, Interface Address 192.168.5.1
     224  Backup Designated Router (ID) 192.168.5.2, Interface Address 192.168.5.2
     225  Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters
     226  Timer intervals configured, Hello 10s, Dead 40s, Wait 40s, Retransmit 5
     227    Hello due in 4.842s
     228  Neighbor Count is 1, Adjacent neighbor count is 1
     229lo is up
     230  ifindex 1, MTU 65536 bytes, BW 0 Kbit <UP,LOOPBACK,RUNNING>
     231  OSPF not enabled on this interface
     232router-2.quagga.ch-geni-net.instageni.rnoc.gatech.edu(config-router)#
     233
     234}}}
     235
     236 For example, in the above the appropriate interface is `eth1`.  So the command to bring down the interface to `router-1` is:
     237{{{
     238router-2.quagga.ch-geni-net.instageni.rnoc.gatech.edu(config-router)# int eth1
     239router-2.quagga.ch-geni-net.instageni.rnoc.gatech.edu(config-if)# shutdown
     240
     241}}}
     242   
     243 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`.
     244
     245{{{
     246root@client:~# traceroute 192.168.20.10
     247traceroute to 192.168.20.10 (192.168.20.10), 30 hops max, 60 byte packets
     248 1  router-1-link-5 (192.168.10.10)  0.525 ms  0.492 ms  0.511 ms
     249 2  router-4-link-3 (192.168.4.1)  0.679 ms  0.669 ms  0.719 ms
     250 3  router-3-link-2 (192.168.3.1)  1.123 ms  1.124 ms  1.034 ms
     251 4  Server-link-6 (192.168.20.10)  1.298 ms  1.346 ms  1.380 ms
     252
     253}}}
     254
     255 
    264256 When we bring up `eth2` at `router-2` again, we notice another routing table update at `router-1` immediately.  The command to bring the interface back up is:
    265257{{{
    266 xuanliu@router-2:$ sudo ifconfig eth2 up
    267 }}}
    268 
    269   * Make `router-2` fail.
    270    
    271  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
    272 
    273 {{{
    274 ps -ef | grep xorp_ | /usr/bin/awk '{ if ( $1 == "root" ) {print "sudo kill -9 " $2}}' | sh
    275 }}}
    276 
    277  Now start `xorp_log.sh` again at `router-1`, and kill the `XORP` processes at `router-2`, the output from `router-1` is
    278 
    279 {{{
    280 ......
    281 
    282 No Change
    283 Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
    284 routing table changed!
    285 
    286 No Change
    287 
    288 No Change
    289 ......
    290 
    291 }}}
    292 
    293  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`.
    294 
    295 {{{
    296 xuanliu@client:~$ traceroute 192.168.20.10
    297 traceroute to 192.168.20.10 (192.168.20.10), 30 hops max, 60 byte packets
    298  1  router-1-lan4 (192.168.10.10)  0.668 ms  0.617 ms  0.584 ms
    299  2  router-4-lan3 (192.168.4.1)  1.279 ms  1.252 ms  1.220 ms
    300  3  router-3-lan2 (192.168.3.2)  1.753 ms  1.733 ms  1.700 ms
    301  4  server-lan5 (192.168.20.10)  2.680 ms  2.656 ms  2.624 ms
    302 }}}
    303 
    304  Rerun `xorp_log.sh` again at `router-1`, and restart `XORP` on `router-2`  to enable `OSPF` routing at `router-2`.
    305 
    306 
    307  Start `XORP` by specifying the routing protocol configuration file.
    308 {{{
    309 xuanliu@router-2:~$ cd /usr/local/xorp/sbin/
    310 xuanliu@router-2:/usr/local/xorp/sbin$ sudo ./xorp_rtrmgr -b /etc/xorp/ospfd.conf -l /tmp/xorp_rtrmgr_log -d
    311 }}}
    312 
    313  Verify the `XORP` process is running
    314 {{{
    315 xuanliu@router-2:/usr/local/xorp/sbin$ ps -ef | grep xorp
    316 root      1972     1  0 13:30 ?        00:00:02 xorp_fea
    317 root      1973     1  0 13:30 ?        00:00:00 xorp_rib
    318 root      1974     1  0 13:30 ?        00:00:00 xorp_policy
    319 root      1975     1  0 13:30 ?        00:00:01 xorp_ospfv2
    320 root      1976     1  0 13:30 ?        00:00:00 ./xorp_rtrmgr -b /etc/xorp/ospfd.conf -l /tmp/xorp_rtrmgr_log -d
    321 }}}
    322 
    323  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.
    324 
    325 {{{
    326 ......
    327 No Change
    328 
    329 No Change
    330 Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
    331 routing table changed!
    332 
    333 No Change
    334 Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
    335 routing table changed!
    336 Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
    337 routing table changed!
    338 
    339 No Change
    340 Files /local/xorp_run/logs/tmp.txt and /local/xorp_run/logs/last_table.txt differ
    341 routing table changed!
    342 
    343 No Change
    344 
    345 No Change
    346 ......
    347 
    348 }}}
    349 
    350   * CSV File at router-1
    351 
    352   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! '''.  These `csv` files live in `/local/xorp_run/logs/rt-change_*.csv`.  A sample `csv` file can be like:
    353 
    354 {{{
    355 router-1,1404240360,0
    356 router-1,1404240362,1
    357 router-1,1404240363,0
    358 router-1,1404240365,1
    359 router-1,1404240366,1
    360 router-1,1404240368,0
    361 router-1,1404240369,1
    362 router-1,1404240371,0
    363 }}}
    364 
    365  In this way, we can plot figures for routing table updates over time.
     258router-2.quagga.ch-geni-net.instageni.rnoc.gatech.edu(config)# int eth1
     259router-2.quagga.ch-geni-net.instageni.rnoc.gatech.edu(config-if)# no shutdown
     260
     261
     262
     263
     264
     265 In this way, we can see routing table updates over time.
    366266
    367267