Commit Graph

16 Commits

Author SHA1 Message Date
Ulrich Spörlein
8948622005 Apply Typo-B-Gone 2000 [TM] 2012-01-05 21:43:33 +00:00
Gleb Smirnoff
f08535f872 Restore a feature that was present in 5.x and 6.x, and was cleared in
7.x, 8.x and 9.x with pf(4) imports: pfsync(4) should suppress CARP
preemption, while it is running its bulk update.

However, reimplement the feature in more elegant manner, that is
partially inspired by newer OpenBSD:

- Rename term "suppression" to "demotion", to match with OpenBSD.
- Keep a global demotion factor, that can be raised by several
  conditions, for now these are:
  - interface goes down
  - carp(4) has problems with ip_output() or ip6_output()
  - pfsync performs bulk update
- Unlike in OpenBSD the demotion factor isn't a counter, but
  is actual value added to advskew. The adjustment values for
  particular error conditions are also configurable, and their
  defaults are maximum advskew value, so a single failure bumps
  demotion to maximum. This is for POLA compatibility, and should
  satisfy most users.
- Demotion factor is a writable sysctl, so user can do
  foot shooting, if he desires to.
2011-12-20 13:53:31 +00:00
Gleb Smirnoff
08b68b0e4c A major overhaul of the CARP implementation. The ip_carp.c was started
from scratch, copying needed functionality from the old implemenation
on demand, with a thorough review of all code. The main change is that
interface layer has been removed from the CARP. Now redundant addresses
are configured exactly on the interfaces, they run on.

The CARP configuration itself is, as before, configured and read via
SIOCSVH/SIOCGVH ioctls. A new prefix created with SIOCAIFADDR or
SIOCAIFADDR_IN6 may now be configured to a particular virtual host id,
which makes the prefix redundant.

ifconfig(8) semantics has been changed too: now one doesn't need
to clone carpXX interface, he/she should directly configure a vhid
on a Ethernet interface.

To supply vhid data from the kernel to an application the getifaddrs(8)
function had been changed to pass ifam_data with each address. [1]

The new implementation definitely closes all PRs related to carp(4)
being an interface, and may close several others. It also allows
to run a single redundant IP per interface.

Big thanks to Bjoern Zeeb for his help with inet6 part of patch, for
idea on using ifam_data and for several rounds of reviewing!

PR:		kern/117000, kern/126945, kern/126714, kern/120130, kern/117448
Reviewed by:	bz
Submitted by:	bz [1]
2011-12-16 12:16:56 +00:00
Gleb Smirnoff
1eefdc3bc5 Fix a couple of issues in last commit.
Submitted by:	maxim
Approved by:	re (kib)
2011-08-15 13:33:28 +00:00
Gleb Smirnoff
cc8b2291de 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)
2011-08-15 12:08:41 +00:00
Ruslan Ermilov
acc0fee071 Complete the swap of carp(4) log levels and document the change.
MFC after:	3 days
2010-01-08 16:14:41 +00:00
Gleb Smirnoff
056c7edaf7 Add section describing how ARP load balancing works and its
limitations:
  - Can't load balance behind router
  - ARP balancing + pfsync probably won't work

PR:		kern/93829
Wording by:	scottl
2006-06-07 10:26:51 +00:00
Giorgos Keramidas
1a1fa3bd68 Typo: s/adverisement/advertisement/.
Submitted by:	Fredrik Lindberg <fli+freebsd@shapeshifter.se>
PR:		docs/85050
2005-08-17 18:43:07 +00:00
Ruslan Ermilov
a4be0b3cc1 (Mostly) markup fixes.
Approved by:	re (blanket)
2005-06-16 18:46:17 +00:00
Gleb Smirnoff
1771f872d5 - Document net.inet.carp.suppress_preempt MIB.
- Xref pfsync(4)
2005-05-15 01:58:32 +00:00
Gleb Smirnoff
3cdec3ed29 s/foobar/mekmitasdigoat/g
Requested by:	ceri, des
2005-04-07 15:28:14 +00:00
Gleb Smirnoff
762ce3e6b8 - Be more informative about advbase and advskew. [1]
- Fix ifconfig commands. Replace 'mekmitasdigoat' with
  'foobar'. While the former is more cool, the latter
  makes example lines shorter.

Wording by:     scottl
MFC after:	3 days
2005-04-07 14:20:34 +00:00
Ralf S. Engelschall
58ce5a2700 1. Annotate the rc.conf reference with a hint to the "cloned_interfaces"
variable, because it might be not obvious how to configure carp(4)
   devices in rc.conf.

2. Remove the sentence about the not implemented "carpdev" option (this
   was not imported from OpenBSD according to our source code) to avoid
   confusion.

Reviewed by:    glebius@
MFC after:      3 days
2005-03-23 08:06:38 +00:00
Gleb Smirnoff
442af10ad1 Update description of net.inet.carp.log 2005-02-25 10:38:43 +00:00
Gleb Smirnoff
3e630869d1 mdoc(7) cleanup
Submitted by:	ru
2005-02-24 09:43:16 +00:00
Gleb Smirnoff
8e92589080 Manpage for CARP from .Ox, with minor modifications.
Obtained from:	OpenBSD
2005-02-23 08:29:50 +00:00