Host_A tries to send some data to Host_B over TCP. Host_B is listening on port 4712. Host_A is a remote PC connected on a dedicated WAN. Host_B is a local embedded device based on embOS OS, connected to the WAN throuth a pair of redundant (HSRP) CISCO routers.
When Host A tries to establish a TCP session, even through a simple telnet command, Host B sends initially an [ACK,SYN] followed by a [RST].
Host A (client) --> Host B (server) SYN
Host B (server) --> Host A (client) SYN-ACK
Host B (server) --> Host A (client) RST-ACK
Host A (client) --> Host B (server) ACK
This happens about 8 times out of ten. The rest of the times, instead, the session opens and protocol starts.
I am wondering under what circumstance does a TCP listener send [RST,ACK] after sending [SYN,ACK] in response to a [SYN]?
Note: this happens only when connecting through redundant CISCO routers (virtual MAC and virtual gateway IP), otherwise everything works 100% fine all the time.