Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Sep 2006 19:27:48 +1000
From:      Antony Mawer <fbsd-net@mawer.org>
To:        =?ISO-8859-9?Q?=D6zkan_KIRIK?= <ozkan@mersin.edu.tr>
Cc:        freebsd-net@FreeBSD.org
Subject:   Re: LACP 802.3ad and ng_fec ?
Message-ID:  <4513AC94.8040609@mawer.org>
In-Reply-To: <4513A5D1.4000604@mersin.edu.tr>
References:  <4513A5D1.4000604@mersin.edu.tr>

next in thread | previous in thread | raw e-mail | index | archive | help
On 22/09/2006 6:58 PM, Özkan KIRIK wrote:
> Does ng_fec module support Dynamic LACP (802.3ad) protocol ?
> 
> i have an HP Procurve 5406 switch, i am trying to make a fail over 
> connection between switch and freebsd.
> Does ng_fec support "Fail over" for links ?

The ng_fec module doesn't support LACP (it would be really nice if it 
did!!!), but you can configure it manually if you've got access to the 
console of the switch. I setup exactly this configuration today 
(although in this case it was for bandwidth aggregation rather than 
fall-over) using an HP Procurve 5308xl.

The procedure went something like this:

1) First, create a new startup script in /etc/rc.d/ to configure the 
Netgraph interface on startup... this was a quick hack-up, but does the job:

     ---- begin /etc/rc.d/ngfec ----
     $ cat /etc/rc.d/ngfec
     #!/bin/sh
     #
     # PROVIDE: ngfec
     # REQUIRE: root
     # BEFORE: netif
     # KEYWORD: nojail

     . /etc/rc.subr

     name="ngfec"
     start_cmd="ngfec_start"
     stop_cmd=":"

     # Netgraph FEC startup script
     ngfec_start()
     {
             echo -n "Configuring netgraph FEC device: "
             ngctl mkpeer fec dummy fec
             ngctl msg fec0: add_iface '"em0"'
             ngctl msg fec0: add_iface '"em1"'
             echo "done."
     }

     load_rc_config $name
     run_rc_command "$1"

     ---- end of /etc/rc.d/ngfec ----


2) Configure the new fec0 interface in /etc/rc.conf:

     ifconfig_fec0="inet a.b.c.d netmask w.x.y.z"


3) Telnet to the HP switch, and do the following:

     i) Type "show trunk" and identify what trunk group names are already
        in use. These will be in the format of "TrkN", eg. Trk1,Trk2,...

     ii) Identify which ports are to be configured as part of trunk (eg.
         in my case, C1 and C2)

   iii) Select the next available trunk group name (eg. Trk7), and
        configure the trunk by typing:

        switch# config t
        switch(config)# trunk C1-C2 Trk7 fec
        switch(config)# exit

4) Once the FreeBSD machine is rebooted, the link should be up....


I'm not sure what the behaviour is when one of the links goes down... I 
don't know if that interface is simply removed from the trunk group and 
the remaining ones continue to operate?

Hope this is useful to others out there, as I had trouble finding any 
good documentation on how to do this :-) I owe thanks to lukem dot 
freebsd at cse dot unsw dot edu dot au for the Netgraph commands for 
getting the FreeBSD fec side of things up and running; the rcNG script 
above is based on the commands he provided me with, put into rcNG format 
so I could integrate it with the boot sequence easily.

Cheers
Antony



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4513AC94.8040609>