Connection to controller flapping

  • 12 Replies
  • 4673 Views
*

benleb

  • Newbie
  • *
  • 5
    • View Profile
Connection to controller flapping
« on: August 25, 2016, 12:16:16 AM »
Hey,
today I got my zodiac and the first thing I did, was to try the "demo" Glen Turner posted (http://vk5tu.livejournal.com/55803.html).

Unfortunately, it seems there is something wrong... the connection between the zodiac and the controller establishes but after 1-2 second it breaks down....

Code: [Select]
ben ~/repos/pox $ ./pox.py --verbose openflow.of_01 --address=10.0.1.8 --port=6633 forwarding.hub
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
INFO:forwarding.hub:Hub running.
DEBUG:core:POX 0.2.0 (carp) going up...
DEBUG:core:Running on CPython (2.7.12/Jul 3 2016 19:58:10)
DEBUG:core:Platform is Darwin-15.6.0-x86_64-i386-64bit
INFO:core:POX 0.2.0 (carp) is up.
DEBUG:openflow.of_01:Listening on 10.0.1.8:6633
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 1] connected
INFO:forwarding.hub:Hubifying 70-b3-d5-6c-d4-3f
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 1] closed
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 2] connected
INFO:forwarding.hub:Hubifying 70-b3-d5-6c-d4-3f
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 2] closed
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 3] connected
INFO:forwarding.hub:Hubifying 70-b3-d5-6c-d4-3f
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 3] closed
...

My zodiac runs on 0.65. As far as I read, this setup should work out of the box? Any ideas where the problem is?

Edit: same behaviour with ryu and the "simple_switch.py" app

Thanks for your help!
Ben
« Last Edit: August 25, 2016, 12:35:58 AM by benleb »

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 370
    • View Profile
    • Northbound Networks
Re: Connection to controller flapping
« Reply #1 on: August 25, 2016, 08:41:35 AM »
Hi Ben,

Are you using Mac OSX? I have noticed that sometimes Python based controllers on the Mac drop the TCP connection a couple of times before it stabilises, I'm not really sure why it happens.

Regards,
Paul

*

benleb

  • Newbie
  • *
  • 5
    • View Profile
Re: Connection to controller flapping
« Reply #2 on: August 26, 2016, 01:36:46 AM »
Hey Paul,

thank you! Yes, im using osx. even after 30min no stable connection :/ tried with Debian on another machine now but the same problem (event after waiting to stabilise) :( I also used a different cable to eliminate every possible reason.

Code: [Select]
(17:29:22) prox pox # ./pox.py --verbose openflow.of_01 --address=10.0.1.8 --port=6633 forwarding.hub
POX 0.2.0 (carp) / Copyright 2011-2013 James McCauley, et al.
INFO:forwarding.hub:Hub running.
DEBUG:core:POX 0.2.0 (carp) going up...
DEBUG:core:Running on CPython (2.7.9/Mar 1 2015 12:57:24)
DEBUG:core:Platform is Linux-4.4.6-1-pve-x86_64-with-debian-8.5
INFO:core:POX 0.2.0 (carp) is up.
DEBUG:openflow.of_01:Listening on 10.0.1.8:6633
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 1] connected
INFO:forwarding.hub:Hubifying 70-b3-d5-6c-d4-3f
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 1] closed
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 2] connected
INFO:forwarding.hub:Hubifying 70-b3-d5-6c-d4-3f
INFO:openflow.of_01:[70-b3-d5-6c-d4-3f 2] closed
...

any ideas? :/ please don't tell me my zodiac is broken and needs to go back to Australia :D (i live in Germany...)

thanks!

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 370
    • View Profile
    • Northbound Networks
Re: Connection to controller flapping
« Reply #3 on: August 26, 2016, 07:55:59 AM »
Hi Ben,

It seems to be a POX / OF 1.0 issue, I'll take a look at it.

However I suggest using a different controller as POX is getting a little old now, I would recommend RYU as I've found it be the most stable.

Regards,
Paul

*

benleb

  • Newbie
  • *
  • 5
    • View Profile
Re: Connection to controller flapping
« Reply #4 on: August 26, 2016, 04:41:06 PM »
same behaviour :/ tested different example apps provided with ryu

