Ucarp

From AleikoumWiki

(Difference between revisions)
Jump to: navigation, search
(Sur le Master)
Line 40: Line 40:
# Virtual IP configuration file for UCARP
# Virtual IP configuration file for UCARP
# The number (from 001 to 255) in the name of the file is the identifier
# The number (from 001 to 255) in the name of the file is the identifier
-
PASSWORD="labase-vip"
+
PASSWORD="plop"
BIND_INTERFACE="eth0"
BIND_INTERFACE="eth0"
VIP_INTERFACE="eth0:0"
VIP_INTERFACE="eth0:0"
Line 65: Line 65:
ONPARENT=no
ONPARENT=no
</pre>
</pre>
- 
=== Sur le Backup ===
=== Sur le Backup ===

Revision as of 09:46, 1 February 2008

Voila ce que j'ai retenu de la mise en place d'Ucarp... bon je risque de corriger plus d'une fois cette page mais apres tout c'est un wiki et c'est fait pour ca !

A VENIR !!!!

Contents

Objectif

On a deux machines A et B.
Ces machines sont "identiques" !


La mise en place

Environnement

Scripts indispensables

/etc/sysconfig/carp/vip-down

#!/bin/sh
exec /sbin/ifconfig $1 down


/etc/sysconfig/carp/vip-up
#!/bin/sh
# We could use ifup directly, but it complains if the address is already used
. /etc/sysconfig/network-scripts/ifcfg-$1
exec /sbin/ifconfig $1 ${IPADDR} netmask ${NETMASK} up


Sur le Master

/etc/sysconfig/carp/vip-100.conf

# Virtual IP configuration file for UCARP
# The number (from 001 to 255) in the name of the file is the identifier
PASSWORD="plop"
BIND_INTERFACE="eth0"
VIP_INTERFACE="eth0:0"
OPTIONS="-k 1 -P"

/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=10.10.10.110
NETMASK=255.255.255.0


/etc/sysconfig/network-scripts/ifcfg-eth0:0

DEVICE=eth0:0
BOOTPROTO=static
IPADDR=10.10.10.100
NETMASK=255.255.255.0
ONBOOT=no
ONPARENT=no

Sur le Backup

/etc/sysconfig/carp/vip-100.conf

# Virtual IP configuration file for UCARP
# The number (from 001 to 255) in the name of the file is the identifier
PASSWORD="labase-vip"
BIND_INTERFACE="eth0"
VIP_INTERFACE="eth0:1"
OPTIONS="-k 10 -P"


/etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE=eth0
BOOTPROTO=static
IPADDR=10.10.10.107
NETMASK=255.255.255.0
ONBOOT=yes
TYPE=Ethernet


/etc/sysconfig/network-scripts/ifcfg-eth0:1

DEVICE=eth0:1
BOOTPROTO=static
IPADDR=10.10.10.100
NETMASK=255.255.255.0
ONBOOT=no
ONPARENT=no

Liens

http://gentoo-wiki.com/HOWTO_Setup_IP_failover_with_UCARP

Personal tools