Software Defined Networking
1753783 Members
6847 Online
108799 Solutions
New Discussion

Re: Nicira Extensions

 
SOLVED
Go to solution
ItamarTal
Occasional Advisor

Nicira Extensions

Hello,

 

I'm testing my app using OpenVSwitch which support extensions of the OpenFlow protocol and learn() functions (from the Nicira extensions supported by openvswitch). Is there any possible way to add those action sets from within the HP controller? Is there any legitimate way to send OpenFlow extension commands from an app inside the controller?

 

Thank you very much,

Itamar Tal

Itamar Tal,
Guardicore, LTD
3 REPLIES 3
RuDr
Occasional Advisor

Re: Nicira Extensions

Hi ItamarTal,


Sorry for the delayed response, we're still ramping up our support teams so it has taken us longer that we would like to get this information across.

 

I want to let you know that an engineer has been assigned and a response will get posted shortly.  Thanks for bearing with us as we ramp up. 

 

Russ

Shaila
Advisor
Solution

Re: Nicira Extensions

Hi ItamarTal,

 

As per the openflow spec, from openflow 1.1 onwards experimenter messages are supported to provide a standard way for openFlow switches to offer additional functionality within the OpenFlow message type space. With HP SDN VAN Controller you can do use experimenters as follows:

 

 

Using Multipart request
------------------------------

// import required classes
import static com.hp.of.lib.ProtocolVersion.V_1_3;
import static com.hp.of.lib.msg.MessageFactory.create;
import static com.hp.of.lib.msg.MessageType.MULTIPART_REQUEST;

 

//customize this according to the extension
private static final byte[] DATA = {
            0, 0, 0, 0x12, 0, 0, 0x01, 0x90-B, 0x45, 0x6e, 0x61, 0x62, 0x6c,
            0x65, 0x20, 0x53, 0x65, 0x6c, 0x66, 0x20, 0x44, 0x65, 0x73, 0x74,
            0x72, 0x75, 0x63, 0x74, 0x20, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e,
            0x63, 0x65, 0x21, 0, 0
    };

 

private static final int EXP_TYPE = 42;

 

// Construct a OfmMutableMultipartRequest
OfmMutableMultipartRequest req = (OfmMutableMultipartRequest)
                create(PV, MULTIPART_REQUEST, MultipartType.EXPERIMENTER);
MBodyMutableExperimenter exp = (MBodyMutableExperimenter) req.getBody();
exp.expId(ExperimenterId. NICIRA).expType(EXP_TYPE).data(DATA);

 

// Use the ControllerService API to send the message

cs.send(req.toImmutable());

 


Using Experimenter Message
-------------------------------------

// import required classes
import static com.hp.of.lib.msg.MessageFactory.create;
import static com.hp.of.lib.msg.MessageType.EXPERIMENTER;

 

// Construct a OfmMutableExperimenter
OfmMutableExperimenter exp =
                (OfmMutableExperimenter) create(V_1_3, EXPERIMENTER);
exp.expId(NICIRA).expType(EXP_TYPE).data(DATA);

 

// Use the ControllerService API to send the message
cs.send(exp.toImmutable());

 

 

Using Match
-----------------

// import required classes
import static com.hp.of.lib.match.FieldFactory.createExperimenterField;
import static com.hp.of.lib.ProtocolVersion.V_1_3;
import static com.hp.of.lib.ExperimenterId.NICIRA;

 

createExperimenterField(V_1_3, EXP_TYPE, NICIRA, DATA);

 


Using Action
----------------

// import required classes
import static com.hp.of.lib.instr.ActionFactory.createAction;
import static com.hp.of.lib.ProtocolVersion.V_1_3;
import static com.hp.of.lib.instr.ActionType.EXPERIMENTER;
import static com.hp.of.lib.ExperimenterId.NICIRA;

 

createAction(V_1_3, EXPERIMENTER, NICIRA, DATA);

 

 

Using instruction
--------------------------

// import required classes
import static com.hp.of.lib.instr.InstructionFactory. createInstruction;
import static com.hp.of.lib.ProtocolVersion.V_1_3;
import static com.hp.of.lib.instr.InstructionType.EXPERIMENTER;
import static com.hp.of.lib.ExperimenterId.NICIRA;


createInstruction(V_1_3, EXPERIMENTER, NICIRA, DATA);

 

 

Once you create match, action or instruction, construct a flow mod and send it via ControllerService API.

 

If you are using openflow 1.0, please let me know. I can send you information about how to construct vendor extensions.

 

Best,

-- HP SDN Team
ItamarTal
Occasional Advisor

Re: Nicira Extensions

This is great. Thank you very much

Itamar Tal,
Guardicore, LTD