Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bridge startup with clone interfaces





On 4/22/08 9:42 AM, "Andreas Wrede" <andreas%planix.com@localhost> wrote:

> 
> On Apr 22, 2008, at 2:39 , Daniel Carosone wrote:
> 
>> On Mon, Apr 21, 2008 at 10:46:15AM -0400, Andreas Wrede wrote:
>>> 
>>> On Apr 20, 2008, at 11:51 , Juergen Hannken-Illjes wrote:
>>>> Had the same problem with vlan/bridge interfaces. I use /etc/
>>>> rc.conf:
>>>> 
>>>> auto_ifconfig=NO
>>>> net_interfaces="wm0 wm1 vlan0 vlan1 bridge0 bridge1 bridge2"
>>> 
>>> 
>>> 
>>> Ah, ok, although that solution requires some insight and
>>> understanding of
>>> the network configuration machinery, especially the difference
>>> between a
>>> cloned and non-cloned interface. I stumbled here because I was adding
>>> pkgsrc's openvpn to an already up and running system.
>>> 
>>> Unless there are other drawbacks, I'd like to propose to change
>>> etc/rc.d/network such:
>> 
>> No specific objection to doing create-before-configure, but it's not a
>> sufficiently general solution.  You may still need a specific order,
>> where configuration of one interface depends on the configuration of
>> another (not just the creation).  In particular, encapsulation
>> interfaces like gre, vlan, pppoe and others may need the "parent" to
>> be configured first (dependencies on interface routes being one common
>> case).
> 
>> It may reduce a small number of cases where you need to resort to an
>> explicit order (such as yours), but either way we should improve the
>> documentation around how to specify an explicit order.
> 
> 
> I am more concerned with making the auto_ifconfig process predictable.
> For example, if you have configured a bridge with 2 "real" interfaces,
> autoconfig works. If you later replace one of the interfaces with a
> vlan interface that you defined on top of it, the bridge config will
> fail relatively silently (ie. the bridge will exist with only the
> remaining "real" interface as a member).
> 
>  From a configuration perspective, create-before-configure removes the
> main difference between cloned and non-cloned interfaces.

+1 for the create, then configure:

auto_ifconfig=NO
net_interfaces="wm0 wm1 wm2 wm3 bge0 bge1 vlan11 vlan12 vlan13 vlan14 vlan21
vlan22 vlan23 vlan24 vlan31 vlan32 vlan33 vlan34 vlan41 vlan42 vlan43 vlan44
vlan51 vlan52 vlan53 vlan54 vlan61 vlan62 vlan63 vlan64 vlan71 vlan72 vlan73
vlan74 vlan81 vlan82 vlan83 vlan84 vlan91 vlan92 vlan93 vlan94 vlan101
vlan102 vlan103 vlan104 vlan111 vlan112 vlan113 vlan114 vlan131 vlan132
vlan133 vlan134 vlan151 vlan152 vlan153 vlan154 vlan161 vlan162 vlan163
vlan164 vlan171 vlan172 vlan173 vlan174 vlan181 vlan182 vlan183 vlan184
tap20 tap22 tap24 tap100 tap101 tap102 tap103 tap104 tap105 tap107 tap108
tap116 tap117 tap200 tap202 tap222 tap303 bridge20 bridge22 bridge24
bridge100 bridge101 bridge102 bridge103 bridge104 bridge105 bridge107
bridge108 bridge116 bridge117 bridge20 bridge200 bridge222 bridge303"

I can't imagine a logic to always know what the right order might be beyond
physical media first, bridge last -- but not having to do this would be a
welcome treat.  The default order, alphabetical, is almost always going to
break if you use a bridge.

peter






Home | Main Index | Thread Index | Old Index