From MythTV Official Wiki
Revision as of 00:10, 12 September 2006 by Aboutblank (Talk | contribs)

Jump to: navigation, search


Where on earth do you start with Linux networking? Surely billions of words must have been written on the subject. UNIX was networking before Windows was a gleam in Bill Gates' eye, and when the internet finally was more than a gleam in Bill's eye, he borrowed the TCP/IP stack from BSD.

Anyway, we can restrict this section to just getting all of our myriad Myth boxes talking to one another (and I'll leave the software side of things to another section someday).

I'm going to make a few assumptions here; namely, that you already have a home network of some description and that you're capable of stringing huge lengths of Cat5 all over your immaculate lounge.

The good thing to know is that if you've got all of this in place already, there isn't much you need to do, and nor should MythTV require any significant additions to your existing spiderweb of cables.

Wired networking

This is probably by far the most common setup in most geek's houses, and in my opinion still the best. Almost all modern motherboards come with an inbuilt 100Mbit ethernet controller, which are of varying quality. The good news is that thanks to the work of Donald Becker (one of Linux's unsung heroes in my humble opinion), pretty much every network card on the market will work out of the box in Linux. However, some are rather less reliable than others. I'll go through the most common ones I have experience with.
With NTSC or PAL tuners, 100 Mbit networks are more than enough. Since the video is compressed as soon as (or just after) it leaves the TV card, the amount of traffic being sent over your copper is going to quite small indeed. A PVR-x50 is capable of recording at bitrates up to 16Mbits/sec, so you can see we can shove at least five of those down out 100Mbit pipe before it starts to get a bit clogged. In reality, you're rarely (if ever) going to be utilising half of this bandwidth.
Gigabit will make a difference for those with multiple HD tuners, multiple frontends, and networked storage, especially if you're doing other tasks such as commercial flagging. A single HD video stream typically uses 16-20 Mbit/sec!
Common 100Mbit/s ethernet chipsets:

  • RealTek 8139: probably the most common and cheapest chipset around. Although it's very well supported under Linux, in the past I've had reliability issues with this chipset numerous times, what with lots of dropped packets and mysterious vanishing networks. Personally, I'd avoid this chipset if at all possible - you don't want your live footage of Big Brother 19 to be interupted do you?! That said, I have an embedded one of my Myth boxes, and it's behaved very well so far, but throughput isn't great.
  • VIA Rhine II: another chipset that's very common embedded in motherboards. Well supported under Linux, and seems fairly relible, although it can hog the CPU a little.
  • 3com Etherlink/905: a classic age old workhorse. Although getting on a bit (and still quite pricey), these cards have never let me down, and feature good throughput and low CPU usage. I use these alot for servers.
  • nVidia nForce MCP: very common in Socket A boards with nForce2 chipsets. It's quite new, and not entirely supported under Linux, although it is fully supported with nVidia's binary drivers. I've not had any experience with these under Linux yet, but the ones I have at work under Windows seem fairly solid. Throughput is average, and CPU utilisation seems very low.

What with gigabit ethernet being so cheap these days, I decided I would upgrade my file server from it's embedded 3com 920 (a slightly reworked 3com 905C) to a cheap gigabit network. I picked up a generic gigabit ethernet card along with a cheap generic gigabit switch (two 10/100/1000 ports and eight 10/100 ports) - I was quite skint at the time, but I'd heard good things about the kit I got. They don't provide the full 1000Mbit/s, but they cost a third of the kit that would, so I can't complain. As I said, MythTV is not going to swallow all your bandwidth.
Common 1000Mbit/s ethernet chipsets:

  • RealTek 8169: This may be the most common chipset on budget 1000 Mbit cards (under $20 USD). Supports jumbo frames. Seems to be very reliable.
  • Natsemi DP83820: This is the chipset I use in my fileserver at home, and it seems reliable whilst being very cheap. It is however limited to a maximum throughput of about 600MBit/s
  • Broadcom 5703C: This card seems to work *very* well under Linux. I use one at work, and it has no difficulty bursting at over 900Mbit/s (our hard drives can't keep up with it after that), and CPU usage never seems to jump above 10%. If your motherboard comes with this chip onboard, you need look no further!

In short, most 100Mbit cards will enable you to run a backend with two or three TV cards in it (as long as your computer can cope with that amount of DMA traffic!) without any significant problems. Consider gigabit if you have multiple HD tuners and network storage. Use a network switch rather than a hub. In a hub, that 100Mbit/s is shared between all the ports, whereas in a (slightly more expensive) switch, each port gets the full whammy. Most DSL routers incorporate a good quality 4 port switch.

Wireless networking

Wireless networking is all the rage these days, but I still can't recommend it much for a MythTV setup, or any network that's going to see significant traffic. Add to that that many wireless chipsets are poorly supported under Linux.

<people who know stuff about wireless under Linux should put slightly more informed gibberish here>

Currently, there are two main standards in popular use. On is 802.11b, which provides up to 11Mbit/s with a range of about 50m. As you can probably guess, this sort of connection speed is fine for browsing the web but will soon start to buckle under the strain of even a 9Mbit/s video stream. 802.11g provides up to 54Mbit/s which is theoretically OK.

Many linux distributions now have great support for wireless networking. The 2.6 Kernel has been adding support for 802.11g cards as well. Currently the prism54 chipset and the atheros (madwifi) chipset are integrated into the kernel (there may be more). Other chipsets, like the broadcom one, do not work directly with the kernel and require a windows driver wrapper linuxtant or ndiswrapper. The prism54 website has a great list of supported cards, and many that are fairly inexpensive.

Another alternative, especially for "dedicated" devices like an Xbox_Frontend or MediaMVP device that only has ethernet ports is a wireless bridge device. One Linux-based bridge option is an access point that can run Linux distributions like OpenWRT or the very user-friendly DD-WRT firmware replacement for Linksys WRT54G/GS and other consumer 802.11g wireless routers.

However, one of the key drawbacks of wireless technology at the moment (and correct me if I'm wrong) is that the bandwidth is shared, rather than switched. So instead of each client connected to your wireless access point getting the full 54Mbit/s, they all have to share the same pipe. In addition to this, you are unlikely to see the full 54Mbit/s if you are more than about 20m away from your access point. If you're only going to have a single frontend machine operating over wireless, you might be OK, but this is obviously unsuitable for multiple client setups. Also, If you impliment an 802.11g network, and have a SINGLE 802.11b device connect into your network, your entire wireless network will drop down to 11Mbit/s, which is worthless for streaming video.

802.11b and 802.11g networks use a "hub" model whereby traffic from one wireless node to another wireless node involves the traffic passing across the wireless network twice (server to access point, access point to client), so you'll have better results if you can connect one device to the access point via wired networking.

For SD recorded programs you might be able to use 802.11b, and should be able to get away with 802.11g wireless networks. On a fairly good 802.11g network that does not allow 802.11b traffic, streaming SD recordings recorded at around 2 GB/hour is possible with frontend and backend both using wireless networking. With SD recorded at significantly higher bitrates, some users have had to connect either the frontend or the backend to the 802.11g access point with a wired connection to get good results.

For HD content and dvd's. You will need a lot! 802.11a, pre-n, or wired connections will be needed for any 720p or 1080i content.