Changes between Version 1 and Version 2 of Workshops/Sig Comm2022/Mininet Optical


Ignore:
Timestamp:
Aug 17, 2022, 3:29:25 PM (2 years ago)
Author:
rajag
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Workshops/Sig Comm2022/Mininet Optical

    v1 v2  
    11[[Include(WikiToC)]]
    22
    3 == Setting up a Virtual / Simulated Optical Network using the Mininet-Optical Software Emulator ==
     3== Setting up COSMOS' Optical Network topology using the Mininet-Optical Software Emulator ==
    44
    55This 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
     
    1212The 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.
    1313
    14 Please refer to [wiki:Workshops/SigComm2022/OpticalTutorial] for comparison with the hardware environment.
     14Authors:
     15
     16Agastya Raj, Trinity College Dublin: ''rajag[at]tcd.ie[[BR]]''
     17Julie Raulin, Tyndall National Institute: ''julie.raulin[at]tyndall.ie[[BR]]''
     18Bob Lantz: University of Arizona: ''rlantz[at]cs.stanford.edu[[BR]]''
     19
     20This tutorial is based on hardware tutorial by T. Chen. et al. Please refer to [wiki:Workshops/SigComm2022/OpticalTutorial] for comparison with the hardware environment.
    1521
    1622----
     
    5258----
    5359
    54 = Experiment_1 Context =
    55  || [[Image(sigcomm2022tutorial_topology.png, width=500px)]] ||
    56 Fig.1 Logical Topology of Experiment_1
     60= Network Context =
     61 || [[Image(sigcomm2022tutorial_topology.png, width=1000px)]] ||
     62Fig.1 Logical Topology of the hardware used
    5763
    5864This 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".
     
    1451515. Run a sample script to check Mininet-Optical has been installed correctly.
    146152{{{#!shell-session
    147 root@node:~/mininet-optical# sudo PYTHONPATH=. python3 ./examples/simplelink.py
    148 }}}
     153root@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
     162If you are facing an error, please make sure you have followed the steps above, or consult one of our organizers for resolution.
    149163
    150164The tutorial topology and a sample configuration script should be found in `~/mininet-optical/examples/sigcommtutorial.py` and `~/mininet-optical/examples/config-sigcommtutorial.sh`.
    151 
    152165If you want to test out Mininet-Optical on your computer after the tutorial, we have provided necessary resources in the appendix.
    153166
     
    156169= Setting Up the Optical Topology =
    157170
    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 reconnection between experiments.
     171In 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.
    159172
    160173It 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.
     
    325338
    326339{{{#!shell-session
    327 root@node:~/mininet-optical# sudo PYTHONPATH=. examples/cosmostutorial.py
     340root@node:~/mininet-optical# sudo PYTHONPATH=. examples/sigcommtutorial.py
    328341}}}
    329342
     
    384397All 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.
    385398
    386 === Setting “Snake” Connection ===
    387 
    388 (This is not currently part of the Mininet-Optical software emulated configuration.)
    389 
    390399=== Running the configuration script ===
    391400
     
    395404}}}
    396405
    397 This executes the configuration file which establishes the ground connections first and turns on the transceivers. We walk through the scipt below to deep dive into what's happening.
     406This 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.
    398407
    399408Mininet-Optical's `Terminal` is the equivalent of the ToR switch
     
    465474}}}
    466475
    467 As expected, none of the servers are able to ping each other because no lightpath connections have been established as of yet.
     476As expected, none of the servers are able to ping each other because lightpath connections have not been established as of yet.
    468477
    469478== Configuring ROADMs
     
    477486As a reminder, here are the ROADM port numbers:
    478487
    479 * ROADM 4:
    480         DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201
    481         MUX IN/OUT (LINEIN/DROP1)port: 4101/4201
    482 * ROADM 1:
    483         DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201
    484         MUX IN/OUT (LINEIN/DROP1) port: 4101/4201
    485 * ROADM 2:
    486         DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201
    487         MUX IN/OUT (LINEIN/DROP1) port: 4101/4201
    488 * ROADM 3:
    489         DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201
    490         MUX IN/OUT (LINEIN/DROP1) port: 4101/4201
    491 
    492 Note that the servers are connected to ADD2/DROP2 while DROP1/ADD1 are used
    493 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
     501Note that the servers are connected to ADD2/DROP2 `[4102/5202]` while ADD11/DROP11 `[4111/5211]` are used
     502as passthrough ports between rdm1-lg1 and rdm2-lg1.
    494503
    495504''Also note that these port numbers are the same as the hardware
    496505tutorial page.''
    497506
    498 == Network Interfaces Configuration for Experiment_1 (short-hop) ==
     507== Network Interfaces Configuration for Experiment-1 (short-hop) ==
    499508
    500509In 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.
    501510Once 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:
    502511
    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
     515The NETCONF servers for `rdm1-co1` and `rdm1-lg1` are listening on `localhost` at ports 1834 and 1831, respectively.
     516We will use the `examples/nc_add_connection.py` script to configure connections using NETCONF.
     517
     518{{{#!bash
     519testdir=$(dirname $0)
     520addc=$testdir/nc_add_connection.py
     521rdm1_co1=localhost:1834
     522rdm1_lg1=localhost:1831
     523}}}
    504524
    505525* **rdm1-co1**:
    5065261. 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]
     5272. Add Connection “Exp1_From_sw-da-co1” with Input/ Output Port 4102/4201 with bandwidth [194.30;194.40] THz
    5085283. Enable DEMUX port 5202 “Toward sw-da-co1”
    5095294. Add Connection “Exp1_Toward_sw-da-co1” with I/O Port 5101/5202
    510530
    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
    526536}}}
    527537
    528538* **rdm1-lg1**:
    5295395. 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 [192.95;193.05]
     5406. Add Connection “Exp1_From_sw-da-lg1” with I/O Port 4102/4201 with bandwidth [194.30;194.40] THz
    5315417. Enable DEMUX port 5202 “Towards sw-da-lg1”
    5325428. Add Connection “Exp1_Towards_sw-da-lg1” with I/O Port 5101/5202
    533543
    534544{{{#!bash
    535 $addc $r1 1 10 in-service false 4102 4201 194300 194400 5 Exp1_From_sw-da-lg1
    536 $addc $r1 2 10 in-service false 5101 5202 194300 194400 5 Exp1_Toward_sw-da-lg1
     545$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
    537547}}}
    538548
     
    579589''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.''
    580590
    581 == Network Interfaces Configuration for Experiment_2 (long-hop)
     591== Network Interfaces Configuration for Experiment-2 (long-hop)
    582592
    583593In 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:
    584594
    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
     597The 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.
     598Like Experiment 1 we are using `examples/nc_add_connection.py` script to configure connections using NETCONF.
     599
     600{{{#!bash
     601testdir=$(dirname $0)
     602addc=$testdir/nc_add_connection.py
     603rdm1_co1=localhost:1834
     604rdm1_lg1=localhost:1831
     605rdm2_lg1=localhost:1832
     606rdm2_co1=localhost:1833
     607}}}
     608
     609* **rdm1-co1** ''(Same configuration as for Experiment 1)'':
     6101. Enable MUX port 4102 “From sw-da-co1”
     6112. Add Connection “Exp2_From_sw-da-co1” with I/O Port 4102/4201 with bandwidth [194.30;194.40] THz
     6123. Enable DEMUX port 5202 “Toward sw-da-co1”
     6134. 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)'':
     6215. Enable MUX port 4111 “Through Port”
     6226. Add East-bound Connection “Exp2_East_rdm1-lg1” with I/O Port 4111/4201 with bandwidth [194.30;194.40] THz
     6237. Enable DEMUX port 5211 “Through Port”
     6248. 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**:
     6349. Enable MUX port 4111 “Through Port”
     63510. Add East-bound Connection “Exp2_East_rdm2-lg1” with I/O Port 4111/4201 with bandwidth [194.30;194.40] THz
     63611. Enable DEMUX port 5211 “Through Port”
     63712. 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)'':
     64713. Enable MUX port 4102 “From sw-da-lg1”
     64814. Add Connection “Exp2_From_sw-da-lg1” with I/O Port 4102/4201 with bandwidth [194.30;194.40]
     64915. Enable DEMUX port 5202 “Towards sw-da-lg1”
     65016. 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
     661Now 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
     666press 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
     671PING 192.168.1.2 (192.168.1.2) 56(84) bytes of data.
     672From 192.168.1.1 icmp_seq=1 Destination Host Unreachable
     673From 192.168.1.1 icmp_seq=2 Destination Host Unreachable
     674From 192.168.1.1 icmp_seq=3 Destination Host Unreachable
     675
     676--- 192.168.1.2 ping statistics ---
     6773 packets transmitted, 0 received, 100% packet loss, time 2070ms
     678
     679...
     680
     681*** srv1-co1 pinging srv2-lg1
     682PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
     68364 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=1.21 ms
     68464 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=0.385 ms
     68564 bytes from 192.168.1.3: icmp_seq=3 ttl=64 time=0.430 ms
     686
     687--- 192.168.1.3 ping statistics ---
     6883 packets transmitted, 3 received, 0% packet loss, time 2072ms
     689rtt min/avg/max/mdev = 0.385/0.675/1.211/0.379 ms
     690}}}
     691
     692As 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
     694Note 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.
    636695
    637696= Shutting down Mininet-Optical =
    638697
    639698To 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>>>
    646699
    647700= References =