-
- Lurker
- Posts: 2
- Liked: never
- Joined: Oct 31, 2012 10:25 am
- Full Name: Fabrizio Brintazzoli
- Contact:
Re-IP linux server
Hi! Does anybody knows how to apply Re-IP rules to linux server? Thank you!
-
- VP, Product Management
- Posts: 27371
- Liked: 2799 times
- Joined: Mar 30, 2009 9:13 am
- Full Name: Vitaliy Safarov
- Contact:
Re: Re-IP linux server
Hi Fabrizio, re-IP is only supported for Windows VMs at this time. Thank you!
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Re-IP linux server
You can use a simple in-guest script to do this outside of Veeam itself. This exact process varies based on the specific Linux distribution, but I previously used a simple script that I included in rc.local that would attempt to ping the default gateway, and if it failed, it updated to the secondary IP address. I think there was an example posted to this forum previously.
-
- Chief Product Officer
- Posts: 31804
- Liked: 7298 times
- Joined: Jan 01, 2006 1:01 am
- Location: Baar, Switzerland
- Contact:
Re: Re-IP linux server
Below is Tom's post from internal forums regarding this:
At my old job we used a script in rc.local (for the non-linux versed, it's run during each boot). The script would attempt to ping the default gateway and, if it failed, would swap the network configuration and restart the network services. It was something like this:
The above is just a concept, our actual script was a quite a bit more sophisticated, but the point is it's pretty easy to deal with the issue.
At my old job we used a script in rc.local (for the non-linux versed, it's run during each boot). The script would attempt to ping the default gateway and, if it failed, would swap the network configuration and restart the network services. It was something like this:
Code: Select all
#!/bin/sh
TARGET=`ip route | awk '/default via/ {print $3}'`
RET=`ping -c $PACKETS $TARGET 2> /dev/null | awk '/packets received/ {print $4}'`
if [ "$RET" -ne "$PACKETS" ]; then
echo "Gateway unreachable...swapping to secondary network."
mv /etc/sysconfig/network /etc/sysconfig/network.pri
mv /etc/sysconfig/network.sec /etc/sysconfig/network
service network restart
else
echo "Network is up via $TARGET"
fi
-
- Lurker
- Posts: 2
- Liked: never
- Joined: Oct 31, 2012 10:25 am
- Full Name: Fabrizio Brintazzoli
- Contact:
Re: Re-IP linux server
Thank you very much !!! Fabrizio
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Re-IP linux server
This particular script was used with Redhat based variants, probably RHEL4 and RHEL5. It would likely need some tweaks and changes for newer versions or other distros like Ubuntu.
-
- Novice
- Posts: 7
- Liked: never
- Joined: Mar 18, 2014 3:38 pm
- Contact:
Re: Re-IP linux server
Does anyone know of a script that would Re-IP Linux (SLES & RHEL) from the DR side with say PowerCLI or VIX API?
-
- VP, Product Management
- Posts: 6035
- Liked: 2860 times
- Joined: Jun 05, 2009 12:57 pm
- Full Name: Tom Sightler
- Contact:
Re: Re-IP linux server
I haven't tested this with recent RHEL variants, but PowerCLI has a Set-VMGuestNetworkInterface command that certainly worked back in the RHEL5 days and actually was extensible with custom scripts for other Linux. It's use was relatively simple:
So this would attempt to find an interface currently in the 192.168.1.0 subnet and would change the IP address of that interface to 192.168.2.10. Obviously you could get more complex to do cooler things like network mapping. I tested this in my lab on a RHEL5 VM (vSphere 5.5 infrastructure) and the IP changed. You must of course have VMware tools installed in the guest VM.
Code: Select all
$cred = Get-Credential
$interface = Get-VMGuestNetworkInterface -VM lnx01 -GuestCredential ($cred) | ?{ $_.Ip -like "192.168.1.*"}
Set-VMGuestNetworkInterface -VMGuestNetworkInterface $interface -Ip 192.168.2.10 -Netmask 255.255.255.0 -Gateway 192.168.2.1 -GuestCredential $cred
-
- Novice
- Posts: 7
- Liked: never
- Joined: Mar 18, 2014 3:38 pm
- Contact:
Re: Re-IP linux server
Awesome, thanks tsightler!
-
- Lurker
- Posts: 1
- Liked: never
- Joined: Dec 02, 2014 3:07 pm
- Full Name: Nir
- Contact:
[MERGED] Re-IP scripts for Linux
Hello everyone,
I'm trying to come up with a Bash-based solution for Re-IP functionality in Linux.
Has anyone here succeeded in creating a working Re-IP functionality for Linux systems, specifically RHEL 6 and 7?
I've been looking around and found https://www.vmware.com/support/develope ... rface.html
Which states it works only on various Windows systems and on RHEL 5.
If anyone has a working solution I would greatly appreciate it if you would be willing to share it with me.
Thanks in advance,
Nir.
I'm trying to come up with a Bash-based solution for Re-IP functionality in Linux.
Has anyone here succeeded in creating a working Re-IP functionality for Linux systems, specifically RHEL 6 and 7?
I've been looking around and found https://www.vmware.com/support/develope ... rface.html
Which states it works only on various Windows systems and on RHEL 5.
If anyone has a working solution I would greatly appreciate it if you would be willing to share it with me.
Thanks in advance,
Nir.
-
- Novice
- Posts: 6
- Liked: never
- Joined: May 09, 2016 2:41 pm
- Full Name: Jeff
- Contact:
Re: Re-IP linux server
Now that I have a requirement to do this and it's been almost five years since this the topic was brought up... does anyone know if-and-or-when the feature will be supported?
-
- Product Manager
- Posts: 20400
- Liked: 2298 times
- Joined: Oct 26, 2012 3:28 pm
- Full Name: Vladimir Eremin
- Contact:
Re: Re-IP linux server
We cannot provide any comments regarding future product versions. So, for now the in-guest re-ip script is the only way to go. Thanks.
-
- Enthusiast
- Posts: 52
- Liked: never
- Joined: Oct 28, 2015 9:36 pm
- Full Name: Joe Brancaleone
- Contact:
Re: Re-IP linux server
Are there any updated best practices or planned functionality for the topic of re-IP on Linux replicas? Someone posted a script above that worked pretty well until we started deploying RHEL8, so I'm just wondering how folks are handling some kind of automated network reconfigs for Linux failover processes.
-
- Enthusiast
- Posts: 52
- Liked: never
- Joined: Oct 28, 2015 9:36 pm
- Full Name: Joe Brancaleone
- Contact:
Re: Re-IP linux server
Following up on my inquiry last week, have Veeam engineers or any users come up with an updated Linux script solution that works with RHEL 8 commands and resolves the hardware address conflict created by the failed over and power up Veeam process?
In the Linux script under RHEL 8, neither bouncing the network services nor NetworkManager services have any effect on network interface changes performed dynamically using the nmcli command.
In the new (DR) environment, the HWADDR paramenter in the ifcfg-<DEVICE> (e.g. ifcfg-ens192) file is initializzed to the old (PROD) hardware address but in the new (DR) environment, a different hardware address is assigned. This hardware address conflict is preventing the network interface from coming up and allowing the Linux script to perform its re-IP steps.
In the Linux script under RHEL 8, neither bouncing the network services nor NetworkManager services have any effect on network interface changes performed dynamically using the nmcli command.
In the new (DR) environment, the HWADDR paramenter in the ifcfg-<DEVICE> (e.g. ifcfg-ens192) file is initializzed to the old (PROD) hardware address but in the new (DR) environment, a different hardware address is assigned. This hardware address conflict is preventing the network interface from coming up and allowing the Linux script to perform its re-IP steps.
-
- Enthusiast
- Posts: 52
- Liked: never
- Joined: Oct 28, 2015 9:36 pm
- Full Name: Joe Brancaleone
- Contact:
-
- Veeam Software
- Posts: 745
- Liked: 191 times
- Joined: Nov 01, 2016 11:26 am
- Contact:
Re: Re-IP linux server
Hello Joe,
I have asked our QA engineer in case they have some scripts for RHEL 8 but unfortunately without luck. No best practices either. However, the topic is interesting, I cannot promise a lot but we'll research.
Thanks
I have asked our QA engineer in case they have some scripts for RHEL 8 but unfortunately without luck. No best practices either. However, the topic is interesting, I cannot promise a lot but we'll research.
Thanks
Who is online
Users browsing this forum: Baidu [Spider] and 122 guests