Stanford OpenFlow Forums: Flow-mod causes switch to disconnect (no errors) - Stanford OpenFlow Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Flow-mod causes switch to disconnect (no errors) Rate Topic: -----

#1 User is offline   blastomorpha 

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 19-March 12

Posted 29 May 2012 - 02:17 AM

I've created a new bundle which has to redirect SIP messages to a certain IP to a given switch's port and it has also to change the destination IP and MAC.
The bundle starts fine, I've edited net.beaconcontroller.core's callBackOrdering field in context.xml so that my bundle gets called before routing and switch, but if any SIP message comes and matches, at the time the controller sends the flow-mod the switch gets disconnected, no errors seem to occur but in the eclipse console I find this:
11:43:29.114 [Timer-2] INFO  n.b.core.internal.Controller - Switch liveness timeout detected 10876ms, disconnecting OFSwitchImpl [Socket[addr=/192.168.100.5,port=52031,localport=6633] DPID[00:00:19:21:68:10:00:01]]
11:43:29.120 [Timer-2] INFO  n.b.core.internal.Controller - Switch disconnected OFSwitchImpl [Socket[addr=/192.168.100.5,port=52031,localport=6633] DPID[00:00:19:21:68:10:00:01]]

Then the switch connects again.
It is a real switch, a Netgear ProSafe GSM7352S. I tried with dpctl to change the MAC as a test, the command gives no errors but if I check with dump-flows the flow isn't there. Changing outport works fine instead.

This is my receive command:
Spoiler


Thanks in advance.
0

#2 User is offline   blastomorpha 

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 19-March 12

Posted 29 May 2012 - 02:51 AM

Seems like that the guilty line in my code is
OFFlowMod fm = (OFFlowMod) sw.getInputStream().getMessageFactory()
                                .getMessage(OFType.FLOW_MOD);

The last line before the above is executed fine, then the switch disconnects.
In the debug panel, the ThreadPoolExecutors.class class gets opend and the line "workerDone(this);"
public void run() {
            try {
                Runnable task = firstTask;
                firstTask = null;
                while (task != null || (task = getTask()) != null) {
                    runTask(task);
                    task = null;
                }
            } finally {
                workerDone(this);
            }
        }

within the runTask method is highlited.
0

#3 User is offline   blastomorpha 

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 19-March 12

Posted 29 May 2012 - 05:31 AM

Oh well, a firmware update helped a bit.
Now after the flow-mod installation I get this error:
15:25:53.615 [pool-1-thread-1] ERROR n.b.core.internal.Controller - Error OFPET_FLOW_MOD_FAILED OFPFMFC_ALL_TABLES_FULL from OFSwitchImpl [Socket[addr=/192.168.100.5,port=33431,localport=6633] DPID[00:00:19:21:68:10:00:01]]

However from Beacon web interface or with dpctl dump-flows I can see very few flows or even none.
If I do not modify MAC and/or IP it works, but packets aren't always redirected (I can see this with Wireshark), at times only the first.
Did I make some mistake in my code?
0

#4 User is offline   David Erickson 

  • Developer
  • Group: Administrators
  • Posts: 653
  • Joined: 28-June 11

Posted 29 May 2012 - 11:46 AM

The code looks reasonable, I suspect this is an issue with the switch not supporting dest MAC and dest IP rewrites (individually or simultaneously). Are you using the Indigo firmware?
0

#5 User is offline   blastomorpha 

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 19-March 12

Posted 29 May 2012 - 11:48 PM

Yes, Indigo firmware 2012.03.19-iods, it's the last update available since March.
Using Beacon, even installing a flow-mod to redirect packets to a certain port works at random. Most of the time only the first packet is correctly redirected (with multiple sources also), then the switch just ignores my rule and installs a flow with the wrong output port.
Using dpctl, adding a flow to change the output port works better instead, but I still can't rewrite MAC or IP, it's like the switch ignores the command.
0

#6 User is offline   blastomorpha 

  • Member
  • PipPip
  • Group: Members
  • Posts: 13
  • Joined: 19-March 12

Posted 29 May 2012 - 11:59 PM

I've just check again the release notes of the current firmware.
Seems like MAC rewriting can be done only by some Pronto switches, no one can do IP rewriting.
0

#7 User is offline   Volkan Yazıcı 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 45
  • Joined: 17-October 11

Posted 31 May 2012 - 08:36 AM

View Postblastomorpha, on 29 May 2012 - 11:59 PM, said:

I've just check again the release notes of the current firmware.
Seems like MAC rewriting can be done only by some Pronto switches, no one can do IP rewriting.

A very useful information just a couple of weeks before an Indigo purchase. Thanks for the tip!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users