Source string Read only

(itstool) path: sect2/para
Context English State
The next set of entries are for <systemitem></systemitem>. Since it represents a second master, it uses a different shared <acronym>IP</acronym> address and <acronym>VHID</acronym>. However, the passwords specified with <option>pass</option> must be identical as <acronym>CARP</acronym> will only listen to and accept advertisements from machines with the correct password.
ifconfig_<replaceable>em0</replaceable>="inet <replaceable></replaceable> netmask <replaceable></replaceable>"
ifconfig_<replaceable>em0</replaceable>_alias0="inet vhid <replaceable>2</replaceable> pass <replaceable>testpass</replaceable> alias <replaceable></replaceable>/32"
The third machine, <systemitem></systemitem>, is configured to handle failover from either master. This machine is configured with two <acronym>CARP</acronym> <acronym>VHID</acronym>s, one to handle the virtual <acronym>IP</acronym> address for each of the master hosts. The <acronym>CARP</acronym> advertising skew, <option>advskew</option>, is set to ensure that the backup host advertises later than the master, since <option>advskew</option> controls the order of precedence when there are multiple backup servers.
ifconfig_<replaceable>em0</replaceable>="inet <replaceable></replaceable> netmask <replaceable></replaceable>"
ifconfig_<replaceable>em0</replaceable>_alias0="inet vhid <replaceable>1</replaceable> advskew <replaceable>100</replaceable> pass <replaceable>testpass</replaceable> alias <replaceable></replaceable>/32"
ifconfig_<replaceable>em0</replaceable>_alias1="inet vhid <replaceable>2</replaceable> advskew <replaceable>100</replaceable> pass <replaceable>testpass</replaceable> alias <replaceable></replaceable>/32"
Having two <acronym>CARP</acronym> <acronym>VHID</acronym>s configured means that <systemitem></systemitem> will notice if either of the master servers becomes unavailable. If a master fails to advertise before the backup server, the backup server will pick up the shared <acronym>IP</acronym> address until the master becomes available again.
If the original master server becomes available again, <systemitem></systemitem> will not release the virtual <acronym>IP</acronym> address back to it automatically. For this to happen, preemption has to be enabled. The feature is disabled by default, it is controlled via the <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> variable <varname>net.inet.carp.preempt</varname>. The administrator can force the backup server to return the <acronym>IP</acronym> address to the master:
<prompt>#</prompt> <userinput>ifconfig em0 vhid 1 state backup</userinput>
Once the configuration is complete, either restart networking or reboot each system. High availability is now enabled.
<acronym>CARP</acronym> functionality can be controlled via several <citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry> variables documented in the <citerefentry><refentrytitle>carp</refentrytitle><manvolnum>4</manvolnum></citerefentry> manual pages. Other actions can be triggered from <acronym>CARP</acronym> events by using <citerefentry><refentrytitle>devd</refentrytitle><manvolnum>8</manvolnum></citerefentry>.
Using <acronym>CARP</acronym> on FreeBSD 9 and Earlier
The configuration for these versions of FreeBSD is similar to the one described in the previous section, except that a <acronym>CARP</acronym> device must first be created and referred to in the configuration.
Enable boot-time support for <acronym>CARP</acronym> by loading the <filename>if_carp.ko</filename> kernel module in <filename>/boot/loader.conf</filename>:
Next, on each host, create a <acronym>CARP</acronym> device:
<prompt>#</prompt> <userinput>ifconfig carp0 create</userinput>
Set the hostname, management <acronym>IP</acronym> address, the shared <acronym>IP</acronym> address, and <acronym>VHID</acronym> by adding the required lines to <filename>/etc/rc.conf</filename>. Since a virtual <acronym>CARP</acronym> device is used instead of an alias, the actual subnet mask of <literal>/24</literal> is used instead of <literal>/32</literal>. Here are the entries for <systemitem></systemitem>:
ifconfig_<replaceable>fxp0</replaceable>="inet <replaceable></replaceable> netmask <replaceable></replaceable>"
ifconfig_carp0="vhid <replaceable>1</replaceable> pass <replaceable>testpass</replaceable> <replaceable></replaceable>"
On <systemitem></systemitem>:
ifconfig_<replaceable>fxp0</replaceable>="inet <replaceable></replaceable> netmask <replaceable></replaceable>"
ifconfig_carp0="vhid <replaceable>2</replaceable> pass <replaceable>testpass</replaceable> <replaceable></replaceable>"
The third machine, <systemitem></systemitem>, is configured to handle failover from either of the master hosts:
ifconfig_<replaceable>fxp0</replaceable>="inet <replaceable></replaceable> netmask <replaceable></replaceable>"
cloned_interfaces="carp0 carp1"
ifconfig_carp0="vhid <replaceable>1</replaceable> advskew <replaceable>100</replaceable> pass <replaceable>testpass</replaceable> <replaceable></replaceable>"
ifconfig_carp1="vhid <replaceable>2</replaceable> advskew <replaceable>100</replaceable> pass <replaceable>testpass</replaceable> <replaceable></replaceable>"
Preemption is disabled in the <filename>GENERIC</filename> FreeBSD kernel. If preemption has been enabled with a custom kernel, <systemitem></systemitem> may not release the <acronym>IP</acronym> address back to the original content server. The administrator can force the backup server to return the <acronym>IP</acronym> address to the master with the command:
<prompt>#</prompt> <userinput>ifconfig carp0 down &amp;&amp; ifconfig carp0 up</userinput>
This should be done on the <filename>carp</filename> interface which corresponds to the correct host.
<primary>Virtual LANs</primary>
<acronym>VLANs</acronym> are a way of virtually dividing up a network into many different subnetworks, also referred to as segmenting. Each segment will have its own broadcast domain and be isolated from other <acronym>VLANs</acronym>.
On FreeBSD, <acronym>VLANs</acronym> must be supported by the network card driver. To see which drivers support vlans, refer to the <citerefentry><refentrytitle>vlan</refentrytitle><manvolnum>4</manvolnum></citerefentry> manual page.
When configuring a <acronym>VLAN</acronym>, a couple pieces of information must be known. First, which network interface? Second, what is the <acronym>VLAN</acronym> tag?
To configure <acronym>VLANs</acronym> at run time, with a <acronym>NIC</acronym> of <literal>em0</literal> and a <acronym>VLAN</acronym> tag of <systemitem>5</systemitem> the command would look like this:


No matching activity found.

Browse all component changes

Things to check

Multiple failing checks

The translations in several languages have failing checks



English English
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect2/para
Source string location
String age
a year ago
Source string age
a year ago
Translation file
books/handbook.pot, string 11302