MythTV Backend on multiple networks

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
TerribleTadpole
Newcomer
Posts: 7
Joined: Wed Mar 29, 2017 9:27 am
Australia

MythTV Backend on multiple networks

Post by TerribleTadpole » Mon Aug 31, 2020 8:44 am

Version 0.29

TLDR version: I have a MythTV backend on two networks but I can only make it listen to one of them at a time.

I would like to have the main lounge room client hard wired to the back-end on network 192.168.152.20/24 (for performance reasons) while keeping it available to other devices around the house on the WiFi network 192.168.151.70/24.

I have tried checking "Listen on all IP addresses", "Allow connections from all subnets", and both together. No combination seems to make any difference.

Does anybody have any suggestions?

wesnewell
Senior
Posts: 669
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: MythTV Backend on multiple networks

Post by wesnewell » Tue Sep 01, 2020 3:27 am

afaik, neither of the ip addresses you posted are valid ip addresses. For that reason I don't have a clue what you are trying to accomplish. My suggestion would be to forget the madness and just use one network address, and assign all the clients to the same network and subnet.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.

pcfe
Newcomer
Posts: 8
Joined: Sun Aug 23, 2020 2:11 pm
Luxembourg

Re: MythTV Backend on multiple networks

Post by pcfe » Tue Sep 01, 2020 10:04 am

Myth noob here so the following is purely Linux admin debug ;-)

If you are on Linux, check if it's listening on 0.0.0.0:6543 (IPv4) with the commandline socket statistics tool called `ss` as follows;

Code: Select all

ss -tulpen
AFAICT, mythbackend is on port 6543. As a quick test I've given a test VM with myth on it a second network interface and it does listen on all Ipv4 and IPv6 addresses.

Code: Select all

[mythtv@mythtv ~]$ ss -tulpen | grep 6543
tcp    LISTEN  0       50                     0.0.0.0:6543         0.0.0.0:*     users:(("mythbackend",pid=1376,fd=45)) uid:1001 ino:43278 sk:14 <->            
tcp    LISTEN  0       50                        [::]:6543            [::]:*     users:(("mythbackend",pid=1376,fd=46)) uid:1001 ino:43279 sk:1e v6only:1 <->  
If it is listening on all, then I'd check the firewall. If on a recent Linux distro this will be firewall-cmd. If on an older distro, use iptables.
wesnewell wrote:
Tue Sep 01, 2020 3:27 am
afaik, neither of the ip addresses you posted are valid ip addresses.
Nope, they are valid.
OP just used modern CIDR notation.
Old style notation would have been IP 192.168.151.70 with netmask 255.255.255.0

wesnewell
Senior
Posts: 669
Joined: Mon Jun 23, 2014 6:54 pm
Location: Wylie TX, USA
United States of America

Re: MythTV Backend on multiple networks

Post by wesnewell » Tue Sep 01, 2020 2:54 pm

Learned something new. CIDR. A way to mess with old timers heads. Not sure I agree with its use as it seems to limit mask. But who am I to say.
BE/FE-Asrock AB350 Pro Ryzen 3 3200G, 6 atsc tuners. FE's-GF8200's Athlon II, Ryzen 3 2200G. Mythtv user since 2005.

TerribleTadpole
Newcomer
Posts: 7
Joined: Wed Mar 29, 2017 9:27 am
Australia

Re: MythTV Backend on multiple networks

Post by TerribleTadpole » Sun Oct 04, 2020 6:02 am

TLDR version:
  • I have not been able to solve the issue. Myth TV backend listens on all active addresses but will only connect on the address statically specified with mythtv-setup. For my purposes my server has to be on the hardwired IP connection that isn't on the WiFi network.
  • I have been able to resolve the issue by statically routing the otherwise unreachable IP address to it's WiFi connection.
It's been a while... I have upgraded all the relevant boxes to Ubuntu 20.04 and Myth 31, just in case there was a compatibility issue with my Myth 31 laptop talking to a Myth 0.29 server. That's all done, but problem persists, so I went back to looking at the network issues.
check if it's listening on 0.0.0.0:6543 (IPv4)
Done. The server is listening on 0.0.0.0:6543 and [::]:6543

What I found though was that although the client (my laptop) was able to discover the server via the WiFi on 192.168.151.70 it was trying to connect to it wired network 192.168.152.20.
Image

So what I surmise is happening is this:
  • Client discovers the server on it's own network using uPnP
  • Server sends connection information to the client, which includes the server's IP address as configured in mythtv-setup
  • Client then connects to the server using the IP address provided
This would explain why my hard-wired client connects using the WiFi when I set up the server using its WiFi address as its host address. I don't want that so the server has to use its wired IP. So the laptop has the reverse of the problem now where it is trying to connect to the wired IP 192.168.152.20 through the WiFi.

I have resolved this issue by routing that address on the laptop:

Code: Select all

route add -host 192.168.152.20 gw 192.168.151.70 dev wlan0
It's not a true solution, but it gets me where I wanted to be.

Thanks @wesnewell and @pcfe for your time and suggestions.

Post Reply