PERFORCE change 126426 for review
Gabor Kovesdan
gabor at FreeBSD.org
Sat Sep 15 09:56:33 PDT 2007
http://perforce.freebsd.org/chv.cgi?CH=126426
Change 126426 by gabor at gabor_server on 2007/09/15 16:55:34
IFC
Affected files ...
.. //depot/projects/docproj_hu/books/handbook/advanced-networking/chapter.sgml#2 integrate
Differences ...
==== //depot/projects/docproj_hu/books/handbook/advanced-networking/chapter.sgml#2 (text+ko) ====
@@ -1,7 +1,7 @@
<!--
The FreeBSD Documentation Project
- $FreeBSD: doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.399 2007/08/19 18:33:27 blackend Exp $
+ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.400 2007/09/12 11:47:33 murray Exp $
-->
<chapter id="advanced-networking">
@@ -2859,6 +2859,194 @@
</sect2>
</sect1>
+ <sect1 id="network-aggregation">
+ <sect1info>
+ <authorgroup>
+ <author>
+ <firstname>Andrew</firstname>
+ <surname>Thompson</surname>
+ <contrib>Written by </contrib>
+ </author>
+ </authorgroup>
+ </sect1info>
+ <title>Link Aggregation and Failover</title>
+
+ <indexterm><primary>lagg</primary></indexterm>
+ <indexterm><primary>failover</primary></indexterm>
+ <indexterm><primary>fec</primary></indexterm>
+ <indexterm><primary>lacp</primary></indexterm>
+ <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>
+
+ <variablelist>
+
+ <varlistentry><term>failover</term>
+
+ <listitem>
+ <para>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; any interfaces added after
+ that are used as failover devices.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry><term>fec</term>
+
+ <listitem>
+ <para>Supports Cisco EtherChannel. This is a static setup and does not
+ negotiate aggregation with the peer or exchange frames to monitor the
+ link, if the switch supports LACP then that should be used
+ instead.</para>
+
+ <para>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 VLAN tag, and the IPv4/IPv6 source
+ and destination address.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry><term>lacp</term>
+
+ <listitem>
+ <para>Supports the IEEE 802.3ad Link Aggregation Control Protocol
+ (LACP) and the Marker Protocol. LACP will negotiate a set of
+ aggregable links with the peer in to one or more Link Aggregated
+ Groups. Each LAG is composed of ports of the same speed, set to
+ full-duplex operation. The traffic will be balanced across the ports
+ in the LAG with the greatest total speed, in most cases there will
+ only be one LAG which contains all ports. In the event of changes in
+ physical connectivity, Link Aggregation will quickly converge to a
+ new configuration.</para>
+
+ <para>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 VLAN tag, and the IPv4/IPv6 source
+ and destination address.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry><term>loadbalance</term>
+
+ <listitem>
+ <para>This is an alias of <emphasis>fec</emphasis> mode.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry><term>roundrobin</term>
+
+ <listitem>
+ <para>Distributes outgoing traffic using a round-robin scheduler
+ through all active ports and accepts incoming traffic from any active
+ port. This mode will violate Ethernet frame ordering and should be
+ used with caution.</para>
+ </listitem>
+ </varlistentry>
+ </variablelist>
+ </sect2>
+
+ <sect2>
+ <title>Examples</title>
+
+ <example id="networking-lacp-aggregation-cisco">
+ <title>LACP 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 link. More interfaces
+ can be added to increase throughput and fault tolerance. Since frame
+ ordering is mandatory on Ethernet links then 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 available interfaces.</para>
+
+ <para>On the Cisco switch add the interfaces to the channel group.</para>
+
+ <screen>interface FastEthernet0/1
+ channel-group 1 mode active
+ channel-protocol lacp
+!
+interface FastEthernet0/2
+ channel-group 1 mode active
+ channel-protocol lacp
+!</screen>
+
+ <para>On the &os; machine create the lagg interface.</para>
+
+ <screen>&prompt.root; <userinput>ifconfig lagg0 create</userinput>
+&prompt.root; <userinput>ifconfig lagg0 up laggproto lacp laggport fxp0 laggport fxp1</userinput></screen>
+
+ <para>View the interface status from ifconfig; ports marked as
+ <emphasis>ACTIVE</emphasis> are part of the active aggregation group
+ that has been negotiated with the remote switch and traffic will be
+ transmitted and received. Use the verbose output of &man.ifconfig.8;
+ to view the LAG identifiers.</para>
+
+ <screen>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
+ status: active
+ laggproto lacp
+ laggport: fxp1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
+ laggport: fxp0 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING></screen>
+
+ <para>The switch will show which ports are active. For more detail use
+ <userinput>show lacp neighbor detail</userinput>.</para>
+
+ <screen>switch# show lacp neighbor
+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</screen>
+
+ </example>
+ <example id="networking-lagg-failover">
+ <title>Failover mode</title>
+
+ <para>Failover mode can be used to switch over to another interface if
+ the link is lost on the master.</para>
+
+ <screen>&prompt.root; <userinput>ifconfig lagg0 create</userinput>
+&prompt.root; <userinput>ifconfig lagg0 up laggproto failover laggport fxp0 laggport fxp1</userinput></screen>
+
+ <screen>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
+ status: active
+ laggproto failover
+ laggport: fxp1 flags=0<>
+ laggport: fxp0 flags=5<MASTER,ACTIVE></screen>
+
+ <para>Traffic will be transmitted and received on
+ <devicename>fxp0</devicename>. If the link is lost on
+ <devicename>fxp0</devicename> then <devicename>fxp1</devicename> will
+ become the active link. If the link is restored on the master
+ interface then it will once again become the active link.</para>
+ </example>
+ </sect2>
+ </sect1>
+
<sect1 id="network-diskless">
<sect1info>
<authorgroup>
More information about the p4-projects
mailing list