4

I have 2 applications that communicate through TCP. They keep their connection through a heartbeat of 30 seconds. I need to simulate a scenario where one side fails to send this heartbeat to test the timeout. Is there any programs or a tool in Windows itself to do such thing?

Disconnecting the ethernet cable doesn't work as the program receives a disconnection event from windows

3
  • Do you need both applications to stay up and running and just break the channel between them, or can one of them be killed?
    – Massimo
    Nov 12, 2012 at 17:29
  • @Massimo if either of them is killed or the conexion is lost, they send a disconnection to eachother, I need the connection to stay up, just idle for longer than the heartbeat interval Nov 12, 2012 at 18:39
  • 1
    Disconnect the Ethernet cable on the other machine. That way, it won't be able to send anything. Nov 12, 2012 at 22:05

1 Answer 1

6

There are a couple of possible ways to do this:

  • Try setting a firewall on one of the machines, and blocking the packets from the other side.
  • If you cannot install a firewall, try the same as above, with another box (pc with two interfaces, router,...) inbetween, forwarding packets from one side to another, then filter the packets on the box (you can also bridge the two interfaces, and just add filter rules).
  • Add a switch inbetween, and put them into same vlan. After heartbeat is working, put one of the ports to another vlan (link state will still be up, but traffic won't go through. If you have ACL support on the switch, you can achieve the same with ACLs.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .