Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 08 Aug 2007 09:58:36 -0500
From:      Reid Linnemann <lreid@cs.okstate.edu>
To:        Ewald Jenisch <a@jenisch.at>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: lagg(4) - configuration for /etc/rc.conf?
Message-ID:  <46B9DA1C.1010906@cs.okstate.edu>
In-Reply-To: <20070808135858.GA2847@aurora.oekb.co.at>
References:  <20070808135858.GA2847@aurora.oekb.co.at>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
Written by Ewald Jenisch on 08/08/07 08:58>>
> Hi,
> 
> Thanks to the hints posted here about "failover redundancy" I've
> successfully set up lagg(4) in order to have a machine with redundant
> failover connection to two switches. 
> 
> 
> The only thing that's missing is the correct configuration in
> /etc/rc.conf.
> 
> Here's what I've got so far in my rc.conf:
> 
> defaultrouter="192.168.9.1"
> if_lagg_load="YES"
> ifconfig_bge0="UP"
> ifconfig_bge1="UP"
> ifconfig_lagg0="create"
> ifconfig_lagg0="laggproto failover laggport bge0 laggport bge1 192.168.9.5 netmask 255.255.255.0"
> 
> 
> The problem is that once the machine boots the "lagg0" interface
> doesn't get created/activated; a "ifconfig" done after booting shows
> that no lagg interface is there, but the physical interfaces (bge0,
> bge1) are UP.
> 
> 
> Only after I manually enable the lagg-interface it with "ifconfig
> lagg0 create" the interface is created but then it automagically gets
> the right IP-address and routing also works:
> 
> # ifconfig
> bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
>         ether 00:08:02:47:0d:56
>         media: Ethernet autoselect (1000baseTX <full-duplex>)
>         status: active
>         lagg: laggdev lagg0
> bge1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
>         ether 00:08:02:47:0d:56
>         media: Ethernet autoselect (100baseTX <full-duplex>)
>         status: active
>         lagg: laggdev lagg0
> lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
>         inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
>         inet6 ::1 prefixlen 128 
>         inet 127.0.0.1 netmask 0xff000000 
> lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>         options=1b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING>
>         inet 192.168.9.5 netmask 0xffffff00 broadcast 192.168.9.255
>         ether 00:08:02:47:0d:56
>         media: Ethernet autoselect
>         status: active
>         laggproto failover
>         laggport: bge1 flags=4<ACTIVE>
>         laggport: bge0 flags=5<MASTER,ACTIVE>
> 
> 
> I've tried numerous variations of the "ifconfig_lagg0"-lines in
> /etc/rc.conf above - with or without create etc. - to no extent. Upon
> boot the lagg-interface remains down basically cutting of the box from
> the network until I enable the lagg-interface from the console :-(.
> 
> Thanks much in advance for any clue,
> -ewald
> 
> 

Remember that what you put in rc.conf are variables, not instructions. 
You first define ifconfig_lagg0 to be "create", but then you turn around 
and redefine it to be "laggproto failover laggport bge0 laggport bge1 
192.168.9.5 netmask 255.255.255.0". So when /etc/rc.d/netif fires off to 
configure interfaces, this redefinition is used for configuring the 
lagg0 interface. If you define ifconfig_lagg0 to be "create laggproto 
failover laggport bge0 laggport bge1 192.168.9.5 netmask 255.255.255.0", 
I would expect it to do what you want.




Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?46B9DA1C.1010906>