svn commit: r43901 - head/en_US.ISO8859-1/books/handbook/advanced-networking
Dru Lavigne
dru at FreeBSD.org
Thu Feb 13 19:04:34 UTC 2014
Author: dru
Date: Thu Feb 13 19:04:33 2014
New Revision: 43901
URL: http://svnweb.freebsd.org/changeset/doc/43901
Log:
First pass at link aggregation chapter. Another nit-pickier commit to follow.
Sponsored by: iXsystems
Modified:
head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
Modified: head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Thu Feb 13 16:41:18 2014 (r43900)
+++ head/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.xml Thu Feb 13 19:04:33 2014 (r43901)
@@ -3397,68 +3397,60 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefault
<indexterm><primary>loadbalance</primary></indexterm>
<indexterm><primary>roundrobin</primary></indexterm>
- <sect2>
- <title>Introduction</title>
-
- <para>The &man.lagg.4; interface allows aggregation of multiple
- network interfaces as one virtual interface for the purpose of
- providing fault-tolerance and high-speed links.</para>
- </sect2>
-
- <sect2>
- <title>Operating Modes</title>
-
- <para>The following operating modes are supported by
+ <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
+ 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
+ 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
&man.lagg.4;:</para>
<variablelist>
<varlistentry>
- <term>Failover</term>
+ <term>failover</term>
<listitem>
- <para>Sends and receives traffic only through the master
+ <para>This mode sends and receives traffic only through the master
port. If the master port becomes unavailable, the next
- active port is used. The first interface added is the
- master port and any interfaces added after that are used
+ active port is used. The first interface added to the virtual interface is the
+ master port and all subsequently added interfaces are used
as failover devices. If failover to a non-master port
- occurs, the original port will become master when it
+ occurs, the original port becomes master once it
becomes available again.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>&cisco; Fast ðerchannel;</term>
+ <term>fec / loadbalance</term>
<listitem>
<para>&cisco; Fast ðerchannel; (<acronym>FEC</acronym>)
- is a static setup and does not negotiate aggregation
+ is found on older &cisco; switches. It provides a
+ static setup and does not negotiate aggregation
with the peer or exchange frames to monitor the link.
If the switch supports <acronym>LACP</acronym>, that
should be used instead.</para>
-
- <para><acronym>FEC</acronym> balances outgoing traffic
- across the active ports based on hashed protocol header
- information and accepts incoming traffic from any active
- port. The hash includes the Ethernet source and
- destination address and, if available, the
- <acronym>VLAN</acronym> tag, and the
- <acronym>IPv4</acronym> or <acronym>IPv6</acronym>
- source and destination address.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><acronym>LACP</acronym></term>
+ <term><acronym>lacp</acronym></term>
<listitem>
<para>The &ieee; 802.3ad Link Aggregation Control Protocol
- (<acronym>LACP</acronym>) and the Marker Protocol.
- <acronym>LACP</acronym> will negotiate a set of
+ (<acronym>LACP</acronym>) negotiates a set of
aggregable links with the peer in to 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. The traffic
- will be balanced across the ports in the
+ same speed, set to full-duplex operation, and traffic
+ is balanced across the ports in the
<acronym>LAG</acronym> with the greatest total speed.
- In most cases, there will only be one
- <acronym>LAG</acronym> which contains all ports. In
+ Typically, there is only one
+ <acronym>LAG</acronym> which contains all the ports. In
the event of changes in physical connectivity,
<acronym>LACP</acronym> will quickly converge to a new
configuration.</para>
@@ -3468,24 +3460,16 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefault
information and accepts incoming traffic from any active
port. The hash includes the Ethernet source and
destination address and, if available, the
- <acronym>VLAN</acronym> tag, and the IPv4 or
+ <acronym>VLAN</acronym> tag, and the <acronym>IPv4</acronym> or
<acronym>IPv6</acronym> source and destination
address.</para>
</listitem>
</varlistentry>
<varlistentry>
- <term>Loadbalance</term>
+ <term>roundrobin</term>
<listitem>
- <para>This is an alias of <emphasis>FEC</emphasis>
- mode.</para>
- </listitem>
- </varlistentry>
-
- <varlistentry>
- <term>Round-robin</term>
- <listitem>
- <para>Distributes outgoing traffic using a round-robin
+ <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
@@ -3493,10 +3477,16 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefault
</listitem>
</varlistentry>
</variablelist>
- </sect2>
<sect2>
- <title>Examples</title>
+ <title>Configuration Examples</title>
+
+ <para>This section demonstrates how to configure a &cisco;
+ switch and a &os; 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.</para>
<example xml:id="networking-lacp-aggregation-cisco">
<title><acronym>LACP</acronym> Aggregation with a &cisco;
@@ -3526,10 +3516,10 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefault
channel-group 1 mode active
channel-protocol lacp</userinput></screen>
- <para>Create the &man.lagg.4; interface using
- <replaceable>fxp0</replaceable> and
+ <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
- with the <acronym>IP</acronym> address of
+ with an <acronym>IP</acronym> address of
<replaceable>10.0.0.3/24</replaceable>:</para>
<screen>&prompt.root; <userinput>ifconfig fxp0 up</userinput>
@@ -3537,18 +3527,16 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefault
&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>
- <para>View the interface status by running:</para>
-
- <screen>&prompt.root; <userinput>ifconfig lagg0</userinput></screen>
-
- <para>Ports marked as <emphasis>ACTIVE</emphasis> are part of
+ <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>
- <screen>lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
+ <screen>&prompt.root; <userinput>ifconfig lagg0</userinput>
+lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:05:5d:71:8d:b8
media: Ethernet autoselect
@@ -3557,10 +3545,9 @@ BEGEMOT-BRIDGE-MIB::begemotBridgeDefault
laggport: fxp1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
laggport: fxp0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING></screen>
- <para>To see the port status on the &cisco; switch, use
- <userinput>show lacp neighbor</userinput>:</para>
+ <para>To see the port status on the &cisco; switch:</para>
- <screen>switch# show lacp neighbor
+ <screen>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
@@ -3577,9 +3564,9 @@ Fa0/2 SA 32768 0005.5d71.8d
<para>For more detail, type <userinput>show lacp neighbor
detail</userinput>.</para>
- <para>To retain this configuration across reboots, the
- following entries can be added to
- <filename>/etc/rc.conf</filename>:</para>
+ <para>To retain this configuration across reboots, add the
+ following entries to
+ <filename>/etc/rc.conf</filename> on the &os; system:</para>
<programlisting>ifconfig_<replaceable>fxp0</replaceable>="up"
ifconfig_<replaceable>fxp1</replaceable>="up"
@@ -3592,11 +3579,11 @@ ifconfig_<literal>lagg0</literal>="laggp
<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, first bring the underlying
- physical interfaces up. Then, create the &man.lagg.4;
- interface, using <replaceable>fxp0</replaceable> as the
- master interface and <replaceable>fxp1</replaceable> as
- the secondary interface, and assign an <acronym>IP</acronym>
+ To configure failover mode, 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
+ the secondary interface, and the virtual interface is assigned an <acronym>IP</acronym>
address of
<replaceable>10.0.0.15/24</replaceable>:</para>
@@ -3605,7 +3592,7 @@ ifconfig_<literal>lagg0</literal>="laggp
&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>
- <para>The interface should now look something like
+ <para>The virtual interface should look something like
this:</para>
<screen>&prompt.root; <userinput>ifconfig lagg0</userinput>
@@ -3626,8 +3613,8 @@ lagg0: flags=8843<UP,BROADCAST,RUNNIN
If the link is restored on the master interface, it will
once again become the active link.</para>
- <para>To retain this configuration across reboots, the
- following entries can be added to
+ <para>To retain this configuration across reboots, add the
+ following entries to
<filename>/etc/rc.conf</filename>:</para>
<programlisting>ifconfig_<replaceable>fxp0</replaceable>="up"
@@ -3641,30 +3628,30 @@ ifconfig_<literal>lagg0</literal>="laggp
Interfaces</title>
<para>For laptop users, it is usually desirable to configure
- the wireless device as a secondary interface, which is used
- when the wired connection is not available. With
- &man.lagg.4;, it is possible to use one
- <acronym>IP</acronym> address, prefer the wired connection
+ the wireless device as a secondary which is only used
+ when the Ethernet connection is not available. With
+ &man.lagg.4;, 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.</para>
- <para>In this setup, override the underlying wireless
- interface's <acronym>MAC</acronym> address to match that
- of the &man.lagg.4;, which is inherited from the wired
+ <para>This is achieved by overriding the underlying wireless
+ interface's <acronym>MAC</acronym> address with that
+ of the Ethernet
interface.</para>
- <para>In this example, the wired interface,
- <replaceable>bge0</replaceable>, is the master, and the
+ <para>In this example, the Ethernet interface,
+ <replaceable>bge0</replaceable>, is the master and the
wireless interface, <replaceable>wlan0</replaceable>, is
- the failover interface. The
+ the failover. The
<replaceable>wlan0</replaceable> device was created from
- <replaceable>iwn0</replaceable>, which will be configured
- with the wired connection's <acronym>MAC</acronym> address.
- The first step is to determine the <acronym>MAC</acronym>
- address of the wired interface:</para>
+ <replaceable>iwn0</replaceable> wireless interface, which will be configured
+ with the <acronym>MAC</acronym> address of the Ethernet interface.
+ First, determine the <acronym>MAC</acronym>
+ address of the Ethernet interface:</para>
- <screen>&prompt.root; <userinput>ifconfig bge0</userinput>
+ <screen>&prompt.root; <userinput>ifconfig <replaceable>bge0</replaceable></userinput>
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=19b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4>
ether 00:21:70:da:ae:37
@@ -3674,9 +3661,9 @@ bge0: flags=8843<UP,BROADCAST,RUNNING
status: active</screen>
<para>Replace <replaceable>bge0</replaceable> to match the
- system's interface name. The <literal>ether</literal>
+ system's Ethernet interface name. The <literal>ether</literal>
line will contain the <acronym>MAC</acronym> address of
- the wired interface. Now, change the
+ the specified interface. Now, change the
<acronym>MAC</acronym> address of the underlying wireless
interface:</para>
@@ -3687,16 +3674,16 @@ bge0: flags=8843<UP,BROADCAST,RUNNING
<screen>&prompt.root; <userinput>ifconfig wlan0 create wlandev iwn0 ssid my_router up</userinput></screen>
- <para>Bring the <replaceable>bge0</replaceable> interface up.
- Create the &man.lagg.4; interface with
- <replaceable>bge0</replaceable> as master, and failover to
+ <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>
&prompt.root; <userinput>ifconfig lagg0 create</userinput>
&prompt.root; <userinput>ifconfig lagg0 up laggproto failover laggport bge0 laggport wlan0</userinput></screen>
- <para>The interface will now look something like this:</para>
+ <para>The virtual interface should look something like this:</para>
<screen>&prompt.root; <userinput>ifconfig lagg0</userinput>
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
@@ -3713,8 +3700,8 @@ lagg0: flags=8843<UP,BROADCAST,RUNNIN
<screen>&prompt.root; <userinput>dhclient lagg0</userinput></screen>
- <para>To retain this configuration across reboots, the
- following entries can be added to
+ <para>To retain this configuration across reboots, add the
+ following entries to
<filename>/etc/rc.conf</filename>:</para>
<programlisting>ifconfig_bge0="up"
More information about the svn-doc-head
mailing list