wiki:Tutorials/Optical/MininetOpticalTutorial1

Version 3 (modified by lantz, 2 years ago) ( diff )

Setting up a Virtual/Simulated Optical Network using the Mininet-Optical Software Emulator

This wiki page contains a tutorial for setting up an optical network using Mininet-Optical.

This is a Mininet-Optical version of the tutorial at 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.

Please refer to Tutorials/Optical/Tutorial1 to compare the hardware and software testbed environments.

Author: Bob Lantz

Original Authors:

Artur Minakhmetov, Telecom Paris : artur.minakhmetov[at]telecom-paris.fr
Craig Gutterman, Columbia University : clg2168[at]columbia.edu
Michael Sherman, Rutgers University : msherman[at]winlab.rutgers.edu
Jiakai Yu, University of Arizona : jiakaiyu[at]email.arizona.edu
Tingjun Chen, Columbia University: tc2668[at]columbia.edu

Change Log

26 July 2022: created new version for Mininet-Optical.


Description

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.


Compute Nodes and ToR switch interfaces used

  • Each compute node has 1 Ethernet interface:
    server1-eth0
    server2-eth0
    server2-eth0
    
  • There are three ToR Ethernet interfaces:
    tor1-eth111
    tor2-eth112
    tor3-eth113
    
  • and three WDM transceivers, with separate output and input ports:
tor1-wdm320/321
tor2-wdm290/291
tor3-wdm310/311

Experiment_1 Context

Fig.1 Logical Topology of Experiment_1

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”.

Experiment includes 3 servers:

server1
server2
server3

Experiment includes 4 ROADMs:

roadm1 (localhost:1831)
roadm2 (localhost:1832)
roadm3 (localhost:1833)
roadm4 (localhost:1844)

3 ToR interfaces are connected to the 3 servers:

tor1-eth111 <--> server1
tor2-eth112 <--> server2
tor3-eth113 <--> server3

3 Ethernet interfaces and 3 WDM transceivers will be connected within the ToR switch:

tor1-eth111 ; tor1-wdm320/321  (output/input)
tor2-eth112 ; tor2-wdm290/291  (output/input)
tor3-eth113 ; tor3-wdm310/311  (output/input)

We are assigning next wavelengths to the transceivers:

1553,30 nm 193,00 with bandwidth ~[192.95;193.05] Thz
This corresponds to channel XX in Mininet-Optical's default channel grid.

Setting Up the Optical Topology

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.

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.

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.

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:

class TutorialTopo( Topo ):
...
    def build( self ):

ROADMs and ToR switches are added using addSwitch() calls:

        # ROADMs
        NC = NetconfPortBase
        roadm4 = self.addSwitch('roadm4', cls=LROADM, netconfPort=NC+4)
        ...
        # ToR switches
        tor1 = self.addSwitch('tor1', cls=Terminal, transceivers=[('32', 0*dBm)])
        ...

Servers are added using addHost calls:

class TutorialTopo( Topo ):
        # Servers
        server1 = self.addHost('server1')
        ...

In Mininet, ports are created by specifying port numbers when we add links. (This is due to the underlying link emulation which uses Linux virtual Ethernet (veth) pairs.)

Because of this, we need to specify the correct port numbers when we create the links.

The base port numbers for a Lumentum ROADM20 are specified at the top of the file:

# Lumentum Roadm20 Port numbering
LINEIN, LINEOUT = 5101, 4201
ADD, DROP = 4100, 5200

The server and ToR port numbers are as specified above.

WDM fiber links are unidirectional and are added using wdmLink calls:

        # Inter-ROADM links
        # We put 22km of fiber between roadm2 and roadm3
        # Default fiber length is 1m if not specified
        ...
        self.wdmLink(roadm2, roadm3, LINEOUT, LINEIN, spans=[22*km])
        self.wdmLink(roadm3, roadm2, LINEOUT, LINEIN, spans=[22*km])
        ...
        # ROADM add/drop 2 <-> ToR transceiver links
        self.wdmLink(tor1, roadm4, 320, ADD+2)
        self.wdmLink(roadm4, tor1, DROP+2, 321)

We can see that LINEOUT of roadm2 is connected to LINEIN of roadm3 and vice-versa, with a 22km length of fiber in between, corresponding to a fiber spool in the COSMOS testbed. Later, add/drop port 2 of roadm4 is connected to ports 320/321 of tor1 (output/input, respectively).

