wiki:Software/eAM/qNetwork

Version 4 (modified by nkiran, 12 years ago) ( diff )

Switch Control Service

ORBIT provides OMF based "Aggregate Manager" for configuration of networking devices in the testbed (Network AM). The HTTP based service can be accessed by an experimenter from within the SB9, including from the console and all of the nodes, at the following address:

http://nox.orbit-lab.rutgers.edu:5052/network
Or simply as:
http://nox:5052/network

That base URL renders an XML response detailing all requests implemented by the service. Parameter values, such as to address a particular port (port #) on a particular switch (switch IP address), can be passed as URL arguments in the HTTP request. For example, to retrieve the details of particular port (say 5) on the SB9 switch (IP=10.19.0.253), the requested URL is:

http://nox:5052/network/portStat?switch=10.19.0.253&port=5

The service supports the following main features for the native mode (refer to XML response from the base URL for complete list and API specification):

  1. Getting/setting the VLAN ID on any port(s)
  2. Assigning two or more VLAN IDs on a port, making it a trunk
  3. Getting per port statistics (in, out packet counts) and configuration (VLAN) information
  4. Enabling/disabling a port
  5. Turning on/off default switch topology protocols - Spanning Tree Protocol (STP)
  6. Saving the per-port configuration of the entire switch
  7. Restoring switch configuration to prior saved version

In addition, it supports the following requests to support the OpenFlow mode:

  1. Change the mode of the switch from native to OpenFlow mode (and vice versa)
  2. Set the OpenFlow mode parameters including: control port, controller IP, switch ID (dpid), and the transport mode for secure channel

Pronto 3240 Management

Pronto switches can be configured for of following modes:

  • XorPlus
  • Production Indigo OpenFlow image (i.e. internal flash image)
  • User define OpenFlow image (i.e. NFS booted image)

To be able to switch between these modes you have to be logged in conosole.sb9.

Examples

Force switch into XorPlus mode (i.e. out of OpenFlow mode)

wget http://nox.orbit-lab.org:5052/network/deleteOpenFlow?switch=10.19.0.253

Force switch into OpenFlow mode with controller at node1-1.sb9.orbit-lab.org

wget http://nox.orbit-lab.org:5052/network/addOpenFlow?switch=10.19.0.253\&ofip=10.19.1.1\&ofp=6633
\&dpid=0x001010162001

ofp and dpid are optional (if omitted will be configured with the default set).

Force switch into OpenFlow NFS mode To configure switch in OpenFlow NFS mode, bootmode parameter has to be specified. Additional 3 parameters can be specified, nfsip, roottpath and bootfile. These parameters are optional, if omitted will be configured whit initially set parameters (for sb9 operation NSF server is provided on the console so the experimenter should place the image file names uInitrd2m into /tftpboot directory before issiong this command)

wget http://nox.orbit-lab.org:5022/network/addOpenFlow?switch=10.19.0.253\&ofip=10.19.1.1\&ofp=6633
\&dpid=0x001010162001\&bootmode=nfs\&nfsip=10.19.0.10\&roothpath='\/config'\&bootfile=uInitrd2m

Pronto 3290 Management

SB9 switch u-boot config:

#older flash drive boot for Indigo
flash_bootcmd=setenv bootargs root=/dev/ram console=ttyS0,$br DEV_ADDR=$ip ETH0_IP=$ip GATEWAY=$gip  dpid=$dpid CONTROLLER=$ofip CTRL_PORT=$ofp rw; bootm ffd00000 ff000000 ffee0000

#older flash drive boot for Pica8
cfcard_bootcmd=setenv bootargs root=/dev/ram console=ttyS0,$br; ext2load ide 0:1 0x1000000 /uImage;ext2load ide 0:1 0x2000000 /uInitrd2m;ext2load ide 0:1 0x400000 /LB9A.dtb;bootm 1000000 2000000 400000

#NFS boot of OF image from flash drive
nfs_bootcmd=nfs ff000000 $nfsip:$rootpath/$bootfile; setenv bootargs root=/dev/ram console=ttyS0,$br DEV_ADDR=$ip ETH0_IP=$ip GATEWAY=$gip  dpid=$dpid CONTROLLER=$ofip CTRL_PORT=$ofp rw; bootm ffd00000 ff000000 ffee0000

#Current Pica8 boot from CF card
cfcard_bootcmd2=setenv bootargs root=/dev/hda1 rw noinitrd console=ttyS0,$baudrate;ext2load ide 0:1 0x1000000 boot/uImage;ext2load ide 0:1 0x400000 boot/LB9A.dtb;bootm 1000000 - 400000

#Current Indigo boot from CF card
bootargs_hda1_of=setenv bootargs root=/dev/hda1 rw console=ttyS0,${br} DEV_ADDR=${ip} ETH0_IP=${ip} GATEWAY=${gip} dpid=${dpid} CONTROLLER=${ofip} CTRL_PORT=${ofp} controller_ip=${ofip} controller_port=${ofp}
cfcard_bootcmd3=run bootargs_hda1_of;ext2load ide 0:1 0x1000000 /boot/uImage;ext2load ide 0:1 0x2000000 /boot/uInitrd2m;ext2load ide 0:1 0x400000 /boot/LB9A.dtb;bootm 1000000 2000000 400000

Command Prompts:

Indigo:

indigo-unknown# 

Pica8:

    Please choose which to start: Pica8 XorPlus, OpenFlow, or System shell:
        (Will choose default entry if no input in 10 seconds.)
        [1]  Pica8 XorPlus   * default
        [2]  Open vSwitch
        [3]  System shell
        [4]  Boot menu editor
Enter your choice (1,2,3,4):


sw.sb9.orbit-lab.org>

TODO to fix web service (and OF setup) for SB9 data switch

  1. Web service (Network AM) should recognize the command prompts for Pica8 and Indigo (OF) modes
  2. In Indigo mode, there is a race condition between the ofprotocol service starting and the find-env script that runs to pull/set boot parameters, including the OF controller params. The current fix is to run a script that copies a different ofprotocol start script over original, and rely on the runsv service to restart the ofprotocol service after it detects this change. The alternate start script essentially pulls now stable env params (incl. all passed boot params) to correct configure the path to OF controller. The implication is that either we fix the race condition, or we instruct the web service to execute the workaround.
  3. Establish repository for FTP based loading of OF image, and set up corresponding u-boot configuration.
Note: See TracWiki for help on using the wiki.