<div dir="ltr"><br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
In brief:<br>
<br>
I have the problem that mythbackend does not bind to the desired IP address<br>
(configured via mythtv-setup) if the related interface shows NO-CARRIER in "ip<br>
link show", i.e., has no cable connected to it. This "problem" relates to<br>
ethernet ports and to bridges.<br>
<br>
My setup:<br>
<br>
In my setup, I have a standalone box in the floor running the mythbackend<br>
24/7, and my workstation running mythfrontend in my living room. Both<br>
computers are interconnected using ethernet. This workstation is only switched<br>
on if i'm using it (to watch TV).<br>
<br>
The box on the floor has four ethernet ports. One is connected to my DSL modem<br>
(eth0) atnd the remaining are used to connect to other "clients", e.g., my<br>
workstation wunning mythfrontend:<br>
<br>
eth0: <a href="http://192.168.0.2/24" target="_blank">192.168.0.2/24</a>: Connection to the DSL modem<br>
eth1, eth2, eth3: bridged to br0: <a href="http://192.168.1.1/24" target="_blank">192.168.1.1/24</a>, LAN<br>
<br>
Mythbackend should be reachable by any PC on the LAN, and by mythweb invoked<br>
by a locally running apache server. For this purpose, I decided to bind<br>
mythbackend to 192.168.1.1, to make it available to both localhost (mythweb)<br>
and by PCs attached to the LAN.<br>
<br>
All boxes run Gentoo Linux with Mythtv 0.26. Everything works fine, most of<br>
the time.<br>
<br>
The problem:<br>
<br>
If I reboot the floor server running mythbackend WITHOUT the workstation being<br>
switched on (then eth1 shows NO-CARRIER), mythbackend does NOT bind to<br>
192.168.1.1 (the IP address of br0), but only to 127.0.0.1. Thus, it is not<br>
accessible by mythweb (which is configured to connect to 192.168.1.1) and not<br>
by mythfrontend on the workstation, even if the workstation is switched on<br>
later. Mythbackend does never "rebind" to 192.168.1.1 after the interface<br>
switched to "UP" and "LOWER_UP" shown by "ip link show". The only chance is to<br>
boot the workstation, and then to restart mythbackend manually, allowing it to<br>
bind to 192.168.1.1 on an active interface.<br>
<br>
Interestingly, if the workstation is switched off afterwards, mythbackend<br>
keeps its socket bound to 192.168.1.1...<br>
<br>
For a headless floor server, this is really undesired behavior, but I have no<br>
solution yet. I need your help.<br>
<br>
What I tried:<br>
<br>
This problem occurs if a bridge is used whose involved interfaces show "NO-<br>
CARRIER"... then the bridge shows NO-CARRIER as well, and mythbackend fails to<br>
bind to its IP address. For individual ethernet ports this is true as well, as<br>
they show NO-CARRIER either.<br>
<br>
What is the "best mythbackend practice" for such a setup?<br>
<br>
1.) I could bind mythbackend to 192.168.0.2, which "should" be UP all the<br>
time. On the other hand, even this cannot be guaranteed in all cases...<br>
<br>
2.) I could use a dummy device, e.g., dummy0, assign an IP address to it, and<br>
use this to bind mythbackend to. Would be a hack...<br>
<br>
3.) I could add such a dummy device to the bridge. A dirty hack...<br>
<br>
4.) There is a solution I'm not aware of :-) Is this a bug? Why can't<br>
mythbackend bind to it's requested IP address immediately? Other software are<br>
claiming these interfaces without any hassle. Should I file a bug?<br></blockquote><div><br></div><div>I swear this was discussed in the past but for the life of me I can't find it.</div><div><br></div><div>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.</div>
<div><br></div><div>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: <a href="http://linux.about.com/od/lna_guide/a/gdelna47t06.htm">http://linux.about.com/od/lna_guide/a/gdelna47t06.htm</a></div>
<div><br></div><div>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.</div>
<div><br></div><div> </div><div><br></div><div><br></div></div></div></div>