Ethernet links are added sing addLink() calls:

        # Server<->ToR Ethernet links
        self.addLink(server1, tor1, port1=0, port2=1)
        self.addLink(server2, tor2, port1=0, port2=2)
        self.addLink(server3, tor3, port1=0, port2=3)

ROADM Configuration

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.

Setting “Snake” Connection

(This is not currently part of the Mininet-Optical software emulated configuration.)

Transceiver 33 (ports 330/331) on ToR configuration

(This is not currently part of the Mininet-Optical software emulated configuration, but it would be: 60 (DWDM Channel C60) 1529,55 nm 196,00 Thz with frequency range [195.95,196.05] Thz)

MUX/DEMUX configuration

As a reminder, here are the ROADM port numbers:

  • ROADM 4:

DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5204 MUX IN/OUT (LINEIN/DROP1)port: 4104/4201

  • ROADM 1:

DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201 MUX IN/OUT (LINEIN/DROP1) port: 4101/4201

  • ROADM 2:

DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5201 MUX IN/OUT (LINEIN/DROP1) port: 4101/4201

  • ROADM 3:

DEMUX IN/OUT (ADD1/LINEOUT) port: 5101/5204 MUX IN/OUT (LINEIN/DROP1) port: 4104/4201

Note that the servers are connected to ADD2/DROP2 while DROP1/ADD1 are used as passthrough ports between ROADM 1 and ROADM 2.

ALS Disable Sequence (for 60 seconds)

(This is not currently done in the Mininet-Optical configuration.)

Configuring ROADMs in Mininet-Optical

ROADMs in Mininet-Optical may be configured via several mechanisms. An internal Python API may be used for configuration within the script that creates the network. More realistically, two external SDN/RPC control interfaces are provided: a simple REST interface and a more realistic NETCONF interface which is partially compatible with the NETCONF interface of the hardware Lumentum ROADM20.

To start with, we will implement the connections using the REST API.

Setting “Experiment_1” Connections using REST

Configuring ToR1↔ToR2 Connection 1 on Mininet-Optical using REST

  • ROADM 4:
  1. Enable MUX port 4102 “From ToR 1”
  2. Add Connection “Exp1-FromTor1” with Input/ Output Port 4102/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5202 “Towards ToR 1”
  4. Add Connection “Exp1-TorwardTor1” with I/O Port 5101/5202

192.95THz..193.05THz has a middle frequency of 193.00 THz, which corresponds to channel C32 on Mininet-Optical's default 50GHz channel grid. C1's middle frequency is 191400 GHz, so C33 is at 191400 + 32*50 = 193000 GHz.

We use curl to send a REST request to ROADM4 to add/drop ch33:

    curl "localhost:8080/connect?node=roadm4&port1=4102&port2=4201&channels=33"
    curl "localhost:8080/connect?node=roadm4&port1=5101&port2=5202&channels=33"
  • ROADM 1:
  1. Enable MUX port 4102 “From ToR 2”
  2. Add Connection “From ToR 2” with I/O Port 4102/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5202 “Towards ToR 2”
  4. Add Connection “Towards ToR 2” with I/O Port 5101/5202

We use curl to send a REST request to ROADM4 to add/drop ch33:

    curl "localhost:8080/connect?node=roadm1&port1=4102&port2=4201&channels=33"
    curl "localhost:8080/connect?node=roadm1&port1=5101&port2=5202&channels=33"

Configuring ToR1↔ToR3 Connection 2 on Mininet-Optical using REST

  • ROADM 4 (Same As For Connection 1):
  1. Enable MUX port 4102 “From ToR 1”
  2. Add Connection “From ToR 1” with I/O Port 4102/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5202 “Towards ToR 1”
  4. Add Connection “Towards ToR 1” with I/O Port 5101/5202 with bandwidth [192.95;193.05]
        curl "localhost:8080/connect?node=roadm4&port1=4102&port2=4201&channels=33"
        curl "localhost:8080/connect?node=roadm4&port1=5101&port2=5202&channels=33"
    
  • ROADM 1 <Not Same!>:
  1. Enable MUX port 4101 “Through Port” (enabled for Snake)
  2. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5201 “Through Port” (enabled for Snake)
  4. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05]

