From owner-svn-doc-all@FreeBSD.ORG Thu Feb 13 19:04:34 2014 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6C60899D; Thu, 13 Feb 2014 19:04:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 563B516A0; Thu, 13 Feb 2014 19:04:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1DJ4YeI011480; Thu, 13 Feb 2014 19:04:34 GMT (envelope-from dru@svn.freebsd.org) Received: (from dru@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1DJ4YFS011479; Thu, 13 Feb 2014 19:04:34 GMT (envelope-from dru@svn.freebsd.org) Message-Id: <201402131904.s1DJ4YFS011479@svn.freebsd.org> From: Dru Lavigne Date: Thu, 13 Feb 2014 19:04:34 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org Subject: svn commit: r43901 - head/en_US.ISO8859-1/books/handbook/advanced-networking X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Feb 2014 19:04:34 -0000 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 loadbalance roundrobin - - Introduction - - 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. - - - - Operating Modes - - The following operating modes are supported by + &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 + LACP, as this protocol distributes traffic + bi-directionally while responding to the failure of individual + links. + + 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;: - Failover + failover - Sends and receives traffic only through the master + 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. - &cisco; Fast ðerchannel; + fec / loadbalance &cisco; Fast ðerchannel; (FEC) - 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 LACP, that should be used instead. - - FEC 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 or IPv6 - source and destination address. - LACP + lacp The &ieee; 802.3ad Link Aggregation Control Protocol - (LACP) and the Marker Protocol. - LACP will negotiate a set of + (LACP) negotiates a set of aggregable links with the peer in to one or more Link Aggregated Groups (LAGs). 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 + same speed, set to full-duplex operation, and traffic + is 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 + Typically, there is only one + LAG which contains all the ports. In the event of changes in physical connectivity, LACP will quickly converge to a new configuration. @@ -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 - VLAN tag, and the IPv4 or + VLAN tag, and the IPv4 or IPv6 source and destination address. - Loadbalance + roundrobin - This is an alias of FEC - mode. - - - - - Round-robin - - Distributes outgoing traffic using a round-robin + 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 - - Examples + Configuration Examples + + This section demonstrates how to configure a &cisco; + switch and a &os; system for LACP 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 &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 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 - IP 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. - In this setup, override the underlying wireless - interface's MAC address to match that - of the &man.lagg.4;, which is inherited from the wired + This is achieved by overriding the underlying wireless + interface's MAC address with that + of the Ethernet interface. - In this example, the wired interface, - bge0, is the master, and the + In this example, the Ethernet interface, + bge0, is the master and the wireless interface, wlan0, is - the failover interface. The + the failover. The wlan0 device was created from - iwn0, which will be configured - with the wired connection's MAC address. - The first step is to determine the MAC - address of the wired interface: + iwn0 wireless interface, which will be configured + with the MAC address of the Ethernet interface. + First, determine the MAC + address of the Ethernet interface: - &prompt.root; ifconfig bge0 + &prompt.root; ifconfig bge0 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 Replace bge0 to match the - system's interface name. The ether + system's Ethernet interface name. The ether line will contain the MAC address of - the wired interface. Now, change the + the specified interface. Now, change the MAC address of the underlying wireless interface: @@ -3687,16 +3674,16 @@ bge0: flags=8843<UP,BROADCAST,RUNNING &prompt.root; ifconfig wlan0 create wlandev iwn0 ssid my_router up - Bring the bge0 interface up. - Create the &man.lagg.4; interface with - bge0 as master, and failover to + Make sure the bge0 interface is up, then + create the &man.lagg.4; interface with + bge0 as master with failover to wlan0: &prompt.root; ifconfig bge0 up &prompt.root; ifconfig lagg0 create &prompt.root; ifconfig lagg0 up laggproto failover laggport bge0 laggport wlan0 - The interface will now look something like this: + The virtual interface should look something like this: &prompt.root; ifconfig lagg0 lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 @@ -3713,8 +3700,8 @@ lagg0: flags=8843<UP,BROADCAST,RUNNIN &prompt.root; dhclient lagg0 - To retain this configuration across reboots, the - following entries can be added to + To retain this configuration across reboots, add the + following entries to /etc/rc.conf: ifconfig_bge0="up"