DHCP Plug and Play

From LinuxMCE
Revision as of 22:56, 19 October 2012 by Mcefan (Talk | contribs)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search


LinuxMCE allows a user to plug in any type of device and automatically configures it and lets the user start using it right away without doing anything. The way this is accomplished is with an extension to the DHCP server. When a new device is plugged into the network and requests an IP address, this program connects to a central database to do a lookup of the device's unique MAC address to see what type of device it is. The database defines all the configuration data the device needs to run, and references the software drivers needed. This program then downloads and installs any needed software, adds configuration pages for the device to the user's LinuxMCE Admin Website, and adds the device in the user's local database.

Single NIC & Existing DHCPd

LinuxMCE recommends its core server have 2 ethernet ports, connecting one to an existing LAN (that routes to the Internet), and the other to a LAN segment on which sit all devices that LMCE will serve. That recommended setup runs a DHCP server (DHCPd) on LMCE to assign IP numbers and other network configs to devices on the "inside" LAN served by LMCE. LMCE runs a DHCP client on its "outside" LAN interface to get its IP# (and any other configs the existing LAN might assign) on that outside LAN. LMCE than routes inside LAN traffic to the outside LAN, including to any router/gateway on the outside LAN, while running a firewall that protects devices on the inside from activity on the outside.

However, it is possible to run LMCE on a host with a single ethernet port. There is some complexity in the configuration, the solution is not as fully automated and robust as is the recommended 2 ethernet version. However, it is possible to do. These are instructions, including switching the LAN from an existing DHCP server to using the LMCE DHCPd instead.

  • In existing router/gateway
  1. Disable DHCPd
  2. Assign LAN IP# on desired subnet (eg 192.168.0.1)
  3. Ensure router/gateway is configured to route properly between the newly specified subnet and the other network
  • In LMCE Admin site:
  1. Homepage -> Advanced -> Network -> Network Settings
  2. Make sure "Enable DHCP server" is checked, leave the ranges at their defaults, or at least in the 192.168.80.X range.
  3. Configure the "External network card" staticly to be on the same subnet as the router (eg 192.168.0.X).
  4. Leave the "Internal network card" setting at their defaults (eg 192.168.80.1).
  5. Reoload the router
  • Everything else on the network
  1. If it uses DHCP, either refresh it's IP-number manually or simply reboot it.

Switching From Single NIC to Double NIC

There are instructions for switching from Single to Double NIC.

See also