This time we pass channel 33 through ROADM1:

    curl "localhost:8080/connect?node=roadm1&port1=4101&port2=4201&channels=33"
    curl "localhost:8080/connect?node=roadm1&port1=5101&port2=5201&channels=33"
  • ROADM 2 (Same As For ROADM1):
  1. Enable MUX port 4101 “Through Port” (enabled for Snake)
  2. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5201 “Through Port” (enabled for Snake)
  4. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05]

And pass through ROADM2:

    curl "localhost:8080/connect?node=roadm2&port1=4101&port2=4201&channels=33"
    curl "localhost:8080/connect?node=roadm2&port1=5101&port2=5201&channels=33"
  • ROADM 3 (Same As For ROADM4):
  1. Enable MUX port 4102 “From ToR 3”
  2. Add Connection “From ToR 3” with I/O Port 4102/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5202 “Towards ToR 3”
  4. Add Connection “Towards ToR 3” with I/O Port 5101/5202 with bandwidth [192.95;193.05]

And we drop at ROADM3:

    curl "localhost:8080/connect?node=roadm3&port1=4102&port2=4201&channels=33"
    curl "localhost:8080/connect?node=roadm3&port1=5101&port2=5202&channels=33"

Setting “Experiment_1” Connections using NETCONF

(TBD)

Configuring ToR1↔ToR2 Connection 1

  • ROADM 4:
  1. Enable MUX port 4102 “From ToR 1”
  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)
  3. Enable DEMUX port 5202 “Towards ToR 1”
  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)
  • ROADM 1:
  1. Enable MUX port 4102 “From ToR 2”
  2. Add Connection “From ToR 2” with I/O Port 4102/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5202 “Towards ToR 2”
  4. Add Connection “Towards ToR 2” with I/O Port 5101/5202

Configuting ToR1↔ToR3 Connection 2

  • ROADM 4 (Same As For Connection 1):
  1. Enable MUX port 4102 “From ToR 1”
  2. Add Connection “From ToR 1” with I/O Port 4102/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5202 “Towards ToR 1”
  4. Add Connection “Towards ToR 1” with I/O Port 5101/5202 with bandwidth [192.95;193.05]
  • ROADM 1 <Not Same!>:
  1. Enable MUX port 4101 “Through Port” (enabled for Snake)
  2. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5201 “Through Port” (enabled for Snake)
  4. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05]
  • ROADM 2 (Same As For ROADM1):
  1. Enable MUX port 4101 “Through Port” (enabled for Snake)
  2. Add Connection “Through In” with I/O Port 4101/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5201 “Through Port” (enabled for Snake)
  4. Add Connection “Through Out” with I/O Port 5101/5201 with bandwidth [192.95;193.05]
  • ROADM 3 (Same As For ROADM4):
  1. Enable MUX port 4102 “From ToR 3”
  2. Add Connection “From ToR 3” with I/O Port 4102/4201 with bandwidth [192.95;193.05]
  3. Enable DEMUX port 5202 “Towards ToR 3”
  4. Add Connection “Towards ToR 3” with I/O Port 5101/5202 with bandwidth [192.95;193.05]

Network Interfaces Configuration for Experiment_1

Setting Up ToR switch with 3 logical ToR switches

  1. Preparing the interfaces to be set as VLAN switch ports:
sw-tor-lg1#configure
sw-tor-lg1(conf)#interface twentyFiveGigE 1/1/1
sw-tor-lg1(conf-if-tf-1/1/1)#switchport
sw-tor-lg1(conf-if-tf-1/1/1)#no shutdown
sw-tor-lg1(conf-if-tf-1/1/1)#exit
sw-tor-lg1(conf)#interface twentyFiveGigE 1/1/2
sw-tor-lg1(conf-if-tf-1/1/2)#switchport
sw-tor-lg1(conf-if-tf-1/1/2)#no shutdown
sw-tor-lg1(conf-if-tf-1/1/2)#exit
sw-tor-lg1(conf)#interface twentyFiveGigE 1/1/3
sw-tor-lg1(conf-if-tf-1/1/3)#switchport
sw-tor-lg1(conf-if-tf-1/1/3)#no shutdown
sw-tor-lg1(conf-if-tf-1/1/3)#exit
sw-tor-lg1(conf)#interface tengigabitethernet 1/31/1
sw-tor-lg1(conf-if-te-1/31/1)#switchport
sw-tor-lg1(conf-if-te-1/31/1)#no shutdown
sw-tor-lg1(conf-if-te-1/31/1)#exit
sw-tor-lg1(conf)#interface tengigabitethernet 1/29/1
sw-tor-lg1(conf-if-te-1/29/1)#switchport
sw-tor-lg1(conf-if-te-1/29/1)#no shutdown
sw-tor-lg1(conf-if-te-1/29/1)#exit
sw-tor-lg1(conf)#interface tengigabitethernet 1/32/1
sw-tor-lg1(conf-if-te-1/32/1)#switchport
sw-tor-lg1(conf-if-te-1/32/1)#no shutdown
sw-tor-lg1(conf-if-te-1/32/1)#exit
  1. Assigning interfaces to VLANs
