In short, OMNeT++ and NS-3, both discrete event simulators, could be good choices for you, depending on your exact needs.
NS-3 is a network simulator that uses C++ and (optional) Python to simulate network protocols and (for example) real-life implementations taken directly from the Linux kernel among other application areas. Strong points are its accurate representation of flat packets, good emulation and socket support, PCAP output that enables analyzes with other tools like Wireshark and good community support. Weak points (compared to others) are probably the visualization, which is being enhanced compared to its ancestor ns-2, but still more or less an animation of traces.
For an overview of the supported models, take a look at this website.
OMNeT++ comes with its own IDE (Eclipse-based) and a GUI (nowadays QT-based) for the execution of simulations. A nice overview of the IDE is available online.
OMNeT++ uses C++ to define source code of protocols and applications and its own NED language to combine these implementations into (sub-)modules and networks, which in turn are simulated. The simulator has very good visualization support, which seriously outranks NS-3. It has an extensive library of predefined models, just like NS-3. Simulation models are usually grouped in larger frameworks, the INET framework would be the one of choice for your case. Here's a list of models included in INET. Community support is also quite good as you can see here on Stackoverflow or in the OMNeT Google Group.
From your statement ("detecting faulty communication between client and server"), I assume you are interested in communication faults on the application layer, not on the IP / TCP layers? Both simulators provide models for TCP/IP, but if you are interested in detailed simulations of Ethernet or WLAN, OMNeT++ might be a better start. If you want to use some existing custom application running in a VM and emulate the communication between both, NS-3 might be a better choice. If you want to exclude lower layers and simply try to implement basic message exchange between entities, I might also prefer OMNeT++.