Skip to content

Instantly share code, notes, and snippets.

@mfournier
Created December 17, 2013 15:16
Show Gist options
  • Select an option

  • Save mfournier/8006526 to your computer and use it in GitHub Desktop.

Select an option

Save mfournier/8006526 to your computer and use it in GitHub Desktop.
ucarp config
auto br0
iface br0 inet static
bridge_ports vlan192
bridge_stp off
ucarp-vid 4
ucarp-vip 11.22.33.44
ucarp-upscript /etc/network/vip-up.sh
ucarp-downscript /etc/network/vip-down.sh
ucarp-password mysecretpassword
address 192.168.192.6
netmask 255.255.255.0
gateway 192.168.192.1
iface eth1:ucarp inet static
address 11.22.33.44
netmask 255.255.255.0
post-up /sbin/ip ro add 11.22.33.0/24 dev eth1 src 11.22.33.44 table 10
post-up /sbin/ip ro add default via 11.22.33.1 table 10
post-up /sbin/ip rule add from 11.22.33.44 table 10
post-up /usr/sbin/arping -c 3 -B -S 11.22.33.44 -i eth1
post-down /sbin/ip rule del from 11.22.33.44 table 10
post-down /sbin/ip addr del 11.22.33.44/24 dev eth1:ucarp
#!/bin/sh
/sbin/ifdown eth1:ucarp
#!/bin/sh
/sbin/ifup eth1:ucarp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment