1.2.2 broke OPT1/LAN briding
-
My pfsense setup has OPT1 bridged to LAN. OPT1 is on vlan0. This works fine in 1.2.1.
After upgrading to 1.2.2, it stops working. Looking at the ifconfig output, shows some differences.
In 1.2.1, bridge0 has vlan0 and em0 listed. In 1.2.2, only vlan0 is listed and I cannot connect or ping address on vlan0 from the LAN(em0).
1.2.2:bridge0: flags=8802 <broadcast,simplex,multicast>metric 0 mtu 1500 ether 52:49:3d:25:7a:41 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:00:00:00:00:00 priority 0 ifcost 0 port 0 member: vlan0 flags=143<learning,discover,autoedge,autoptp></learning,discover,autoedge,autoptp></broadcast,simplex,multicast>
1.2.1:
bridge0: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500 ether ee:7a:b5:99:73:24 id 00:04:23:bb:28:1a priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:04:23:bb:28:1a priority 32768 ifcost 0 port 0 member: em0 flags=1e7 <learning,discover,stp,edge,autoedge,ptp,autoptp>port 2 priority 128 path cost 20000 proto rstp role designated state forwarding member: vlan0 flags=143 <learning,discover,autoedge,autoptp></learning,discover,autoedge,autoptp></learning,discover,stp,edge,autoedge,ptp,autoptp></up,broadcast,running,simplex,multicast>
-
Please post the contents of /tmp/bridge0_setup.sh (you can open it and paste from Diagnostics -> Edit file)
-
,@cmb:
Please post the contents of /tmp/bridge0_setup.sh (you can open it and paste from Diagnostics -> Edit file)
That file doesn't exist..The only filename close to that is /tmp/bridge0_config:
/sbin/ifconfig bridge0 destroy /sbin/ifconfig bridge0 create /sbin/ifconfig vlan0 mtu 1500 /sbin/ifconfig em0 mtu 1500 /sbin/ifconfig vlan0 up /sbin/ifconfig em0 up /sbin/ifconfig bridge0 addm vlan0 stp vlan0 addm em0 stp em0 up
-
That file doesn't exist..The only filename close to that is /tmp/bridge0_config:
That's what I was after, I was trying to recall the filename from memory.
It's being configured correctly. What output do you get when you run all those commands manually?
-
/tmp/bridge_config_vr0 /sbin/ifconfig vr0 mtu 1500 /sbin/ifconfig vlan1 mtu 1500 /sbin/ifconfig bridge0 create /sbin/ifconfig bridge0 addm vr0 addm vlan1 up /sbin/ifconfig bridge0 stp vr0 stp vlan1 # ifconfig bridge0 bridge0: flags=8843 <up,broadcast,running,simplex,multicast>metric 0 mtu 1500 ether ea:f4:9b:29:bf:64 id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 member: vlan1 flags=143 <learning,discover,autoedge,autoptp>member: vr0 flags=143 <learning,discover,autoedge,autoptp></learning,discover,autoedge,autoptp></learning,discover,autoedge,autoptp></up,broadcast,running,simplex,multicast>
/tmp/bridge0_config /sbin/ifconfig bridge0 destroy /sbin/ifconfig bridge0 create /sbin/ifconfig vr0 mtu 1500 /sbin/ifconfig vlan1 mtu 1500 /sbin/ifconfig vr0 up /sbin/ifconfig vlan1 up /sbin/ifconfig bridge0 addm vr0 stp vr0 addm vlan1 stp vlan1 up # ifconfig bridge0 bridge0: flags=8802 <broadcast,simplex,multicast>metric 0 mtu 1500 ether 82:87:ad:81:d0:6e id 00:0e:0c:d8:17:84 priority 32768 hellotime 2 fwddelay 15 maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 root id 00:0e:0c:d8:17:84 priority 32768 ifcost 0 port 0 member: vlan1 flags=143 <learning,discover,autoedge,autoptp>member: vr0 flags=1c7 <learning,discover,stp,autoedge,ptp,autoptp>port 1 priority 128 path cost 200000 proto rstp role designated state discarding</learning,discover,stp,autoedge,ptp,autoptp></learning,discover,autoedge,autoptp></broadcast,simplex,multicast>
If now do the following it brings back the bridge
/sbin/ifconfig bridge0 destroy /sbin/ifconfig vr0 mtu 1500 /sbin/ifconfig vlan1 mtu 1500 /sbin/ifconfig bridge0 create /sbin/ifconfig bridge0 addm vr0 addm vlan1 up
Spanning Tree Protocol (STP) (http://www.freebsd.org/doc/en/books/handbook/network-bridging.html )
/sbin/ifconfig bridge0 stp vlan1
ifconfig: unable to set bridge flags: Invalid argument
Apparently it will not work on vlan nic's (same on 1.2.1 and 1.2.2)
So if
/sbin/ifconfig bridge0 addm vr0 stp vr0 addm vlan1 stp vlan1 up
is change back to
/sbin/ifconfig bridge0 addm vr0 addm vlan1 up
/sbin/ifconfig bridge0 stp vr0 stp vlan1
it should work as before.The quick hack:
/usr/local/www/interfaces_opt.php (you can open it and paste from Diagnostics -> Edit file)
find
$bridgecmd .= " addm $bridgeif stp $bridgeif ";
and change it to
$bridgecmd .= " addm $bridgeif ";
save and reboot -
Ah, I wasn't thinking that STP wouldn't work on VLANs. Thanks Perry.
I don't have time to fix it right now but put it on my todo list for sometime in the next week. The fix Perry posted will work for those of you bridging VLANs, but isn't a suitable long term fix.
-
Fixed in 1.2.3.