summaryrefslogtreecommitdiffstats
path: root/share
diff options
context:
space:
mode:
authorglebius <glebius@FreeBSD.org>2011-08-15 12:08:41 +0000
committerglebius <glebius@FreeBSD.org>2011-08-15 12:08:41 +0000
commiteb0477f78d680e21ad26426379519418dbab1708 (patch)
tree340c2b3bbb4847a53da438c97057331202825087 /share
parentbc78ba97c172e5075d58182001d8caeb3a3cf898 (diff)
downloadFreeBSD-src-eb0477f78d680e21ad26426379519418dbab1708.zip
FreeBSD-src-eb0477f78d680e21ad26426379519418dbab1708.tar.gz
Describe how carp(4) status changes can be processed with
help of devd(8). Submitted by: "Alexander V. Chernikov" <melifaro ipfw.ru> Approved by: re (kib)
Diffstat (limited to 'share')
-rw-r--r--share/man/man4/carp.440
1 files changed, 39 insertions, 1 deletions
diff --git a/share/man/man4/carp.4 b/share/man/man4/carp.4
index a985fb8..cbcd800 100644
--- a/share/man/man4/carp.4
+++ b/share/man/man4/carp.4
@@ -25,7 +25,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 5, 2010
+.Dd August 15, 2011
.Dt CARP 4
.Os
.Sh NAME
@@ -168,6 +168,25 @@ forwarded to its destination, and destination replying faster
than the state information is packed and synced with the second router.
If the reply would be load balanced to second router, it will be
dropped due to no state.
+.Sh STATE CHANGE NOTIFICATIONS
+Sometimes it is useful to get notified about
+.Nm
+status change events.
+This can be accomplished by using
+.Xr devd 8
+hooks.
+Master/slave events are signalled as
+.Nm
+interface
+.Dv LINK_UP
+or
+.Dv LINK_DOWN
+event.
+Please see
+.Xr devd.conf 5
+and
+.Sx EXAMPLES
+section for more information.
.Sh EXAMPLES
For firewalls and routers with multiple interfaces, it is desirable to
failover all of the
@@ -249,6 +268,25 @@ This way, locally connected systems will receive different ARP replies and
subsequent IP traffic will be balanced among the hosts.
If one of the hosts fails, the other will take over the virtual MAC address,
and begin answering ARP requests on its behalf.
+.Pp
+Processing of
+.Nm
+status change events can be set up by using the following devd.conf rules:
+.Bd -literal -offset indent
+notify 0 {
+ match "system" "IFNET";
+ match "type" "LINK_UP";
+ match "subsystem" "carp*";
+ action "/root/carpcontrol.sh $type $subsystem";
+};
+
+notify 0 {
+ match "system" "IFNET";
+ match "type" "LINK_UP";
+ match "subsystem" "carp*";
+ action "/root/carpcontrol.sh $type $subsystem";
+};
+.Ed
.Sh SEE ALSO
.Xr inet 4 ,
.Xr pfsync 4 ,
OpenPOWER on IntegriCloud