Italiano English
Edit History Actions

UCARP allows a couple of hosts to share common virtual IP addresses in order to provide automatic failover. It is a portable userland implementation of the secure and patent-free Common Address Redundancy Protocol (CARP, OpenBSD’s alternative to the patents-bloated VRRP).
Strong points of the CARP protocol are: very low overhead, cryptographically signed messages, interoperability between different operating systems and no need for any dedicated extra network link between redundant hosts.

Linux Flavor: Ubuntu

Per far girare UCARP su Debian/Ubuntu, bisogna creare un'interfaccia virtuale. Per fare cio basta inserire in /etc/network/interfaces qualcosa simile a:

# Virtual Address
auto eth0:1
iface eth0:1 inet static

riavviare networking da inet.d con /etc/init.d/networking restart
dando il comando ucarp --help si hanno le seguenti informazioni:

root@newmate:/etc# ucarp --help

ucarp 1.1 - Dec 26 2004

--interface=<if> (-i <if>): bind interface <if>
--srcip=<ip> (-s <ip>): source (real) IP address of that host
--vhid=<id> (-v <id>): virtual IP identifier (1-255)
--pass=<pass> (-p <pass>): password
--preempt (-P): becomes a master as soon as possible
--addr=<ip> (-a <ip>): virtual shared IP address
--help (-h): summary of command-line options
--advbase=<seconds> (-b <seconds>): advertisement frequency
--advskew=<skew> (-k <skew>): advertisement skew (0-255)
--upscript=<file> (-u <file>): run <file> to become a master
--downscript=<file> (-d <file>): run <file> to become a backup
--deadratio=<ratio> (-r <ratio>): ratio to consider a host as dead
--shutdown (-z): call shutdown script at exit
--daemonize (-B): run in background
--facility=<facility> (-f): set syslog facility (default=daemon)

Sample usage:

Manage the shared virtual address on interface eth0, with
1 as a virtual address idenfitier, mypassword as a password, and as a real permanent address for this host.
Call /etc/ when the host becomes a master, and
/etc/ when the virtual IP address has to be disabled.

ucarp --interface=eth0 --srcip= --vhid=1 --pass=mypassword \
      --addr= \
      --upscript=/etc/ --downscript=/etc/

Please report bugs to

in seguito avviare ucarp con:

DA COMPLETARE PRESTO... dato che ho un piccolo problema con gli indirizzi IP...

per farlo partire all'avvio inserire la stringa in un file in /etc/rc2.d/S99NomeFileDiAvvio o creare uno script e chiamare lo script da rc2.d/S99NomeFileDiAvvio per esempio.