487 | | == A More Complex Desktop Topology == |
488 | | |
489 | | To connect a more complex ExoGENI topology, we look at routing from a two-node ExoGENI world into the same DETER topology. The ExoGENI topology looks like this: |
490 | | |
491 | | [[Image(ExoGENI.png)]] |
492 | | |
493 | | Node0 is running the fedd and will be accessible as before at hostname "b". In addition we will make Node1 accessible throughout the DETER topology by its IP address. |
494 | | |
495 | | When we create the ExoGENI topology we use the AutoIP feature of [https://geni-orca.renci.org/trac/wiki/flukes Flukes] to assign addresses. By default Flukes puts the addresses on the 172.16.0.0/30 subnet. We move those addresses to the 10.16.0.0/24 subnet by editing the nodes' properties. DETER uses the 10.0.0.0/8 network block for experiment interfaces. It uses the 172.16.0.0/30 net for addressing [http://containers.deterlab.net containers] management interfaces. |
496 | | |
497 | | When the slice is ready, log in to Node0 and run the {{{init_fedd}}} utility as before. In addition, add the following lines to {{{/usr/local/etc/fedd/desktop.config}}}: |
| 498 | == A More Complex Desktop Layout == |
| 499 | |
| 500 | To connect a more complex topology, we route TCP connections from the DETER experiment through the desktop VM to the local network. This example uses the ISI subnet, 128.9.0.0/16. |
| 501 | |
| 502 | |
| 503 | The desktop is running the VM running fedd and that VM will be accessible as before at hostname "b". In addition we will make the rest of the subnet accessible throughout the DETER topology by its IP addresses. |
| 504 | |
| 505 | |
| 506 | Log in to the VM and run the {{{init_fedd}}} utility as before. In addition, add the following lines to {{{/usr/local/etc/fedd/desktop.config}}}: |
506 | | export_networks: 10.16.0.0/24 |
507 | | }}} |
508 | | |
509 | | With those settings, {{{fedd.py}}} will export any routes discovered on {{{eth1}}} and network 10.16.0.0/24 to the ospfd running in DETER. |
510 | | |
511 | | The simplest way to export a complex ExoGENI topology is to just run ospfd inside the ExoGENI topology. With these settings, the combined experiment will be able to route throughout the experiment as soon as routing converges. For this simple topology to work, we log in to Noed1 in exoGENI and add a route to all the DETER nodes through Node0: |
512 | | |
513 | | {{{ |
514 | | # ip route add 10.0.0.0/16 via 10.16.0.1 |
515 | | }}} |
516 | | |
517 | | Start up fedd.py on Node0 as before and run the same {{{fedd_create.py}}} command on DETER. |
518 | | |
519 | | In addition to being able to contact Node0 directly, nodes in the DETER experiment now see a route to the 10.16.0.0/24 network: |
| 515 | export_networks: 128.9.0.0/16 |
| 516 | }}} |
| 517 | |
| 518 | With those settings, {{{fedd.py}}} will export any routes discovered on {{{eth0}}} and network 128.9.0.0/16 to the ospfd running in DETER. Routes to other places will not be exported, nor would routes on other interfaces. (The VM has only the eth0 interface, so the second part is sort of moot.) |
| 519 | |
| 520 | Now we need to construct a route to the network we want to export. This route will be given to the [http://www.nongnu.org/quagga/docs/docs-info.html quagga routing system] and distributed throughout the experiment. To construct it, we must know the default router for the VM. To discover it, use the command: |
| 521 | |
| 522 | {{{ |
| 523 | $ ip route |
| 524 | default via 192.168.233.2 dev eth0 proto static |
| 525 | [ ... ] |
| 526 | }}} |
| 527 | |
| 528 | That will produce many lines of output, but the important one is the default route line. If you have constructed a more complex routing layout, you will need to choose the appropriate router, but that is beyond the scope of this example. |
| 529 | |
| 530 | Edit {{{/usr/local/etc/fedd/external_networks}}} and put the following line in: |
| 531 | |
| 532 | {{{ |
| 533 | ip route 128.9.0.0/16 192.168.233.2 |
| 534 | }}} |
| 535 | |
| 536 | This is a route command to the [http://www.nongnu.org/quagga/docs/docs-info.html#Zebra quagga routing system] explaining that the route to the network we want to export into the federated experiment (128.9.0.0./16) can be reached via the default router of the VM (192.168.233.2). When the federation system builds an experiment, it issues those commands directly. |
| 537 | |
| 538 | Start up fedd.py on the desktop VM as before and run the same {{{fedd_create.py}}} command on DETER. |
| 539 | |
| 540 | In addition to being able to contact the desktop VM directly, nodes in the DETER experiment now see a route to the 128.9.0.0/16 network: |
529 | | 10.16.0.0/24 via 10.0.3.2 dev eth0 proto zebra metric 20 |
530 | | 192.168.0.0/22 dev eth4 proto kernel scope link src 192.168.1.188 |
531 | | 192.168.252.0/22 via 192.168.1.254 dev eth4 proto zebra |
532 | | }}} |
533 | | |
534 | | That route reaches Node1: |
535 | | |
536 | | {{{ |
537 | | a:~$ ping 10.16.0.2 |
538 | | PING 10.16.0.2 (10.16.0.2) 56(84) bytes of data. |
539 | | 64 bytes from 10.16.0.2: icmp_req=1 ttl=63 time=139 ms |
540 | | 64 bytes from 10.16.0.2: icmp_req=2 ttl=63 time=69.9 ms |
541 | | 64 bytes from 10.16.0.2: icmp_req=3 ttl=63 time=69.4 ms |
542 | | }}} |
543 | | |
544 | | While some attention needs to be paid to routing if routing protocols are not run in ExoGENI, this facility allows a wide range of connectivity between the testbeds. |
| 550 | 128.9.0.0/16 via 10.0.3.2 dev eth4 proto zebra metric 20 |
| 551 | 192.168.0.0/22 dev eth0 proto kernel scope link src 192.168.0.81 |
| 552 | 192.168.252.0/22 via 192.168.1.254 dev eth0 proto zebra |
| 553 | }}} |
| 554 | |
| 555 | We can collect the ISI home page from the 128.9.0.0/16 network: |
| 556 | |
| 557 | {{{ |
| 558 | a:~$ wget www.isi.edu |
| 559 | --2014-06-10 10:42:34-- http://www.isi.edu/ |
| 560 | Resolving www.isi.edu (www.isi.edu)... 128.9.176.20 |
| 561 | Connecting to www.isi.edu (www.isi.edu)|128.9.176.20|:80... connected. |
| 562 | HTTP request sent, awaiting response... 302 Found |
| 563 | Location: http://www.isi.edu/home [following] |
| 564 | --2014-06-10 10:42:34-- http://www.isi.edu/home |
| 565 | Reusing existing connection to www.isi.edu:80. |
| 566 | HTTP request sent, awaiting response... 200 OK |
| 567 | Cookie coming from www.isi.edu attempted to set domain to www.isi.edu |
| 568 | Length: unspecified [text/html] |
| 569 | Saving to: `index.html' |
| 570 | |
| 571 | [ <=> ] 12,294 --.-K/s in 0.1s |
| 572 | |
| 573 | 2014-06-10 10:42:34 (80.7 KB/s) - `index.html' saved [12294] |
| 574 | }}} |
| 575 | |
| 576 | This also works from nodes deeper in the layout, e.g, node "f": |
| 577 | |
| 578 | {{{ |
| 579 | f:~$ ip route |
| 580 | default via 192.168.1.254 dev eth0 |
| 581 | 10.0.0.0/24 via 10.0.2.2 dev eth4 proto zebra metric 30 |
| 582 | 10.0.1.0/24 via 10.0.2.2 dev eth4 proto zebra metric 20 |
| 583 | 10.0.2.0/24 dev eth4 proto kernel scope link src 10.0.2.1 |
| 584 | 10.0.3.0/24 via 10.0.2.2 dev eth4 proto zebra metric 30 |
| 585 | 10.0.4.0/24 via 10.0.2.2 dev eth4 proto zebra metric 20 |
| 586 | 128.9.0.0/16 via 10.0.2.2 dev eth4 proto zebra metric 20 |
| 587 | 192.168.0.0/22 dev eth0 proto kernel scope link src 192.168.0.87 |
| 588 | 192.168.252.0/22 via 192.168.1.254 dev eth0 proto zebra |
| 589 | f:~$ wget www.isi.edu |
| 590 | --2014-06-10 10:44:07-- http://www.isi.edu/ |
| 591 | Resolving www.isi.edu (www.isi.edu)... 128.9.176.20 |
| 592 | Connecting to www.isi.edu (www.isi.edu)|128.9.176.20|:80... connected. |
| 593 | HTTP request sent, awaiting response... 302 Found |
| 594 | Location: http://www.isi.edu/home [following] |
| 595 | --2014-06-10 10:44:07-- http://www.isi.edu/home |
| 596 | Reusing existing connection to www.isi.edu:80. |
| 597 | HTTP request sent, awaiting response... 200 OK |
| 598 | Cookie coming from www.isi.edu attempted to set domain to www.isi.edu |
| 599 | Length: unspecified [text/html] |
| 600 | Saving to: `index.html' |
| 601 | |
| 602 | [ <=> ] 12,344 --.-K/s in 0.09s |
| 603 | |
| 604 | 2014-06-10 10:44:07 (128 KB/s) - `index.html' saved [12344] |
| 605 | }}} |
| 606 | |
| 607 | This configuration allows all th enodes in the federated experiment to make outgoing TCP connections into 128.9.0.0/16. There are actually 2 NATs manipulating packets: |
| 608 | |