LinuxMCE Forums

General => Installation issues => Topic started by: Oatz on March 26, 2009, 06:04:44 pm

Title: LinuxMCE as DHCP server, NOT gateway!
Post by: Oatz on March 26, 2009, 06:04:44 pm
So I have an issue with LinuxMCE and my network design and here is my "so-far" working solution.
Perhaps someone could let me know if I have broken anything I don't know about, let me know how nutty I am, etc.
First off, I'm a DD-WRT junkie. I love this tight little linux package on my routers and the way it turns all the iptables, OpenVPN, QOS, etc. linux complexity (and goodness!!!) into a easy to use web GUI.

At first I installed LinuxMCE 710 and turned my DDWRT router into a stupid switch, letting LinuxMCE handle all the dhcpd, DNS, gateway, etc. But I'm seriously missing a ton of things that were configured in my DDWRT router:
- QOS
- WAN thoughput and statistics (in colorful little pngs!)
- OpenVPN
- Much more

Now sure you can do ALL of this stuff in Kubuntu + a degree in Linux networking. But DDWRT gives me all this without said degree and leaves my Linux brain to worry about other more interesting things, like media scripts and flickr photos syncing ;)

Sure the ideal solution for me would be to have the DD-WRT super awesome WebGUI merged with LinuxMCE (*cough*), but until that great day.....

I decided enough was enough, the simple port forwarding thingy in the LinuxMCE admin tool was not going to cut it as my DDWRT replacement. So here it goes:

Project LinuxMCE as DHCPD (192.168.80.1) and DDWRT Router (Netgear 834Bv2 192.168.80.150) as DNS, GATEWAY + all the other DDWRT goodies! YAY!

1) sudo su

2) Edited 1 line in /etc/resolv.conf to add my DDWRT router as DNS resolver
Code: [Select]
nameserver 192.168.80.150

3) Edited /etc/network/interfaces and added the gateway (FYI eth1 now is disconnected, would like to remove this interface completely!)
Code: [Select]
auto lo
        iface lo inet loopback

auto eth1
iface eth1 inet dhcp
auto eth0
iface eth0 inet static
        address 192.168.80.1
        netmask 255.255.255.0
        gateway 192.168.80.150

4) Edited /etc/dhcp3/dhcpd.conf and changed the routers line
Code: [Select]
option routers 192.168.80.150;

5) Restarted the involved daemons:
/etc/init.d/./networking restart
/etc/init.d/./dhcp3-server restart
/etc/init.d/./dhcdbd restart

Now I have my cake and I'm eating it. Perhaps this cake is not as good as I think it is, perhaps this cake smells funny? But so far ignorance is bliss.

The big question here is: Does LinuxMCE really need to serve any core network role beyond a DHCP server?





Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: posde on March 26, 2009, 06:11:11 pm
You will need to redo any changes you do to the dhcpd.conf file each time you add another MD, or add any network device, that is controlled via lmce as the dhcpd conf gets re-created.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Oatz on March 26, 2009, 06:17:13 pm
Thanks.
Hmm I would like to avoid a hack, such as a CRON job that changes that line back to 192.168.80.150 and restarts the DHCPD daemon.
Does anyone know where in the LinuxMCE scripts it rewrites that dhcpd.conf file once a new device is added?

I will search...
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: dbs on March 26, 2009, 07:38:11 pm
Try this:

http://forum.linuxmce.org/index.php?topic=4574.0 (http://forum.linuxmce.org/index.php?topic=4574.0)
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: posde on March 26, 2009, 07:41:57 pm
Thanks.
Hmm I would like to avoid a hack,

Then PLEASE, use the core as your gateway. Everything else is a hack.  :'(
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Oatz on March 26, 2009, 08:05:11 pm
Thanks.
Hmm I would like to avoid a hack,

Then PLEASE, use the core as your gateway. Everything else is a hack.  :'(
True. But.... so far this config works fine!
And where would Linux or LinuxMCE be if it weren't for hacks?
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: jondecker76 on March 26, 2009, 08:48:38 pm
Not an answer to your question, but you sound like a good candidate for Vera (www.micasaverde.com)
It is made by the creators of Pluto - and in simple terms its a Core running on DD-WRT... and its LMCE compatible (uses DCERouter). With your experience with DD-WRT, this might be right up your alley. Also, I think they're still doing an earlybird special where you can get a great price.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: totallymaxed on March 26, 2009, 10:57:30 pm
Not an answer to your question, but you sound like a good candidate for Vera (www.micasaverde.com)
It is made by the creators of Pluto - and in simple terms its a Core running on DD-WRT... and its LMCE compatible (uses DCERouter). With your experience with DD-WRT, this might be right up your alley. Also, I think they're still doing an earlybird special where you can get a great price.

Micasaverde's Vera is actually built on top of Open-wrt  http://openwrt.org/ (http://openwrt.org/)

All the best