Code: [Select]
(08:39:35) prox ryu # ryu-manager --verbose ryu/app/simple_switch.py
loading app ryu/app/simple_switch.py
loading app ryu.controller.ofp_handler
instantiating app ryu.controller.ofp_handler of OFPHandler
instantiating app ryu/app/simple_switch.py of SimpleSwitch
BRICK SimpleSwitch
  CONSUMES EventOFPPortStatus
  CONSUMES EventOFPPacketIn
BRICK ofp_event
  PROVIDES EventOFPPortStatus TO {'SimpleSwitch': set(['main'])}
  PROVIDES EventOFPPacketIn TO {'SimpleSwitch': set(['main'])}
  CONSUMES EventOFPHello
  CONSUMES EventOFPEchoRequest
  CONSUMES EventOFPEchoReply
  CONSUMES EventOFPPortStatus
  CONSUMES EventOFPSwitchFeatures
  CONSUMES EventOFPPortDescStatsReply
  CONSUMES EventOFPErrorMsg
connected socket:<eventlet.greenio.base.GreenSocket object at 0x7f06f4b90590> address:('10.0.1.99', 49324)
hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x7f06f4b90dd0>
move onto config mode
switch features ev version=0x1,msg_type=0x6,msg_len=0xb0,xid=0x23539afd,OFPSwitchFeatures(actions=1779,capabilities=7,datapath_id=123917682136127,n_buffers=0,n_tables=1,ports={1: OFPPhyPort(port_no=1,hw_addr='7a:b0:c6:63:dc:1d',name='eth0',config=0,state=1,curr=136,advertised=0,supported=0,peer=0), 2: OFPPhyPort(port_no=2,hw_addr='b6:0d:1f:83:4c:ad',name='eth1',config=0,state=1,curr=136,advertised=0,supported=0,peer=0), 3: OFPPhyPort(port_no=3,hw_addr='a5:f5:81:d9:42:d0',name='eth2',config=0,state=1,curr=136,advertised=0,supported=0,peer=0)})
move onto main mode
connected socket:<eventlet.greenio.base.GreenSocket object at 0x7f06f4b908d0> address:('10.0.1.99', 49325)
hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x7f06f4b90d50>
move onto config mode
switch features ev version=0x1,msg_type=0x6,msg_len=0xb0,xid=0x238b62af,OFPSwitchFeatures(actions=1779,capabilities=7,datapath_id=123917682136127,n_buffers=0,n_tables=1,ports={1: OFPPhyPort(port_no=1,hw_addr='06:b2:c4:c0:39:0d',name='eth0',config=0,state=1,curr=136,advertised=0,supported=0,peer=0), 2: OFPPhyPort(port_no=2,hw_addr='9d:98:a3:ea:8c:49',name='eth1',config=0,state=1,curr=136,advertised=0,supported=0,peer=0), 3: OFPPhyPort(port_no=3,hw_addr='4f:13:c2:29:36:88',name='eth2',config=0,state=1,curr=136,advertised=0,supported=0,peer=0)})
move onto main mode
connected socket:<eventlet.greenio.base.GreenSocket object at 0x7f06f4b66ed0> address:('10.0.1.99', 49326)
hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x7f06f4b90e10>
move onto config mode
switch features ev version=0x1,msg_type=0x6,msg_len=0xb0,xid=0x581ce2e4,OFPSwitchFeatures(actions=1779,capabilities=7,datapath_id=123917682136127,n_buffers=0,n_tables=1,ports={1: OFPPhyPort(port_no=1,hw_addr='b5:fd:73:21:39:b2',name='eth0',config=0,state=1,curr=136,advertised=0,supported=0,peer=0), 2: OFPPhyPort(port_no=2,hw_addr='88:ea:9f:bc:cb:0e',name='eth1',config=0,state=1,curr=136,advertised=0,supported=0,peer=0), 3: OFPPhyPort(port_no=3,hw_addr='cd:15:0d:fe:06:ca',name='eth2',config=0,state=1,curr=136,advertised=0,supported=0,peer=0)})
move onto main mode
connected socket:<eventlet.greenio.base.GreenSocket object at 0x7f06f4b90590> address:('10.0.1.99', 49327)
hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x7f06f4b90d90>
move onto config mode
switch features ev version=0x1,msg_type=0x6,msg_len=0xb0,xid=0xc8d4747a,OFPSwitchFeatures(actions=1779,capabilities=7,datapath_id=123917682136127,n_buffers=0,n_tables=1,ports={1: OFPPhyPort(port_no=1,hw_addr='1c:b3:1e:fa:57:6a',name='eth0',config=0,state=1,curr=136,advertised=0,supported=0,peer=0), 2: OFPPhyPort(port_no=2,hw_addr='2d:9f:46:f3:12:43',name='eth1',config=0,state=1,curr=136,advertised=0,supported=0,peer=0), 3: OFPPhyPort(port_no=3,hw_addr='e0:7f:be:e7:0b:b4',name='eth2',config=0,state=1,curr=136,advertised=0,supported=0,peer=0)})
move onto main mode
...

thanks!
Ben
« Last Edit: August 26, 2016, 04:43:29 PM by benleb »

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 370
    • View Profile
    • Northbound Networks
Re: Connection to controller flapping
« Reply #5 on: August 26, 2016, 04:52:09 PM »
Hi Ben,

Can you please describe your setup, what's connected to what, etc. so we can work through what the issue may be.

Regards,
Paul

*

benleb

  • Newbie
  • *
  • 5
    • View Profile
Re: Connection to controller flapping
« Reply #6 on: August 26, 2016, 05:31:12 PM »
Sure...

First setup is a Macbook with El Capitan, connected to the Zodiac by USB and Ethernet to Port 4.
Second setup is a HP ProBook running Debian, connected to Zodiac by Ethernet to Port 4. USB Connection goes to the Macbook.

No Connections to the other Ports on the Zodiac for now. That shouldn't be the problem?

Tried different ethernet and usb cables now, nothing seems to work... even placed to zodiac on the other side of my table to test but no luck...

More info needed? which?

Thanks!

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 370
    • View Profile
    • Northbound Networks
Re: Connection to controller flapping
« Reply #7 on: August 26, 2016, 05:47:18 PM »
Hi Ben,

I noticed that with both tests you were using OpenFlow 1.0, try again with RYU and OpenFlow 1.3 by running simple_switch_13.py. Unfortunately POX only supports OpenFlow 1.0 so you can't try it with that.

Regards,
Paul

*

benleb

  • Newbie
  • *
  • 5
    • View Profile
Re: Connection to controller flapping
« Reply #8 on: August 26, 2016, 06:18:35 PM »
Thanks, Paul! It works!  :D

But why not with 1.0? It seems that this isn't a general problem?
« Last Edit: August 26, 2016, 06:24:31 PM by benleb »

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 370
    • View Profile
    • Northbound Networks
Re: Connection to controller flapping
« Reply #9 on: August 26, 2016, 06:43:31 PM »
Looks like there is some sort of issue with the OF 1.0 code, I'll take a look. Not a lot of people are still using 1.0 so I'm not sure when it started happening, but I'm glad you got it working.

Regards,
Paul

*

M.Ibrahem

  • Newbie
  • *
  • 26
    • View Profile
Re: Connection to controller flapping
« Reply #10 on: August 30, 2016, 09:43:58 AM »
Hi Paul,
i am gonna to use zodiac with POX controller.
are there any recent problems with POX controller till now ??

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 370
    • View Profile
    • Northbound Networks
Re: Connection to controller flapping
« Reply #11 on: August 30, 2016, 05:40:43 PM »
Hi,

Normally POX works fine however it's looks like a bug was introduced into the OpenFlow 1.0 code at some point, it will be fixed before the next update. That said, I would recommend using a more modern controller like RYU if possible.

Regards,
Paul

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 370
    • View Profile
    • Northbound Networks
Re: Connection to controller flapping
« Reply #12 on: September 03, 2016, 11:03:59 AM »
Seemed to be a OF 1.0 issue with the heart timeout code added in v0.64, it has now been fixed in v0.66.

Regards,
Paul
« Last Edit: September 07, 2016, 09:58:51 AM by Paul Zanna »