Hello,
Following the HP SDN workshop tutorial, I have a problem when my controller (HP VAN SDN) try to installing Flow-Mods in my physical switch (HP 3800-24 G).
The openFlow version used by the switch is 1.3
The Methode that instert Flow-Mods (given by the tuto) is:
private void installDhcpFlowMod(DataPathId dp, ProtocolVersion version) {
OfmMutableFlowMod flowMod67, flowMod68;
Action action;
MutableMatch match67, match68;
match67 = MatchFactory.createMatch(version);
match67.addField(FieldFactory.createBasicField(version, OxmBasicFieldType.UDP_DST, PortNumber.valueOf(67)));
match67.addField(FieldFactory.createBasicField(version, OxmBasicFieldType.IP_PROTO, IpProtocol.UDP));
match67.addField(FieldFactory.createBasicField(version, OxmBasicFieldType.ETH_TYPE, EthernetType.IPv4));
match68 = MatchFactory.createMatch(version);
match68.addField(FieldFactory.createBasicField(version, OxmBasicFieldType.UDP_DST, PortNumber.valueOf(68)));
match68.addField(FieldFactory.createBasicField(version, OxmBasicFieldType.IP_PROTO, IpProtocol.UDP));
match68.addField(FieldFactory.createBasicField(version, OxmBasicFieldType.ETH_TYPE, EthernetType.IPv4));
action = ActionFactory.createAction(version, ActionType.OUTPUT, Port.CONTROLLER, ActOutput.CONTROLLER_NO_BUFFER);
// create flow-mod and add all required fields
flowMod67 = (OfmMutableFlowMod) MessageFactory.create(version, MessageType.FLOW_MOD);
flowMod67.match((Match) match67.toImmutable());
flowMod67.hardTimeout(0);
flowMod67.idleTimeout(0);
flowMod67.addAction(action);
flowMod67.priority(33333);
flowMod67.command(FlowModCommand.ADD);
flowMod67.bufferId(BufferId.NO_BUFFER);
flowMod67.outPort(Port.NONE);
flowMod67.cookie(0x1234);
flowMod68 = (OfmMutableFlowMod) MessageFactory.create(version, MessageType.FLOW_MOD);
flowMod68.match((Match) match68.toImmutable());
flowMod68.hardTimeout(0);
flowMod68.idleTimeout(0);
flowMod68.addAction(action);
...
flowMod68.cookie(0x1235);
try {
// Send our flow-mods
controllerService.sendFlowMod((OfmFlowMod) flowMod67.toImmutable(), dp);
controllerService.sendFlowMod((OfmFlowMod) flowMod68.toImmutable(), dp);
} catch (OpenflowException e) {
ogger.warn("MYFIRST: Failed to install DHCP FlowMod: " + e.getMessage().toString());
}
}
The controller bundle failed with the follwing instruction:
flowMod67.addAction(action);
or
flowMod68.addAction(action);
Do you know why ?
Moreover, do you know why this code is using two different “flowMod” (67 and 68) Is it depending on the kind of switch.
In fact this tuto is suppose to be executed on Mininet. I use it with physical HP switch. Do you think it could be the problem ?
Best regards,
Serge