Current-Users archive

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

Re: bridge startup with clone interfaces

On Apr 20, 2008, at 11:51 , Juergen Hannken-Illjes wrote:

On Sun, Apr 20, 2008 at 11:42:05AM -0400, Andreas Wrede wrote:
brconfig(8) shows how to create a bridge using the shell escape (!) in
a /etc/ifconfig.bridge0 file. This may not work if an interface
participating in the bridge is also a cloned interface (tap in my
case) as it may only be created after the bridge0 interface.
(Currently, ifconfig -C returns "bridge" first, so it will not work
for any of the cloned interfaces).

My current solution is the split the interface configuration loop in /
etc/rc.d/network into two loops, one to create all necessary clones
and the other to do the configuration, see patch below.

Is there another way to configure this?

Had the same problem with vlan/bridge interfaces. I use /etc/rc.conf:

        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:

--- network.orig        2005-11-24 12:28:45.000000000 -0500
+++ network     2008-04-20 08:16:00.000000000 -0400
@@ -193,20 +193,23 @@
                echo -n 'Configuring network interfaces:'
                for int in $tmp; do
                        eval args=\$ifconfig_$int
if [ -n "$args" ] || [ -f /etc/ifconfig. $int ]; then if ifconfig $int create 2>/dev/null && \
                                   checkyesno ipfilter; then
                                        # resync ipf(4)
                                        ipf -y >/dev/null
+               done
+               for int in $tmp; do
+                       eval args=\$ifconfig_$int
                        if [ -n "$args" ]; then
                                echo -n " $int"
                                ifconfig $int $args
                        elif [ -f /etc/ifconfig.$int ]; then
                                echo -n " $int"
                                while read args; do
                                        [ -z "$args" ] && continue
                                        case "$args" in


Attachment: PGP.sig
Description: This is a digitally signed message part

Home | Main Index | Thread Index | Old Index