Problems about Ryu app (ofctl_rest) on Zodiac switch

  • 6 Replies
  • 5997 Views
*

kodark

  • Newbie
  • *
  • 3
    • View Profile
Problems about Ryu app (ofctl_rest) on Zodiac switch
« on: June 09, 2016, 07:16:10 PM »
Hi, all

I run the simple_switch. It didn't have any problem.
but when I run the ofctl_rest. It has problem at flow table on zodiac FX.
when I run ofctl_rest. It has flow table, I can add my flow table and
Through the second moment My flow table's disappear.
when I tried to add new flow table or get flows stats or Get ports description
It have empty but I can get dpid with command /stats/portdesc/<dpid>.

Here my result
when i run  ofctl_rest and add flow

-------------------------------------------------------------------------

Zodiac_FX01(openflow)# show flows

-------------------------------------------------------------------------

Flow 1
 Match:
 Attributes:
  Table ID: 0                           Cookie:0xb020557a795565d8
  Priority: 0                           Duration: 26 secs
  Hard Timeout: 0 secs                  Idle Timeout: 0 secs
  Byte Count: 2657                      Packet Count: 31
  Last Match: 00:00:01
 Instructions:
  Apply Actions:
   Output: CONTROLLER

Flow 2
 Match:
  Destination MAC: 01:80:C2:00:00:0E
 Attributes:
  Table ID: 0                           Cookie:0x0
  Priority: 65535                               Duration: 26 secs
  Hard Timeout: 0 secs                  Idle Timeout: 0 secs
  Byte Count: 0                 Packet Count: 0
  Last Match: 00:00:26
 Instructions:
  Apply Actions:
   Output: CONTROLLER

Flow 3
 Match:
  In Port: 1
  Destination MAC: 08:62:66:7C:D3:A4
 Attributes:
  Table ID: 0                           Cookie:0xda92c9080ce936d4
  Priority: 2                           Duration: 26 secs
  Hard Timeout: 300 secs                        Idle Timeout: 60 secs
  Byte Count: 863                       Packet Count: 9
  Last Match: 00:00:01
 Instructions:
  Apply Actions:
   Output Port: 2

Flow 4
 Match:
  In Port: 1
  Destination IP:  192.168.1.111
 Attributes:
  Table ID: 0                           Cookie:0x1
  Priority: 1                           Duration: 18 secs
  Hard Timeout: 3000 secs                       Idle Timeout: 600 secs
  Byte Count: 360                       Packet Count: 6
  Last Match: 00:00:00
 Instructions:
  Apply Actions:
   Output Port: 2

Flow 5
 Match:
  In Port: 2
  Destination IP:  192.168.1.1
 Attributes:
  Table ID: 0                           Cookie:0x1
  Priority: 1                           Duration: 13 secs
  Hard Timeout: 3000 secs                       Idle Timeout: 600 secs
  Byte Count: 534                       Packet Count: 7
  Last Match: 00:00:01
 Instructions:
  Apply Actions:
   Output Port: 1
+++++++++++++++++++++++++++++++++++++

And This is ping from my com to another IP.
It work but when flow disappear It didn't work.

+++++++++++++++++++++++++++++++++++++
C:\Users\pon>ping -t5 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Reply from 192.168.1.1: bytes=32 time<1ms TTL=64
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Reply from 192.168.1.111: Destination host unreachable.
Request timed out.
Request timed out.

Ping statistics for 192.168.1.1:
    Packets: Sent = 13, Received = 7, Lost = 6 (46% loss),
Approximate round trip times in milli-seconds:
    Minimum = 0ms, Maximum = 0ms, Average = 0ms


++++++++++++++++++++++++++++++++
And result no Flows installed from zodiac FX
++++++++++++++++++++++++++++++++

Zodiac_FX01(openflow)# show flows
No Flows installed!

Could you help me fix problems, please ?

 :'(
Regards,
Ponlasit

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 373
    • View Profile
    • Northbound Networks
Re: Problems about Ryu app (ofctl_rest) on Zodiac switch
« Reply #1 on: June 09, 2016, 07:58:36 PM »
Hi Ponlasit,

