75 lines
2.3 KiB
Markdown
75 lines
2.3 KiB
Markdown
**Cette page a été importée automatiquement de notre ancien wiki mais n'a pas encore été révisée.**
|
|
|
|
# uvrrpd
|
|
|
|
Utiliser le demon vrrp [uvrrpd](https://forge.evolix.org/projects/uvrrpd)
|
|
|
|
# Paquet debian wheezy vrrpd
|
|
|
|
Utiliser le paquet evolix vrrpd wheezy avec différents patches ainsi qu'un script permettant d'utiliser les *macvlan* :
|
|
|
|
~~~
|
|
- debian/patches/010-vrrpd-1.0_to_1.0-1exp1
|
|
- debian/patches/120-orig_prio.patch
|
|
- debian/patches/150-fix_vrid_check.patch
|
|
- debian/patches/series
|
|
- debian/patches/100-external_script_enhanced.patch
|
|
- debian/patches/170-log_format.patch
|
|
- debian/patches/130-receive_multicast.patch
|
|
- debian/patches/140-vrrp_switch_macvlan.patch
|
|
- debian/patches/011-fix_compile_warnings.patch
|
|
- debian/patches/012-typo_help_auth_pw.patch
|
|
- debian/patches/110-slave_init_state.patch
|
|
- debian/patches/160-dont_handle_virtual_ip.patch
|
|
- [...]
|
|
- debian/vrrp_switch_macvlan
|
|
- debian/sysctl.vrrpd
|
|
- debian/README.macvlan
|
|
~~~
|
|
|
|
L'utilisation des macvlans permet l'utilisation des adresses mac virtuelles VRRP.
|
|
|
|
Pour cela :
|
|
|
|
* utiliser le script vrrp_switch_macvlan (/etc/vrrpd/vrrp_switch installé par défaut)
|
|
* utiliser l'option -x pour interdire à vrrpd de manipuler les interfaces en déléguant cette opération au script. Dans ce mode, vrrpd reçoit et emet des paquets VRRP et appelle /etc/vrrpd/vrrp_switch lors des changements d'états master/slave
|
|
* ne pas utiliser l'option -n
|
|
|
|
## Exemple
|
|
|
|
~~~
|
|
/usr/sbin/vrrpd -i eth0 -x -D -d 10 -v 42 -p 100 -l wan 192.168.1.240
|
|
|
|
## VRRP instance "wan"
|
|
# -i eth0 : bind to eth0 (wan interface)
|
|
# -x : don't handle the virtual IP address
|
|
# -D : daemonize
|
|
# -d 10 : 10s between advertisement, 1s by default
|
|
# -v 42 : VRID
|
|
# -p 100 : priority 100
|
|
# -l wan : Name of vrrp instance (for logging purpose)
|
|
~~~
|
|
|
|
Dans l'état master, l'interface vrrp_${vrid}_${interface} est crée avec la VIP et l'adresse mac VRRP 00:00:5e:00:01:${vrid} (ici interface vrrp_42_eth0, VIP 192.168.1.240 et la mac 00:00:5e:00:01:2a).
|
|
|
|
## Sysctls
|
|
|
|
Voir /usr/share/doc/vrrpd/sysctl.vrrpd
|
|
|
|
~~~
|
|
net.ipv4.conf.default.rp_filter=0
|
|
net.ipv4.conf.all.rp_filter=0
|
|
net.ipv4.conf.all.arp_ignore=1
|
|
net.ipv4.conf.all.arp_announce=2
|
|
~~~
|
|
|
|
## Logs
|
|
|
|
Logs dans /var/log/daemon
|
|
|
|
Historique des changements d'états dans /var/log/vrrpd/state.$vrid
|
|
|
|
Etat courant dans /var/run/vrrpd/vrrp-${instance_name}
|
|
|
|
Fichier pid /var/run/vrrpd_${instance_name}_${vrid}.pid
|