0

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?
ProfHase85
  • 451
  • 3
  • 6
  • 13

1 Answers1

2

Your machines are probably unreachable because of ARP timeout issues.

You can trying sending out an unsolicited/gratuitous ARP rught after the IP swap with a tool like "arping", with something like arping -U 10.0.0.1 (see also: How to broadcast ARP update to all neighbors in Linux?)

unlink
  • 690
  • 7
  • 12