Finish editorial review of this chapter.

Sponsored by: iXsystems
This commit is contained in:
Dru Lavigne 2014-02-13 20:49:58 +00:00
parent 1d800d7b72
commit 56ba08f862
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=43904

View file

@ -3399,17 +3399,18 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefaultBridgeIf.0 s bridge2</screen>
<para>&os; provides the &man.lagg.4; interface which can be used
to aggregate multiple
network interfaces into one virtual interface for the purpose of
providing fault tolerance and link aggregation. Link
network interfaces into one virtual interface in order to
provide failover and link aggregation. Failover allows traffic
to continue to flow even if an interface becomes available. Link
aggregation works best on switches which support
<acronym>LACP</acronym>, as this protocol distributes traffic
bi-directionally while responding to the failure of individual
links.</para>
<para>The operating modes supported by the lagg interface
<para>The aggregation protocols supported by the lagg interface
determine which ports are used for outgoing traffic and
whether or not a specific port accepts incoming
traffic. The following operating modes are supported by
traffic. The following protocols are supported by
&man.lagg.4;:</para>
<variablelist>
@ -3443,7 +3444,7 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefaultBridgeIf.0 s bridge2</screen>
<listitem>
<para>The &ieee; 802.3ad Link Aggregation Control Protocol
(<acronym>LACP</acronym>) negotiates a set of
aggregable links with the peer in to one or more Link
aggregable links with the peer into one or more Link
Aggregated Groups (<acronym>LAG</acronym>s). Each
<acronym>LAG</acronym> is composed of ports of the
same speed, set to full-duplex operation, and traffic
@ -3471,8 +3472,8 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefaultBridgeIf.0 s bridge2</screen>
<listitem>
<para>This mode distributes outgoing traffic using a round-robin
scheduler through all active ports and accepts incoming
traffic from any active port. This mode violates
Ethernet frame ordering and should be used with
traffic from any active port. Since this mode violates
Ethernet frame ordering, it should be used with
caution.</para>
</listitem>
</varlistentry>
@ -3492,15 +3493,21 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefaultBridgeIf.0 s bridge2</screen>
<title><acronym>LACP</acronym> Aggregation with a &cisco;
Switch</title>
<para>This example connects two interfaces on a &os; machine
to the switch as a single load balanced and fault tolerant
<para>This example connects two &man.fxp.4; Ethernet interfaces on a &os; machine
to the first two
Ethernet ports on a &cisco; switch as a single load balanced and fault tolerant
link. More interfaces can be added to increase throughput
and fault tolerance. Frame ordering is mandatory on
and fault tolerance. Replace the names of the &cisco; ports,
Ethernet devices, channel group number, and
<acronym>IP</acronym> address shown in
the example to match the local configuration.</para>
<para>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 across the
distinguish different traffic flows and balance the flows across the
available interfaces.</para>
<para>On the &cisco; switch, add the
@ -3508,32 +3515,26 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefaultBridgeIf.0 s bridge2</screen>
<replaceable>FastEthernet0/2</replaceable> interfaces to
channel group <replaceable>1</replaceable>:</para>
<screen><userinput>interface FastEthernet0/1
channel-group 1 mode active
<screen><userinput>interface <replaceable>FastEthernet0/1</replaceable>
channel-group <replaceable>1</replaceable> mode active
channel-protocol lacp</userinput>
!
<userinput>interface FastEthernet0/2
channel-group 1 mode active
<userinput>interface <replaceable>FastEthernet0/2</replaceable>
channel-group <replaceable>1</replaceable> mode active
channel-protocol lacp</userinput></screen>
<para>On the &os; system, create the &man.lagg.4; interface using
the physical interfaces <replaceable>fxp0</replaceable> and
<replaceable>fxp1</replaceable>, and bring the interfaces up
<replaceable>fxp1</replaceable> and bring the interfaces up
with an <acronym>IP</acronym> address of
<replaceable>10.0.0.3/24</replaceable>:</para>
<screen>&prompt.root; <userinput>ifconfig fxp0 up</userinput>
&prompt.root; <userinput>ifconfig fxp1 up</userinput>
<screen>&prompt.root; <userinput>ifconfig <replaceable>fxp0</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig <replaceable>fxp1</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig lagg0 create </userinput>
&prompt.root; <userinput>ifconfig lagg0 up laggproto lacp laggport fxp0 laggport fxp1 10.0.0.3/24</userinput></screen>
&prompt.root; <userinput>ifconfig lagg0 up laggproto lacp laggport <replaceable>fxp0</replaceable> laggport <replaceable>fxp1</replaceable> <replaceable>10.0.0.3/24</replaceable></userinput></screen>
<para>Next, verify the status of the virtual interface. Ports
marked as <literal>ACTIVE</literal> are part of
the active aggregation group that has been negotiated with
the remote switch. Traffic will be transmitted and
received through active ports. Use the verbose output of
&man.ifconfig.8; to view the <acronym>LAG</acronym>
identifiers.</para>
<para>Next, verify the status of the virtual interface:</para>
<screen>&prompt.root; <userinput>ifconfig lagg0</userinput>
lagg0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
@ -3545,6 +3546,14 @@ lagg0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 150
laggport: fxp1 flags=1c&lt;ACTIVE,COLLECTING,DISTRIBUTING&gt;
laggport: fxp0 flags=1c&lt;ACTIVE,COLLECTING,DISTRIBUTING&gt;</screen>
<para>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.</para>
<para>To see the port status on the &cisco; switch:</para>
<screen>switch# <userinput>show lacp neighbor</userinput>
@ -3579,7 +3588,7 @@ ifconfig_<literal>lagg0</literal>="laggproto lacp laggport <replaceable>fxp0</re
<para>Failover mode can be used to switch over to a secondary
interface if the link is lost on the master interface.
To configure failover mode, make sure that the underlying
To configure failover, make sure that the underlying
physical interfaces are up, then create the &man.lagg.4;
interface. In this example, <replaceable>fxp0</replaceable> is the
master interface, <replaceable>fxp1</replaceable> is
@ -3587,10 +3596,10 @@ ifconfig_<literal>lagg0</literal>="laggproto lacp laggport <replaceable>fxp0</re
address of
<replaceable>10.0.0.15/24</replaceable>:</para>
<screen>&prompt.root; <userinput>ifconfig fxp0 up</userinput>
&prompt.root; <userinput>ifconfig fxp1 up</userinput>
<screen>&prompt.root; <userinput>ifconfig <replaceable>fxp0</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig <replaceable>fxp1</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig lagg0 create</userinput>
&prompt.root; <userinput>ifconfig lagg0 up laggproto failover laggport fxp0 laggport fxp1 10.0.0.15/24</userinput></screen>
&prompt.root; <userinput>ifconfig lagg0 up laggproto failover laggport <replaceable>fxp0</replaceable> laggport <replaceable>fxp1</replaceable> <replaceable>10.0.0.15/24</replaceable></userinput></screen>
<para>The virtual interface should look something like
this:</para>
@ -3624,7 +3633,7 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>fxp0
</example>
<example xml:id="networking-lagg-wired-and-wireless">
<title>Failover Mode Between Wired and Wireless
<title>Failover Mode Between Ethernet and Wireless
Interfaces</title>
<para>For laptop users, it is usually desirable to configure
@ -3636,7 +3645,7 @@ ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>fxp0
maintaining the ability to transfer data over the wireless
connection.</para>
<para>This is achieved by overriding the underlying wireless
<para>This is achieved by overriding the physical wireless
interface's <acronym>MAC</acronym> address with that
of the Ethernet
interface.</para>
@ -3667,21 +3676,21 @@ bge0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 1500
<acronym>MAC</acronym> address of the underlying wireless
interface:</para>
<screen>&prompt.root; <userinput>ifconfig iwn0 ether 00:21:70:da:ae:37</userinput></screen>
<screen>&prompt.root; <userinput>ifconfig <replaceable>iwn0</replaceable> ether <replaceable>00:21:70:da:ae:37</replaceable></userinput></screen>
<para>Bring the wireless interface up, but do not set an
<acronym>IP</acronym> address:</para>
<screen>&prompt.root; <userinput>ifconfig wlan0 create wlandev iwn0 ssid my_router up</userinput></screen>
<screen>&prompt.root; <userinput>ifconfig wlan0 create wlandev <replaceable>iwn0</replaceable> ssid <replaceable>my_router</replaceable> up</userinput></screen>
<para>Make sure the <replaceable>bge0</replaceable> interface is up, then
create the &man.lagg.4; interface with
<replaceable>bge0</replaceable> as master with failover to
<replaceable>wlan0</replaceable>:</para>
<screen>&prompt.root; <userinput>ifconfig bge0 up</userinput>
<screen>&prompt.root; <userinput>ifconfig <replaceable>bge0</replaceable> up</userinput>
&prompt.root; <userinput>ifconfig lagg0 create</userinput>
&prompt.root; <userinput>ifconfig lagg0 up laggproto failover laggport bge0 laggport wlan0</userinput></screen>
&prompt.root; <userinput>ifconfig lagg0 up laggproto failover laggport <replaceable>bge0</replaceable> laggport wlan0</userinput></screen>
<para>The virtual interface should look something like this:</para>
@ -3704,12 +3713,12 @@ lagg0: flags=8843&lt;UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST&gt; metric 0 mtu 150
following entries to
<filename>/etc/rc.conf</filename>:</para>
<programlisting>ifconfig_bge0="up"
ifconfig_iwn0="ether 00:21:70:da:ae:37"
wlans_iwn0="wlan0"
<programlisting>ifconfig_<replaceable>bge0</replaceable>="up"
ifconfig_<replaceable>iwn0</replaceable>="<replaceable>ether 00:21:70:da:ae:37</replaceable>"
wlans_<replaceable>iwn0</replaceable>="wlan0"
ifconfig_wlan0="WPA"
cloned_interfaces="<literal>lagg0</literal>"
ifconfig_<literal>lagg0</literal>="laggproto failover laggport bge0 laggport wlan0 DHCP"</programlisting>
ifconfig_<literal>lagg0</literal>="laggproto failover laggport <replaceable>bge0</replaceable> laggport wlan0 DHCP"</programlisting>
</example>
</sect2>
</sect1>