Solved if_bridge membership in rc.conf not being applied...

Hi all,

Need a bit of help with bridging please:

In /etc/rc.conf I have the following defined
Code:
...
cloned_interfaces="bridge0"
ifconfig_bridge0="addm wlan0 addm ue0"
On boot the bridge interface is created but with no members. If I issue the following command once booted, it works as expected: ifconfig bridge0 addm wlan0 addm ue0!

Any ideas as to what could be wrong, or what I have missed?

73,

Jamez
 
When I was setting up the bridge on my system 2 or 3 years ago, I experienced the same problem, and if I remember correctly, it seemed to be a timing issue, and this became resolved once I added other initializations between the bridge declaration and membership additions. Furthermore, since it may happen, that some of my ports are not connected, I forced the respective NIC's to come up before adding them to the bridge. The following sequence does work for me:

Code:
...
cloned_interfaces="bridge0"
ifconfig_re0="SYNCDHCP -tso description WAN"
ifconfig_em0="up -tso"
ifconfig_em1="up -tso"
ifconfig_bridge0="inet 192.168.0.0/24 addm em0 addm em1 description LAN"
...

PS: Ahh.., now I see, that you are using a USB ethernet NIC -- ue0. There is another problem involved with this. Usually the USB NIC's are comming-up very late in the boot sequence and most likely ue0 is not available yet, when it comes to the bridge membership additions.

In order to resolve this, add to the file /boot/loader.conf the kernel modules of your USB NIC driver. On another system of mine, my USB NIC is driven by axe(4) and consequently my /boot/loader.conf contains:
Code:
...
uether_load="YES"
if_axe_load="YES"
...
 
Hi obsigna,

Yep, this is my first outing with a USB NIC, and your spot on about late enumeration!

After putting the following into /boot/loader.conf
Code:
if_run_load="YES"
runfw_load="YES"
wlan_wep_load="YES"
wlan_ccmp_load="YES"
wlan_tkip_load="YES"
wlan_xauth_load="YES"
if_bridge_load="YES"
and changing the ordering in /etc/rc.conf
Code:
ifconfig_ue0="DHCP"
ntpd_enable="YES"
ntpd_sync_on_start="YES"
wlans_run0="wlan0"
create_args_wlan0="wlanmode hostap channel 2"
hostapd_enable="YES"
#...snipped other stuff out...
cloned_interfaces="bridge0"
ifconfig_bridge0="addm wlan0 addm ue0"
It seems that the ifconfig command pulls in the revelant kernel modules when manually entering, and the wlan0 interface is not in the expected state when bridge attempts to utilise it.

The balance has been restored! :)
 
If any way possible get rid of the USB NIC and replace it with a (for example) mini pci-express one. USB NICs are generally just awful and don't work that well in FreeBSD.
 
I must admit I have never used USB nics before; going down this path as to handle a usb bus on a self-etched homebrew pcb is one thing, to design and etch a pci-express interface including the connection header is in a place my skills haven't arrived at yet...

The smsc(4) and run(4) driver seems reliable at first squeeze beyond the above issue with the run driver...

Happy to take on board your experience though, if you have any examples?

73,

James.
 
Back
Top