From owner-freebsd-questions@FreeBSD.ORG Fri Dec 19 18:07:59 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9194F1065673 for ; Fri, 19 Dec 2008 18:07:59 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id E97CF8FC17 for ; Fri, 19 Dec 2008 18:07:58 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id mBJI7oJp074607; Fri, 19 Dec 2008 18:07:51 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.2 smtp.infracaninophile.co.uk mBJI7oJp074607 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1229710071; bh=lE/n4wyGELRyVU a4OEm/wsx8HXmUKqCSQVSr2fPEJYM=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<494BE2EC.20407@infracaninophile.co.uk>|Date:=20Fri,=201 9=20Dec=202008=2018:07:40=20+0000|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User-A gent:=20Thunderbird=202.0.0.18=20(X11/20081125)|MIME-Version:=201.0 |To:=20Karrj=20|CC:=20freebsd-questions@freebsd.o rg|Subject:=20Re:=20Netstat=20command=20output|References:=20<21094 731.post@talk.nabble.com>|In-Reply-To:=20<21094731.post@talk.nabble .com>|X-Enigmail-Version:=200.95.6|Content-Type:=20multipart/signed =3B=20micalg=3Dpgp-sha256=3B=0D=0A=20protocol=3D"application/pgp-si gnature"=3B=0D=0A=20boundary=3D"------------enig380075DC9986FC35F77 396EF"; b=xMN519TDYzTfYUfz3xV47ZXhwsIGzB1hp0v834DGGem0xjwMNfK3fiB6/ 0gL8rpa+HMQgabDKZW5jOALVOx3Re2IZyA5Vd/Qbg/4oySmIHw7G/oKPPq+PB1zBRft wiseP/xBmgcCNUQMPWmNTZP4IzlStyeTAdK3Q1I86jZl4iM= Message-ID: <494BE2EC.20407@infracaninophile.co.uk> Date: Fri, 19 Dec 2008 18:07:40 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: Karrj References: <21094731.post@talk.nabble.com> In-Reply-To: <21094731.post@talk.nabble.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig380075DC9986FC35F77396EF" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (smtp.infracaninophile.co.uk [IPv6:::1]); Fri, 19 Dec 2008 18:07:51 +0000 (GMT) X-Virus-Scanned: ClamAV 0.94.2/8786/Fri Dec 19 10:30:31 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-3.5 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: Netstat command output X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Dec 2008 18:07:59 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig380075DC9986FC35F77396EF Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Karrj wrote: > Hello - Warning - I am new to FreeBSD. I am not sure this is the corre= ct > forum for this post - forgive me if it is not and please direct me to t= he > 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 goa= l is > to use this as a WAN emulator. I was doing some initial testing where t= he > 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 t= he > FreeBSD. The outputput of the command indicates a relatively small numb= er 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 perfo= rmed > 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 error= s > according to the trace analysis - no retransmissions, etc shown in the > trace. My questions are related to the meaning and interpretation of th= e > 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 = by > output errors in the command? The interface cannot see the packets afte= r > they have been transmitted. I would like a technical explanation of the= > output of this netstat command. 2) How to alleviate the errors? Is this= a > buffer issue? How to determine the NIC type?=20 > Any feedback would be most appreciated. Hmm... well, to determine the NIC type, look at the interface name. In F= reeBSD, 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 ext= ract PCI ID numbers etc. using 'pciconf -lv'. =20 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 almos= t certainly got a mismatch between switch and server -- one is trying to au= toneg, 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 wil= l 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 sophis= ticated 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 you= r 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 wiresh= ark running. Note that some modern NICs with hardware checksum offloading can give fal= se checksum errors on locally generated traffic -- essentially tcpdump grabs= a copy of the outgoing packet before the NIC can calculate the checksum and inse= rt it. This will only affect programs like tcpdump(1). It won't cause the error = counters netstat(1) reports to be incremented. If you do see this sort of thing, = then you just need another machine you can do packet capture on to prove to yo= urself that the checksums are correct over the wire. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig380075DC9986FC35F77396EF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEUEAREIAAYFAklL4vYACgkQ8Mjk52CukIxqbACghrRlaIVk5GYC58JL/fToYKzz 7eMAmIdCJg/zr+1aVsVJYn9DQ16c+hA= =kbZV -----END PGP SIGNATURE----- --------------enig380075DC9986FC35F77396EF--