Use of localhost, 127.0.0.1, DNS, etc? (1 Viewer)

coopers

Portal Pro
November 8, 2005
180
3
Adelaide
Home Country
Hi Folks,

I'm wondering if someone smart can explain how networking things work with TVserver and client installed on the same machine.

I noticed the other day that the TV my wife was watching stopped, when I rebooted the router.

In the TV client dialog, I have the client set to recieve TV from "htpc" which is the name of the machine. The machine is given it's IP address by the router, using DHCP.


So, there are a few scenarios I'm hoping someone can explain to me:


Use the machine's name in client dialog, e.g. "htpc":
Seems to me the client finds the server by asking the router through DNS where it is. Also seems the packets are being sent from the server, through the router and then back to the same machine, where the client picks them up. Is that right?

Use the "IP address" (assuming the router always assigns the same one, or you ahve made it static):
I think other than eliminating the DNS step this would be the same as above?

Use "localhost" for the machine's name.
I'd think here that the client would automatically connect to the server on the same machine, and data would not go through the router. Is that right?
From this post, it seems though that it won't work:
https://forum.team-mediaportal.com/1-0-rc3-svn-builds-289/tv-does-not-work-after-suspend-46466/
Does anyone know why that wouldn't work - and shouldn't it work?

Use 127.0.0.1 - the localhost IP address
I'd expect this to be the same as using localhost?

If anyone can delve a bit into the correct way to set this up, and tell me what is happening, I'd appreciate it.




https://forum.team-mediaportal.com/1-0-rc3-svn-builds-289/tv-does-not-work-after-suspend-46466/
 

sonome

Portal Pro
June 26, 2005
69
0
Perth, Australia
Yes, this is something that's puzzled me as well. As soon as my router is disconnected (single-seat installation), the tv drops and the tv server can't be found until I restart MediaPortal (regardless of whether the router is turned back on or not).

I was caught out on this last week - I unplugged my router while recording a tv show, and ended up losing part of the recording.
 

Paranoid Delusion

Moderation Manager
  • Premium Supporter
  • June 13, 2005
    13,062
    2,978
    Cheshire
    Home Country
    United Kingdom United Kingdom
    The only other thing i can think of is network not starting quickly enough, maybe install the MS Loopback Device and see if that helps.

    Installing Microsoft Loopback Adapter

    * Go to the Add Hardware control panel
    * Click Next on the first wizard screen
    * When asked if the hardware is connected, select Yes and click Next
    * In the list of installed hardware, scroll to the bottom and select Add a new hardware device and click Next
    * Choose the option titled Install the hardware that I manually select from a list (Advanced) and click Next
    * In the list of common hardware types, select Network adapters and click Next
    * In the list of manufacturers, select Microsoft. Then in the list of network adapters, select Microsoft Loopback Adapter and click Next
    * Click Next one more time to install the Microsoft Loopback Adapter and then press Finish

    In Device Manager go to Network Adapters\MS Loopback Adapter, select properties and under Advanced\Network Address put 127.0.0.1
    See if that helps.
     

    smiler3k

    Portal Member
    January 17, 2008
    39
    0
    Lancashire
    Home Country
    United Kingdom United Kingdom
    Just use fixed ip addresses on all pcs on network.
    Then they will all work regardless of router.
    Just remember to specify router address on each pc for dns and gateway.
     

    coopers

    Portal Pro
    November 8, 2005
    180
    3
    Adelaide
    Home Country
    So to confirm - unless I am using a loopback adapter, when watching TV, the server is sending video through my router and then back to the client program?
     

    IkeV70

    Portal Pro
    April 28, 2008
    55
    3
    Home Country
    Netherlands Netherlands
    So to confirm - unless I am using a loopback adapter, when watching TV, the server is sending video through my router and then back to the client program?

    No, that's not how it works. MP, TV Server and database (MS SQL or My SQL) communicate with eachother via the PC's IP address. The problem is that if the PC doesn't retrieve it's usual IP address because the router is disconnected (or the WLAN is down) then MP, TV Server and TV Server's database can't find eachother.

    If they did manage to find eachother all data will move directly from one component to the other, data will not be sent through the router.
     

    sunflower

    Portal Pro
    February 28, 2007
    185
    7
    Cologne
    Home Country
    Germany Germany
    Well, also in mTv Plugin looses connection to theTv Service as soon as theconnection to the router fails. I'm using a WLAN connect, so this happens from time to time. Unfortunately, I'm not choose 127.0.0.1 or localhost as an IP adress for streaming, as the list box does not offer that choice.
     

    Users who are viewing this thread

    Top Bottom