Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
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 '12 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 –  ibrabeicker Nov 12 '12 at 18:39
1  
Disconnect the Ethernet cable on the other machine. That way, it won't be able to send anything. –  David Schwartz Nov 12 '12 at 22:05
add comment

1 Answer

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.
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.