Assume a physical switch with the following physical or virtual nodes connected to it (we are talking about a lab environment):
- "client" at 192.168.1.1, it sends requests to 192.168.1.2
- "server1" at 192.168.1.2
- "server2" at 192.168.1.2 (this IP is not an error)
- "controller" at 192.168.1.100
The target is configure all system in a way that "controller" can decide if the client must work with server1 or with server2. That is, a command in the controller must modify network in order that "client" sees at address 192.168.1.2 the server1 or the server2.
I'm thinking on following possibilities:
- using VLANs: VLAN 10 (by example) will contain the client and the server that must receive its request. The controller should modify which of the server1 or server2 belongs to the VLAN 10.
- using a virtual switch created in the controller: this virtual switch will have as connections the client and the server related to it. The controller must connect/disconnect to the virtual switch server1 or server2.
- tricking ARP: disable ARP answer in both server1 and server2. The controller will answer to ARP queries for 192.168.1.2, giving as answer the address of the server1 or server2.
- ... (other options).
Any hint about the most common/feasible option? existing related software? (all machines are Linux ones).
The final objective is, in a lab, allow automatic testing. A test session could be, by example:
- clone server2 from a master image.
- apply patch under test to server2
- route traffic to server2
- execute automated test
in parallel, other clones of client and/or server could be in use by other test sessions.