[mythtv-users] HDHomeRun tuners and network switches

Stephen Worthington stephen_agent at jsw.gen.nz
Fri Jan 21 10:11:56 UTC 2022

On Thu, 20 Jan 2022 10:59:55 -0500, you wrote:

>Thanks for all the suggestions.  I used the hdhomerun_config to capture
>some video with no errors of any kind now that I kept the tuners from
>routing through the AP/router.  I think I'm going to move everything out of
>the AP/router except the one cable to the first switch.
>JIm A

I do not know about the AX50, so I do not know how its Ethernet LAN
ports work.  There are basically two different ways that routers
handle LAN ports.  One way has the LAN ports connected to the router
hardware individually and all traffic between the LAN ports goes via
the routing hardware or the router CPU (or both).  This setup is very
useful if you want separate LANs with separate routing for each LAN,
but very bad if you want two or more of the LAN ports to be on the
same subnet (ie bridged together).

Routers are very bad at bridging - that is a function best left to
switches.  So packets supposedly on the same subnet that have to
traverse the router to get to a different LAN port will often have low
throughput, as the CPU needs to examine and route each packet, and
router CPUs are not normally very fast.  Routers do high speed routing
on their dedicated router hardware, and packets that need to be
examined by the CPU will have low throughput.  Low throughput = low
bandwidth.  Low bandwidth compared to the 1 gigabit/s of the LAN port
means that if there is too much traffic, packets will be dropped to
reduce the traffic down to the amount that can actually be routed
between the LAN ports.  This is a likely scenario for your setup - UDP
packets traversing the router between LAN ports are too much for the
router CPU to handle and are not being routed by the dedicated
hardware as router hardware usually does not do bridging.  So some UDP
packets get dropped.  CPU routed packets on my old ERLite router had
only about 150-200 Mbit/s bandwidth available once I had all my
firewall rules installed.  Packets routed on its dedicated routing
hardware had 1 gigabit/s bandwidth.

The plus side of this LAN port configuration is that if you really are
routing between the LAN ports rather than bridging (ie each LAN port
has a different subnet on it), then you can get full gigabit routing
between all the ports (including the CPU/router hardware port and
access via that to the WAN port).  That assumes that you only use the
routing features that are handled on the dedicated routing hardware.
QoS, for example, will usually require the packets to be routed via
the CPU.

The other way of organising router LAN ports has all the LAN ports on
a separate internal hardware switch, and also on that switch is an
internal Ethernet port to the router hardware and/or the router CPU.
Sometimes there is a separate port for the CPU and the dedicated
router hardware.  This separate switch works exactly the same as a
normal external Ethernet switch.  It is usually moderately intelligent
- it has VLAN capabilities.  You can configure the switch VLANs so
some of the LAN ports just connect to each other over a VLAN
(bridged), or there can be a VLAN that connects them to the Ethernet
port to the router, or some combination of VLANs.  With this sort of
LAN port configuration, if you have several of your LAN ports on the
same subnet, you can just configure them to be bridged on the same
VLAN and there will not be any bandwidth problems with the bridged
packets.  The bridged packets are handled entirely in the switch
hardware and are never seen by the CPU or router hardware.  The
downside of this sort of LAN port configuration is that there is
contention between the LAN ports for the CPU/router hardware port when
packets between the LAN ports actually need to be routed instead of
bridged.  You potentially have say 4 LAN ports wanting all their
traffic to be routed via one single gigabit port to the CPU/router
hardware.  In some routers using switched LAN ports, the WAN port can
also be on the switch, causing contention between WAN packets and LAN
packets for access to the CPU.

Really good routers that use switched LAN ports solve the problem by
having a higher speed on the CPU/router hardware port, so if there are
4 x 1 gigabit/s LAN ports, the CPU/router hardware port will be 4
gigabits/s.  Such routers are usually far beyond the means of home
users to ever contemplate buying.

So what I recommend to people buying a router is to find out which
sort of router it is and whether that is actually the sort they want,
depending on what they want their LAN ports to be used for.  I have
Ubiquity ER4 router, which has separate LAN ports.  In the Ubiquiti
routers, there are others (such as the ER-X) which have switched LAN
ports, and some that have a mixture (such as one separate LAN port and
5 switched LAN ports).  If you have a small network where you do not
need any more LAN ports than are switched LAN ports on the router,
then getting a router with switched LAN ports saves the need to buy a
separate switch.  But if your needs are larger than that, I think it
is best to get a router with non-switched LAN ports and also get
yourself a decent switch or two to go with it.  Do all the routing on
the router and all the bridging on the switches.  I have a Ubiquiti
ES-24 Lite switch to go with my ER-4.  It is a full commercial grade
switch with all the features I might ever need in a switch, except for
POE.  I also have a simple unmanaged 5 port switch to use whenever I
have only one Ethernet connection at a location and need more - I can
use it until I get a new cable installed to that location from my
ES-24 main switch.

More information about the mythtv-users mailing list