sw-tor-lg1#configure
sw-tor-lg1(conf)#interface vlan 121
sw-tor-lg1(conf-if-vl-121)#untagged twentyFiveGigE 1/1/1
sw-tor-lg1(conf-if-vl-121)#untagged tengigabitethernet 1/32/1
sw-tor-lg1(conf-if-vl-121)#exit
sw-tor-lg1(conf)#interface vlan 122
sw-tor-lg1(conf-if-vl-122)#untagged twentyFiveGigE 1/1/2
sw-tor-lg1(conf-if-vl-122)#untagged tengigabitethernet 1/29/1
sw-tor-lg1(conf-if-vl-122)#exit
sw-tor-lg1(conf)#interface vlan 123
sw-tor-lg1(conf-if-vl-123)#untagged twentyFiveGigE 1/1/3
sw-tor-lg1(conf-if-vl-123)#untagged tengigabitethernet 1/31/1
sw-tor-lg1(conf-if-vl-123)#exit
sw-tor-lg1(conf)#exit
  1. Assigning a wavelength to transceivers:
sw-tor-lg1#configure
sw-tor-lg1(conf)#interface tengigabitethernet 1/32/1
sw-tor-lg1(conf-if-te-1/32/1)#wavelength 1553.3
sw-tor-lg1(conf-if-te-1/32/1)#exit
sw-tor-lg1(conf)#interface tengigabitethernet 1/29/1
sw-tor-lg1(conf-if-te-1/29/1)#wavelength 1553.3
sw-tor-lg1(conf-if-te-1/29/1)#exit
sw-tor-lg1(conf)#interface tengigabitethernet 1/32/1
sw-tor-lg1(conf-if-te-1/32/1)#wavelength 1553.3
sw-tor-lg1(conf-if-te-1/32/1)#exit
sw-tor-lg1(conf)#exit
  1. Verify VLANs:
sw-tor-lg1#show vlan

Codes: * - Default VLAN, G - GVRP VLANs, R - Remote Port Mirroring VLANs, P - Primary, C - Community, I - Isolated
       O - Openflow, Vx - Vxlan
Q: U - Untagged, T - Tagged
   x - Dot1x untagged, X - Dot1x tagged
   o - OpenFlow untagged, O - OpenFlow tagged
   G - GVRP tagged, M - Vlan-stack
   i - Internal untagged, I - Internal tagged, v - VLT untagged, V - VLT tagged

    NUM    Status    Description                     Q Ports
    121    Active                                    U Te 1/32/1
                                                     U Tf 1/1/1
    122    Active                                    U Te 1/29/1
                                                     U Tf 1/1/2
    123    Active                                    U Te 1/31/1
                                                     U Tf 1/1/3

Configuring Compute Nodes (Servers srv1..3-lg1)

  1. Install net-tools:
sudo apt install net-tools
  1. Configure interfaces eo1 and assign IP addresses:
native@srv1-lg1:~$ sudo ifconfig eno1 192.168.1.1 netmask 255.255.255.0
native@srv2-lg1:~$ sudo ifconfig eno1 192.168.1.2 netmask 255.255.255.0
native@srv3-lg1:~$ sudo ifconfig eno1 192.168.1.3 netmask 255.255.255.0

Perform Experiment_1

  1. Establish Connection ToR1↔ToR2.
  2. Try Ping from Srv1 to Srv2:
native@srv1-lg1:~$ ping 192.168.1.3
PING 192.168.1.3 (192.168.1.3) 56(84) bytes of data.
64 bytes from 192.168.1.3: icmp_seq=1 ttl=64 time=0.460 ms
64 bytes from 192.168.1.3: icmp_seq=2 ttl=64 time=0.423 ms
  1. Establish Connection ToR1↔ToR2.
  2. Try Ping from Srv1 to Srv3.

Attachments (1)

Download all attachments as: .zip

Note: See TracWiki for help on using the wiki.