Search code examples
windowsnetwork-programmingsimulate

Windows simulate network cable loss


I'm trying to program some tool and i want to simulate a network cable lose with it. So i want to get the same effect like i unplug the networkcable from my computer and plug it in again. It's not the same as the '/renew' / '/release' commands. When i disconnect / connect it manualy it look likes windows remember some things and it's connected very fast back again. Is it possible and maybe how to do it in code?

Thank you very much!


edit: I found another program that just blocks all ports, this is ok for me too but how to do in code :).


Solution

  • You should set the fetch and send data bitrate to 0

    Alternatively you could just set the receive bitrate to 0 bits and leave the send untouched this would also simulator the same.