The translation is temporarily closed for contributions due to maintenance, please come back later.

Source string Read only

(itstool) path: example/para
Context English State
Configuration Examples
This section demonstrates how to configure a <trademark class="registered">Cisco</trademark> switch and a FreeBSD system for <acronym>LACP</acronym> load balancing. It then shows how to configure two Ethernet interfaces in failover mode as well as how to configure failover mode between an Ethernet and a wireless interface.
<acronym>LACP</acronym> Aggregation with a <trademark class="registered">Cisco</trademark> Switch
This example connects two <citerefentry><refentrytitle>fxp</refentrytitle><manvolnum>4</manvolnum></citerefentry> Ethernet interfaces on a FreeBSD machine to the first two Ethernet ports on a <trademark class="registered">Cisco</trademark> switch as a single load balanced and fault tolerant link. More interfaces can be added to increase throughput and fault tolerance. Replace the names of the <trademark class="registered">Cisco</trademark> ports, Ethernet devices, channel group number, and <acronym>IP</acronym> address shown in the example to match the local configuration.
Frame ordering is mandatory on Ethernet links and any traffic between two stations always flows over the same physical link, limiting the maximum speed to that of one interface. The transmit algorithm attempts to use as much information as it can to distinguish different traffic flows and balance the flows across the available interfaces.
On the <trademark class="registered">Cisco</trademark> switch, add the <replaceable>FastEthernet0/1</replaceable> and <replaceable>FastEthernet0/2</replaceable> interfaces to channel group <replaceable>1</replaceable>:
<userinput>interface <replaceable>FastEthernet0/1</replaceable>
channel-group <replaceable>1</replaceable> mode active
channel-protocol lacp</userinput>
!
<userinput>interface <replaceable>FastEthernet0/2</replaceable>
channel-group <replaceable>1</replaceable> mode active
channel-protocol lacp</userinput>
On the FreeBSD system, create the <citerefentry><refentrytitle>lagg</refentrytitle><manvolnum>4</manvolnum></citerefentry> interface using the physical interfaces <replaceable>fxp0</replaceable> and <replaceable>fxp1</replaceable> and bring the interfaces up with an <acronym>IP</acronym> address of <replaceable>10.0.0.3/24</replaceable>:
<prompt>#</prompt> <userinput>ifconfig <replaceable>fxp0</replaceable> up</userinput>
<prompt>#</prompt> <userinput>ifconfig <replaceable>fxp1</replaceable> up</userinput>
<prompt>#</prompt> <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> create </userinput>
<prompt>#</prompt> <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> up laggproto lacp laggport <replaceable>fxp0</replaceable> laggport <replaceable>fxp1</replaceable> <replaceable>10.0.0.3/24</replaceable></userinput>
Next, verify the status of the virtual interface:
<prompt>#</prompt> <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal></userinput>
lagg0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=8&lt;VLAN_MTU&gt;
ether 00:05:5d:71:8d:b8
inet 10.0.0.3 netmask 0xffffff00 broadcast 10.0.0.255
media: Ethernet autoselect
status: active
laggproto lacp
laggport: fxp1 flags=1c&lt;ACTIVE,COLLECTING,DISTRIBUTING&gt;
laggport: fxp0 flags=1c&lt;ACTIVE,COLLECTING,DISTRIBUTING&gt;
Ports marked as <literal>ACTIVE</literal> are part of the <acronym>LAG</acronym> that has been negotiated with the remote switch. Traffic will be transmitted and received through these active ports. Add <option>-v</option> to the above command to view the <acronym>LAG</acronym> identifiers.
To see the port status on the <trademark class="registered">Cisco</trademark> switch:
switch# <userinput>show lacp neighbor</userinput>
Flags: S - Device is requesting Slow LACPDUs
F - Device is requesting Fast LACPDUs
A - Device is in Active mode P - Device is in Passive mode

Channel group 1 neighbors

Partner's information:

