I have two servers and I used my own embedded system with LwIP to do connection to these server.
My embedded system with LwIP is the client and I have server1 and server2. I connected to server1 and end the connection before connecting to server2.
Further breakdown on the flow:
- Client creates New Socket with server1
- Client sent DNS packet to obtain server1's ip address; received ACK from AP
- Client send TCP SYN packet;
- Server1 send TCP SYN-ACK and perform some data transmission
- Client ends connection with server1 by sending TCP RST packet; and close socket
- Client creates New Socket with server2
- Client sent DNS packet to obtain server2's ip address; received ACK from AP
- Client send TCP SYN packet to server2
- Server2 send TCP SYN-ACK and perform some data transmission
- Client ends connection with server2 by sending TCP RST packet; and close socket
However, sometimes server2 did not response to client's SYN Packet which is in Step 9. Its only happens sometime. I checked several forum like:
[1] Why would a server not send a SYN/ACK packet in response to a SYN packet
[2] Server not sending a SYN/ACK packet in response to a SYN packet
My code does not enable window scaling. I cannot check the server as its a private server, so I am not very sure if it was dropped. My environment is quite noisy and busy with many routers plus communication devices. This problem only happens in noisy environment but not in a cleaner environment.
What can I do as a client to fix this problem?