I got two virtual machines running on SLES11 SP3 in the same subnet for which I' d like to swap ip-addresses on the fly. I tried the following script (of course with both different ip parameters) on both machines (login via ssh on both and than call it):
#! /bin/bash
sleep 20
ifconfig eth0 [[old_ip/new_ip]] netmask 255.255.255.0
Which caused both machines to be unreachable.
- What did I do wrong? Maybe yast plays a role?
- Any better idea how to perform the swap?