Small correction, the client is using source port as 7801.

-----Original Message-----
From: Guru Chaitanya Perakam 
Sent: Monday, July 27, 2015 12:46 PM
To: '[email protected]'
Subject: Ryu manager doesn't send FIN/ACK in response to FIN

Hi,

Issue:
=====
When an Openflow client closes the connection with Ryu Manager by sending a 
FIN, only ACK is sent in response.

FIN/ACK is not received by Openflow client. The TCP connection on Ryu Manager 
is moved to CLOSE-WAIT state.
 
This causes our switch (Openflow client) to wait in FIN-WAIT-2 state and then 
sends a Reset to Ryu Manager after some timeout.
Again when the switch uses the same source port for reconnection, the 
connection fails.

PFA packet dissections text file "ryn-find-issue.txt" with this mail.

Further observations:
=================
Thereafter, if I try to reconnect to Ryu Manager using same source port, the 
client is stuck in SYN-SENT state.

The below are the only ways to recover:
    1. Killing the Ryu manager sends the pending FIN/ACK messages.
    2. Reconnecting to Ryu Manager using different source port.
            a. At this state Ryu Manager is sending FIN/ACK for the previous 
source port also.

Please resolve this issue, I suspect that TCP connection cleanup is being 
performed only when some other activity happens.


Packet capture explanation:
======================
    1. RY Manager IP: 10.37.73.180
    Port:                          6633
    2. Switch (Openflow client) IP: 10.37.73.181
    Source Port:                                     7801

Packet 1:    Client sends a FIN to Ryu Manager
Packet 2:    Ryu Manager sends an ACK
Packet 3:    Client sends a RST to forcefully close the connection. (ICMP 
destination unreached is received for this message)
Packet 4,5: ICMP destination port unreached messages Packet 6,N: Client keeps 
on resending the SYN messages. (Client reuses the same source port 7801 for 
reconnection)


Logs on Ryu Manager:
=================
connected socket:<eventlet.greenio.base.GreenSocket object at 0x7f49316759d0> 
address:('10.37.73.181', 7801) hello ev <ryu.controller.ofp_event.EventOFPHello 
object at 0x7f4931675ad0> move onto config mode EVENT ofp_event->dpset 
EventOFPSwitchFeatures switch features ev version: 0x4 msg_type 0x6 xid 
0xa85d7a34 
OFPSwitchFeatures(auxiliary_id=0,capabilities=79,datapath_id=8398923215522496512,n_buffers=0,n_tables=1)
move onto main mode
EVENT ofp_event->dpset EventOFPStateChange
DPSET: register datapath <ryu.controller.controller.Datapath object at 
0x7f4931675a50> EVENT ofp_event->dpset EventOFPStateChange
DPSET: unregister datapath <ryu.controller.controller.Datapath object at 
0x7f4931675a50>


Netstat output on Linux where Ryu is installed:
===================================
tcp        0      0 Ubuntu-73.180:6633      10.37.73.181:7801       CLOSE_WAIT

Thanks & regards,
Guru Chaitanya Perakam



------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel

Reply via email to