Commit Graph

31 Commits

Author SHA1 Message Date
Kristof Provost
6dd9dfc449 carp: Minor language improvements in the man page
Submitted by:	Massimiliano Stucchi <max AT stucchi.ch>
2018-07-01 15:17:53 +00:00
Kristof Provost
0d3d234cd1 carp: Set DSCP value CS7
Update carp to set DSCP value CS7(Network Traffic) in the flowlabel field of
packets by default. Currently carp only sets TOS_LOWDELAY in IPv4 which was
deprecated in 1998. This also implements sysctl that can revert carp back to
it's old behavior if desired.

This will allow implementation of QOS on modern network devices to make sure
carp packets aren't dropped during interface contention.

Submitted by:	Nick Wolff <darkfiberiru AT gmail.com>
Reviewed by:	kp, mav (earlier version)
Differential Revision:	https://reviews.freebsd.org/D14536
2018-07-01 08:37:07 +00:00
Alexander Motin
167a34407c Keep CARP state as INIT when net.inet.carp.allow=0.
Currently when net.inet.carp.allow=0 CARP state remains as MASTER, which is
not very useful (if there are other masters -- it can lead to split brain,
if there are none -- it makes no sense).  Having it as INIT makes it clear
that carp packets are disabled.

Submitted by:	wg
MFC after:	1 month
Relnotes:	yes
Sponsored by:	iXsystems, Inc.
Differential Revision:	https://reviews.freebsd.org/D14477
2018-05-07 14:44:55 +00:00
Edward Tomasz Napierala
e81210c1d0 The tcpdump is section 1, not 8.
MFC after:	1 month
Sponsored by:	The FreeBSD Foundation
2016-02-29 17:16:06 +00:00
Baptiste Daroussin
923544aa8d Sort SEE ALSO 2014-12-26 22:30:18 +00:00
Christian Brueffer
0b3504fd3b Fix various mdoc issues.
Found with:	mandoc -Tlint
2014-12-21 09:53:29 +00:00
Dmitry Morozovsky
da4d5bb79b Change examples to have master skew above 0 to have ability to overwrite this
from the slave (for example, when master is failing on disk IO and could not be
logged into or execute cronjob).

Commented out examples changed too to simplify future merging.

Idea by:	kaa@zvuki.ru
Discussed with:	glebius
MFC after:	1 week
2014-05-29 21:02:57 +00:00
Sergey Kandaurov
07b9a28adb In the EXAMPLES section: append the subsystem regular expression with a
typical interface name pattern as devd(8) uses full string match.

Discussed with:	avg, glebius
2013-02-21 15:41:09 +00:00
Gleb Smirnoff
7951008b47 Change net.inet.carp.demotion sysctl to add the supplied value
to the current demotion factor instead of assigning it.

  This allows external scripts to control demotion factor together
with kernel in a raceless manner.
2012-12-25 14:08:13 +00:00
Gleb Smirnoff
9c883c6cf0 Give a clue how to force tcpdump(8) to interpret correctly CARP packets. 2012-09-29 10:49:02 +00:00
Benjamin Kaduk
e98adf398d Catch up to the carp rewrite and refer to vhids instead of interfaces.
Pointy hat to:	bjk
Submitted by:	glebius
Approved by:	hrs (mentor)
2012-05-30 05:42:40 +00:00
Benjamin Kaduk
84e3b10b7c Grammar and markup fixes.
PR:		docs/159854
Approved by:	hrs (mentor)
2012-05-03 13:08:11 +00:00
Xin LI
e274aea7a0 Use 10.0 instead of 10 for FreeBSD version number. The latter undefined. 2012-04-22 07:42:44 +00:00
Eitan Adler
50d675f7a9 Remove trailing whitespace per mdoc lint warning
Disussed with:	gavin
No objection from:	doc
Approved by:	joel
MFC after:	3 days
2012-03-29 05:02:12 +00:00
Gleb Smirnoff
a1ae564ebf - Rewrite paragraphs about preemption.
- Avoid word combination "carp interface".

Prodded by:	az
2012-01-26 19:11:08 +00:00
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