Working on a project which implements a clustering algorithm. One important property of the clustering is to respect guarantees when face a network partition.
To prove that clustering works I need a way to emulate partitions in my windows development environment.
In the following example i will use term node and in this context is a Tcp Listener which starts on an Ip and accepts incoming connections on a port. Ex in c#: new TcpListener("10.16.8.9", 12345)
Test case : N2 partitioned from N1 and N3
Given
I have a cluster of 3 nodes running on one NIC with 3 IPs
N1 running at 10.16.8.9
N2 running at 10.16.8.10
N3 running at 10.16.8.11
Dev can connect to N1, N2, N3
When
A partition occurrences for N2
Then
N2 cannot reach N1 and N3
N1 can reach N3
N3 can reach N1
Dev can connect to N1, N2, N3
Illustrated
What are my options if I want to block/restore the traffic flow from/to N2 with the windows tooling ?