W5300 does not respond to SYN request from peer
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Ethernet Chips
No replies yet. Be the first to reply.
Join the discussion.
Share projects and connect with makers.
Joined before the site update? first.
New to WIZnet Makers?
We sent a verification link to your address. Open it to activate your account, then log in.
Accounts from this email provider are reviewed by an administrator after verification. Approval usually takes one business day.
Already have an account?
Enter your email address. If it belongs to an account, we'll send a link to set a new password. Members who joined before the site update use this to set their password.
If an account uses that address, we sent a link to set a new password. The link works once and expires in 30 minutes.
Know your password?
Need an account?
RE: W5300 does not respond to SYN request from peer
by becky ·
Hi
This problem is due to your network configuration.
10.54.53.240 is in a different network band from 10.15.1.80, and it is judged that the packet transmitted from 10.54.53.240 does not reach 10.15.1.80.
RE: RE: W5300 does not respond to SYN request from peer
by sensiwood ·
Hi Becky,
Thanks a lot for your reply.
Do you mean sub-net by ‘network band’?
Yes apparently both 10.54.53.240 and 10.10.28.240 are not in the same network with 10.15.1.80; they are the source IP addresses from the remote sites. But they are correctly routed into the local network where 10.15.1.80. There is one router between 10.15.1.80 and WAN. The LAN port of the router has one IP address 10.15.1.250 which is used by the local host as the gateway. I think it is a typical scenario of routing.
I attached the other Wireshark capture which shows a successful case in the same scenario, so the network architecture should be good. Note the SYN and SYN ACK at packet ID 296, 297.Wiznet packets capture when good condition.zip (12.7 KB)
Sorry I missed one point in the original description. In our project, both remote IP addresses could communicate with 10.15.1.80 successfully at the start. But if you leave the system run about 2 weeks, the issue as described above would happen.
Two capture files show the apparent differences.
Thanks!
RE: W5300 does not respond to SYN request from peer
by Eugeny ·
It looks like really W5300 ignores the packets not responding to them, even to the retramsmitted one - thus it is not just a kind of “packet loss” - it is steady behavior in some W5300 state.
You must prove it - that when this happens, you have at least one socket in LISTEN state. If you have diagnostic terminal to W5300, then program its driver to print all common and socket registers into this diagnostic output (e.g. pressing a key on the diag terminal) so that you can see whole the configuration when issue happens.
I suspect it is not correct assumption. In my web server application, when client’s web browser issues more requests than sockets available, all new requests are “hung” - browser keeps waiting, until it timeouts. This means for me that chip (I use W5100) simply does not respond - otherwise if browser’s stack would receive RST, it stopped waiting immediately.
Yes, it is controlled by the W5300 TCP/IP stack. Thus if something stops working, you first must look, carefully and thoroughly, into the current effective configuration of the chip at the time of the issue.
It confirms that chip is still operational, and there’s something else than faulty hardware.
Also logical as you reset whole configuration of the chip.
My conclusion - further troubleshooting is needed dumping all possible meaningful registers at the time after issue starts happening. I am sure we will find something interesting in the output.
RE: W5300 does not respond to SYN request from peer
by sensiwood ·
Hi Eugeny,
Sorry for the late reply.
I appreciate very much for your detailed comments.
And it is not possible at the moment to debug anything on the site so I was still trying to reproduce it on my own test bench. To dump all the registers is a good idea and I will try.
Hope I can come back with some useful information in following days.
Thanks again for your help!
RE: W5300 does not respond to SYN request from peer
by sensiwood ·
Hi Eugeny,
I did some tests on my test bench. The only way to reproduce the issue is, to set up two devices with the different IP addresses but the same MAC addresses.
Device 1 (TCP client), IP 192.168.30.10, MAC 00:01:19:01:01:01
Device 2 (TCP client), IP 192.168.30.11, MAC 00:01:19:01:01:01
Device 3 (TCP server), IP 192.168.30.17, MAC 00:01:19:64:01:02
All devices are connected to one switch to form a LAN.
Device 1 and 2 send the request to device 3 and device 3 responses.
I let the system run for some time (10 minutes) and I found device 3 does not send any response to SYN request any more. The only way to recover the communication is to reset the W5300. This is the similar phenomenon as our customer reports.
I reckon this is not desirable for LAN configuration because typically the MAC address over the LAN should be unique. But at the moment it is the only way to reproduce the issue stably.
And even if there are two MAC addresses on the LAN, this will confuse the switch only. For ARP table of the device, I think it should be OK if several target IP addresses use the same MAC address. Correct me if I am wrong.
When the issue happens, the register values I dumped from the firmware are:
MR: 0x01
IR: 0x00
IMR: 0x00
SHAR: 00:01:19:64:01:02
GAR: 0x0000
SUBR: 0x0fff
SIPR: 0xc0a81e11
RTR: 0xc350
RCR: 0x0008
TMSR: 0x0808080808080808
RMSR: 0x0808080808080808
MTYPER: 0x00ff
UIPR: 0x00000000
UPORTR: 0x0000
FMTUR: 0x0000
SOCK0
MR21
CR0
SR14
SOCK1
MR21
CR0
SR14
SOCK2
MR21
CR0
SR14
SOCK3
MR21
CR0
SR14
SOCK4
MR21
CR0
SR14
SOCK5
MR21
CR0
SR14
SOCK6
MR21
CR0
SR14
SOCK7
MR21
CR0
SR14
I cannot see obvious abnormal values from above. All sockets are in LISTENING status.
I also captured one situation that all sockets are in 0x17 status ESTABLISHED and the further SYN request will be responded with RST by w5300. It is reasonable.
And during the test, I ever read 0x1e and 0x11 status value of the socket randomly but they are not described in the manual. What do they mean?
Thanks!
RE: W5300 does not respond to SYN request from peer
by sensiwood ·
Dear support team of Wiznet,
I am still waiting for your response on my query.
Our customer keeps having similar phenomenon every 2 weeks or so.
Since the workaround provided by you does not work on my setup, I cannot positively reply anything to our customer yet.
The situation is getting more pressured when time elapsed without progress.
I hope you can understand it.
I think I have provided all the details I tested and all the dumped register values when the issue happened.
If you think that is not good enough for you to start working with, please let me know. I will provide more if possible.
Thanks!
RE: W5300 does not respond to SYN request from peer
by sensiwood ·
Dear support team,
Thanks for your reply.
I believe _SYN packet has been sent from the peer device and this SYN has also been captured by Wireshark using the port-mirroring switch, as I shared in my original message.
I re-pasted below for your reference.
And I am sure that when W5300 does not reply to new SYN packet, the existing established socket in W5300 still works.
As illustrated above, you can identify that @216 packet, there is a new SYN request from 10.54.53.240 to 10.15.1.80, but 10.15.1.80 (W5300) does not reply. But one existing socket on W5300 still works because 10.15.1.80 can still reply to 10.10.28.240.
About your second question about MAC address. Yes typically MAC address should be unique in one LAN. In this test, I only used this special configuration to reproduce the problem faster. In this configuration, W5300 opens and closes sockets very frequently which can produce the same phenomenon (W5300 not replying SYN request) in several minutes.
I think the errata sheet you shared was helpful; I need a workable method to clear the buffer and close the socket safely. Using your suggested workaround, the socket will not change into UDP mode, so my test program is locked up here. I re-attached my original email for your reference, which also includes the dumped register value.
Please support. If you need further verification or assistance from my side, please let me know.
Re Ticket#2018111201000127 W5300 does not respond to SYN request from peer.zip (114.8 KB)
RE: W5300 does not respond to SYN request from peer
by Eugeny ·
In this setup, if routing device is intelligent, it will have to decide which route to send the packets. It may simply appear that SYN packets are sent to wrong wire.
I would do it differently. I would put PC (Win or Linux) with two LAN cards in bridge mode between switch and W5300, and set up Wireshark on it. In this setup you will be able to see PC’s both interfaces, and be sure that respecive packets are travelling in the wire up to the W5300’s magjack.
RE: W5300 does not respond to SYN request from peer
by sensiwood ·
I have to clarify that, on my setup, I don’t use router. I only used a switch. The diagram is below.
Let the system run about 10 minutes and then device 3 cannot respond to any SYN request from device 1 or device 2. I reckon that two devices with same MAC address on the same LAN will confuse the switch, but this is the only scenario I can reproduce the same phenomenon reported by customer. After I remove the duplicated MAC address device from the network and rebooted the switch, the device 3 cannot still reply to incoming SYN request. So I suppose W5300 run into an unexpected status.
Write RST to MR1 register can restore W5300, but that will reset other working sockets on the same W5300. So I am querying if any method to prevent W5300 go into that status.
RE: W5300 does not respond to SYN request from peer
by sensiwood ·
Thanks for sharing this good idea. I will try to figure out how to do it on my setup.
RE: W5300 does not respond to SYN request from peer
by Eugeny ·
That does not guarantee that this switching device performs no packet filtering.
I suspect it is normal. After some time of operation intermediate network device decides on illegal devices and “disconnects” them.
Depending on the device, rebooting it may not clear cache. I think you must manually perform commands to reinitializate the tables / clear them.
Your diagram shows 3 W5300 devices, but you say that device 3 is affected. Clear everything, and swap switch ports of device 1 and device 2 - will another physical device become unresponsive?