Andrew
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: jondecker76 on March 27, 2009, 12:08:05 am
sorry - Yes, Andrew is correct. Still, it may be worth checking if it offers the types of features you are looking for
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Oatz on March 30, 2009, 05:34:12 am
micasaverde looks cool, but I'm stuck on open-source (free) software for my media center. I'm also pretty cheap. Thanks for the help and links, this hack doesn't seem to be sustainable with all the rewriting in /etc/ each time a device is added, or the core rebooted.

I'm going to write some quick and dirty bash scripts to automate all of the config changes to change the gateway. Will post these if anyone else is interested.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: posde on March 30, 2009, 08:24:24 am
Oatz,

would you mind looking at the webadmin code for the network settings, and see if you can enhance that code, instead of creating an external script.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 07, 2009, 07:51:58 pm

would you mind looking at the webadmin code for the network settings, and see if you can enhance that code, instead of creating an external script.

I'll put in another vote for that.

The webmin interface for dhcpd is pretty basic vis a vis all the goodies dhcpd offers. Extending / integrating the webmin interface / scripts to embrace that goodness seems like a positive step.

For example, if dcerouter is going to re-write dhcpd.conf upon device detection / removal, the scripts that do that could be changed to embrace the current .conf / change only its pieces, rather than rewriting it. OR, provision could be made to include locally defined preferences.

Is that idea reasonable?

Where would one look to start down that path? A particular developer forum, from which questions regarding dhcp interaction / scripts involved, could be inquired about?
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: tschak909 on April 07, 2009, 08:21:56 pm
You need to check out code here in SVN:

http://svn.linuxmce.org/svn/branches/LinuxMCE-0810/

The relevant pieces are src/PlutoDHCP, src/BootScripts, src/Plug_and_Play_Plugin, and a few others that I can't remember right off the top of my head.

-Thom
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 07, 2009, 08:33:39 pm
The relevant pieces are src/PlutoDHCP, src/BootScripts, src/Plug_and_Play_Plugin, and a few others that I can't remember right off the top of my head.

Thanks for that.

Reality check please: If things were 'that simple' would it not have been done already? i.e. If what I'm thinking / suggesting here has not already been done, there must be a reason. If the reason is for lack of eyeballs on the issue, that's one thing. If the reason is there's way more complexity in there than is apparent to the naked eye, that's another.

e.g. I'm sensing that database schema changes would be required, and I can't imagine that being a quick thing from the time of conceptualization through quality assurance and in to production.

So, reality check, please.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: tschak909 on April 07, 2009, 08:51:42 pm
Very astute,

you're going to find the changes aren't simple, simply because of the sheer scope of the system.

I've said this once
and I will say it again.

This isn't your daddy's media center.

It is a smart home platform, encompassing a huge amount of scope, and in order for it to work out of the box as intended, as smoothly as possible, the use case that was decided was for this device to be the center of everything in the house.

I've argued with people repeatedly on this issue, shown code, ran through use cases, but it has fallen upon deaf ears, mostly because nobody has been able to prove me wrong while maintaining our feature set.

I'm tired of arguing. Make a patch that keeps our functionality that allows what you want, or....set it up like we say.

-Thom
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 07, 2009, 09:38:05 pm
I'm tired of arguing. Make a patch that keeps our functionality that allows what you want, or....set it up like we say.

I'm not arguing. I hear you and substantially agree with what you're saying. 'These are our design goals.' 'It works for the intent for which it was designed.' 'All contributions welcome that enhance. (And not break.)'

But, I'll add ... I'm tired of the attitude - in some aspects it's overwhelming. IF YOU MUST BE THE GATEWAY - BE THE GATEWAY. WITH ALL THE DYNAMIC SPECIFICATIONS (especially due to convergence) THAT THAT IMPLIES. OTHERWISE, STOP BEING THE GATEWAY. This is the crux of the noise - be a gateway, or don't be a gateway - pick one. As a design direction.

What you're really getting at, but is often overshadowed - hey, people, we've come this far. It's a good thing. Yes, we all recognize there's lots to do yet. We'll get there, some day, maybe. This stuff doesn't just spring in to being instantaneously.

And, also overshadowed - hey people, it's free. It's what it is. We'd all like to make it 'better'. But our hours are already tapped out. If you (the user) want it to be better, then we need you to contribute some of your own hours to help us make it better. It's 'free' only in $, it is what it is. If you want it to be different, and the community agrees with those differences, it's up to you (the user) to contribute them. If LinuxMCE works for you and satisfies all of your requirements, we're really happy for you, and quite gratified. But if it doesn't, well, only you can make it better.

Mr. User, please reference: http://wiki.linuxmce.com/index.php/LinuxMCE_wiki:Site_support

Now I get your perspective - forest and trees. And your fatigue - just how many times can you say the same thing over and over without getting at least a little testy. Particularly as they are repeated distractions from actually moving forward.

