Hitchhiker's Guide to Openbsd
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
6.11.2 - Configuration
CARP's controls are located in two places: sysctl(8) and ifconfig(8) . Let's look at the sysctls first. The first sysctl, net.inet.carp.allow , defines whether the host handles CARP packets at all. Clearly, this is necessary to use CARP. This sysctl is enabled by default. The second, net.inet.carp.log , logs CARP state changes, bad packets and other errors. Set to log state changes by default. Third, net.inet.carp.preempt enables natural selection among CARP hosts. The most fit for the job (that is to say, able to advertise most frequently) will become master. Disabled by default, meaning a http://www.openbsd.org/faq/faq6.html (26 of 33)9/4/2011 10:02:06 AM 6 - Networking system that is not a master will not attempt to (re)gain master status. All these sysctl variables are documented in sysctl(3) . For the remainder of CARP's configuration, we rely on ifconfig(8) . The CARP-specific commands advbase and advskew deal with the interval between CARP advertisements. The formula (in seconds) is advskew divided by 256, then added to advbase . advbase can be used to decrease network traffic or allow longer latency before a backup host takes over; advskew lets you control which host will be master without much delaying failover (should that be required). Next, pass sets a password, and vhid sets the virtual host identifier number of the CARP group. You need to assign a unique number for each CARP group, even if (for load balancing purposes) they share the same IP address. CARP is limited to 255 groups. Finally, carpdev specifies which physical interface belongs to this particular CARP group. By default, whichever interface has an IP address in the same subnet assigned to the CARP interface will be used. Let's put all these settings together in a basic configuration. Let's say you're deploying two identically configured Web servers, rachael (192.168.0.5) and pris (192.168.0.6), to replace an older system that was at 192.168.0.7. The commands: rachael# ifconfig carp0 create rachael# ifconfig carp0 vhid 1 pass tyrell carpdev fxp0 \ Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2025
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling