[mythtv-users] directly connecting HDHR to spare LAN port

Stephen Worthington stephen_agent at jsw.gen.nz
Wed Jun 22 17:19:36 UTC 2022


On Wed, 22 Jun 2022 09:58:53 -0500, you wrote:

>On Tue, Jun 21, 2022 at 2:16 AM Mike Perkins <mikep at randomtraveller.org.uk>
>wrote:
>

>> And of course the reverse is also true. All the HDHR traffic will go to
>> the router, which has to
>> process it even if it ultimately just ignores it.

No, that is not correct.  The HDHR traffic is layer 3 UDP or TCP
packets.  They have specific IP addresses, so their layer 2 Ethernet
packets will also have specific Ethernet addresses.  If the IP address
is for the PC doing the bridging, the Ethernet address will be for the
port the HDHR is connected to, and the packets will not be passed
across the bridge as they will have arrived at their destination. Only
Ethernet packets with a broadcast address or an address that is not on
the bridging PC will be sent across the bridge.  There will be a bit
more broadcast traffic for the ARP packets to allow the HDHR to find
the correct Ethernet address for it to send its IP packets to, but
those packets are rare and small, so there will be very little impact
from that.

The packets that are a real problem with a bridge are the large
broadcast or multicast multimedia packets - if you are using that sort
of multimedia packets, they will be bridged onto the HDHR subnet and
will clash with the HDHR packets for the available bandwidth.  On a
home network, one common culprit for sending broadcast multimedia
packets is a DVB/ATSC to IP converter that makes available TV channels
as IP streams.

>> If you're going to add a software bridge that defeats the object. You
>> might just as well plug the
>> HDHR directly into the router.
>>
>
>All (most) home routers that run Linux (99% probably) LAN ports are already
>software bridged using the exact same commands I just outlined anyway :)

No, routers do not do software bridging except in exceptional
circumstances.  Routers that have bridged ports almost always do it
using an additional Ethernet bridge chip, or the equivalent circuitry
on their SOC chip.  The bridging is done in hardware.  If you tell a
router to bridge two ports that are not on a hardware bridge, it will
not be able to route the packets between those ports and hence will
not be able to offload that traffic to its routing hardware.  Instead,
the bridged packets will all need to be sent via the router's CPU.
Router CPUs are simply not very fast as they rely on their offloading
hardware for routing all packets except the initial ones that set up
an IP connection.  After the IP connection is established, the CPU
does not see the packets that get routed by the offloading hardware.
So due to the lack of CPU capacity, when bridging packets through the
CPU, small routers can not do it at anything like 1 Gbit/s, and the
throughput drops dramatically.  It is common for software bridged
traffic on consumer or prosumer grade routers to max out at around 300
Mbit/s.  And since that traffic is maxing out the CPU, it can also
degrade the throughput of other traffic that needs the CPU, so
connections take longer to start, for example.  Even powerful PC CPUs
use a noticeable amount of CPU to do software bridging, which is a
good reason not to use them for that purpose.  Bridging is best done
by an Ethernet switch using layer 2 hardware.

If you want to do layer 2 things, use a good smart Ethernet switch
with all the usual features (VLANs, multimedia packets, ...) supported
in hardware.  Such switches are available for not unreasonable prices,
but they are not dirt cheap like the dumb 5 or 8 port switches
commonly used on home networks, some of which are now less than NZ$20.
I use a Ubiquiti EdgeSwitch 24 Lite, which from memory was around
NZ$700 a few years ago.  There are a lot of similarly full featured
switches available for similar prices.

Generally, the only software bridging that you want to do on a PC is
to do with things like using OpenVPN in layer 2 mode where you bridge
the encrypted VPN connection with a PC Ethernet port.  For most
bridging, you get your smart switch to do it, using VLANs for the more
complicated things.

Using a bridge to avoid having to use another DHCP server is simply
not a good idea.  If you have to avoid using another DHCP server, then
just plug the HDHR into the main subnet on a switch port - it will
perform better that way than on a PC port that is software bridged. If
you have run out of ports on your switch, buy a bigger switch.  But
the best way to run an HDHR is on a separate subnet on a separate PC
port with only layer 3 (routing, not bridging) to the rest of the
network.  And yes, that does mean you will need to set up a DHCP
server, or assign a static IP address to the HDHR if it supports that.

>> The only way I could see a case for using a software bridge is if you have
>> capacity constraints: ie
>> no more ports on the router or no way to run a cable between HDHR and
>> router.
>>
>> --
>>
>> Mike Perkins\
>>


More information about the mythtv-users mailing list