There's a basic constraint: (gateway) all or nothing. But the nature of the environment is most of the time you must integrate with, or seamlessly transition from, the current environment. The constraint means two states: 'broken', or 'working'. Broken = bad. Working takes some non-zero time to accomplish. And that's the rub. Unfortunately. But that's the way it is. Sorry 'bout that. So, the irritation is understandable, on every side. People want drop in, fire and forget, functionality. Unrealistically - that doesn't happen, for these type of applications, even in the pay world.

No doubt, on the list of things to do, is the be a gateway or not issue(s).

Let me iterate here ... thank you for being here.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: tschak909 on April 07, 2009, 09:56:03 pm
Well put.

-Thom
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Rusty_Shackleford on April 16, 2009, 05:49:33 pm
I'm new to LinuxMCE, but not new to networking.  Why not setup another subnet for LinuxMCE?  Leave your existing network in place, setup your core, plug the internet facing nic into your current network, give it a static IP address, then plugin either a cheap switch or another wifi ap (with a different SSId and channel) to the internal NIC on the core, then hang all your MDs off that? 

I believe this would also limit traffic on the LinuxMCE network to only media traffic so you should reduce the chance of stuttering or other media issues.

Hopefully this will work because that's what I intend to attempt to do.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 16, 2009, 07:14:29 pm
I'm new to LinuxMCE, but not new to networking.  Why not setup another subnet for LinuxMCE?  ...

Every device in the house has some level of media capability. Or the point of presence for a bluetooth dongle, and so on and so forth. A second network would mean duplicating devices.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Dale_K on April 16, 2009, 07:22:23 pm
I'm new to LinuxMCE, but not new to networking.  Why not setup another subnet for LinuxMCE?  Leave your existing network in place, setup your core, plug the internet facing nic into your current network, give it a static IP address, then plugin either a cheap switch or another wifi ap (with a different SSId and channel) to the internal NIC on the core, then hang all your MDs off that? 

I believe this would also limit traffic on the LinuxMCE network to only media traffic so you should reduce the chance of stuttering or other media issues.

Hopefully this will work because that's what I intend to attempt to do.

This configuration works swimmingly and is exactly how I run my setup.

LinuxMCE external network plugged into wireless router that serves my home computer networking and internet access.  LinuxMCE gets dynamic 192.168.1.x address.

LinuxMCE internal network plugged into a switch that also has a wireless access point attached.  Running the default 192.168.80.x subnet.

All LinuxMCE related equipment is connected to the internal network via hardwire or wireless to the accesspoint.

The only special configuration is I have to open the LinuxMCE firewall to allow communication from my PC's to LinuxMCE through the external interface. (The 192.168.1.x subnet).

I have run this configuration from day one and I'm very happy with it.  There is no impact on my internal network or my LinuxMCE network and I don't get any annoying 'found new shit' on my Core everytime I plug a laptop/hdd/whatever into my network.  It has the added benefit of maintaining internet connectivity on my PC network even when my Core is down.  (Which is pretty frequent due to my tinkering).
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 16, 2009, 07:46:21 pm
... and I don't get any annoying 'found new shit' ...

