carp(4) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

carp(4)

The CARP allows multiple hosts on the same local network to share
a  set  of IPv4 and/or IPv6 addresses.  Its primary purpose is to
ensure that these addresses are always available.  To use the ad‐
ministrator needs to configure at a minimum a common virtual host
ID (vhid), and attach at least one IP address  to  this  vhid  on
each  machine  which is to take part in the virtual group.  Addi‐
tional parameters can also be set on a per-vhid basis: and  which
are  used to control how frequently the host sends advertisements
when it is the master for a virtual host, and which  is  used  to
authenticate advertisements.  The parameter stands for It is mea‐
sured  in seconds and specifies the base of the advertisement in‐
terval.  The parameter stands for It is measured in 1/256 of sec‐
onds.  It is added to the base advertisement interval to make one
host advertise a bit slower that the other does.   Both  and  are
put  inside  CARP advertisements.  These values can be configured
using or through the CARP virtual hosts can be configured on mul‐
ticast-capable interfaces: Ethernet, layer 2 VLAN, FDDI and Token
Ring.  An arbitrary number of virtual host IDs can be  configured
on  an  interface.  An arbitrary number of IPv4 or IPv6 addresses
can be attached to a particular vhid.  It is important  that  all
hosts participating in a vhid have the same list of prefixes con‐
figured  on  the vhid, since all the prefixes are included in the
cryptographic checksum supplied in each advertisement.   Multiple
vhids running on one interface participate in master/backup elec‐
tions  independently.  Additionally, there are a number of global
parameters which can be set using  Allow  operation.   When  dis‐
abled, virtual hosts remain in initial state, neither sending nor
receiving  announcements  or traffic.  Enabled by default.  Allow
virtual hosts to preempt each other.  When enabled, a vhid  in  a
backup  state  would  preempt  a master that is announcing itself
with a lower advskew.  Disabled by default.  DSCP value  in  carp
packet.  Valid Values are 0 to 63.  A value of 4 is equivalent to
the  old  standard  of TOS LOW_DELAY.  TOS values were deprecated
and replaced by DSCP in 1998.  The default value is 56  (CS7/Net‐
work  Control).   Determines  what  events  relating to vhids are
logged.  A value of 0 disables any logging.  A value of 1 enables
logging state changes of vhids.  Values above 1 enable logging of
bad packets.  The default value is 1.  This value shows the  cur‐
rent  level  of  CARP demotion.  The value is added to the actual
advskew sent in announcements for all vhids.  During normal  sys‐
tem  operation the demotion factor is zero.  However, problematic
conditions raise its level: when experiences problem with sending
announcements, when an interface running a  vhid  goes  down,  or
while the interface is not synchronized.  The demotion factor can
be adjusted writing to the sysctl oid.  The signed value supplied
to  the command is added to current demotion factor.  This allows
to control behaviour depending on some external  conditions,  for
example  on  the  status  of  some daemon utility.  This value is
added to when an interface running a vhid goes down.  The default
value is 240 (the maximum advskew value).  This value is added to
when experiences errors sending its announcements.   The  default
value is 240 (the maximum advskew value).  Sometimes it is useful
to  get  notified about status change events.  This can be accom‐
plished by using hooks.  Master/slave events are signalled  under
system The subsystem specifies the vhid and name of the interface
where  the  master/slave event occurred.  The type of the message
displays the new state of the vhid.  Please see and  the  section
for  more  information.   For firewalls and routers with multiple
interfaces, it is desirable to failover all of the addresses run‐
ning together, when one of the  physical  interfaces  goes  down.
This  is achieved by the use of the preempt option.  Enable it on
both hosts A and B: Assume that host A is  the  preferred  master
and   we  are  running  the  192.168.1.0/24  prefix  on  em0  and
192.168.2.0/24 on em1.  This is the setup for host A (advskew  is
above  0  so  it  could be overwritten in the emergency situation
from the other host): ifconfig em0 vhid 1 advskew 100 pass mekmi‐
tasdigoat 192.168.1.1/24 ifconfig em1 vhid  2  advskew  100  pass
mekmitasdigoat  192.168.2.1/24 The setup for host B is identical,
but it has a higher ifconfig em0 vhid 1 advskew 200  pass  mekmi‐
tasdigoat  192.168.1.1/24  ifconfig  em1  vhid 2 advskew 200 pass
mekmitasdigoat 192.168.2.1/24 When one of the physical interfaces
of host A fails, is demoted to a  configured  value  on  all  its
vhids.   Due to the preempt option, host B would start announcing
itself, and thus preempt host A on  both  interfaces  instead  of
just  the  failed one.  Processing of status change events can be
set up  by  using  the  following  devd.conf  rule:  notify  0  {
        match "system"          "CARP";         match "subsystem"
"[0-9]+@[0-9a-z]+";            match   "type"              "(MAS‐
TER|BACKUP)";          action  "/root/carpcontrol.sh   $subsystem
$type"; }; To see packets decoded in output, one needs to specify
the  option,  otherwise will interpret them as VRRP packets: tcp‐
dump -npi vlan0 -T carp The device first appeared in  The  device
was  imported  into  In  was  significantly  rewritten, and is no
longer a pseudo-interface.
















































맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3