| 262 | That experiment file generates the following topology: |
| 263 | |
| 264 | [[Image(example_topology.png)]] |
| 265 | |
| 266 | Each of the boxes is a node and the circle is a shared network. Considering the values of the `set-node-testbed` calls, the experiment will be split up like this: |
| 267 | |
| 268 | [[Image(testbeds.png)]] |
| 269 | |
| 270 | The assignment of nodes to testbeds implicitly creates links (or networks) that must be connected across the wide area, and one of the key jobs of `fedd` is to create these connections. Fedd splits the experiment description into two descriptions (one for each testbed), adds extra nodes and startcmds to create the shared experiment, and swaps them in. The sub-experiments look something like these: |
| 271 | |
| 272 | {{{ |
| 273 | set ns [new Simulator] |
| 274 | source tb_compat.tcl |
| 275 | |
| 276 | set a [$ns node] |
| 277 | tb-set-hardware $a pc |
| 278 | tb-set-node-os $a FC6-STD |
| 279 | tb-set-node-tarfiles $a /usr /proj/emulab-ops//tarfiles/bwfed/fedkit.tgz |
| 280 | # tb-set-node-testbed $a "deter" |
| 281 | tb-set-node-startcmd $a "sudo -H /usr/local/federation/bin/make_hosts /proj/emulab-ops/exp/bwfed/tmp//hosts >& /tmp/federate \$USER" |
| 282 | tb-set-node-failure-action $a "fatal" |
| 283 | set b [$ns node] |
| 284 | tb-set-hardware $b pc |
| 285 | tb-set-node-os $b FC6-STD |
| 286 | tb-set-node-tarfiles $b /usr /proj/emulab-ops//tarfiles/bwfed/fedkit.tgz |
| 287 | # tb-set-node-testbed $b "deter" |
| 288 | tb-set-node-startcmd $b "sudo -H /usr/local/federation/bin/make_hosts /proj/emulab-ops/exp/bwfed/tmp//hosts >& /tmp/federate \$USER" |
| 289 | set control [$ns node] |
| 290 | tb-set-hardware $control pc |
| 291 | tb-set-node-os $control FC6-STD |
| 292 | tb-set-node-tarfiles $control /usr /proj/emulab-ops//tarfiles/bwfed/fedkit.tgz |
| 293 | # tb-set-node-testbed $control "deter" |
| 294 | tb-set-node-startcmd $control "sudo -H /usr/local/federation/bin/make_hosts /proj/emulab-ops/exp/bwfed/tmp//hosts >& /tmp/federate \$USER " |
| 295 | tb-set-node-failure-action $control "fatal" |
| 296 | # Link establishment and parameter setting |
| 297 | set link0 [$ns duplex-link $a $b 100000kb 0.0ms DropTail] |
| 298 | |
| 299 | tb-set-ip-link $a $link0 10.1.1.2 |
| 300 | tb-set-ip-link $b $link0 10.1.1.3 |
| 301 | # federation gateway |
| 302 | set ucbtunnel0 [$ns node ] |
| 303 | tb-set-hardware $ucbtunnel0 pc3000_tunnel |
| 304 | tb-set-node-os $ucbtunnel0 FBSD7-TVF |
| 305 | tb-set-node-startcmd $ucbtunnel0 "sudo -H /usr/local/federation/bin/fed-tun.pl -f /proj/emulab-ops/exp/bwfed/tmp/`hostname`.gw.conf >& /tmp/bridge.log" |
| 306 | tb-set-node-tarfiles $ucbtunnel0 /usr/ /proj/emulab-ops//tarfiles/bwfed/fedkit.tgz |
| 307 | # Link establishment and parameter setting |
| 308 | set link1 [$ns duplex-link $ucbtunnel0 $b 100000kb 0.0ms DropTail] |
| 309 | |
| 310 | tb-set-ip-link $ucbtunnel0 $link1 10.1.3.2 |
| 311 | tb-set-ip-link $b $link1 10.1.3.3 |
| 312 | |
| 313 | $ns rtproto Session |
| 314 | $ns run |
| 315 | }}} |
| 316 | |
| 317 | {{{ |
| 318 | set ns [new Simulator] |
| 319 | source tb_compat.tcl |
| 320 | |
| 321 | set c [$ns node] |
| 322 | tb-set-hardware $c pc |
| 323 | tb-set-node-os $c FC6-SMB |
| 324 | tb-set-node-tarfiles $c /usr /proj/Deter//tarfiles/bwfed/fedkit.tgz |
| 325 | # tb-set-node-testbed $c "ucb" |
| 326 | tb-set-node-startcmd $c "sudo -H /bin/sh /usr/local/federation/bin/federate.sh >& /tmp/startup \$USER " |
| 327 | tb-set-node-failure-action $c "fatal" |
| 328 | set d [$ns node] |
| 329 | tb-set-hardware $d pc |
| 330 | tb-set-node-os $d FC6-SMB |
| 331 | tb-set-node-tarfiles $d /usr /proj/Deter//tarfiles/bwfed/fedkit.tgz |
| 332 | # tb-set-node-testbed $d "ucb" |
| 333 | tb-set-node-startcmd $d "sudo -H /bin/sh /usr/local/federation/bin/federate.sh >& /tmp/startup \$USER " |
| 334 | tb-set-node-failure-action $d "fatal" |
| 335 | set e [$ns node] |
| 336 | tb-set-hardware $e pc |
| 337 | tb-set-node-os $e FC6-SMB |
| 338 | tb-set-node-tarfiles $e /usr /proj/Deter//tarfiles/bwfed/fedkit.tgz |
| 339 | # tb-set-node-testbed $e "ucb" |
| 340 | tb-set-node-startcmd $e "sudo -H /bin/sh /usr/local/federation/bin/federate.sh >& /tmp/startup \$USER" |
| 341 | tb-set-node-failure-action $e "fatal" |
| 342 | set f [$ns node] |
| 343 | tb-set-hardware $f pc |
| 344 | tb-set-node-os $f FC6-SMB |
| 345 | tb-set-node-tarfiles $f /usr /proj/Deter//tarfiles/bwfed/fedkit.tgz |
| 346 | # tb-set-node-testbed $f "ucb" |
| 347 | tb-set-node-startcmd $f "sudo -H /bin/sh /usr/local/federation/bin/federate.sh >& /tmp/startup \$USER" |
| 348 | tb-set-node-failure-action $f "fatal" |
| 349 | # Create LAN |
| 350 | set lan0 [$ns make-lan "$c $d $e " 100000kb 0.0ms ] |
| 351 | |
| 352 | # Set LAN/Node parameters |
| 353 | tb-set-ip-lan $c $lan0 10.1.2.2 |
| 354 | tb-set-lan-simplex-params $lan0 $c 0.0ms 100000kb 0 0.0ms 100000kb 0 |
| 355 | |
| 356 | |
| 357 | # Set LAN/Node parameters |
| 358 | tb-set-ip-lan $d $lan0 10.1.2.3 |
| 359 | tb-set-lan-simplex-params $lan0 $d 0.0ms 100000kb 0 0.0ms 100000kb 0 |
| 360 | |
| 361 | |
| 362 | # Set LAN/Node parameters |
| 363 | tb-set-ip-lan $e $lan0 10.1.2.4 |
| 364 | tb-set-lan-simplex-params $lan0 $e 0.0ms 100000kb 0 0.0ms 100000kb 0 |
| 365 | |
| 366 | |
| 367 | # federation gateway |
| 368 | set detertunnel0 [$ns node ] |
| 369 | tb-set-hardware $detertunnel0 pc3000_tunnel |
| 370 | tb-set-node-os $detertunnel0 FBSD7-TVF |
| 371 | tb-set-node-startcmd $detertunnel0 "sudo -H /usr/local/federation/bin/fed-tun.pl -f /proj/Deter/exp/bwfed/tmp/`hostname`.gw.conf >& /tmp/bridge.log" |
| 372 | tb-set-node-tarfiles $detertunnel0 /usr/ /proj/Deter//tarfiles/bwfed/fedkit.tgz |
| 373 | # Link establishment and parameter setting |
| 374 | set link1 [$ns duplex-link $c $detertunnel0 100000kb 0.0ms DropTail] |
| 375 | |
| 376 | tb-set-ip-link $c $link1 10.1.3.2 |
| 377 | tb-set-ip-link $detertunnel0 $link1 10.1.3.3 |
| 378 | |
| 379 | $ns rtproto Session |
| 380 | $ns run |
| 381 | }}} |
| 382 | |
| 383 | The resulting topology across two testbeds looks like this: |
| 384 | |
| 385 | [[Image(federated_testbeds.png)]] |
| 386 | |
| 387 | The red nodes are the connector nodes inserted by `fedd`. They both transfer experimental traffic verbatim and tunnel services, like a shared filesystem. Exactly what gets tunneled and how the connections are made is a function of the federation kit, the topic of the next section. |
| 388 | |
| 389 | = The Federation Kit = |
| 390 | |
| 391 | The federation kit is the software used by `fedd` to connect testbeds and tunnel services from the master to the other testbeds. Currently we have a single fedkit (available from the [FeddDownload download section]) that provides SSH tunnels to connect experimental testbeds at the ethernet layer, and that tunnels the emulab event system and provides shared file service via [http://en.wikipedia.org/wiki/Server_Message_Block SMB]. That fedkit runs on any FreeBSD or Linux image that provides the SMB file system. |
| 392 | |
| 393 | By splitting this function out, we intend to allow different installations of `fedd` to provide different interconnection and service tunneling function. Currently the [FeddDownload DETER fedkit] is the only federation kit in use, and `fedd` defaults its startcmd options for use with it. |
| 394 | |