(-:

I'm not disputing or disagreeing with anything you say, but the intent of the first post in the thread was to attempt to work within the framework of the design of LinuxMCE. As we are so often told to do. And, theoretically, if not in practice, once the core is built, it's built. (Not in practice in the sense that functionality is evolving, not static.)

If I understand correctly, could you not accomplish the same functionality you mention by turning off the firewall and DHCP in the core? (Everything being on the same network.)
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: tschak909 on April 16, 2009, 07:49:01 pm
*shakes-his-head*

You guys are needlessly complicating your setups.

Why? WHY?!?!

The system is MEANT to integrate into your home. It's MEANT to consolidate all your technology. If you don't let it do that, you don't get the full benefits of the system. Plain and simple.

The more you fight what this system tries to do, the less you can use it.

But that's fine, you control freaks just keep going on, and breaking the system.

-Thom
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Dale_K on April 16, 2009, 07:54:40 pm
... and I don't get any annoying 'found new shit' ...

(-:

I'm not disputing or disagreeing with anything you say, but the intent of the first post in the thread was to attempt to work within the framework of the design of LinuxMCE. As we are so often told to do. And, theoretically, if not in practice, once the core is built, it's built. (Not in practice in the sense that functionality is evolving, not static.)

What I mean by that is that when my kids comes over and plug their laptops in or connect to the wireless, LMCE would give me the 'found new shit'.  With my PC network and LMCE network separate, my Core will only detect hardware I intentionally want to connect to LMCE.

Quote
If I understand correctly, could you not accomplish the same functionality you mention by turning off the firewall and DHCP in the core? (Everything being on the same network.)

No, the Core MUST be the DHCP server for your LMCE installation.  I don't know exactly why other than an ass-ton of stuff stops working if it isn't.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: tschak909 on April 16, 2009, 08:00:38 pm
Sure, people plug in their laptops, but you just tell it not to ask about it again. Problem solved.

*shake-head*

-Thom
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Dale_K on April 16, 2009, 08:06:13 pm
Sure, people plug in their laptops, but you just tell it not to ask about it again. Problem solved.

*shake-head*

-Thom

Or, never deal with it at all.
*shake-head*
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: hari on April 16, 2009, 08:08:42 pm
i like vlans

*shake head*
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Zaerc on April 16, 2009, 08:11:06 pm
I like ice-cream.

*nod head*
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: tschak909 on April 16, 2009, 08:27:10 pm
ROFLMAO.

I'm just trying to prove a point really... The more you guys fight the system, the less it works for you. It's a smart home, and if you spend a bit of time using it as intended, it will work better in the long run.

-Thom
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Dale_K on April 16, 2009, 09:03:04 pm
ROFLMAO.

I'm just trying to prove a point really... The more you guys fight the system, the less it works for you. It's a smart home, and if you spend a bit of time using it as intended, it will work better in the long run.

-Thom

I think I just disagree in my specific situation.  If it were a case of my system was complete and running all the time, I might agree.  But a good example is that my Core is down right now (I crashed it, again).  If the system were setup 'as intended' I would have no internet on any of my PC's.  This is not acceptable.  I do a lot of stuff with my internet connection including hosting a Teamspeak Server, FTP Server and Web Server on a Win2K3 box.  My wife and I play WoW as well so "I know you can't play while I'm at work because the LMCE server is down." would most likely end in divorce and quite possibly physical harm to my person.

In the separate physical network configuration I am taking nothing away from the LMCE installation.  As far as my Core is concerned the setup IS 'as intended', it's just blind to my PC network.

I'm not saying my configuration is better or worse than any other.  I'm saying it's a viable option for those that are in similar circumstances and I have yet to see any negative reprocussions as a result of this configuration.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: hari on April 16, 2009, 09:18:08 pm
your mileage may vary, but I'm doing quite some strange things with my core (my development core is my main lmce system :-). I'm telecommuter and never had unplanned outages because of the core. The nat/routing itself is rock solid. And it boots quite fast, my vpn client session on my workstation does even survive when i reboot the core. If things would go really bad, I could also directly connect to the DSL/Router/WLAN combo from my provider.

If you really want to separate things, given the total cost of a "proper" LMCE installation with a few gadgets, a VLAN capable switch does not really add much. Then you can patch your outlets to the lmce network or your other network. Done.

br, Hari
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: colinjones on April 17, 2009, 12:06:43 am
I'm new to LinuxMCE, but not new to networking.  Why not setup another subnet for LinuxMCE?  Leave your existing network in place, setup your core, plug the internet facing nic into your current network, give it a static IP address, then plugin either a cheap switch or another wifi ap (with a different SSId and channel) to the internal NIC on the core, then hang all your MDs off that? 

I believe this would also limit traffic on the LinuxMCE network to only media traffic so you should reduce the chance of stuttering or other media issues.

Hopefully this will work because that's what I intend to attempt to do.

Rusty - to answer your question specifically... what you are describing is precisely the correct/recommended/as-designed LMCE network topology. See here http://wiki.linuxmce.org/index.php/Network_Setup

But note, as described in the article, when all is said and done, there really is no reason not to have everything on the internal network, the topology is the same just the nodes in different places, and that way the network is simpler and requires less hardware. Don't worry about isolating the media traffic, the chances of that causing problems even on a 100M network is vanishingly small (unless you intend to have 10 MDs all playing media at the same time!)

Unsolicited - you have all the advice you need. The consensus is basically unanimous. If you still want to set it up another way, then do so, but there is zero point continuing to argue the point in this or other threads. To do so would likely be considered trolling.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 18, 2009, 05:40:17 am
i like vlans

*shake head*

Now THERE'S a good thought!

Put all the 'good' / home / permanent stuff on the non-default vlan. Then when new, temporary stuff comes in, it ends up on Default. And you can set up policies and procedures as to how you want to deal with that.

But ... under the scenario mentioned, kids friend comes over with his laptop ... presumably your child's computer is a media device (he can play video, music, whatever, on it from the media library), and therefore on vlan 1. But the friend's computer would land on vlan 0.

I'm assuming they want to play a death match against each other, or something, via computer. [What the heck do _I_ know about this stuff, I'm guessing here!]

May get tricky defining what traffic can autonomously travel between the two vlans.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 18, 2009, 06:22:47 am
You guys are needlessly complicating your setups.

Why? WHY?!?!

If you do some hard thinking about why, you can probably answer the question yourself. But don't put out that effort if you're not willing to consider the answers as valid. [That is NOT a shot.]

Reasonable people generally do reasonable things. One of the reasons you have to keep asking 'Why?' is because what's reasonable depends upon you're perspective / where you're coming from. Perhaps the perspectives boil down to a perspective of "What we have." or "What we're offering." vs. one of "What we want." It gets further complicated with elements of not knowing we wanted it but got it, and having got it, why do we not also have something else.

    I'm trying to think of a couple of examples. Perhaps these will do ... (1) People got text messaging on their phones - it was a new, and now de rigeur, thing. It didn't take too long until people started saying what do you mean only 168 (or whatever) characters at a time! (2) [Ontario, Canada] Phones have been coming with bluetooth. Why the heck can't I buy one with wi-fi from my carriers! (Different answer for that, because carriers can't collect data charges when you go over wi-fi, but the principle, given X logically wanting Y, is the same.)

