View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 10 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
PostPosted: Wed Jul 09, 2008 3:02 am 
Offline
Joined: Mon May 24, 2004 10:49 pm
Posts: 112
Location: Calgary, Alberta, Canada
I've noticed that in the last couple of versions, that mythtv-setup, on the first screen of the "1. General" section, that the Local Backend and Master Backend default to the actual IP address of the machine. I realize that is needed for multi-frontend or multi-backend setups, but I'm not sure it's wise for a "single box in the home," combined frontend/backend usage.

Doesn't that mean that every database access has go out of your machine, bounce off your router, and back into your machine? What happens if after a power failure, the router assigns the Myth box a different IP address? Or similarly, the failure of a router, or damaged network cable borks network access? Does that render you machine into Door Stop status and create instant Spousal and Child Acceptance Factor chaos?

I know previous versions defaulted to the standard, local address of 127.0.0.1. Is there a reason that was changed between versions? Is it simply a configuration error that got mastered on the Knoppmyth CD? Or is it something that rolled down from the main Myth development team to solve some other specific problem? Or is my understanding of the data flow incorrect? Maybe one of the dev team, or testers could cast light on that.

Perhaps I'm overly sensitive to this potential problem. I had a boss rip me a new, errrrr, orifice when he couldn't access files on his own machine due to a similar situation. After lost work due to several power failures, (some weather related, some caused by a twit flipping a circuit breaker), I committed the sin of plugging his machine into a UPS. The "on the motherboard" network card took that inopportune moment to decide to go belly up. Because of a shared configuration with all the other machines in the office, that used a network path to the file repository, he couldn't access any of the data, even though they were located on his own machine. Of course he couldn't prepare any more tax returns, submit them to government, print anything . . . All my fault. I broke it (even though I didn't touch the network cable). He had to call in a repair guy, who couldn't come in till two days later. He said the boss needed a new network card. I pulled the one out of my bag, and handed it the repair guy. (The boss wouldn't let me install it, saving the time waiting for the repair guy -- cuz I broke things.) He assured the boss it wasn't my fault. Had I not brought the card, they would have been down for another day, till the repair guy got a new card. But still lost work time = lost money = never trusted with hardware or software suggestions again. So yea, I'm a little sensitive to "needless" network path routing.

Interestingly, a couple of years later, that onboard network adaptor started working again.


Top
 Profile  
 
PostPosted: Wed Jul 09, 2008 3:06 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
ChapmanI wrote:
What happens if after a power failure, the router assigns the Myth box a different IP address?


Things like your MythTV backend should really get a static IP number, not one from DHCP.


Top
 Profile  
 
PostPosted: Wed Jul 09, 2008 6:47 am 
Offline
Joined: Sun Jul 24, 2005 4:16 pm
Posts: 508
Location: Ft. Worth TX
ceenvee703 wrote:
ChapmanI wrote:
What happens if after a power failure, the router assigns the Myth box a different IP address?


Things like your MythTV backend should really get a static IP number, not one from DHCP.



& If you dig through your router's setup page, there's a way available to assign a static IP to the MAC number [id] of your Mythbox, so power failures or high water, it'll always get the same IP back.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 7:57 am 
Offline
Joined: Sat Mar 11, 2006 4:01 pm
Posts: 61
Location: Tobaccoville, NC, USA
----------------------------------------
1) Local Backend and Master Backend default to the actual IP address of the machine: Yes, the ip address setting is configured to allow seperate frontend/backend combinations.
----------------------------------------
2) who decided to configure this way? Unknown
----------------------------------------
3) Doesn't that mean that every database access has go out of your machine, bounce off your router, and back into your machine? NO. This only happens when an ip address in a DIFFERENT subnet than yours is being accessed.

*Note "/24" = "255.255.255.0" = Class C block used for examples.
Example 1) DB/backend=192.168.1.10/24, and mythbox/frontend is also 192.168.1.10/24 = traffic stays local to box.

Example 2) DB/backend=192.168.1.10/24, and mythbox/frontend is also 192.168.1.9/24 = traffic stays local to switch/hub, and doesnt go through routing engine of router.

Example 3) DB/backend=192.168.2.10/24, and mythbox/frontend is 192.168.1.10/24 = traffic goes to to router for processing, which routes to appropriate subnet, then to switch port. (example described in question #3).
----------------------------------------
4) If dhcp reservation cannot be configured (assign static ip to mac address in router), you should do one of the following:
4a) change configuration to reflect localhost, or assign a static ip to machine.
4b) if dhcp reservation is an option, then you are good to go.
----------------------------------------
5) If network card is DOWN, however, then loopback through the nic will not function, and therefore the issue you described earlier (cannot access ip address locally assigned to machine, from itself.)
----------------------------------------

_________________
"If the facts don't fit the theory, change the facts"
--Albert Einstein


Top
 Profile  
 
PostPosted: Wed Jul 09, 2008 9:30 am 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
snaproll wrote:
If you dig through your router's setup page, there's a way available to assign a static IP to the MAC number [id] of your Mythbox, so power failures or high water, it'll always get the same IP back.

