Index: chapter.sgml
===================================================================
RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml,v
retrieving revision 1.420
diff -u -r1.420 chapter.sgml
--- chapter.sgml 5 Jan 2009 21:30:43 -0000 1.420
+++ chapter.sgml 9 Jan 2009 06:18:24 -0000
@@ -3283,13 +3283,31 @@
+ Configuring &man.lagg.4; in /etc/rc.conf
+
+ To configure &man.lagg.4; in Failover mode using
+ em0, em1,
+ and an IP address of
+ 192.160.1.20.
+ The configuration in /etc/rc.conf is made up of
+ three parts: enabling the interfaces, specifying that the &man.lagg.4;
+ interface is to be created and configuring the interface:
+
+ ifconfig_em0="up"
+ifconfig_em1="up"
+cloned_interfaces="lagg0"
+ifconfig_lagg0="inet 192.168.1.20/24 laggproto failover laggport em0 laggport em1"
+
+
+
Examples
LACP aggregation with a &cisco; Switch
This example connects two interfaces on a &os; machine to the
- switch as a single load balanced and fault tolerant link. More interfaces
+ switch as a single load balanced and fault tolerant link with an IP
+ address of 10.1.20.1. 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
@@ -3314,12 +3332,22 @@
fxp0 and
fxp1:
- &prompt.root; ifconfig lagg0 create
-&prompt.root; ifconfig lagg0 up laggproto lacp laggport fxp0 laggport fxp1
+ &prompt.root; ifconfig fxp0 up
+&prompt.root; ifconfig fxp1 up
+&prompt.root; ifconfig lagg0 create
+&prompt.root; ifconfig lagg0 inet 10.1.20.1/24 up laggproto lacp laggport fxp0 laggport fxp1
+
+ Configure /etc/rc.conf the same
+ way:
+
+ ifconfig_fxp0="up"
+ifconfig_fxp1="up"
+cloned_interfaces="lagg0"
+ifconfig_lagg0="inet 10.1.20.1/24 laggproto lacp laggport fxp0 laggport fxp1"
View the interface status by running:
- &prompt.root; ifconfig lagg0
+ &prompt.root; ifconfig lagg0
Ports marked as
ACTIVE are part of the active aggregation group
@@ -3330,6 +3358,7 @@
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:05:5d:71:8d:b8
+ inet 10.1.20.1 netmask 0xffffff00 broadcast 10.1.20.255
media: Ethernet autoselect
status: active
laggproto lacp
@@ -3361,21 +3390,34 @@
Failover mode can be used to switch over to a secondary interface if
the link is lost on the master interface. Create and configure the
- lagg0 interface, with
+ lagg0 interface, with
fxp0 as the master interface and
- fxp1 as the secondary interface:
-
- &prompt.root; ifconfig lagg0 create
-&prompt.root; ifconfig lagg0 up laggproto failover laggport fxp0 laggport fxp1
+ fxp1 as the secondary interface and an IP
+ address of
+ 10.20.1.2:
+
+
+ &prompt.root; ifconfig fxp0 up
+&prompt.root; ifconfig fxp1 up
+&prompt.root; ifconfig lagg0 create
+&prompt.root; ifconfig lagg0 inet 10.20.1.2/24 laggproto failover laggport fxp0 laggport fxp1
+
+ Configure /etc/rc.conf the same way:
+
+ ifconfig_fxp0="up"
+ifconfig_fxp1="up"
+cloned_interfaces="lagg0"
+ifconfig_lagg0="inet 10.1.20.2/24 laggproto failover laggport fxp0 laggport fxp1"
The interface will look something like this, the major
differences will be the MAC address and the
device names:
- &prompt.root; ifconfig lagg0
+ &prompt.root; ifconfig lagg0
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
options=8<VLAN_MTU>
ether 00:05:5d:71:8d:b8
+ inet 10.20.1.2 netmask 0xffffff00 broadcast 10.20.1.255
media: Ethernet autoselect
status: active
laggproto failover