Clustering testing network setup
This network setup helps to perform checks on your cluster software with various network issues may happen in production time. Overall network setup is preseneted on fugure below:
This setup include:
- four networks:
n1,n2,n3,n4. These networks can represent your physical machines. To run process in particular network namespace, you can useip netns exec n1 my-appor for dockerdocker run -n n1 myimage - two software briges, that can be compared to network hub/switch in real world:
vbr-leftandvbr-right - lines on figure represents virtual links, that will be wires in real world.
Let's start nc server in network n3:
#ip netns exec <network-name> <command>
ip netns exec n3 nc -l 0.0.0.0 8080 Run client and send hello to nc server from network n1:
echo hello | ip netns exec n1 nc 192.168.10.3 8080For example, to simulate broken connection between two datacenters, just shut down one end of link between two bridges:
ip link set vbr-left2right down