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: 7802
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
No. Time Source Destination Protocol
Length Info
1 0.000000000 10.37.73.181 10.37.73.180 TCP 60
ssp-client > 6633 [FIN, ACK] Seq=1 Ack=1 Win=65000 Len=0
Frame 1: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: OpenflowClient:45:00 (<MASKED>), Dst: Ibm_68:c8:b0 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.181 (10.37.73.181), Dst:
10.37.73.180 (10.37.73.180)
Transmission Control Protocol, Src Port: ssp-client (7801), Dst Port: 6633
(6633), Seq: 1, Ack: 1, Len: 0
No. Time Source Destination Protocol
Length Info
2 0.037729000 10.37.73.180 10.37.73.181 TCP 54
6633 > ssp-client [ACK] Seq=1 Ack=2 Win=29200 Len=0
Frame 2: 54 bytes on wire (432 bits), 54 bytes captured (432 bits) on interface 0
Ethernet II, Src: Ibm_68:c8:b0 (<MASKED>), Dst: OpenflowClient:45:00 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.180 (10.37.73.180), Dst:
10.37.73.181 (10.37.73.181)
Transmission Control Protocol, Src Port: 6633 (6633), Dst Port: ssp-client
(7801), Seq: 1, Ack: 2, Len: 0
No. Time Source Destination Protocol
Length Info
3 179.143410000 10.37.73.181 10.37.73.180 TCP 60
ssp-client > 6633 [RST, ACK] Seq=502051935 Ack=3084556325 Win=1 Len=0
Frame 3: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: OpenflowClient:45:00 (<MASKED>), Dst: Ibm_68:c8:b0 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.181 (10.37.73.181), Dst:
10.37.73.180 (10.37.73.180)
Transmission Control Protocol, Src Port: ssp-client (7801), Dst Port: 6633
(6633), Seq: 502051935, Ack: 3084556325, Len: 0
No. Time Source Destination Protocol
Length Info
4 1015.818782000 10.37.73.181 10.37.73.180 ICMP 70
Destination unreachable (Port unreachable)
Frame 4: 70 bytes on wire (560 bits), 70 bytes captured (560 bits) on interface 0
Ethernet II, Src: OpenflowClient:45:00 (<MASKED>), Dst: Ibm_68:c8:b0 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.181 (10.37.73.181), Dst:
10.37.73.180 (10.37.73.180)
Internet Control Message Protocol
No. Time Source Destination Protocol
Length Info
5 1015.818805000 10.37.73.181 10.37.73.180 ICMP 70
Destination unreachable (Port unreachable)
Frame 5: 70 bytes on wire (560 bits), 70 bytes captured (560 bits) on interface 0
Ethernet II, Src: OpenflowClient:45:00 (<MASKED>), Dst: Ibm_68:c8:b0 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.181 (10.37.73.181), Dst:
10.37.73.180 (10.37.73.180)
Internet Control Message Protocol
No. Time Source Destination Protocol
Length Info
6 1116.416962000 10.37.73.181 10.37.73.180 TCP 60
[TCP Port numbers reused] ssp-client > 6633 [SYN] Seq=0 Win=65000 Len=0
MSS=1460
Frame 6: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: OpenflowClient:45:00 (<MASKED>), Dst: Ibm_68:c8:b0 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.181 (10.37.73.181), Dst:
10.37.73.180 (10.37.73.180)
Transmission Control Protocol, Src Port: ssp-client (7801), Dst Port: 6633
(6633), Seq: 0, Len: 0
No. Time Source Destination Protocol
Length Info
7 1116.715535000 10.37.73.181 10.37.73.180 TCP 60
[TCP Retransmission] ssp-client > 6633 [SYN] Seq=0 Win=65000 Len=0 MSS=1460
Frame 7: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: OpenflowClient:45:00 (<MASKED>), Dst: Ibm_68:c8:b0 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.181 (10.37.73.181), Dst:
10.37.73.180 (10.37.73.180)
Transmission Control Protocol, Src Port: ssp-client (7801), Dst Port: 6633
(6633), Seq: 0, Len: 0
No. Time Source Destination Protocol
Length Info
8 1117.015247000 10.37.73.181 10.37.73.180 TCP 60
[TCP Retransmission] ssp-client > 6633 [SYN] Seq=0 Win=65000 Len=0 MSS=1460
Frame 8: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: OpenflowClient:45:00 (<MASKED>), Dst: Ibm_68:c8:b0 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.181 (10.37.73.181), Dst:
10.37.73.180 (10.37.73.180)
Transmission Control Protocol, Src Port: ssp-client (7801), Dst Port: 6633
(6633), Seq: 0, Len: 0
No. Time Source Destination Protocol
Length Info
9 1117.315306000 10.37.73.181 10.37.73.180 TCP 60
[TCP Retransmission] ssp-client > 6633 [SYN] Seq=0 Win=65000 Len=0 MSS=1460
Frame 9: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on interface 0
Ethernet II, Src: OpenflowClient:45:00 (<MASKED>), Dst: Ibm_68:c8:b0 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.181 (10.37.73.181), Dst:
10.37.73.180 (10.37.73.180)
Transmission Control Protocol, Src Port: ssp-client (7801), Dst Port: 6633
(6633), Seq: 0, Len: 0
No. Time Source Destination Protocol
Length Info
10 1117.864848000 10.37.73.181 10.37.73.180 TCP 60
[TCP Retransmission] ssp-client > 6633 [SYN] Seq=0 Win=65000 Len=0 MSS=1460
Frame 10: 60 bytes on wire (480 bits), 60 bytes captured (480 bits) on
interface 0
Ethernet II, Src: OpenflowClient:45:00 (<MASKED>), Dst: Ibm_68:c8:b0 (<MASKED>)
Internet Protocol Version 4, Src: 10.37.73.181 (10.37.73.181), Dst:
10.37.73.180 (10.37.73.180)
Transmission Control Protocol, Src Port: ssp-client (7801), Dst Port: 6633
(6633), Seq: 0, Len: 0
------------------------------------------------------------------------------
_______________________________________________
Ryu-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ryu-devel