<?xml version="1.0" encoding="utf-8"?><!DOCTYPE article  PUBLIC '-//OASIS//DTD DocBook XML V4.4//EN'  'http://www.docbook.org/xml/4.4/docbookx.dtd'><article><articleinfo><title>ucarp</title><revhistory><revision><revnumber>6</revnumber><date>2008-03-18 17:28:11</date><authorinitials>localhost</authorinitials><revremark>converted to 1.6 markup</revremark></revision><revision><revnumber>5</revnumber><date>2007-02-13 23:19:03</date><authorinitials>ac3bf1</authorinitials></revision><revision><revnumber>4</revnumber><date>2007-02-13 23:18:17</date><authorinitials>ac3bf1</authorinitials></revision><revision><revnumber>3</revnumber><date>2007-02-13 23:16:39</date><authorinitials>ac3bf1</authorinitials></revision><revision><revnumber>2</revnumber><date>2007-02-13 23:15:06</date><authorinitials>ac3bf1</authorinitials></revision><revision><revnumber>1</revnumber><date>2007-02-13 23:05:40</date><authorinitials>ac3bf1</authorinitials></revision></revhistory></articleinfo><para><ulink url="http://www.ucarp.org/project/ucarp"/> </para><para> 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). </para><para> 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. </para><para> Linux Flavor: Ubuntu </para><para> Per far girare UCARP su Debian/Ubuntu, bisogna creare un'interfaccia virtuale. Per fare cio basta inserire in <code>/etc/network/interfaces</code> qualcosa simile a: </para><screen><![CDATA[# Virtual Address
auto eth0:1
iface eth0:1 inet static
        address 10.10.10.1
        netmask 255.255.255.0]]></screen><para>riavviare <code>networking</code> da <code>inet.d</code> con <code>/etc/init.d/networking restart</code> </para><para> dando il comando <code>ucarp --help</code> si hanno le seguenti informazioni:</para><screen><![CDATA[root@newmate:/etc# ucarp --help
]]><![CDATA[
ucarp 1.1 - Dec 26 2004
]]><![CDATA[
--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)
]]><![CDATA[
Sample usage:
]]><![CDATA[
Manage the 10.1.1.252 shared virtual address on interface eth0, with
1 as a virtual address idenfitier, mypassword as a password, and
10.1.1.1 as a real permanent address for this host.
Call /etc/vip-up.sh when the host becomes a master, and
/etc/vip-down.sh when the virtual IP address has to be disabled.
]]><![CDATA[
ucarp --interface=eth0 --srcip=10.1.1.1 --vhid=1 --pass=mypassword \
      --addr=10.1.1.252 \
      --upscript=/etc/vip-up.sh --downscript=/etc/vip-down.sh
]]><![CDATA[
]]><![CDATA[
Please report bugs to bugs@ucarp.org.]]></screen><para>in seguito avviare ucarp con: </para><para><emphasis role="strong">DA COMPLETARE PRESTO...</emphasis> dato che ho un piccolo problema con gli indirizzi IP... </para><para>per farlo partire all'avvio inserire la stringa in un file in <code>/etc/rc2.d/S99NomeFileDiAvvio</code> o creare uno script e chiamare lo script da <code>rc2.d/S99NomeFileDiAvvio</code> per esempio. </para></article>