[mythtv-users] link-local and mythtv

John Pilkington J.Pilk at tesco.net
Thu Aug 6 11:20:05 UTC 2015


On 06/08/15 11:02, Stuart Auchterlonie wrote:
> On 05/08/15 20:10, Stephen Worthington wrote:
>> On Wed, 5 Aug 2015 09:46:25 -0400, you wrote:
>>
>>> On Wed, Aug 5, 2015 at 5:07 AM, John Pilkington <J.Pilk at tesco.net> wrote:
>>>> Thanks for that, Stephen.  But if I set 127.0.0.1, the TV will display the
>>>> UPnP server menu with titles of the recordings, but doesn't show thumbnails
>>>> or play recordings.  If I set 169.254.10.241, everything works while the TV
>>>> is 'on' but I get complaints or worse when it's in standby.  The only
>>>> connection between laptop and TV is an ethernet crossover cable.
>>>>
>>>> ifconfig, and mythtv-setup, also show a wlan0, the wifi hotspot, but I don't
>>>> think I should let myth use that.
>>>>
>>>> No big deal, but I thought I would ask.
>>>
>>> You should be able to set up mythtv to listen on 127.0.0.1, then use
>>> iptables to NAT the 169.254.10.241 traffic to 127.0.0.1.  You should
>>> be able to configure your ethernet device to set this up automatically
>>> when the interface is configured.  Then it should just work whenever
>>> that interface is available.
>>>
>>> Eric
>>
>> I am not sure that using NAT (not masquerading) rules would work, as
>> the lo interface normally runs with a big MTU (mine is showing 65536).
>> Any packets larger than the MTU of the ethernet interface (likely
>> 1500) would get dropped, which would probably cause some quite hard to
>> track down type problems.
>>
>> But I have just looked at the ifconfig output for my MythTV box
>> (Mythbuntu 14.04), which has static addresses on two ethernet ports
>> that are currently unused, with no cable plugged in, and the static
>> addresses are visible.  I could have sworn that even static addresses
>> disappeared when an interface was down, but maybe something has
>> changed since I last looked.  Anyway, if you can assign a static IP
>> address to the TV through its settings somewhere, then you can use a
>> static IP address on your ethernet interface and have MythTV listen on
>> that.  If your TV does not have a setting for a static IP address,
>> then you may have to run a DHCP server on the laptop and have it
>> assign the TV an appropriate address when it is on.  If the TV only
>> does link-local addresses, then you are probably out of luck, but that
>> is unlikely.
>
> The linux tcp stack has the property that it'll (by default) accept
> packets for an ip address assigned to *any* of it's interfaces.
>
> So you can, in theory, assign the permanent address of the backend to
> an alias of the loopback address, and then have the backend bind to
> that. Then even if your external interface has a different ip address
> things will still be able to talk to the "permanent" address.
>
> Gotta love networking ;-)
>
> By the sounds of it, it's worth running a dhcp client (probably dnsmasq)
> on the linux box, so the tv gets a proper ip address.

Hmm.  Yes, thanks.  Looks like the next month reading 'man dnsmasq.' :-)
I'll ask google and see what happens.

>
> Cheers
> Stuart





More information about the mythtv-users mailing list