PDA

View Full Version : Recommend a NIC


Beebe
02-25-2007, 08:51 AM
Can anyone recommend a good quality general purpose inexpensive 100Mbit or 1000Mbit NIC for use in FreeBSD servers mainly. I think perhaps the ones I've got are not working too well, since I only get around 50mbps from my fileserver, and since the recent problems I've had with the one in my Staros bandwidth shaper having to be set on half duplex to avoid packet loss.

Thanks,
Roger

Ick
02-25-2007, 09:03 AM
We have had really good luck with the Realtek 8139 10/100. Cost is probably about $12.00.

Beebe
02-25-2007, 10:00 AM
We have had really good luck with the Realtek 8139 10/100. Cost is probably about $12.00.

Isn't that a chipset? Can I be sure that all 8139 based cards are good? I see them on ebay, 4 for $8 buy it now including shipping.

Thanks,
Roger

lonnie
02-25-2007, 11:26 AM
We have always used Realtek 8139 cards. There are fancier brands that reduce processor load, but when you have greater than a 600 MHz PIII it does not really matter.

tog
02-25-2007, 05:03 PM
I recommend against using Realtek anything in servers and routers, only use Realtek-based devices in slightly less important desktop client PCs.

Use Intel Etherexpress Pro/100 or Intel EtherExpress Pro/1000 series cards for some of the best server-grade NICs you can get for FreeBSD. These are drivers "fxp" and "em" respectively. I can see model PWLA8391GT Intel 10/100/1000 NICs (FreeBSD driver "em") for only $30 new. They are well worth it.

http://www.freebsd.org/cgi/man.cgi?query=fxp
http://www.freebsd.org/cgi/man.cgi?query=em

If you had ever read the source code for various Realtek drivers you would cringe. There are often comments starting with "FIXME" and comments complaining about Realtek's inaccurate or complete lack of documentation for their chipset which has resulted in crippling bugs in the Realtek drivers for both Linux and *BSD on more than one occasion.

tony
02-25-2007, 05:07 PM
That's too bad you have not had any luck with RTL drivers. Our own experience has been quite the opposite, and have had excellent luck with them on all our core routers for years.

The Intel PRO/100 cards are Ok, but cost quite a bit more.

lonnie
02-25-2007, 05:15 PM
I am not aware of ANY crippling bugs in either Linux or FreeBSD, and as Tony said we have used Realtek exclusively for years (since 1996) and I chuckle when I see distress postings from people who bought the expensive name brand units.

I would not change my advice one little bit and I still recommend Realtek 8139 based cards. I will also say that Intel EtherPro cards are fine units but if you have the CPU horsepower they are not necessary.

tog
02-25-2007, 06:21 PM
I can assure you Realtek does firmly fall within the "you get what you pay for" though. Realtek's 8129 and 8139 chipsets are horrible. See end of this post. I do believe you that the RTL8139 and various drivers works fine now since it has been around for so long. I have a decent-sized pile of Intel 8255x 10/100 NICs that we got for like $7/each so I have no reason to use anything else :)

Price isn't much of a concern for me for NICs. 3coms are some of the most expensive and they are definitely to be avoided for example. I would recommend using a Realtek RTL8139 before I would ever recommend using a 3com 3c905B or C.

I leave you with some comments from the current FreeBSD if_rl.c (Realtek 8139 driver). Do you really want this piece of junk NIC in your important routers and servers?

/*
* The RealTek 8139 PCI NIC redefines the meaning of 'low end.' This is
* probably the worst PCI ethernet controller ever made, with the possible
* exception of the FEAST chip made by SMC. The 8139 supports bus-master
* DMA, but it has a terrible interface that nullifies any performance
* gains that bus-master DMA usually offers.
*
* For transmission, the chip offers a series of four TX descriptor
* registers. Each transmit frame must be in a contiguous buffer, aligned
* on a longword (32-bit) boundary. This means we almost always have to
* do mbuf copies in order to transmit a frame, except in the unlikely
* case where a) the packet fits into a single mbuf, and b) the packet
* is 32-bit aligned within the mbuf's data area. The presence of only
* four descriptor registers means that we can never have more than four
* packets queued for transmission at any one time.
*
* Reception is not much better. The driver has to allocate a single large
* buffer area (up to 64K in size) into which the chip will DMA received
* frames. Because we don't know where within this region received packets
* will begin or end, we have no choice but to copy data from the buffer
* area into mbufs in order to pass the packets up to the higher protocol
* levels.


What. The. F***.

/*
* Detect the Realtek 8139B. For some reason, this chip is very
* unstable when left to autoselect the media
* The best workaround is to set the device to the required
* media type or to set it to the 10 Meg speed.
*/

/*
* A frame has been uploaded: pass the resulting mbuf chain up to
* the higher level protocols.
*
* You know there's something wrong with a PCI bus-master chip design
* when you have to use m_devget().
*
* The receive operation is badly documented in the datasheet, so I'll
* attempt to document it here.
...



/*
* Here's a totally undocumented fact for you. When the
* RealTek chip is in the process of copying a packet into
* RAM for you, the length will be 0xfff0. If you spot a
* packet header with this value, you need to stop. The
* datasheet makes absolutely no mention of this and
* RealTek should be shot for this.
*/


/*
* XXX The RealTek chip includes the CRC with every
* received frame, and there's no way to turn this
* behavior off (at least, I can't find anything in
* the manual that explains how to do it) so we have
* to trim off the CRC manually.
*/

/*
* The RealTek is brain damaged and wants longword-aligned
* TX buffers, plus we can only have one fragment buffer
* per packet. We have to copy pretty much all the time.
*/

tony
02-25-2007, 08:12 PM
RTL chips are cheap ($5.00 for a new card), and as such, you do get what you pay for. The kicker however, despite what the driver author thinks about the cards, they do perform very well, despite some of the brain-deadness of the cards, and required workarounds. This alone is not new among network cards, and pretty much all cards have quirks, and required workarounds. The worst of the bunch being 3Com.

For the price vs. performance (and stability) under V3, the RTL chips are the most wide-spread, reliable and perform adequately.

HoeDing
02-26-2007, 12:52 PM
I use intel pro 1000's in our pfsense routers myself, but I have had nothing but good luck with 8139 based cards either.