- Community Home
- >
- Networking
- >
- Software Defined Networking
- >
- Re: HP VAN SDN Controller v2.4.5 - Can't get flow ...
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-10-2015 08:14 AM
тАО06-10-2015 08:14 AM
HP VAN SDN Controller v2.4.5 - Can't get flow entries from switch
Hi,
I've been struggling with a problem on my application. I need to use HP Controller Service getFlowStats function to get all the flow entries that I install on a specific switch.
The problem is that I can get all the flow entries on the switch except the flow that I really want to retrieve: it's a flow where I want to push a Vlan Header to the packets that match, set it's VlanId to 100 and send it to a specific port.
Using ovs-ofctl dump-flows we can see the the flow was correctly installed:
cookie=0x64, duration=115.19s, table=1, n_packets=0, n_bytes=0, priority=50000,ip actions=push_vlan:0x8100,set_field:100->vlan_vid,NORMAL
I'll attach screen shoots of Wireshark logs to show the flow-add message with the flow that I created and the of_flow_stats_reply logs. They both show the correct flow entry being added and being sent to the controller.
The strange part is that using tools like Wireshark and Mininets ovs-ofct dump-flows I can see that the flow is correctly installed on the datapath and packets that hit it get marked with the appropriate Vlan tag, but when I try to retrieve it using ControllerService.getFlowStats( DataPathId , TableId ), the return message shows:
MySdnLab: PacketListener: flow stats -> {fstats:tid=null,pri=0,match=null,...}
Trying to solve this problem I included a Flow Remove Flag on the flow entry to see if the switch would send it back when it's idle Timeout expires and it did and return message was correct.
So I would like to ask if someone could help me with this issue, I'll even put the code I used to build the flow and send it to the controller and the code to get it's stats.
Thank you,
PM
/**************//***********************/
private void setPushVlanFlow (DataPathId dpId){
OfmMutableFlowMod smallflowMod = (OfmMutableFlowMod) MessageFactory.create(PV, MessageType.FLOW_MOD);
MutableMatch match = MatchFactory.createMatch(PV)
.addField(FieldFactory.createBasicField(PV, OxmBasicFieldType.ETH_TYPE, EthernetType.IPv4));
smallflowMod.match((Match) match.toImmutable());
int lowLabel = 100;
Action vlanActionPush = ActionFactory.createAction(PV, ActionType.PUSH_VLAN, EthernetType.VLAN );
Action vlanActionSetField = ActionFactory.createActionSetField(PV, OxmBasicFieldType.VLAN_VID, VlanId.valueOf(lowLabel));
Action outputAction = ActionFactory.createAction(PV, ActionType.OUTPUT, Port.NORMAL);
InstrMutableAction write = InstructionFactory.createMutableInstruction( PV, InstructionType.APPLY_ACTIONS);
write.addAction(vlanActionPush)
.addAction(vlanActionSetField)
.addAction(outputAction);
smallflowMod.addInstruction( (Instruction) write.toImmutable() ) ;
smallflowMod.command(FlowModCommand.ADD)
.hardTimeout( 0 )
.idleTimeout( 10 )
.cookie(lowLabel)
.tableId( TableId.valueOf( 1 ) )
.priority( 50000 )
.bufferId( BufferId.NO_BUFFER );
try {
mControllerService.sendFlowMod( (OfmFlowMod)smallflowMod.toImmutable(), dpId );
LOG.info("MySdnLab: SwitchListener handleSmallFlows: successfully for src node " + dpId.toString());
} catch (OpenflowException e) {
// TODO Auto-generated catch block
LOG.info("MySdnLab: SwitchListener Set Initial Flows: DNS exception {}", e);
}
}
/*************************//**************************/
public void run() {
// TODO Auto-generated method stub
LOG.info("MySdnLab: PacketListener: Print Flow entries on device -> " + auxDpId.toString());
List<MBodyFlowStats> Statslist = mControllerService.getFlowStats( auxDaId , TableId.ALL);
for(MBodyFlowStats flowStats : Statslist){
LOG.info("MySdnLab: PacketListener: flow stats -> " + flowStats.toString());
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-29-2015 01:49 PM
тАО06-29-2015 01:49 PM
Re: HP VAN SDN Controller v2.4.5 - Can't get flow entries from switch
I hesitate to say this may be an issue that HP will have to deal with. It seems like you've gone through the appropriate process for loading the flow, verifying its installation on the switch, and verifying that it is being used when the match parameters are satisfied. Given that, you should be seeing stats for your flows; if you are not getting results...there may be a bigger issue present.
To be clear, is it the case that you are getting stats back for your flow but they are incorrect/null/0 or is it the case that you get stats back for every flow on the switch and the flow your app programmitically installs is missing?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-03-2015 07:42 AM
тАО07-03-2015 07:42 AM
Re: HP VAN SDN Controller v2.4.5 - Can't get flow entries from switch
Hi PaMartin,
Do I understand correctly that when your application does the getFlowStats( auxDaId , TableId.ALL), all flows on the switch are returned except the one your application has send itself? And at the same time it does show up in the ovs-ofctl dump-flows output? Could you perhaps post both outputs? Thanks!
Best regards,
Wouter
HP SDN CoE Team