Changes between Initial Version and Version 1 of Tutorials/Optical/Mininet Optical Tutorial1


Ignore:
Timestamp:
Jul 26, 2022, 9:30:14 PM (2 years ago)
Author:
lantz
Comment:

initial edits - WIP

Legend:

Unmodified
Added
Removed
Modified
  • Tutorials/Optical/Mininet Optical Tutorial1

    v1 v1  
     1[[Include(WikiToC)]]
     2
     3== Setting up a Virtual/Simulated Optical Network using the Mininet-Optical Software Emulator ==
     4This wiki page contains a tutorial for setting up an optical network using [https://mininet-optical.org Mininet-Optical].
     5
     6This is a Mininet-Optical version of the tutorial at [wiki:Tutorials/Optical/Tutorial1]. It is intended to show how an experiment designed for the COSMOS testbed may be  adapted for use in a software emulation environment, and how Mininet-Optical may be used to design experiments that will later be run on the COSMOS hardware testbed.
     7
     8Please refer to [wiki:Tutorials/Optical/Tutorial1] for comparison between the hardware and software testbed environments.
     9
     10Author: Bob Lantz
     11
     12Original Authors:
     13
     14Artur Minakhmetov, Telecom Paris : artur.minakhmetov[at]telecom-paris.fr\\
     15Craig Gutterman, Columbia University : clg2168[at]columbia.edu\\
     16Michael Sherman, Rutgers University : msherman[at]winlab.rutgers.edu\\
     17Jiakai Yu, University of Arizona : jiakaiyu[at]email.arizona.edu\\
     18Tingjun Chen, Columbia University: tc2668[at]columbia.edu\\
     19
     20Change Log
     21
     2226 July 2022: created new version for Mininet-Optical.
     23
     24----
     25= Description =
     26The COSMOS testbed enables creation and use of optical networks of various topologies. An example of how an optical network could be configured and used is provided. A simple experiment on switching of optical paths is described.
     27
     28----
     29
     30= Compute Nodes and ToR switch interfaces used =
     31
     32* Each compute node has 1 Ethernet interface:
     33{{{
     34server1-eth0
     35server2-eth0
     36server2-eth0
     37}}}
     38
     39* There are three ToR Ethernet interfaces:
     40{{{
     41tor1-eth111
     42tor2-eth112
     43tor3-eth113
     44}}}
     45
     46* and three WDM transceivers, with separate output and input ports:
     47
     48{{{
     49tor1-wdm320/321
     50tor2-wdm290/291
     51tor3-wdm310/311
     52}}}
     53
     54
     55----
     56
     57= Experiment_1 Context =
     58 || [[Image(Experiment_1.png, width=500px)]] ||
     59Fig.1 Logical Topology of Experiment_1
     60
     61The experiment consists of changing the light path from ToR1<-->ToR2 to ToR1<-->ToR3, representing changing of the light path in a C-RAN when “Client” wants to move its base-band processing from “Edge Cloud” to “Central Cloud”.
     62
     63Experiment includes 3 servers:
     64{{{
     65server1
     66server2
     67server3
     68}}}
     69
     70Experiment includes 4 ROADMs:
     71{{{
     72roadm1 (localhost:1831)
     73roadm2 (localhost:1832)
     74roadm3 (localhost:1833)
     75roadm4 (localhost:1844)
     76}}}
     77
     78
     793 ToR interfaces are connected to the 3 servers:
     80
     81{{{
     82tor1-eth111 <--> server1
     83tor2-eth112 <--> server2
     84tor3-eth113 <--> server3
     85}}}
     86
     87
     883 Ethernet interfaces and 3 WDM transceivers will be connected within the ToR switch:
     89
     90{{{
     91tor1-eth111 ; tor1-wdm320/321  (output/input)
     92tor2-eth112 ; tor2-wdm290/291  (output/input)
     93tor3-eth113 ; tor3-wdm310/311  (output/input)
     94}}}
     95
     96
     97We are assigning next wavelengths to the transceivers:
     98
     99{{{
     1001553,30 nm 193,00 with bandwidth ~[192.95;193.05] Thz
     101This corresponds to channel XX in Mininet-Optical's default channel grid.
     102}}}
     103
     104
     105----
     106= Setting Up the Optical Topology =
     107
     108In 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.
     109
     110It 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.
     111
     112The Mininet-Optical emulated network is created using a Python script, examples/cosmostutorial.py. Take a look at it now to see how the topology is implemented.
     113
     114The topology itself is created using Mininet's high-level topology template API. Specifically, we create a subclass of class Topo and override the build() method:
     115
     116
     117{{{#!python
     118class TutorialTopo( Topo ):
     119...
     120    def build( self ):
     121}}}
     122
     123
     124ROADMs and ToR switches are added using addSwitch() calls:
     125
     126{{{#!python
     127        # ROADMs
     128        NC = NetconfPortBase
     129        roadm4 = self.addSwitch('roadm4', cls=LROADM, netconfPort=NC+4)
     130        ...
     131        # ToR switches
     132        tor1 = self.addSwitch('tor1', cls=Terminal, transceivers=[('32', 0*dBm)])
     133        ...
     134}}}
     135
     136Servers are added using addHost calls:
     137
     138{{{#!python
     139class TutorialTopo( Topo ):
     140        # Servers
     141        server1 = self.addHost('server1')
     142        ...
     143}}}
     144
     145In Mininet, ports are created by specifying port numbers when we add links.
     146(This is due to the underlying link emulation which uses Linux virtual Ethernet (veth)
     147pairs.)
     148
     149Because of this, we need to specify the correct port numbers when we create the links.
     150
     151The base port numbers for a Lumentum ROADM20 are specified at the top of the file:
     152
     153{{{#!python
     154# Lumentum Roadm20 Port numbering
     155LINEIN, LINEOUT = 5101, 4201
     156ADD, DROP = 4100, 5200
     157}}}
     158
     159The server and ToR port numbers are as specified above.
     160
     161WDM fiber links are unidirectional and are added using wdmLink calls:
     162{{{#!python
     163        # Inter-ROADM links
     164        # We put 22km of fiber between roadm2 and roadm3
     165        # Default fiber length is 1m if not specified
     166        ...
     167        self.wdmLink(roadm2, roadm3, LINEOUT, LINEIN, spans=[22*km])
     168        self.wdmLink(roadm3, roadm2, LINEOUT, LINEIN, spans=[22*km])
     169        ...
     170        # ROADM add/drop 2 <-> ToR transceiver links
     171        self.wdmLink(tor1, roadm4, 320, ADD+2)
     172        self.wdmLink(roadm4, tor1, DROP+2, 321)
     173}}}
     174
     175We can see that LINEOUT of roadm2 is connected to LINEIN of roadm3 and vice-versa,
     176with a 22km length of fiber in between, corresponding to a fiber spool in
     177the COSMOS testbed. Later, add/drop port 2 of roadm4 is connected to ports
     178320/321 of tor1 (output/input, respectively).
     179
     180Ethernet links are added sing addLink() calls:
     181{{{#!python
     182        # Server<->ToR Ethernet links
     183        self.addLink(server1, tor1, port1=0, port2=1)
     184        self.addLink(server2, tor2, port1=0, port2=2)
     185        self.addLink(server3, tor3, port1=0, port2=3)
     186}}}
     187
     188----
     189
     190
     191WORK IN PROGRESS!!!
     192
     193...
     194
     195
     196
     197= ROADMs Configuration =
     198All 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.
     199
     200== Setting “Snake” Connection ==
     201Correct ROADM operation requires Line In port of a ROADM to always receive a light. That is why there is a dedicated transceiver (tengigabitethernet 1/33 on ToR) that sends light through all ROADMs by passing through loop-back connection on Calient S320 (port 5.5.1) and redirecting back, so the light is received on the same transceiver.
     202This kind of connection is called “Snake”.
     203
     204In order maintain this “Snake” for “Experiment_1” next connections form Table 1 must be in place: 1,3,5,6,8,9.
     205
     206=== tengigabitethernet 1/33/1 on ToR configuration ===
     207
     208Snake Interface (to passe through all ROADMs in loop): 60 (DWDM Channel C60) 1529,55 nm 196,00 Thz with frequency range [195.95,196.05] Thz
     209
     210=== MUX/DEMUX configuration ===
     211
     212* ROADM 4:
     213        DEMUX IN/OUT port: 5101/5204
     214        MUX IN/OUT port: 4104/4201
     215* ROADM 1:
     216        DEMUX IN/OUT port: 5101/5201
     217        MUX IN/OUT port: 4101/4201
     218* ROADM 2:
     219        DEMUX IN/OUT port: 5101/5201
     220        MUX IN/OUT port: 4101/4201
     221* ROADM 3:
     222        DEMUX IN/OUT port: 5101/5204
     223        MUX IN/OUT port: 4104/4201
     224
     225=== ALS Disable Sequence (for 60 seconds) ===
     226
     2271. ROADM 4 booster,
     2282. ROADM 2 booster,
     2293. ROADM 3 booster,
     2304. ROADM 1 booster,
     231
     232== Setting “Experiment_1” Connections ==
     233
     234=== Configuring ToR1<->ToR2 Connection 1 ===
     235
     236* ROADM 4:
     2371. Enable MUX port 4102 “From ToR 1”
     2382. Add Connection “Exp1-FromTor1” with Input/ Output Port 4102/4201 with bandwidth [192.95;193.05] (python add_connection.py 10.104.1.4 1 10 in-service false 4102 4201 192950 193050 5 Exp1-FromTor1)
     2393. Enable DEMUX port 5202 “Towards ToR 1”
     2404. Add Connection “Exp1-TorwardTor1” with I/O Port 5101/5202 (python add_connection.py 10.104.1.4 2 10 in-service false 5101 5202 192950 193050 5 Exp1-TorwardTor1)
     241* ROADM 1:
     2425. Enable MUX port 4102 “From ToR 2”
     2436. Add Connection “From ToR 2” with I/O Port 4102/4201 with bandwidth [192.95;193.05]
     2447. Enable DEMUX port 5202 “Towards ToR 2”
     2458. Add Connection “Towards ToR 2” with I/O Port 5101/5202
     246
     247=== Configuting ToR1<->ToR3 Connection 2 ===
     248
     249* ROADM 4 (Same As For Connection 1):
     2501. Enable MUX port 4102 “From ToR 1”
     2512. Add Connection “From ToR 1” with I/O Port 4102/4201 with bandwidth [192.95;193.05]
     2523. Enable DEMUX port 5202 “Towards ToR 1”
     2534. Add Connection “Towards ToR 1” with I/O Port 5101/5202 with bandwidth [192.95;193.05]
     254* ROADM 1 <Not Same!>:
     2555. Enable MUX port 4101 “Through Port” (enabled for Snake)
     2566. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05]
     2577. Enable DEMUX port 5201 “Through Port” (enabled for Snake)
     2588. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05]
     259* ROADM 2 (Same As For ROADM1):
     2609. Enable MUX port 4101 “Through Port” (enabled for Snake)
     26110. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05]
     26211. Enable DEMUX port 5201 “Through Port” (enabled for Snake)
     26312. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05]
     264* ROADM 3 (Same As For ROADM4):
     26513. Enable MUX port 4102 “From ToR 3”
     26614. Add Connection “From ToR 3” with I/O Port 4102/4201 with bandwidth [192.95;193.05]
     26715. Enable DEMUX port 5202 “Towards ToR 3”
     26816. Add Connection “Towards ToR 3” with I/O Port 5101/5202 with bandwidth [192.95;193.05]
     269
     270----
     271
     272= Network Interfaces Configuration for Experiment_1 =
     273== Setting Up ToR switch with 3 logical ToR switches ==
     2741. Preparing the interfaces to be set as VLAN switch ports:
     275
     276{{{
     277sw-tor-lg1#configure
     278sw-tor-lg1(conf)#interface twentyFiveGigE 1/1/1
     279sw-tor-lg1(conf-if-tf-1/1/1)#switchport
     280sw-tor-lg1(conf-if-tf-1/1/1)#no shutdown
     281sw-tor-lg1(conf-if-tf-1/1/1)#exit
     282sw-tor-lg1(conf)#interface twentyFiveGigE 1/1/2
     283sw-tor-lg1(conf-if-tf-1/1/2)#switchport
     284sw-tor-lg1(conf-if-tf-1/1/2)#no shutdown
     285sw-tor-lg1(conf-if-tf-1/1/2)#exit
     286sw-tor-lg1(conf)#interface twentyFiveGigE 1/1/3
     287sw-tor-lg1(conf-if-tf-1/1/3)#switchport
     288sw-tor-lg1(conf-if-tf-1/1/3)#no shutdown
     289sw-tor-lg1(conf-if-tf-1/1/3)#exit
     290sw-tor-lg1(conf)#interface tengigabitethernet 1/31/1
     291sw-tor-lg1(conf-if-te-1/31/1)#switchport
     292sw-tor-lg1(conf-if-te-1/31/1)#no shutdown
     293sw-tor-lg1(conf-if-te-1/31/1)#exit
     294sw-tor-lg1(conf)#interface tengigabitethernet 1/29/1
     295sw-tor-lg1(conf-if-te-1/29/1)#switchport
     296sw-tor-lg1(conf-if-te-1/29/1)#no shutdown
     297sw-tor-lg1(conf-if-te-1/29/1)#exit
     298sw-tor-lg1(conf)#interface tengigabitethernet 1/32/1
     299sw-tor-lg1(conf-if-te-1/32/1)#switchport
     300sw-tor-lg1(conf-if-te-1/32/1)#no shutdown
     301sw-tor-lg1(conf-if-te-1/32/1)#exit
     302}}}
     303
     3042. Assigning interfaces to VLANs
     305
     306{{{
     307sw-tor-lg1#configure
     308sw-tor-lg1(conf)#interface vlan 121
     309sw-tor-lg1(conf-if-vl-121)#untagged twentyFiveGigE 1/1/1
     310sw-tor-lg1(conf-if-vl-121)#untagged tengigabitethernet 1/32/1
     311sw-tor-lg1(conf-if-vl-121)#exit
     312sw-tor-lg1(conf)#interface vlan 122
     313sw-tor-lg1(conf-if-vl-122)#untagged twentyFiveGigE 1/1/2
     314sw-tor-lg1(conf-if-vl-122)#untagged tengigabitethernet 1/29/1
     315sw-tor-lg1(conf-if-vl-122)#exit
     316sw-tor-lg1(conf)#interface vlan 123
     317sw-tor-lg1(conf-if-vl-123)#untagged twentyFiveGigE 1/1/3
     318sw-tor-lg1(conf-if-vl-123)#untagged tengigabitethernet 1/31/1
     319sw-tor-lg1(conf-if-vl-123)#exit
     320sw-tor-lg1(conf)#exit
     321}}}
     322
     3233. Assigning a wavelength to transceivers:
     324
     325{{{
     326sw-tor-lg1#configure
     327sw-tor-lg1(conf)#interface tengigabitethernet 1/32/1
     328sw-tor-lg1(conf-if-te-1/32/1)#wavelength 1553.3
     329sw-tor-lg1(conf-if-te-1/32/1)#exit
     330sw-tor-lg1(conf)#interface tengigabitethernet 1/29/1
     331sw-tor-lg1(conf-if-te-1/29/1)#wavelength 1553.3
     332sw-tor-lg1(conf-if-te-1/29/1)#exit
     333sw-tor-lg1(conf)#interface tengigabitethernet 1/32/1
     334sw-tor-lg1(conf-if-te-1/32/1)#wavelength 1553.3
     335sw-tor-lg1(conf-if-te-1/32/1)#exit
     336sw-tor-lg1(conf)#exit
     337}}}
     338
     3394. Verify VLANs:
     340
     341{{{
     342sw-tor-lg1#show vlan
     343
     344Codes: * - Default VLAN, G - GVRP VLANs, R - Remote Port Mirroring VLANs, P - Primary, C - Community, I - Isolated
     345       O - Openflow, Vx - Vxlan
     346Q: U - Untagged, T - Tagged
     347   x - Dot1x untagged, X - Dot1x tagged
     348   o - OpenFlow untagged, O - OpenFlow tagged
     349   G - GVRP tagged, M - Vlan-stack
     350   i - Internal untagged, I - Internal tagged, v - VLT untagged, V - VLT tagged
     351
     352    NUM    Status    Description                     Q Ports
     353    121    Active                                    U Te 1/32/1
     354                                                     U Tf 1/1/1
     355    122    Active                                    U Te 1/29/1
     356                                                     U Tf 1/1/2
     357    123    Active                                    U Te 1/31/1
     358                                                     U Tf 1/1/3
     359
     360}}}
     361
     362== Configuring Compute Nodes (Servers srv1..3-lg1) ==
     363
     3641. Install net-tools:
     365
     366{{{#!shell-session
     367sudo apt install net-tools
     368}}}
     369
     3702. Configure interfaces eo1 and assign IP addresses:
     371
     372{{{#!shell-session
     373native@srv1-lg1:~$ sudo ifconfig eno1 192.168.1.1 netmask 255.255.255.0
     374native@srv2-lg1:~$ sudo ifconfig eno1 192.168.1.2 netmask 255.255.255.0
     375native@srv3-lg1:~$ sudo ifconfig eno1 192.168.1.3 netmask 255.255.255.0
     376}}}
     377
     378
     379----
     380= Perform Experiment_1 =
     381
     3821. Establish Connection ToR1<->ToR2.
     3832. Try Ping from Srv1 to Srv2:
     384
     385{{{#!shell-session
     386native@srv1-lg1:~$ ping 192.168.1.3
     387PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
     38864 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.460 ms
     38964 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=0.423 ms
     390}}}
     391
     3923. Establish Connection ToR1<->ToR2.
     3934. Try Ping from Srv1 to Srv3.