If lmce is a black box home control system, it is also a computer. As such it must peacefully and instantly co-exist with the computers already in the home. Since it does not, people must 'break their systems.' Or, people must double-device and double-DSL their homes, which they find unacceptable.

I suspect things ultimately boil down to a learning curve / non-zero time to a finished integral installation / home network. And that's a constantly moving target in our dynamic world - so I don't think 'why?' is going to be solved any time soon. Merely which particular thing they're breaking that day.

After all, things must go through a beta / testing stage. It doesn't just spring into being in instant perfection.

Everyone is just going to have to deal.

That being said, someone simply asking 'Why?', as in "You people are idiots.", is not productive or conducive. People only break their systems (as in, work outside the box) to accomplish required, at least to them, functionality. If that required functionality were already present, they wouldn't be 'breaking' their systems.

I do get your perspective though - frustration, and, there are only so many hours in a day. And, as I say above, perfect results don't spring out of thin air.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 18, 2009, 06:25:22 am
I like ice-cream.

*nod head*


Ah, but what flavour?!?
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 18, 2009, 06:40:35 am
Unsolicited - you have all the advice you need. The consensus is basically unanimous. If you still want to set it up another way, then do so, but there is zero point continuing to argue the point in this or other threads. To do so would likely be considered trolling.

I'm confused. I no longer even remember what started this thread, but it has meandered into all sorts of interesting discussions.

Looking back, it's not even my thread, as far as I can tell. So I'm not sure why I'm being singled out.

In this DHCP thread, if I was seeking an answer, my answer was received long ago - you will have to re-write dhcpd.conf occasionally. (Since then, these other interesting discussions have occurred.)

I'm not sure which consensus you're talking about - there have been 3 or 4 community / forum recognized solutions to DHCP use presented herein.

I certainly don't intend to be trolling. I don't think I've been arguing. But I'm happy to be shown the error of my ways.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 18, 2009, 06:49:18 am
What I mean by that is that when my kids comes over and plug their laptops in or connect to the wireless, LinuxMCE would give me the 'found new shit'.  With my PC network and LinuxMCE network separate, my Core will only detect hardware I intentionally want to connect to LinuxMCE.

Isn't this what the 2nd DHCP range is for?

Or could you avoid this problem by assigning IPs to mac addresses? (This is done by entering device IP addresses for each device, accomplishing, essentially, static DHCP addresses?)

Hey, if non-DHCP addresses are placed in the device entry, does this not inherently segregate out non-designated lmce devices by virtue of them being within the DHCP range? Do out of range / static IP-Mac dhcpd.conf entries get made?

And can someone explain ... if I have two ranges specified, say 1-100 and 101-200,  where does a newly receiving DHCP device land?
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: hari on April 18, 2009, 11:38:04 am
If lmce is a black box home control system, it is also a computer. As such it must peacefully and instantly co-exist with the computers already in the home. Since it does not, people must 'break their systems.' Or, people must double-device and double-DSL their homes, which they find unacceptable.
some see LMCE as complete solution/appliance.. so that "must" is also a point of view :-)

br, Hari

Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 18, 2009, 06:52:23 pm
If lmce is a black box home control system, it is also a computer. As such it must peacefully and instantly co-exist with the computers already in the home. Since it does not, people must 'break their systems.' Or, people must double-device and double-DSL their homes, which they find unacceptable.
some see LinuxMCE as complete solution/appliance.. so that "must" is also a point of view :-)
br, Hari

Absolutely.

But I suspect such are quite significantly in the minority. If these forums, etc. are in any way representative of your audience, then I think this is born out. Granted - common thinking says only a very small percentage of the whole even participates in such. But that thinking also seems to agree, in my impression, that those being vocal are the thin end of some wedge.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: Pnuts on April 18, 2009, 07:23:42 pm
While the setup that I plan to have is not standard, it meets the requirements of LMCE and my own. I am currently far from having the network layed out as i plan, but in the end it will work great. http://wiki.linuxmce.org/index.php/User:Pnuts

The initial Linksys Router will have wireless disabled unless I am going to be working on the core. This way my wife will be able to access the internet if the core is down. When I am not doing this, the Wireless access point will provide wireless for the Cores internal network.

