Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Jul 1999 01:48:31 -0700
From:      grady@xcf.berkeley.edu (Steven Grady)
To:        freebsd-net@freebsd.org
Subject:   network hangs
Message-ID:  <19990726084851.6F9651528E@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help
I'm getting network hangs on my 3.1-RELEASE system.  The configuration
looks like:
    DSL<-->de1:FreeBSD 3.1:de0<-->100 Mbit switch into internal network

At the moment, de0 and de1 are both Asante Fast Ethernet adapters (with
21140AE chipsets), but I also tried no-name 10/100 cards using the PNIC
chipset (and therefore the pn driver), as well as one of each.  The
network works fine for an indefinite period before the hang.  When the
problem occurs, both interfaces hang.  Rebooting the gateway fixes the
problem, but it then comes back.  Sometimes the hang occurs 30 seconds
after the reboot, other times it can stay up for hours, handling 25 Meg
downloads, ssh sessions, web surfing, etc., with no problems.

When the PNIC cards were used, the driver would start issuing the message
"Watchdog timeout".  With the de driver, no kernel messages are currently
showing up.  Natd logging is turned on, but no interesting messages are
being generated there either.

I'm pretty sure this is FreeBSD's fault, and not the DSL provider's
(PacBell's), because I never saw this problem connecting the DSL line
directly to a Win98 client, or to a hub with Win98 clients configured
to use static IP addresses.  I can't use that configuration since I need
natd (for additional internal hosts), and firewalling...

The system is a 150MHz Pentium/P54C with 64 Megs of memory.  The kernel
differences from GENERIC are:
    maxusers	64
    options	"EXT2FS"
    options	IPFIREWALL
    options	IPFIREWALL_FORWARD
    options	IPFIREWALL_VERBOSE
    options	IPDIVERT
    pseudo-device bpfilter 4
    <Various devices commented out>

The network configuration is straightforward, with the interfaces
and router configured correctly, as well as:
	gateway_enable="YES"
	firewall_enable="YES"
	firewall_type="open"
	natd_enable="YES"
	natd_interface="de1"

This is the second system I've tried this on -- we were getting exactly the
same behavior on an old 486 with the PNIC cards, although it was running
FreeBSD 3.2.  We also got it when we used a 4-port hub instead of a
16-port switch.

I haven't been able to experiment with it as much as I'd like yet, but
it seems like the hang occurs more often if multiple users are using
the DSL connection at the same time.  It also seems to happen more often
(but not always) when a big download is occurring.

My only suspicion at this point is that a 150MHz Pentium can't handle
a 100 Mbit network.  Any chance of that?  How can I tell?  It seems
unlikely, since even when maxing out the connection (with a file
coming in at 300K/sec), top reported the CPU time as 7% system,
2% interrupt, 88% idle, with natd also showing 7%...

Further information:
    Output of netstat -m after the hang:
	634/640 mbufs in use:
		612 mbufs allocated to data
		21 mbufs allocated to packet headers
		1 mbufs allocated to socket names and addresses
	72/144/1536 mbuf clusters in use (current/peak/max)
	368 Kbytes allocated to network (60% in use)
	0 requests for memory denied
	0 requests for memory delayed
	0 calls to protocol drain routines

    Diff of "netstat -m" during a hang, before and after a short
    ping -f:
	1,3c1,3
	< 634/640 mbufs in use:
	< 	612 mbufs allocated to data
	< 	21 mbufs allocated to packet headers
	---
	> 626/672 mbufs in use:
	> 	605 mbufs allocated to data
	> 	20 mbufs allocated to packet headers
	6c6
	< 368 Kbytes allocated to network (60% in use)
	---
	> 372 Kbytes allocated to network (59% in use)

    Diff of "netstat -s" during a hang, before and after a short
    ping -f:

	20c20
	<	34503 packets sent from this host
	---
	>	34908 packets sent from this host
	54c54
	<	34180 packets sent
	---
	>	34184 packets sent
	56c56
	<		6 data packets (5700 bytes) retransmitted
	---
	>		10 data packets (11540 bytes) retransmitted
	90c90
	<	6 retransmit timeouts
	---
	>	10 retransmit timeouts
	109c109
	<	303 datagrams output
	---
	>	305 datagrams output

    dmesg output related to networking: 

	de0: <Digital 21140A Fast Ethernet> rev 0x22 int a irq 12 on pci0.10.0
	de0: Asanta 21140A [10-100Mb/s] pass 2.2
	de0: address aa:bb:cc:dd:ee:ff
	de0: enabling 10baseT port
	de1: <Digital 21140A Fast Ethernet> rev 0x22 int a irq 12 on pci0.11.0
	de1: Asanta 21140A [10-100Mb/s] pass 2.2
	de1: address gg:hh:ii:jj:kk:ll
	de1: enabling 10baseT port
	...
	IP packet filtering initialized, divert enabled, rule-based forwarding enabled, unlimited logging
	
I'd strongly appreciate some pointers on this one.  My next step is to
install 3.2 on the machine, but I haven't seen anything suggesting that
will help.  We were darn happy getting our DSL connection a few days ago,
but it's getting frustrating having to reboot the gateway a dozen times
a day.  Thanks muchly for any help.
--
	Steven
	grady@xcf.berkeley.edu
"Do you think there's a God?"
"Well, SOMEbody's out to get me!"


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990726084851.6F9651528E>