wiki:Internal/OpenFlow/miscOF

Version 4 (modified by akoshibe, 11 years ago) ( diff )

OpenFlow Miscellany

This page documents various odds-and-ends regarding OpenFlow and related platforms, tools, and whatnot.

  • Using xterm with mininet hosts. You can background then by doing:
    mininet> h1 xterm &
    
    this allows you to spawn a terminal for a switch, from which you can, say, sniff packets using wireshark.
  • A good way to track packets and transactions between datapath and controller is via buffer Id for switch-initiated conversations, and by XID for controller-initiated transactions. A caveat is that the buffer ID is only applicable to a subset of messages e.g. PacketIns and PacketOuts. A -1 buffer ID indicates a controller-generated packet (e.g. by a flow pushing tool or via a REST API for static flows).
  • making FlowMods. If not building a match object from a PacketIn, make sure to not forget to invert the wildcard bit for the field you are setting. The default match is wildcarded to all. For example, to make a match object that only inspects source MAC address of an Ethernet header:
     (1)    OFMatch m1 = new OFMatch();
     (2)    m1.setDataLayerSource(hwaddr);
    	   m1.setWildcards(OFMatch.OFPFW_ALL & ~OFMatch.OFPFW_DL_SRC);
    
     (3)    flowmod.setmatch(m1);   //and other params as necessary
    
    1. Create a new match object.
    2. Add the source MAC address to match on, and turn the wildcard bit for source MAC field (OFPFW_DL_SRC)
    3. set the FlowMod match to the one you just created.

  • compiling oflops (cbench Controller Benchmarker). This requires an additional package, libconfig8-dev, in addition to the dependencies listed, so the list becomes:
    autoconf automake libtool libsnmp-dev libpcap-dev libconfig8-dev
    
Note: See TracWiki for help on using the wiki.