That's the best way, in my opinion. Even though the D in DHCP is Dynamic, DHCP is very often used to assign static IP addresses based on MAC address.

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 10:19 am 
Offline
Joined: Fri Apr 02, 2004 10:08 am
Posts: 1637
Location: Virginia, USA
Just curious here: what is the advantage of having the router do this, versus what I usually do, which is answer "NO" when KnoppMyth asks "Use broadcast DHCP?", then plug in an IP number, mask, etc., outside of my router's DHCP range.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 11:15 am 
Offline
Joined: Thu Sep 30, 2004 11:29 am
Posts: 2419
Location: Mechanicsburg, PA
ceenvee703 wrote:
Just curious here: what is the advantage of having the router do this

It allows you to manage your hostnames and IP addresses in a central location. If your router offers DNS (most do) you automatically provide name-based lookups for all machines on your LAN.

I think the real question is what advantage is it to set a static IP address on each individual machine and not be able to do name-based lookups from any machine on your LAN? :)

_________________
KnoppMyth R5.5
MythiC Dragon v2.0
Join the KnoppMyth Frappr!


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 2:31 pm 
Offline
Site Admin
Joined: Fri Sep 19, 2003 6:37 pm
Posts: 2659
Location: Whittier, Ca
ceenvee703 wrote:
Just curious here: what is the advantage of having the router do this, versus what I usually do, which is answer "NO" when KnoppMyth asks "Use broadcast DHCP?", then plug in an IP number, mask, etc., outside of my router's DHCP range.
You've been using MythTV for two long! :D As far as I'm concerned it is best to use a static IP for any and all backends.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 2:35 pm 
Offline
Joined: Mon May 24, 2004 10:49 pm
Posts: 112
Location: Calgary, Alberta, Canada
Yes of course setting a static IP on the machine, or via MAC address in the router is the way to go. As long as I've had a router, I've used the MAC address method, so that when I want to access a machine, I always know I'm connecting to the right one.

But then again, I'm an experienced user. Most people buy a router, take it home, plug it in, and don't configure a thing. How many WiFi connections do you see with the default name for that brand of router, and often the default password?

All of you who jumped on the "static, or MAC triggered IP address" bandwagon missed the point.

While I think Warchild misinterpreted my phrase "bounce off the router," his closing comment seems to imply my analysis of traffic flow is correct.
warchildx wrote:
3) Doesn't that mean that every database access has go out of your machine, bounce off your router, and back into your machine? NO. This only happens when an ip address in a DIFFERENT subnet than yours is being accessed.

*Note "/24" = "255.255.255.0" = Class C block used for examples.
Example 1) DB/backend=192.168.1.10/24, and mythbox/frontend is also 192.168.1.10/24 = traffic stays local to box.
This implies that the Myth box is smart enough to know that if the backend address is the same as it's own IP, traffic stay on the same machine, and nothing is sent across the network card. Is that correct? That seems to confilict with statement 5
warchildx wrote:
5) If network card is DOWN, however, then loopback through the nic will not function, and therefore the issue you described earlier (cannot access ip address locally assigned to machine, from itself.)

If that's the case (as I postulated) then it adds several additional, unneeded, potential points of failure [failed Nic, bad or unplugged network cable or WiFi interfearance (if that's your connection), router died - locked up - or unplugged]. I've seen more than one posting of the "suddenly can't connect to local backend" vein of thought, and I'd bet dollars to doughnuts this is the cause.

If that's the case, I'd suggest that the "R5 Hints and Tips" in "Phase 2b" suggest using 127.0.0.1 for both IP addresses instead of the actual IP address (192. . . ), for cases of a single combined frontend/backend machine. Might be worthy of a notation in the pamphlet too.

Is multiple frontend and/or multiple backend the most common situation? I'd think they are advanced concepts, and those capable of setting them up would understand the need of setting backend IP addresses. I'm not sure that defaulting to that higher end approach is the right choice. It just might be a stumbling block for a less proficient user, who is just taking a look at Knoppmyth. The kind who try it on some older hardware, not necessarily connected to their network.

Or am I completely out to lunch here, and talking trough that extra orifice ripped by the above boss?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jul 09, 2008 4:06 pm 
Offline
Joined: Sat Mar 11, 2006 4:01 pm
Posts: 61
Location: Tobaccoville, NC, USA
Thanks for the props.

Quote:
This implies that the Myth box is smart enough to know that if the backend address is the same as it's own IP, traffic stay on the same machine ...

Yes
Quote:
, and nothing is sent across the network card...

Not exactly. instructions are processed through the network adapter chipset, or driver, and looped back through machine. Doesnt actually come out the cable, though. (I know it sounds wierd, but trust me)

Note on #5 comment. As far as network card down... FYI: Some network drivers also take into consideration "link status" to instruct driver that card is down, or network is not up.

_________________
"If the facts don't fit the theory, change the facts"
--Albert Einstein


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 20 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu