Changes between Version 1 and Version 2 of Workshops/Sig Comm2022/Mininet Optical
- Timestamp:
- Aug 17, 2022, 3:29:25 PM (2 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Workshops/Sig Comm2022/Mininet Optical
v1 v2 1 1 [[Include(WikiToC)]] 2 2 3 == Setting up a Virtual / Simulated Optical Networkusing the Mininet-Optical Software Emulator ==3 == Setting up COSMOS' Optical Network topology using the Mininet-Optical Software Emulator == 4 4 5 5 This wiki page is intended for participants attending COSMOS workshop in SIGCOMM 2022. This contains a tutorial for setting up a virtual/simulated optical network using Mininet-Optical. [https://mininet-optical.org Mininet-Optical] was developed as part of the COSMOS and COSM-IC projects and … … 12 12 The Mininet-Optical version of this tutorial implements the same network topology and the same experiment as the hardware testbed tutorial, but there are differences between the software and hardware environments. 13 13 14 Please refer to [wiki:Workshops/SigComm2022/OpticalTutorial] for comparison with the hardware environment. 14 Authors: 15 16 Agastya Raj, Trinity College Dublin: ''rajag[at]tcd.ie[[BR]]'' 17 Julie Raulin, Tyndall National Institute: ''julie.raulin[at]tyndall.ie[[BR]]'' 18 Bob Lantz: University of Arizona: ''rlantz[at]cs.stanford.edu[[BR]]'' 19 20 This tutorial is based on hardware tutorial by T. Chen. et al. Please refer to [wiki:Workshops/SigComm2022/OpticalTutorial] for comparison with the hardware environment. 15 21 16 22 ---- … … 52 58 ---- 53 59 54 = Experiment_1Context =55 || [[Image(sigcomm2022tutorial_topology.png, width= 500px)]] ||56 Fig.1 Logical Topology of Experiment_160 = Network Context = 61 || [[Image(sigcomm2022tutorial_topology.png, width=1000px)]] || 62 Fig.1 Logical Topology of the hardware used 57 63 58 64 This experiment demonstrates optical switching between the short (1-hop) path, between {{{srv1-co1}}} and {{{srv1-lg1}}}, and the long (2-hop) path, between {{{srv1-co1}}} and {{{srv2-lg1}}}. It represents changing of the light path in C-RAN when a "Client" wants to dynamically change its base-band processing location between a nearby "Edge Cloud" and a further away "Central Cloud". … … 145 151 5. Run a sample script to check Mininet-Optical has been installed correctly. 146 152 {{{#!shell-session 147 root@node:~/mininet-optical# sudo PYTHONPATH=. python3 ./examples/simplelink.py 148 }}} 153 root@node:~/mininet-optical# sudo PYTHONPATH=. python3 ./examples/simpletest.py 154 }}} 155 Expected output: 156 {{{#!shell-session 157 root@node:~/mininet-optical# 158 }}} 159 If your output looks like above, mininet-optical is successfully installed and working on your 160 computer. Please exit the current Mininet-Optical script, by typing exit or pressing control-D at the `mininet-optical>` prompt: 161 162 If you are facing an error, please make sure you have followed the steps above, or consult one of our organizers for resolution. 149 163 150 164 The tutorial topology and a sample configuration script should be found in `~/mininet-optical/examples/sigcommtutorial.py` and `~/mininet-optical/examples/config-sigcommtutorial.sh`. 151 152 165 If you want to test out Mininet-Optical on your computer after the tutorial, we have provided necessary resources in the appendix. 153 166 … … 156 169 = Setting Up the Optical Topology = 157 170 158 In the COSMOS optical testbed, all devices are connected to a Calient S320 space switch. This switch serves as a programmable patch panel that allows any port to be connected to any other port, enabling realization of arbitrary topologies with fast re connection between experiments.171 In the COSMOS optical testbed, all devices are connected to a Calient S320 space switch. This switch serves as a programmable patch panel that allows any port to be connected to any other port, enabling realization of arbitrary topologies with fast re-connection between experiments. 159 172 160 173 It is possible to create a virtual space switch/programmable patch panel in Mininet-Optical to emulate the COSMOS optical testbed itself, but for this tutorial we will implement the topology using Mininet-Optical's topology API. … … 325 338 326 339 {{{#!shell-session 327 root@node:~/mininet-optical# sudo PYTHONPATH=. examples/ cosmostutorial.py340 root@node:~/mininet-optical# sudo PYTHONPATH=. examples/sigcommtutorial.py 328 341 }}} 329 342 … … 384 397 All of these configurations can be performed by Python scripts developed to work with the COSMOS test-bed. The Python commands send NETCONF commands to the ROADM. 385 398 386 === Setting “Snake” Connection ===387 388 (This is not currently part of the Mininet-Optical software emulated configuration.)389 390 399 === Running the configuration script === 391 400 … … 395 404 }}} 396 405 397 This executes the configuration file which establishes the ground connections first and turns on the transceivers. We walk through th e scipt below to deep dive into what's happening.406 This executes the configuration file which establishes the ground connections first and turns on the transceivers. We walk through this script below to deep dive into what's happening. 398 407 399 408 Mininet-Optical's `Terminal` is the equivalent of the ToR switch … … 465 474 }}} 466 475 467 As expected, none of the servers are able to ping each other because no lightpath connections havebeen established as of yet.476 As expected, none of the servers are able to ping each other because lightpath connections have not been established as of yet. 468 477 469 478 == Configuring ROADMs … … 477 486 As a reminder, here are the ROADM port numbers: 478 487 479 * ROADM 4:480 DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201481 MUX IN/OUT (LINEIN/DROP1)port: 4101/4201482 * ROADM 1:483 DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201484 MUX IN/OUT (LINEIN/DROP1) port: 4101/4201485 * ROADM 2:486 DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201487 MUX IN/OUT (LINEIN/DROP1) port: 4101/4201488 * ROADM 3:489 DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201490 MUX IN/OUT (LINEIN/DROP1) port: 4101/4201491 492 Note that the servers are connected to ADD2/DROP2 while DROP1/ADD1are used493 as passthrough ports between ROADM 1 and ROADM 2.488 * **rdm1-co1**: 489 MUX IN/OUT (ADD1/LINEOUT) port: 4101/4201[[BR]] 490 DEMUX IN/OUT (LINEIN/DROP1)port: 5101/5201 491 * **rdm1-lg1**: 492 MUX IN/OUT (ADD1/LINEOUT) port: 4101/4201[[BR]] 493 DEMUX IN/OUT (LINEIN/DROP1) port: 5101/5201 494 * **rdm2-lg1**: 495 MUX IN/OUT (ADD1/LINEOUT) port: 4101/4201[[BR]] 496 DEMUX IN/OUT (LINEIN/DROP1) port: 5101/5201 497 * **rdm2-co1**: 498 MUX IN/OUT (ADD1/LINEOUT) port: 4101/5201[[BR]] 499 DEMUX IN/OUT (LINEIN/DROP1) port: 5101/5201 500 501 Note that the servers are connected to ADD2/DROP2 `[4102/5202]` while ADD11/DROP11 `[4111/5211]` are used 502 as passthrough ports between rdm1-lg1 and rdm2-lg1. 494 503 495 504 ''Also note that these port numbers are the same as the hardware 496 505 tutorial page.'' 497 506 498 == Network Interfaces Configuration for Experiment _1 (short-hop) ==507 == Network Interfaces Configuration for Experiment-1 (short-hop) == 499 508 500 509 In Experiment 1, we are choosing to pass the optical signal through 1 hop (via a pair of 10km fiber spools). This requires us to establish a connection between rdm1-co1 and rdm1-lg1. 501 510 Once you perform the base test as described above, the script will prompt you to press `Return` key to perform the test for configuration 1. Before trying the configuration, let's dive into what connections this script will install: 502 511 503 ==== Configuring srv1-co1<=>srv1-lg1 Connection 1 on Mininet-Optical using NETCONF ==== 512 ==== Configuring srv1-co1<==>srv1-lg1 Connection 1 on Mininet-Optical using NETCONF ==== 513 514 515 The NETCONF servers for `rdm1-co1` and `rdm1-lg1` are listening on `localhost` at ports 1834 and 1831, respectively. 516 We will use the `examples/nc_add_connection.py` script to configure connections using NETCONF. 517 518 {{{#!bash 519 testdir=$(dirname $0) 520 addc=$testdir/nc_add_connection.py 521 rdm1_co1=localhost:1834 522 rdm1_lg1=localhost:1831 523 }}} 504 524 505 525 * **rdm1-co1**: 506 526 1. Enable MUX port 4102 “From sw-da-co1” 507 2. Add Connection “Exp1_From_sw-da-co1” with Input/ Output Port 4102/4201 with bandwidth [194.30;194.40] 527 2. Add Connection “Exp1_From_sw-da-co1” with Input/ Output Port 4102/4201 with bandwidth [194.30;194.40] THz 508 528 3. Enable DEMUX port 5202 “Toward sw-da-co1” 509 529 4. Add Connection “Exp1_Toward_sw-da-co1” with I/O Port 5101/5202 510 530 511 The NETCONF servers for `rdm-co1`[r4] and `rdm-lg1`[r1] are listening on `localhost` at ports 1834 and 1831, respectively. 512 We will use the `examples/nc_add_connection.py` script to configure connections using NETCONF. 513 514 {{{#!bash 515 testdir=$(dirname $0) 516 addc=$testdir/nc_add_connection.py 517 r4=localhost:1834 518 r1=localhost:1831 519 }}} 520 521 Note that MUX/ADD/LINEOUT is module 1 and DEMUX/DROP/LINEIN is module 2. We are calling all of our connections connection 10. The interfaces are `in-service` and `blocked` is `false`. The 5 is an attenuation setting which may currently be ignored in Mininet-Optical. 522 523 {{{#!bash 524 $addc $r4 1 10 in-service false 4102 4201 194300 194400 5 Exp1_From_sw-da-co1 525 $addc $r4 2 10 in-service false 5101 5202 194300 194400 5 Exp1-Toward_swda_co1 531 Note that MUX/ADD/LINEOUT is module 1 and DEMUX/DROP/LINEIN is module 2. We are calling all of our connections connection 10. The interfaces are `in-service` and `blocked` is `false`. The 5 is an attenuation setting which may currently be ignored in Mininet-Optical. 532 533 {{{#!bash 534 $addc $rdm1_co1 1 10 in-service false 4102 4201 194300 194400 5 Exp1_From_sw-da-co1 535 $addc $rdm1_co1 2 10 in-service false 5101 5202 194300 194400 5 Exp1-Toward_sw-da_co1 526 536 }}} 527 537 528 538 * **rdm1-lg1**: 529 539 5. Enable MUX port 4102 “From sw-da-lg1” 530 6. Add Connection “Exp1_From_sw-da-lg1” with I/O Port 4102/4201 with bandwidth [19 2.95;193.05]540 6. Add Connection “Exp1_From_sw-da-lg1” with I/O Port 4102/4201 with bandwidth [194.30;194.40] THz 531 541 7. Enable DEMUX port 5202 “Towards sw-da-lg1” 532 542 8. Add Connection “Exp1_Towards_sw-da-lg1” with I/O Port 5101/5202 533 543 534 544 {{{#!bash 535 $addc $r 1 1 10 in-service false 4102 4201 194300 194400 5 Exp1_From_sw-da-lg1536 $addc $r 1 2 10 in-service false 5101 5202 194300 194400 5 Exp1_Toward_sw-da-lg1545 $addc $rdm1_lg1 1 10 in-service false 4102 4201 194300 194400 5 Exp1_From_sw-da-lg1 546 $addc $rdm1_lg1 2 10 in-service false 5101 5202 194300 194400 5 Exp1_Toward_sw-da-lg1 537 547 }}} 538 548 … … 579 589 ''Note that the Mininet-Optical ROADM dataplane is currently modeled using OvS switching in the Linux kernel, so each hop will add some delay that would not be seen on hardware. Process scheduling, OS and VM overhead, etc. can create additional delays in a software emulator.'' 580 590 581 == Network Interfaces Configuration for Experiment _2 (long-hop)591 == Network Interfaces Configuration for Experiment-2 (long-hop) 582 592 583 593 In Experiment 2, we are choosing to pass the optical signal through 2 hops (via a pair of 10km fiber spools with the 32km Manhattan dark fiber). This requires us to establish a connection between srv1-co1 and srv2-lg1. Once you perform the experiment 1 as described above, the script will prompt you to press Return key to perform the test for configuration 2. Before trying the configuration, let's dive into what connections this script will install: 584 594 585 ==== [WIP] Configuring srv1-co1<=>srv2-lg1 Connection 2 on Mininet-Optical using NETCONF ==== 586 587 * rdm1-co1 (Same As For Experiment 1): 588 1. Enable MUX port 4102 “From ToR 1” 589 2. Add Connection “From ToR 1” with I/O Port 4102/4201 with bandwidth [192.95;193.05] 590 3. Enable DEMUX port 5202 “Towards ToR 1” 591 4. Add Connection “Towards ToR 1” with I/O Port 5101/5202 with bandwidth [192.95;193.05] 592 {{{ 593 examples/nc_add_connection.py localhost:1834 1 10 in-service false 4102 4201 192950 193050 5 Exp1-FromTor1 594 examples/nc_add_connection.py localhost:1834 2 10 in-service false 5101 5202 192950 193050 5 Exp1-TorwardTor1 595 }}} 596 597 * ROADM 1 <Not Same!>: 598 5. Enable MUX port 4101 “Through Port” (enabled for Snake) 599 6. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05] 600 7. Enable DEMUX port 5201 “Through Port” (enabled for Snake) 601 8. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05] 602 603 This time we pass channel 34 through ROADM 1: 604 {{{ 605 examples/nc_add_connection.py localhost:1831 1 10 in-service false 4101 4201 192950 193050 5 Exp1-EastR1 606 examples/nc_add_connection.py localhost:1831 2 10 in-service false 5101 5201 192950 193050 5 Exp1-WestR1 607 }}} 608 609 * ROADM 2 (Same As For ROADM1): 610 9. Enable MUX port 4101 “Through Port” (enabled for Snake) 611 10. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05] 612 11. Enable DEMUX port 5201 “Through Port” (enabled for Snake) 613 12. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05] 614 615 And pass through ROADM2: 616 {{{ 617 examples/nc_add_connection.py localhost:1832 1 10 in-service false 4101 4201 192950 193050 5 Exp1-WestR2 618 examples/nc_add_connection.py localhost:1832 2 10 in-service false 5101 5201 192950 193050 5 Exp1-EastR2 619 }}} 620 621 * ROADM 3 (Same As For ROADM4): 622 13. Enable MUX port 4102 “From ToR 3” 623 14. Add Connection “From ToR 3” with I/O Port 4102/4201 with bandwidth [192.95;193.05] 624 15. Enable DEMUX port 5202 “Towards ToR 3” 625 16. Add Connection “Towards ToR 3” with I/O Port 5101/5202 with bandwidth [192.95;193.05] 626 627 And we drop at ROADM3: 628 {{{ 629 examples/nc_add_connection.py localhost:1833 1 10 in-service false 4102 4201 192950 193050 5 Exp1-FromTor2 630 examples/nc_add_connection.py localhost:1833 2 10 in-service false 5101 5202 192950 193050 5 Exp1-TorwardTor2 631 }}} 632 633 Note: Observe the slightly longer RTT to `server3`, reflecting the increased propagation time across two 22km fibers to reach the "Central Cloud" data center. 634 635 ---- 595 ==== Configuring srv1-co1<==>srv2-lg1 connection on Mininet-Optical using NETCONF ==== 596 597 The NETCONF servers for `rdm1-co1` and `rdm1-lg1` are listening on `localhost` at ports 1834 and 1831 as Experiment 1. We are configuring `rdm2-lg1' and 'rdm2-co1` to listen at ports 1832 and 1833 respectively. 598 Like Experiment 1 we are using `examples/nc_add_connection.py` script to configure connections using NETCONF. 599 600 {{{#!bash 601 testdir=$(dirname $0) 602 addc=$testdir/nc_add_connection.py 603 rdm1_co1=localhost:1834 604 rdm1_lg1=localhost:1831 605 rdm2_lg1=localhost:1832 606 rdm2_co1=localhost:1833 607 }}} 608 609 * **rdm1-co1** ''(Same configuration as for Experiment 1)'': 610 1. Enable MUX port 4102 “From sw-da-co1” 611 2. Add Connection “Exp2_From_sw-da-co1” with I/O Port 4102/4201 with bandwidth [194.30;194.40] THz 612 3. Enable DEMUX port 5202 “Toward sw-da-co1” 613 4. Add Connection “Exp2_Toward_sw-da-co1” with I/O Port 5101/5202 with bandwidth [194.30;194.40] THz 614 615 {{{#!bash 616 $addc $rdm1_co1 1 10 in-service false 4102 4201 194300 194400 5 Exp2-From_sw-da-co1 617 $addc $rdm1_co1 2 10 in-service false 5101 5202 194300 194400 5 Exp2_Toward_sw-da-co1 618 }}} 619 ---- 620 * **rdm1-lg1** ''(Different configuration from Experiment 1)'': 621 5. Enable MUX port 4111 “Through Port” 622 6. Add East-bound Connection “Exp2_East_rdm1-lg1” with I/O Port 4111/4201 with bandwidth [194.30;194.40] THz 623 7. Enable DEMUX port 5211 “Through Port” 624 8. Add West-bound Connection “Exp2_West_rdm1-lg1” with I/O Port 5101/5211 with bandwidth [194.30;194.40] THz 625 626 This time we pass channel 61 through rdm1-lg1: 627 628 {{{#!bash 629 $addc $rdm1_lg1 1 10 in-service false 4111 4201 194300 194400 5 Exp2_East_rdm1-lg1 630 $addc $rdm1_lg1 2 10 in-service false 5101 5211 194300 194400 5 Exp2_West_rdm1-lg1 631 }}} 632 ---- 633 * **rdm2-lg1**: 634 9. Enable MUX port 4111 “Through Port” 635 10. Add East-bound Connection “Exp2_East_rdm2-lg1” with I/O Port 4111/4201 with bandwidth [194.30;194.40] THz 636 11. Enable DEMUX port 5211 “Through Port” 637 12. Add West-bound Connection “Exp2_West_rdm2-lg1” with I/O Port 5101/5211 with bandwidth [194.30;194.40] THz 638 639 And pass through rdm2-lg1: 640 641 {{{#!bash 642 $addc $rdm2_lg1 1 10 in-service false 4111 4201 194300 194400 5 Exp2_East_rdm2-lg1 643 $addc $rdm2_lg1 2 10 in-service false 5101 5211 194300 194400 5 Exp2_West_rdm2-lg1 644 }}} 645 ---- 646 * **rdm2-co1** ''(Same As For rdm1-co1)'': 647 13. Enable MUX port 4102 “From sw-da-lg1” 648 14. Add Connection “Exp2_From_sw-da-lg1” with I/O Port 4102/4201 with bandwidth [194.30;194.40] 649 15. Enable DEMUX port 5202 “Towards sw-da-lg1” 650 16. Add Connection “Exp2_Towards_sw-da-lg1” with I/O Port 5101/5202 with bandwidth [194.30;194.40] 651 652 And we drop at rdm2-co1: 653 654 {{{#!bash 655 $addc $rdm2_co1 1 10 in-service false 4102 4201 194300 194400 5 Exp1-Fromswda_lg1 656 $addc $rdm2_co1 2 10 in-service false 5101 5202 194300 194400 5 Exp1-Torwardswda_lg1 657 }}} 658 ---- 659 ==== Performing Experiment 2 and Results 660 661 Now you can try installing the above lightpaths for Experiment 2 by yourself. As prompted by the terminal, press `Return` to install the configuration and perform the test. This will establish the connections between ROADMs as described above, which you can also view with the lines printed. 662 663 {{{#!shell-session 664 ... 665 *** Test Experiment 2 666 press return to configure and perform Experiment 2> 667 ... 668 *** Installing ROADM configuration for srv1-co1<-->srv2-lg1 (NETCONF) 669 ... 670 *** srv1-co1 pinging srv1-lg1 671 PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data. 672 From 192.168.1.1 icmp_seq=1 Destination Host Unreachable 673 From 192.168.1.1 icmp_seq=2 Destination Host Unreachable 674 From 192.168.1.1 icmp_seq=3 Destination Host Unreachable 675 676 --- 192.168.1.2 ping statistics --- 677 3 packets transmitted, 0 received, 100% packet loss, time 2070ms 678 679 ... 680 681 *** srv1-co1 pinging srv2-lg1 682 PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. 683 64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=1.21 ms 684 64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=0.385 ms 685 64 bytes from 192.168.1.3: icmp_seq=3 ttl=64 time=0.430 ms 686 687 --- 192.168.1.3 ping statistics --- 688 3 packets transmitted, 3 received, 0% packet loss, time 2072ms 689 rtt min/avg/max/mdev = 0.385/0.675/1.211/0.379 ms 690 }}} 691 692 As expected, srv1-co1 and srv2-lg1 are able to ping each other because we established the ROADM rules for long-hop configuration. Consequently, as opposed to Experiment 1, srv1-co1 and srv1-lg1 are not able to ping each other because no such connection is established yet. 693 694 Note that the average ping time for srv1-co1 to srv2-lg1 is 0.675 ms, and the average ping time for srv1-co1 to srv1-lg1 in Experiment 1 was 0.339 ms. Observe the slightly longer RTT to `srv2-lg1`, reflecting the increased propagation time across two 32km fibers to reach the "Central Cloud" data center. 636 695 637 696 = Shutting down Mininet-Optical = 638 697 639 698 To exit Mininet-Optical, type `exit` or press control-D at the `mininet-optical>` prompt. 640 641 = Acknowledgments =642 643 This tutorial is based on the hardware tutorial at [wiki:Workshops/SigComm2022/OpticalTutorial] by T. Chen et al..644 645 <<<credits>>>646 699 647 700 = References =