[mythtv-users] Mythbackend does not bind to IP addresses of interfaces without carrier
Joseph Fry
joe at thefrys.com
Mon Jun 24 20:57:43 UTC 2013
>
> In brief:
>
> I have the problem that mythbackend does not bind to the desired IP address
> (configured via mythtv-setup) if the related interface shows NO-CARRIER in
> "ip
> link show", i.e., has no cable connected to it. This "problem" relates to
> ethernet ports and to bridges.
>
> My setup:
>
> In my setup, I have a standalone box in the floor running the mythbackend
> 24/7, and my workstation running mythfrontend in my living room. Both
> computers are interconnected using ethernet. This workstation is only
> switched
> on if i'm using it (to watch TV).
>
> The box on the floor has four ethernet ports. One is connected to my DSL
> modem
> (eth0) atnd the remaining are used to connect to other "clients", e.g., my
> workstation wunning mythfrontend:
>
> eth0: 192.168.0.2/24: Connection to the DSL modem
> eth1, eth2, eth3: bridged to br0: 192.168.1.1/24, LAN
>
> Mythbackend should be reachable by any PC on the LAN, and by mythweb
> invoked
> by a locally running apache server. For this purpose, I decided to bind
> mythbackend to 192.168.1.1, to make it available to both localhost
> (mythweb)
> and by PCs attached to the LAN.
>
> All boxes run Gentoo Linux with Mythtv 0.26. Everything works fine, most of
> the time.
>
> The problem:
>
> If I reboot the floor server running mythbackend WITHOUT the workstation
> being
> switched on (then eth1 shows NO-CARRIER), mythbackend does NOT bind to
> 192.168.1.1 (the IP address of br0), but only to 127.0.0.1. Thus, it is not
> accessible by mythweb (which is configured to connect to 192.168.1.1) and
> not
> by mythfrontend on the workstation, even if the workstation is switched on
> later. Mythbackend does never "rebind" to 192.168.1.1 after the interface
> switched to "UP" and "LOWER_UP" shown by "ip link show". The only chance
> is to
> boot the workstation, and then to restart mythbackend manually, allowing
> it to
> bind to 192.168.1.1 on an active interface.
>
> Interestingly, if the workstation is switched off afterwards, mythbackend
> keeps its socket bound to 192.168.1.1...
>
> For a headless floor server, this is really undesired behavior, but I have
> no
> solution yet. I need your help.
>
> What I tried:
>
> This problem occurs if a bridge is used whose involved interfaces show "NO-
> CARRIER"... then the bridge shows NO-CARRIER as well, and mythbackend
> fails to
> bind to its IP address. For individual ethernet ports this is true as
> well, as
> they show NO-CARRIER either.
>
> What is the "best mythbackend practice" for such a setup?
>
> 1.) I could bind mythbackend to 192.168.0.2, which "should" be UP all the
> time. On the other hand, even this cannot be guaranteed in all cases...
>
> 2.) I could use a dummy device, e.g., dummy0, assign an IP address to it,
> and
> use this to bind mythbackend to. Would be a hack...
>
> 3.) I could add such a dummy device to the bridge. A dirty hack...
>
> 4.) There is a solution I'm not aware of :-) Is this a bug? Why can't
> mythbackend bind to it's requested IP address immediately? Other software
> are
> claiming these interfaces without any hassle. Should I file a bug?
>
I swear this was discussed in the past but for the life of me I can't find
it.
What it sounds like your doing is using the server ports in lieu of a
switch, which should work for most things, but it's a bit of a kludge.
Personally, I'd spend a couple of dollars and get a cheap 5 port switch,
or a residential gateway router with built in switch.
If you are really against spending anything... I believe you could create a
dummy interface, assign it an IP (say 192.168.2.1), and use that IP for
your backend IP. Finally, add a route between the bridge and the dummy
interface so that your workstations can connect to it:
http://linux.about.com/od/lna_guide/a/gdelna47t06.htm
Dummy interfaces are on dirty hacks... this is exactly the scenario that
they were made for (giving a standalone machine an addressable IP). Now I
don't know if putting one in the bridge would be considered a "dirty hack",
but I wouldn't suggest putting it in the bridge anyway.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mythtv.org/pipermail/mythtv-users/attachments/20130624/437d8481/attachment.html>
More information about the mythtv-users
mailing list