Hitchhiker's Guide to Openbsd
Download 1.27 Mb. Pdf ko'rish
|
obsd-faq49
192.168.0.7 netmask 255.255.255.0
create the carp0 interface and give it a vhid of 1, a password of tyrell, and the IP address 192.168.0.7 with mask 255.255.255.0. Assign fxp0 as the member interface. To make it permanent across reboots, you can create an /etc/hostname.carp0 file that looks like this: inet 192.168.0.7 255.255.255.0 192.168.0.255 vhid 1 pass tyrell carpdev fxp0 Note that the broadcast address is specified in that line, in addition to the vhid and the password. Failing to do this is a common cause of errors, as it is needed as a place holder. Do the same on pris. Whichever system brings the CARP interface up first will be master (assuming that preempt is disabled; the opposite is true when preempt is enabled). But let's say you're not deploying from scratch. Rachael was already in place at the address 192.168.0.7. How do you work around that? Fortunately, CARP can deal with this situation. You simply assign the address to the CARP interface and leave the physical interface specified by the `carpdev' keyword http://www.openbsd.org/faq/faq6.html (27 of 33)9/4/2011 10:02:06 AM 6 - Networking without an IP address. However, it tends to be cleaner to have an IP for each system--it makes individual monitoring and access much simpler. Let's add another layer of complexity; we want rachael to stay master when possible. There are several reasons we might want this: hardware differences, simple prejudice, "if this system isn't master, there's a problem," or knowing the default master without doing scripting to parse and email the output of ifconfig. On rachael, we'll use the sysctl we created above, then edit /etc/sysctl.conf to make it permanent. rachael# sysctl net.inet.carp.preempt=1 We'll do configuration on pris, too: pris# ifconfig carp0 advskew 100 This slightly delays pris's advertisements, meaning rachael will be master when alive. Note that if you are using PF on a CARP'd computer, you must pass "proto carp" on all involved interfaces, with a line similar to: pass on fxp0 proto carp keep state 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