It may be an issue with matching layer 2 packets i.e. ARP. You have matching flows for layer 3 (flows 4 & 5), but only a one-way flow for layer 2 (flows 2 &3). Maybe also set the timeouts to 0 also because some flows are 300 secs and others are 3000 secs.

Regards,
Paul

*

kodark

  • Newbie
  • *
  • 3
    • View Profile
Re: Problems about Ryu app (ofctl_rest) on Zodiac switch
« Reply #2 on: June 09, 2016, 08:52:44 PM »
Hi, Paul
This is a sample my flow.before I post it.
I setup flow Hard Timeout, Idle Timeout = 0 and setup layer 2 .
and It's as same as problem of sample. My flow table's disappear.
when I tried to add new flow table or get flows stats or Get ports description
It have empty but I can get dpid with command /stats/portdesc/<dpid>.

Regards,
Ponlasit

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 373
    • View Profile
    • Northbound Networks
Re: Problems about Ryu app (ofctl_rest) on Zodiac switch
« Reply #3 on: June 09, 2016, 09:39:12 PM »
Hi Ponlasit,

Can you please add the --verbose switch to your RYU command and post the output. Also which version of the firmware are you running?

Regards,
Paul

*

kodark

  • Newbie
  • *
  • 3
    • View Profile
Re: Problems about Ryu app (ofctl_rest) on Zodiac switch
« Reply #4 on: June 10, 2016, 02:42:03 AM »
Hi, Paul

I use ryu manager version 3.22 and zodiac FX version 0.61.
Sorry I didn't tell you I use run_sdn_hub.sh by sdn_hub. when i run.
OK, I found error: [Errno 104] Connection reset by peer
File "/home/ubuntu/ryu/ryu/lib/hub.py", line 52, in _launch .
then I run real directory of ofctl. I didn't get error 104.
But I have new problem about when I add flow table to zodiac
sometime my ping works, sometime my ping doesn't 
It shows destination host unreachable but my flow available.
Usually when I run simple switch(can ping) first and then
when run ofctl is no flow(can't ping) without add flow but run ofctl with add flow It works.
I don't know why I run ofctl first then It didn't work with same flow.

here error
    func(*args, **kwargs)
  File "/home/ubuntu/ryu/ryu/controller/controller.py", line 103, in deactivate
    method(self)
  File "/home/ubuntu/ryu/ryu/controller/controller.py", line 207, in _send_loop
    self.socket.sendall(buf)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 308, in sendall
    tail = self.send(data, flags)
  File "/usr/lib/python2.7/dist-packages/eventlet/greenio.py", line 293, in send
    total_sent += fd.send(data[total_sent:], flags)
error: [Errno 104] Connection reset by peer

connected socket:<eventlet.greenio.GreenSocket object at 0x7f0db0483d10> address:('192.168.1.50', 50170)
hello ev <ryu.controller.ofp_event.EventOFPHello object at 0x7f0db03d2d10>
move onto config mode
EVENT ofp_event->dpset EventOFPSwitchFeatures
switch features ev version: 0x4 msg_type 0x6 xid 0xe12823cc OFPSwitchFeatures(auxiliary_id=0,capabilities=7,datapath_id=123917682135216,n_buffers=0,n_tables=10)

 :'(
Regards,
Paul

*

Paul Zanna

  • Moderator
  • Sr. Member
  • *****
  • 373
    • View Profile
    • Northbound Networks
Re: Problems about Ryu app (ofctl_rest) on Zodiac switch
« Reply #5 on: June 12, 2016, 11:43:22 AM »
Hi Ponlasit,

It looks like the switch disconnects and then reconnects for some reason which is why the flows are lost.

Regards,
Paul

*

Clive

  • Newbie
  • *
  • 7
    • View Profile
Re: Problems about Ryu app (ofctl_rest) on Zodiac switch
« Reply #6 on: June 12, 2016, 06:37:58 PM »
Hi guys,

I had this same issue as well. While running Ryu ofctl_rest, sometimes the flows just disappear. Each time this happened, Ryu would pop up a message called DPSET: Multiple connections {dpid}. This is Ryu saying that more than one switch with the same dpid is trying to connect to it. So I think the Zodiac somehow disconnected and tried to reconnect. I just assume that its Zodiac being a bit unstable that this happens.

Kind Regards,
Clive