The 2 switches I use are also managed switches, so while i am doing the conversion of my current network to the planned one built around LMCE, I can setup VLANs and move over each room as i see fit. While doing this I simply have a cat5 from the original linksys to the switch after the LMCE Core and with Vlan its all set.

Also, anyone looking to invest in a switch, I highly suggest the Sisco SLM2008: http://www.cdw.com/shop/products/default.aspx?edc=1254662&enkwrd=ALLPROD%3aslm2008 its 104.99, gigabit, a managed switch, and if you have PoE at your house, you can use it to power the switch on port 1 so there is no need to place it near a power outlet (works well under the house).
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 18, 2009, 07:30:21 pm
While the setup that I plan to have is not standard ...

Cool! Thank you for the post! Including the product heads up. Mind you, switches _under_ the house is not something that immediately occurred to me to plan for. (-:
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: shaz on April 24, 2009, 07:12:21 pm
So would it work to do as Oatz said in his first post and disable linuxmce's firewall and use the gateway before its firewall? And also having to re-edit the dhcpd.conf on reboots.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 24, 2009, 07:31:54 pm
So would it work to do as Oatz said in his first post and disable linuxmce's firewall and use the gateway before its firewall? And also having to re-edit the dhcpd.conf on reboots.

I am not a LinuxMCE expert. My best guess is:
- turning off the LinuxMCE firewall exposes you to the big bad world. If you have another firewall in place before the LinuxMCE machine, then the big bad world isn't getting to it, so you should have no additional issues beyond what you already have.
- my sense is that dhcpd.conf is re-written at each detection of new device, not at restart. So that's the point at which you would reschmuck dhcpd.conf. I also sense that you could just turn off LinuxMCE's DHCP and use another, _but_ LinuxMCE would lose the ability to detect new devices - you would have to manually add them on your own. Not just to your network / dhcp, but to LinuxMCE as well.
  - if you are not using lmce for home control / mobile orbiters, this may not be a big issue. In that situation, you are not frequently adding / (re)moving devices. If you are moving about from room to room with your orbiter (bluetooth / wi-fi device, cell) then dhcp is how lmce tracks what's where, to control what. e.g. If you wander about from room to room and use an orbiter to change the tv channel, you want it changing the channel in the room that you are currently in, not the room that you were just in.

You are defeating the intent of lmce in doing these things. If the functionality lost in doing so is not of concern to you, then you're still good to go. IIRC.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: shaz on April 24, 2009, 09:29:51 pm
Ya that was my intentions to use my Gateways firewall. I really don't have any new devices being added as they are all registered. I will still keep linuxmce the IP distribution box though to keep its functionality.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: posde on April 24, 2009, 09:42:55 pm
[..]If you are moving about from room to room with your orbiter (bluetooth / wi-fi device, cell) then dhcp is how lmce tracks what's where, to control what. e.g. If you wander about from room to room and use an orbiter to change the tv channel, you want it changing the channel in the room that you are currently in, not the room that you were just in.

This is not correct. DHCP has nothing to do with tracking the movement of the user. The movement of the user is detected, either by using the follow me functionality of the fiire chiefs, or by utilizing Bluetooth (with the mobile orbiter on the Bluetooth device iirc)
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: colinjones on April 24, 2009, 11:02:15 pm
One of the functions that DHCP performs is detecting new devices, particularly as you turn Orbiters on and off. Another, and critical one, is enabling MD functionality. Without DHCP, no MDs. full stop. If you are not using HA or multiple MDs, then I suspect that LMCE is not the product for you. Try MythTV, VDR or XBMC....

Shaz - you haven't said anything at all about why you want to turn off the firewall. Quite simply, Why?? If you want to use another firewall, then do so! Why do you feel this implies you need to turn off the one in LMCE? Are you afraid of being too safe?! Just leave it on, as it too performs other functions in LMCE.

You are talking about turning off the firewall and DHCP, loosing Orbiter, MDs, pnp, QoS, having to manually edit DHCP at various intervals, etc, but I don't see any reason for doing any of this. Just leave both on. If you want also to use your own firewall, then do so. But don't make this any more complicated than you need to.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: shaz on April 24, 2009, 11:55:46 pm
One of the functions that DHCP performs is detecting new devices, particularly as you turn Orbiters on and off. Another, and critical one, is enabling MD functionality. Without DHCP, no MDs. full stop. If you are not using HA or multiple MDs, then I suspect that LinuxMCE is not the product for you. Try MythTV, VDR or XBMC....

Shaz - you haven't said anything at all about why you want to turn off the firewall. Quite simply, Why?? If you want to use another firewall, then do so! Why do you feel this implies you need to turn off the one in LinuxMCE? Are you afraid of being too safe?! Just leave it on, as it too performs other functions in LinuxMCE.

You are talking about turning off the firewall and DHCP, loosing Orbiter, MDs, pnp, QoS, having to manually edit DHCP at various intervals, etc, but I don't see any reason for doing any of this. Just leave both on. If you want also to use your own firewall, then do so. But don't make this any more complicated than you need to.

No, if I were to turn one of my routers into a gateway/dns and leave linuxmce to dhcp I would turn the firewall off on linuxmce and let the routers firewall be enabled. I will still have a firewall up, just one. What Oatz was talking about was the easy use of the dd-wrt interface and I also enjoy using its interface to handle my network. I don't want to turn off the dhcp service on linuxmce, that would just make things way to overly complicated and is not my intentions.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: colinjones on April 25, 2009, 12:58:16 am
That is workable, just be aware that turning off the firewall means you loose the QoS features for VoIP and NATing to the internal network, but that may not concern you. Note, you don't actually need to NAT internally if the firewall is off, because of course, it will just route... however, for the reference of others.... with many broadband routers, their NAT/PAT/PortForward/VirtualServer (call it what you will) is only able to NAT to a local subnet address on its internal LAN interface. Thus these devices will not be able to NAT through the 192.168.1.x subnet into the 192.168.80.x network. So if you have a sevice you want to reach on the LMCE internal network for inbound Internet connections (eg Bit Torrent client, web server, etc) you will need to leave the LMCE firewall on. Use the broadband client to NAT to the external interface of the core, then use the core's NAT to complete the connection to the internal device. This works very well and is very easy to set up... note this is a limitation of those particular broadband routers, nothing to do with LMCE.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 25, 2009, 01:24:52 am
Which brings us back to a well reasoned earlier post - if the lmce firewall is doing no harm, why not leave it on / alone? (DHCP no longer in the picture, as it's being left on, here.)

That is workable, just be aware that turning off the firewall means you loose the QoS features for VoIP and NATing to the internal network, but that may not concern you.

Now that's interesting. I get the not wanting NAT in this situation. But the quote implies that either lmce firewall != iptables, or iptables (as used by the lmce firewall) is more than just a firewall. It implies it's doing some packet massaging too. No?

If the routers (ddwrt), switches (?), NICs, and so on and so forth are all QoS aware, why would the lmce firewall matter? Unless it, and not Asterisk, is the beastie flipping those flags on in the packets?
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: colinjones on April 25, 2009, 02:04:15 am
Not sure I follow the "not wanting NAT" bit... personally I do want NAT, but perhaps you meant something else?

I have no idea what does the QoS, but I believed it was the firewall (certainly I have read in the past that disabling the firewall disables the QoS)...

If we assume that (TBC), then you need to understand that there is much more to QoS than "flags". Broadly the 2 halves of QoS are, "marking" and "enforcement". An application can certainly emit packets that are pre-marked, ie have their ToS or DSCP flags marked; a layer 2 switching device can mark the CoS flags based on policies, and a layer 3 routing device can mark ToS or DSCP flags based on all sorts of things. But marked packets on their own do nothing.

It is only when you enforce policies based on the markings (or override the markings with new markings and enforce based on those; or ignore the markings and enforce based on something else entirely) that the QoS concept has any effect. Prioritisation, queuing, bandwidth clamps, etc are typically how enforcing is implemented, and no application can directly influence that. Switches do the enforcing for CoS and routers to the enforcing for ToS/DSCP.

The first "concentration" point (potential congestion point) in a LMCE network is the core. If the internal interface is congested, particularly with very large payload video stream packets, downloads, etc.... then very small VoIP packets will suffer latency issues due to things like serialisation delays, queuing delays, etc on the external NIC. Asterisk marking packets and the "router" in the core enforcing these by placing them in a Strict Priorty Queue/LLQ type prioritisation will help resolve this. So yes, although I cannot definitively say what the core actually does or which component does it, it is certainly something you would want to do on the core to protect telephony, and is something that the core would have to do, not Asterisk.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 25, 2009, 03:50:02 am
Not sure I follow the "not wanting NAT" bit... personally I do want NAT, but perhaps you meant something else?

Agreed, you want NAT between your internal and public networks. But the network layout described in this thread is an openwrt / dd-wrt router connecting public and internal networks (and doing NAT), and multiple internal devices behind it. I have seen nothing to believe that the non-core computers present are behind and not beside the core. Yes, NAT is needed, but not on the core in this thread.

I have no idea what does the QoS, but I believed it was the firewall (certainly I have read in the past that disabling the firewall disables the QoS)...

Agreed, it's what I've been reading, but I don't understand why, to date. Part of the question I posed in my last then, is really "Is firewall a misnomer - turning on the lmce firewall is accomplishing more than what one at first blush expects a firewall to be doing?"

The firewall being more than a firewall is not intuitive as only firewall rules are specified under that tab. I can certainly see how nat / routing / firewall are all involved here in this thread, and how it is not one stop shopping in webadmin under firewall. And I can see how wanting to do anything different in webadmin to manage it would be a can of worms to open, without some serious reason to do so such that it would rise to the top of the priority list. [We may get there, but not today.]

If we assume that (TBC), then you need to understand that there is much more to QoS than "flags". Broadly the 2 halves of QoS are, "marking" and "enforcement"...

Thank you for your post - it reminds me / us that not only must the source app (or, given that the firewall enables / disables QoS, source machine) set the flags, all the points of network concentration (e.g. switch, router) between must honour those flags.

For brevity (because this gets long very quickly) ... you are assuming (in this thread) that all machines are behind the core, and that the core is doing the routing. The former may or may not be true, the latter is explicitly not true. Again, in this thread.

Whether or not the firewall is turned on, the flags should be honoured by the core (routing) [and the flags should be set by the app] - or the firewall is more than a firewall. (The question of which, is what started this branch of the thread.)

I'd guess that that is the cause of much forum traffic - many saying don't turn off the firewall as you'll lose functionality that is sort of the whole point of having lmce in the first place, and others saying 'I already have a firewall.' And I'd suspect made worse, when coming from a Kubuntu install up via CD, as such users would be more aware / sensitive to such fine points. Vs. black box DVD fire-and-forget installs.

Like I say above, I'm not sure another approach (within webadmin) is appropriate, given the complexity and inter-relationship of the concepts, but certainly it should be kept in mind should those areas see further work.

In the meantime, perhaps some relabelling of the 'firewall' tab may be warranted, and an explanatory note that more than a firewall is covered under it.

For myself, I'd like to see the current iptables listed in text under the new rule entry boxes, but I'll put that request in when I get back to that area. (Other things happening around me at the moment.) Certainly doing so would reveal that much more than just what we think of as firewall rules are being turned on/off with the firewall tickbox.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: unsolicited on April 25, 2009, 04:00:51 am
... then I suspect that LinuxMCE is not the product for you. Try MythTV, VDR or XBMC...

I'm not sure I agree with that. Here's why / my perspective ...

Asterisk/MythTV (etc.) is my initial goal, but given convergence, I don't think it is my / the end goal. From what I've seen, lmce is, or will be, the end goal. It's just that home control is not the first priority in my set of goals.

I'd rather go through the learning curve, once, with lmce, than twice - via Myth then lmce. I know I'm going to go through some pain, as I ignore or neuter some aspects of lmce, and have to work with / through others (dhcp, firewall), but I believe it will be worth it in the end.

But that's just me. Certainly this is not the first time I've heard that if all you want is an Asterisk/Myth box, then the learning curve of lmce may be more than you want.

But look, lmce opens up with "Tell me what you rooms are." ... imagine the possibilities.

_That's_ a perspective / approach _I_ want to be part of. It just makes so much sense.

YMMV.
Title: Re: LinuxMCE as DHCP server, NOT gateway!
Post by: colinjones on April 25, 2009, 04:25:48 am
To both previous posts -

That maybe your priority, unsolicited, but not necessarily Shaz's. And my comments were directed at Shaz.

There is no specific indication that Shaz intended the network topology you are suggesting other than an inference from the presence in this thread. Either way, I absolutely will not recommend that topology ... all the more determinedly because Shaz provides no background whatever on why they might want to do that. In this instance, the response is clear - 2 NICs, 2 networks...

This is potentially a perfect example of what I have clearly outlined recently, of setting the wrong tone for newbies, by continually bringing up a single NIC config as a viable "option". It is NOT! For experienced users, it is a "last resort", that will not get supported currently. If we set the tone of this being an "option" people will inevitably want to take it without 1) understanding the difficulties involved, and 2) without understanding the simplicity that the as-designed approach can mean, as described here - http://wiki.linuxmce.org/index.php/Network_Setup

Be clear, 99% of all cases, there is no _real_ reason why the correct topology cannot be used, and thus be a simpler and more supportable solution. The issue is almost invariably that people do not understand the correct topology and incorrectly believe it means a major impact on their environment... which is precisely why I wrote that wiki article. This needs to be the united front of information presented to all newcomers... if there happens to be one of those very rare instances where a single NIC environment is the only realistic option, you can rest assured that will come out in the wash, and then contingent on an experienced user mentoring the newcomer, that can be addressed on a case by case basis.

Shaz - you most definitely need a new thread to discuss this. To start with a blank slate, outline your issue/concern/question, and allow others to come in without all the baggage and potential misunderstanding/misattribution from this thread.

This thread has been going around in circles, and off on tangents for some time now. I have allowed it to continue against my better judgement, based on the Charter's "light touch" principles... however, I can see now that the history of to'ing and fro'ing over several different topics, going in circles, etc, and general direction means that this thread is going to continue flaring, but without adding any value beyond the original discussion. For that reason, additional comments are not going to benefit in any way from the preceeding comments in this thread, and would be clearer and less ambiguous in a new thread, for the same reasons as my advice to Shaz.

Locking