Netstat command output

john.karr at john.karr at
Fri Dec 19 18:51:11 UTC 2008

Thanks for the response. I will heed your suggestions. 

-----Original Message-----
From: Matthew Seaman [mailto:m.seaman at] 
Sent: Friday, December 19, 2008 12:08 PM
To: Karr,JE,John,JGU8 R
Cc: freebsd-questions at
Subject: Re: Netstat command output

Karrj wrote:
> Hello - Warning -  I am new to FreeBSD. I am not sure this is the
> forum for this post - forgive me if it is not and please direct me to
> correct area. I have installed FreeBSD on a HP Proliant DL380 G3
server with
> (2) NICs. I have also installed Dummynet and NetSNMP as my ultimate
goal is
> to use this as a WAN emulator. I was doing some initial testing where
> FreeBSD box acts as a router between two subnets where an ftp client
is on
> one subnet and an ftp server is on the other. I kick off an ftp get of
a 9
> MB file and at the same time initiate a netstat -w1 -Ibge0 command on
> FreeBSD. The outputput of the command indicates a relatively small
number of
> input errors (<10 per interval). The same command on the bge1
interface is
> all zeros. This is repeatable every time I perform the ftp get. I
> the same test without the FreeBSD box by having the client and server
> connected to the same subnet through the same switch ports and no
> according to the trace analysis - no retransmissions, etc shown in the
> trace. My questions are related to the meaning and interpretation of
> output of the netstat command and how to resolve the errors. 1) What
is the
> meaning of input errors? Is it bad CRC at layer 2? What would be meant
> output errors in the command? The interface cannot see the packets
> they have been transmitted. I would like a technical explanation of
> output of this netstat command. 2) How to alleviate the errors? Is
this a
> buffer issue? How to determine the NIC type? 
> Any feedback would be most appreciated.

Hmm... well, to determine the NIC type, look at the interface name.  In
the i/f device depends on the chipset of the NIC.  There are manual
pages for
all of the available types: bge(4) in your case.  If you need more
detail, look
at the boot-time dmesg output -- ie /var/run/dmesg.boot -- or you can
PCI ID numbers etc. using 'pciconf -lv'.  

If you're only seeing errors on the input side on bge0, that sounds like
a duplex mismatch to me.  What's the output of 'ifconfig bge0'?  If it
claims the connection is running at 100Mb/s half duplex then you've
certainly got a mismatch between switch and server -- one is trying to
and the other is wired to a fixed speed.  Either set them both to
autoneg, or
wire them both down.  (100Mb half duplex is the default setting a NIC
use when it fails to negotiate correctly with a switch.)

Same sort of effect /can/ be caused by a dodgy patch lead, but I assume
that's one of the first things you'ld have swapped out in trying to
debug this.

To tell exactly what the errors are you're going to need some more
analysis tools than netstat(1).  tcpdump(1) and/or wireshark (from
ports) are
probably your best bet.  If you don't want to put an X environment on
FreeBSD box, then use 'tcpdump -i bge0 -s 0 -w /some/filename' to
capture the
packet flows, then copy the file to another machine where you have

Note that some modern NICs with hardware checksum offloading can give
checksum errors on locally generated traffic -- essentially tcpdump
grabs a copy
of the outgoing packet before the NIC can calculate the checksum and
insert it.
This will only affect programs like tcpdump(1). It won't cause the error
netstat(1) reports to be incremented.  If you do see this sort of thing,
you just need another machine you can do packet capture on to prove to
that the checksums are correct over the wire.



Dr Matthew J Seaman MA, D.Phil.                   7 Priory Courtyard
                                                  Flat 3
PGP:     Ramsgate
                                                  Kent, CT11 9PW

More information about the freebsd-questions mailing list