LACP port Oper Port Port
Port Flags Priority Dev ID Age Key Number State
Fa0/1 SA 32768 0005.5d71.8db8 29s 0x146 0x3 0x3D
Fa0/2 SA 32768 0005.5d71.8db8 29s 0x146 0x4 0x3D
For more detail, type <userinput>show lacp neighbor detail</userinput>.
To retain this configuration across reboots, add the following entries to <filename>/etc/rc.conf</filename> on the FreeBSD system:
ifconfig_<replaceable>fxp0</replaceable>="up"
ifconfig_<replaceable>fxp1</replaceable>="up"
cloned_interfaces="<literal>lagg<replaceable>0</replaceable></literal>"
ifconfig_<literal>lagg<replaceable>0</replaceable></literal>="laggproto lacp laggport <replaceable>fxp0</replaceable> laggport <replaceable>fxp1</replaceable> <replaceable>10.0.0.3/24</replaceable>"
Failover Mode
Failover mode can be used to switch over to a secondary interface if the link is lost on the master interface. To configure failover, make sure that the underlying physical interfaces are up, then create the <citerefentry><refentrytitle>lagg</refentrytitle><manvolnum>4</manvolnum></citerefentry> interface. In this example, <replaceable>fxp0</replaceable> is the master interface, <replaceable>fxp1</replaceable> is the secondary interface, and the virtual interface is assigned an <acronym>IP</acronym> address of <replaceable>10.0.0.15/24</replaceable>:
<prompt>#</prompt> <userinput>ifconfig <replaceable>fxp0</replaceable> up</userinput>
<prompt>#</prompt> <userinput>ifconfig <replaceable>fxp1</replaceable> up</userinput>
<prompt>#</prompt> <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> create</userinput>
<prompt>#</prompt> <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal> up laggproto failover laggport <replaceable>fxp0</replaceable> laggport <replaceable>fxp1</replaceable> <replaceable>10.0.0.15/24</replaceable></userinput>
The virtual interface should look something like this:
<prompt>#</prompt> <userinput>ifconfig <literal>lagg<replaceable>0</replaceable></literal></userinput>
lagg0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
options=8&lt;VLAN_MTU&gt;
ether 00:05:5d:71:8d:b8
inet 10.0.0.15 netmask 0xffffff00 broadcast 10.0.0.255
media: Ethernet autoselect
status: active
laggproto failover
laggport: fxp1 flags=0&lt;&gt;
laggport: fxp0 flags=5&lt;MASTER,ACTIVE&gt;
Traffic will be transmitted and received on <replaceable>fxp0</replaceable>. If the link is lost on <replaceable>fxp0</replaceable>, <replaceable>fxp1</replaceable> will become the active link. If the link is restored on the master interface, it will once again become the active link.
To retain this configuration across reboots, add the following entries to <filename>/etc/rc.conf</filename>:
ifconfig_<replaceable>fxp0</replaceable>="up"
ifconfig_<replaceable>fxp1</replaceable>="up"
cloned_interfaces="<literal>lagg<replaceable>0</replaceable></literal>"
ifconfig_<literal>lagg<replaceable>0</replaceable></literal>="laggproto failover laggport <replaceable>fxp0</replaceable> laggport <replaceable>fxp1</replaceable> <replaceable>10.0.0.15/24</replaceable>"
Failover Mode Between Ethernet and Wireless Interfaces
For laptop users, it is usually desirable to configure the wireless device as a secondary which is only used when the Ethernet connection is not available. With <citerefentry><refentrytitle>lagg</refentrytitle><manvolnum>4</manvolnum></citerefentry>, it is possible to configure a failover which prefers the Ethernet connection for both performance and security reasons, while maintaining the ability to transfer data over the wireless connection.
This is achieved by overriding the Ethernet interface's <acronym>MAC</acronym> address with that of the wireless interface.
In theory, either the Ethernet or wireless MAC address can be changed to match the other. However, some popular wireless interfaces lack support for overriding the MAC address. We therefore recommend overriding the Ethernet MAC address for this purpose.
If the driver for the wireless interface is not loaded in the <literal>GENERIC</literal> or custom kernel, and the computer is running FreeBSD 12.1, load the corresponding <filename>.ko</filename> in <filename>/boot/loader.conf</filename> by adding <userinput><replaceable>driver</replaceable>_load="YES"</userinput> to that file and rebooting. Another, better way is to load the driver in <filename>/etc/rc.conf</filename> by adding it to <varname>kld_list</varname> (see <citerefentry><refentrytitle>rc.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry> for details) in that file and rebooting. This is needed because otherwise the driver is not loaded yet at the time the <citerefentry><refentrytitle>lagg</refentrytitle><manvolnum>4</manvolnum></citerefentry> interface is set up.
In this example, the Ethernet interface, <replaceable>re0</replaceable>, is the master and the wireless interface, <replaceable>wlan0</replaceable>, is the failover. The <replaceable>wlan0</replaceable> interface was created from the <replaceable>ath0</replaceable> physical wireless interface, and the Ethernet interface will be configured with the <acronym>MAC</acronym> address of the wireless interface. First, determine the <acronym>MAC</acronym> address of the wireless interface:

Loading…

No matching activity found.

Browse all component changes

Source information

Source string comment
(itstool) path: example/para
Flags
read-only
Source string location
book.translate.xml:65535
String age
a year ago
Source string age
a year ago
Translation file
books/handbook.pot, string 11069