[Soekris] net5501 vr(4) repeated unplug/replug -> port stops working
Mike Tancsa
mike at sentex.net
Wed Mar 5 17:02:19 UTC 2008
At 04:45 PM 2/27/2008, Stuart Henderson wrote:
>On 2008-02-27, Andreas Wrede <aew.soekris at planix.com> wrote:
> >
> > On Feb 26, 2008, at 18:05 , Jared D. McNeill wrote:
> >
> >> Stuart Henderson wrote:
> >>> I've seen some problems with the onboard NICs on net5501, where
> >>> if the device connected is unplugged and replugged, the interface
> >>> has link, is able to transmit packets, but is unable to receive
> >>> packets (nothing shown in tcpdump on the interface). Bringing
> >>> the interface down and back up fixes it.
> >>>
> >>> Has anyone noticed this on OS other than OpenBSD?
> >>
> >> I see it on NetBSD also. Glad I'm not the only one :-)
> >
> > For me, it does not happen as long as the interface is in promiscuous
> > mode (ie. while watching to see if I can reproduce the problem).
>
>I first noticed this on NICs configured as a bridge.
On FreeBSD, I created this simple userland script that resets the nic
by watching for its up/down events in syslog's kern.* facility. The
proper fix on FreeBSD is at
http://people.freebsd.org/~yongari/vr/
#!/bin/sh
#look for the following in kern.* on FreeBSD vr1: link state changed to UP
#this means the interface state might have bounced, or just come
up. On FreeBSD 6.x
#this often results in a wedged NIC, so do an extra down/up and
generate some traffic
while read LINE
do
TRIG=`echo "$LINE"|awk '/vr.: link state changed to UP/ {where =
match($0, /vr.:/);if (where) {print substr($0, where, 3)}}'`
if [ -n "$TRIG" ]
then
echo $TRIG
/usr/bin/logger "Resetting due to up/down event $TRIG"
sleep 5
/sbin/ifconfig $TRIG down
/sbin/ifconfig $TRIG up
# ping the broadcast address just to generate some
traffic. This helps as well
/sbin/ping -c 1 -t1 -q `/sbin/ifconfig $TRIG |awk
'/broadcast/ {print $6}'`
/usr/bin/logger "$TRIG restart done"
TRIG=""
fi
done
In syslog, I have
kern.* | exec
/usr/local/sbin/interface-check.sh
---Mike
More information about the Soekris-tech
mailing list