| | 1 | [[Include(WikiToC)]] |
| | 2 | |
| | 3 | == Setting up a Virtual/Simulated Optical Network using the Mininet-Optical Software Emulator == |
| | 4 | This wiki page contains a tutorial for setting up an optical network using [https://mininet-optical.org Mininet-Optical]. |
| | 5 | |
| | 6 | This 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 | |
| | 8 | Please refer to [wiki:Tutorials/Optical/Tutorial1] for comparison between the hardware and software testbed environments. |
| | 9 | |
| | 10 | Author: Bob Lantz |
| | 11 | |
| | 12 | Original Authors: |
| | 13 | |
| | 14 | Artur Minakhmetov, Telecom Paris : artur.minakhmetov[at]telecom-paris.fr\\ |
| | 15 | Craig Gutterman, Columbia University : clg2168[at]columbia.edu\\ |
| | 16 | Michael Sherman, Rutgers University : msherman[at]winlab.rutgers.edu\\ |
| | 17 | Jiakai Yu, University of Arizona : jiakaiyu[at]email.arizona.edu\\ |
| | 18 | Tingjun Chen, Columbia University: tc2668[at]columbia.edu\\ |
| | 19 | |
| | 20 | Change Log |
| | 21 | |
| | 22 | 26 July 2022: created new version for Mininet-Optical. |
| | 23 | |
| | 24 | ---- |
| | 25 | = Description = |
| | 26 | The 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 | {{{ |
| | 34 | server1-eth0 |
| | 35 | server2-eth0 |
| | 36 | server2-eth0 |
| | 37 | }}} |
| | 38 | |
| | 39 | * There are three ToR Ethernet interfaces: |
| | 40 | {{{ |
| | 41 | tor1-eth111 |
| | 42 | tor2-eth112 |
| | 43 | tor3-eth113 |
| | 44 | }}} |
| | 45 | |
| | 46 | * and three WDM transceivers, with separate output and input ports: |
| | 47 | |
| | 48 | {{{ |
| | 49 | tor1-wdm320/321 |
| | 50 | tor2-wdm290/291 |
| | 51 | tor3-wdm310/311 |
| | 52 | }}} |
| | 53 | |
| | 54 | |
| | 55 | ---- |
| | 56 | |
| | 57 | = Experiment_1 Context = |
| | 58 | || [[Image(Experiment_1.png, width=500px)]] || |
| | 59 | Fig.1 Logical Topology of Experiment_1 |
| | 60 | |
| | 61 | The 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 | |
| | 63 | Experiment includes 3 servers: |
| | 64 | {{{ |
| | 65 | server1 |
| | 66 | server2 |
| | 67 | server3 |
| | 68 | }}} |
| | 69 | |
| | 70 | Experiment includes 4 ROADMs: |
| | 71 | {{{ |
| | 72 | roadm1 (localhost:1831) |
| | 73 | roadm2 (localhost:1832) |
| | 74 | roadm3 (localhost:1833) |
| | 75 | roadm4 (localhost:1844) |
| | 76 | }}} |
| | 77 | |
| | 78 | |
| | 79 | 3 ToR interfaces are connected to the 3 servers: |
| | 80 | |
| | 81 | {{{ |
| | 82 | tor1-eth111 <--> server1 |
| | 83 | tor2-eth112 <--> server2 |
| | 84 | tor3-eth113 <--> server3 |
| | 85 | }}} |
| | 86 | |
| | 87 | |
| | 88 | 3 Ethernet interfaces and 3 WDM transceivers will be connected within the ToR switch: |
| | 89 | |
| | 90 | {{{ |
| | 91 | tor1-eth111 ; tor1-wdm320/321 (output/input) |
| | 92 | tor2-eth112 ; tor2-wdm290/291 (output/input) |
| | 93 | tor3-eth113 ; tor3-wdm310/311 (output/input) |
| | 94 | }}} |
| | 95 | |
| | 96 | |
| | 97 | We are assigning next wavelengths to the transceivers: |
| | 98 | |
| | 99 | {{{ |
| | 100 | 1553,30 nm 193,00 with bandwidth ~[192.95;193.05] Thz |
| | 101 | This corresponds to channel XX in Mininet-Optical's default channel grid. |
| | 102 | }}} |
| | 103 | |
| | 104 | |
| | 105 | ---- |
| | 106 | = Setting Up the Optical Topology = |
| | 107 | |
| | 108 | 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. |
| | 109 | |
| | 110 | 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. |
| | 111 | |
| | 112 | The 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 | |
| | 114 | The 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 |
| | 118 | class TutorialTopo( Topo ): |
| | 119 | ... |
| | 120 | def build( self ): |
| | 121 | }}} |
| | 122 | |
| | 123 | |
| | 124 | ROADMs 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 | |
| | 136 | Servers are added using addHost calls: |
| | 137 | |
| | 138 | {{{#!python |
| | 139 | class TutorialTopo( Topo ): |
| | 140 | # Servers |
| | 141 | server1 = self.addHost('server1') |
| | 142 | ... |
| | 143 | }}} |
| | 144 | |
| | 145 | In 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) |
| | 147 | pairs.) |
| | 148 | |
| | 149 | Because of this, we need to specify the correct port numbers when we create the links. |
| | 150 | |
| | 151 | The base port numbers for a Lumentum ROADM20 are specified at the top of the file: |
| | 152 | |
| | 153 | {{{#!python |
| | 154 | # Lumentum Roadm20 Port numbering |
| | 155 | LINEIN, LINEOUT = 5101, 4201 |
| | 156 | ADD, DROP = 4100, 5200 |
| | 157 | }}} |
| | 158 | |
| | 159 | The server and ToR port numbers are as specified above. |
| | 160 | |
| | 161 | WDM 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 | |
| | 175 | We can see that LINEOUT of roadm2 is connected to LINEIN of roadm3 and vice-versa, |
| | 176 | with a 22km length of fiber in between, corresponding to a fiber spool in |
| | 177 | the COSMOS testbed. Later, add/drop port 2 of roadm4 is connected to ports |
| | 178 | 320/321 of tor1 (output/input, respectively). |
| | 179 | |
| | 180 | Ethernet 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 | |
| | 191 | WORK IN PROGRESS!!! |
| | 192 | |
| | 193 | ... |
| | 194 | |
| | 195 | |
| | 196 | |
| | 197 | = ROADMs Configuration = |
| | 198 | 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. |
| | 199 | |
| | 200 | == Setting “Snake” Connection == |
| | 201 | Correct 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. |
| | 202 | This kind of connection is called “Snake”. |
| | 203 | |
| | 204 | In 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 | |
| | 208 | Snake 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 | |
| | 227 | 1. ROADM 4 booster, |
| | 228 | 2. ROADM 2 booster, |
| | 229 | 3. ROADM 3 booster, |
| | 230 | 4. ROADM 1 booster, |
| | 231 | |
| | 232 | == Setting “Experiment_1” Connections == |
| | 233 | |
| | 234 | === Configuring ToR1<->ToR2 Connection 1 === |
| | 235 | |
| | 236 | * ROADM 4: |
| | 237 | 1. Enable MUX port 4102 “From ToR 1” |
| | 238 | 2. 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) |
| | 239 | 3. Enable DEMUX port 5202 “Towards ToR 1” |
| | 240 | 4. 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: |
| | 242 | 5. Enable MUX port 4102 “From ToR 2” |
| | 243 | 6. Add Connection “From ToR 2” with I/O Port 4102/4201 with bandwidth [192.95;193.05] |
| | 244 | 7. Enable DEMUX port 5202 “Towards ToR 2” |
| | 245 | 8. 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): |
| | 250 | 1. Enable MUX port 4102 “From ToR 1” |
| | 251 | 2. Add Connection “From ToR 1” with I/O Port 4102/4201 with bandwidth [192.95;193.05] |
| | 252 | 3. Enable DEMUX port 5202 “Towards ToR 1” |
| | 253 | 4. Add Connection “Towards ToR 1” with I/O Port 5101/5202 with bandwidth [192.95;193.05] |
| | 254 | * ROADM 1 <Not Same!>: |
| | 255 | 5. Enable MUX port 4101 “Through Port” (enabled for Snake) |
| | 256 | 6. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05] |
| | 257 | 7. Enable DEMUX port 5201 “Through Port” (enabled for Snake) |
| | 258 | 8. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05] |
| | 259 | * ROADM 2 (Same As For ROADM1): |
| | 260 | 9. Enable MUX port 4101 “Through Port” (enabled for Snake) |
| | 261 | 10. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05] |
| | 262 | 11. Enable DEMUX port 5201 “Through Port” (enabled for Snake) |
| | 263 | 12. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05] |
| | 264 | * ROADM 3 (Same As For ROADM4): |
| | 265 | 13. Enable MUX port 4102 “From ToR 3” |
| | 266 | 14. Add Connection “From ToR 3” with I/O Port 4102/4201 with bandwidth [192.95;193.05] |
| | 267 | 15. Enable DEMUX port 5202 “Towards ToR 3” |
| | 268 | 16. 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 == |
| | 274 | 1. Preparing the interfaces to be set as VLAN switch ports: |
| | 275 | |
| | 276 | {{{ |
| | 277 | sw-tor-lg1#configure |
| | 278 | sw-tor-lg1(conf)#interface twentyFiveGigE 1/1/1 |
| | 279 | sw-tor-lg1(conf-if-tf-1/1/1)#switchport |
| | 280 | sw-tor-lg1(conf-if-tf-1/1/1)#no shutdown |
| | 281 | sw-tor-lg1(conf-if-tf-1/1/1)#exit |
| | 282 | sw-tor-lg1(conf)#interface twentyFiveGigE 1/1/2 |
| | 283 | sw-tor-lg1(conf-if-tf-1/1/2)#switchport |
| | 284 | sw-tor-lg1(conf-if-tf-1/1/2)#no shutdown |
| | 285 | sw-tor-lg1(conf-if-tf-1/1/2)#exit |
| | 286 | sw-tor-lg1(conf)#interface twentyFiveGigE 1/1/3 |
| | 287 | sw-tor-lg1(conf-if-tf-1/1/3)#switchport |
| | 288 | sw-tor-lg1(conf-if-tf-1/1/3)#no shutdown |
| | 289 | sw-tor-lg1(conf-if-tf-1/1/3)#exit |
| | 290 | sw-tor-lg1(conf)#interface tengigabitethernet 1/31/1 |
| | 291 | sw-tor-lg1(conf-if-te-1/31/1)#switchport |
| | 292 | sw-tor-lg1(conf-if-te-1/31/1)#no shutdown |
| | 293 | sw-tor-lg1(conf-if-te-1/31/1)#exit |
| | 294 | sw-tor-lg1(conf)#interface tengigabitethernet 1/29/1 |
| | 295 | sw-tor-lg1(conf-if-te-1/29/1)#switchport |
| | 296 | sw-tor-lg1(conf-if-te-1/29/1)#no shutdown |
| | 297 | sw-tor-lg1(conf-if-te-1/29/1)#exit |
| | 298 | sw-tor-lg1(conf)#interface tengigabitethernet 1/32/1 |
| | 299 | sw-tor-lg1(conf-if-te-1/32/1)#switchport |
| | 300 | sw-tor-lg1(conf-if-te-1/32/1)#no shutdown |
| | 301 | sw-tor-lg1(conf-if-te-1/32/1)#exit |
| | 302 | }}} |
| | 303 | |
| | 304 | 2. Assigning interfaces to VLANs |
| | 305 | |
| | 306 | {{{ |
| | 307 | sw-tor-lg1#configure |
| | 308 | sw-tor-lg1(conf)#interface vlan 121 |
| | 309 | sw-tor-lg1(conf-if-vl-121)#untagged twentyFiveGigE 1/1/1 |
| | 310 | sw-tor-lg1(conf-if-vl-121)#untagged tengigabitethernet 1/32/1 |
| | 311 | sw-tor-lg1(conf-if-vl-121)#exit |
| | 312 | sw-tor-lg1(conf)#interface vlan 122 |
| | 313 | sw-tor-lg1(conf-if-vl-122)#untagged twentyFiveGigE 1/1/2 |
| | 314 | sw-tor-lg1(conf-if-vl-122)#untagged tengigabitethernet 1/29/1 |
| | 315 | sw-tor-lg1(conf-if-vl-122)#exit |
| | 316 | sw-tor-lg1(conf)#interface vlan 123 |
| | 317 | sw-tor-lg1(conf-if-vl-123)#untagged twentyFiveGigE 1/1/3 |
| | 318 | sw-tor-lg1(conf-if-vl-123)#untagged tengigabitethernet 1/31/1 |
| | 319 | sw-tor-lg1(conf-if-vl-123)#exit |
| | 320 | sw-tor-lg1(conf)#exit |
| | 321 | }}} |
| | 322 | |
| | 323 | 3. Assigning a wavelength to transceivers: |
| | 324 | |
| | 325 | {{{ |
| | 326 | sw-tor-lg1#configure |
| | 327 | sw-tor-lg1(conf)#interface tengigabitethernet 1/32/1 |
| | 328 | sw-tor-lg1(conf-if-te-1/32/1)#wavelength 1553.3 |
| | 329 | sw-tor-lg1(conf-if-te-1/32/1)#exit |
| | 330 | sw-tor-lg1(conf)#interface tengigabitethernet 1/29/1 |
| | 331 | sw-tor-lg1(conf-if-te-1/29/1)#wavelength 1553.3 |
| | 332 | sw-tor-lg1(conf-if-te-1/29/1)#exit |
| | 333 | sw-tor-lg1(conf)#interface tengigabitethernet 1/32/1 |
| | 334 | sw-tor-lg1(conf-if-te-1/32/1)#wavelength 1553.3 |
| | 335 | sw-tor-lg1(conf-if-te-1/32/1)#exit |
| | 336 | sw-tor-lg1(conf)#exit |
| | 337 | }}} |
| | 338 | |
| | 339 | 4. Verify VLANs: |
| | 340 | |
| | 341 | {{{ |
| | 342 | sw-tor-lg1#show vlan |
| | 343 | |
| | 344 | Codes: * - Default VLAN, G - GVRP VLANs, R - Remote Port Mirroring VLANs, P - Primary, C - Community, I - Isolated |
| | 345 | O - Openflow, Vx - Vxlan |
| | 346 | Q: 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 | |
| | 364 | 1. Install net-tools: |
| | 365 | |
| | 366 | {{{#!shell-session |
| | 367 | sudo apt install net-tools |
| | 368 | }}} |
| | 369 | |
| | 370 | 2. Configure interfaces eo1 and assign IP addresses: |
| | 371 | |
| | 372 | {{{#!shell-session |
| | 373 | native@srv1-lg1:~$ sudo ifconfig eno1 192.168.1.1 netmask 255.255.255.0 |
| | 374 | native@srv2-lg1:~$ sudo ifconfig eno1 192.168.1.2 netmask 255.255.255.0 |
| | 375 | native@srv3-lg1:~$ sudo ifconfig eno1 192.168.1.3 netmask 255.255.255.0 |
| | 376 | }}} |
| | 377 | |
| | 378 | |
| | 379 | ---- |
| | 380 | = Perform Experiment_1 = |
| | 381 | |
| | 382 | 1. Establish Connection ToR1<->ToR2. |
| | 383 | 2. Try Ping from Srv1 to Srv2: |
| | 384 | |
| | 385 | {{{#!shell-session |
| | 386 | native@srv1-lg1:~$ ping 192.168.1.3 |
| | 387 | PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data. |
| | 388 | 64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.460 ms |
| | 389 | 64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=0.423 ms |
| | 390 | }}} |
| | 391 | |
| | 392 | 3. Establish Connection ToR1<->ToR2. |
| | 393 | 4. Try Ping from Srv1 to Srv3. |