[mythtv-users] Diskless DHCPd

Mike Perkins mikep at randomtraveller.org.uk
Fri Oct 31 17:33:38 UTC 2008


Mitch Gore wrote:
> Hi,
> 
> I have a diskless frontend that is working 100%
> 
> I decided today to move my DHCP server to my Backup/Server off my DD-WRT
> linksys router.
> 
> here is my dhcpd.conf file I wrote:
> ddns-update-style interim;
> ignore client-updates;
> 
> subnet 192.168.0.0 netmask 255.255.255.0 {
>   range 192.168.0.100 192.168.0.199;
>   default-lease-time 86400;
>   max-lease-time 86400;
>   option routers 192.168.0.1;
>   option ip-forwarding off;
>   option broadcast-address 192.168.0.255;
>   option subnet-mask 255.255.255.0;
>   option ntp-servers 192.168.0.1;
>   option domain-name-servers 192.168.0.1;
> 
>   #static leases
>   host mythfe {
>           hardware ethernet 00:13:D4:77:B9:61;
>           fixed-address 192.168.0.203;
>           }
>   host maincomp {
>           hardware ethernet 00:0C:76:5B:B9:E1;
>           fixed-address 192.168.0.200;
>           }
> 
>   #diskless boot config
>   allow booting;
>   allow bootp;
>   class "pxeclients" {
>      match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
>      next-server 192.168.0.202;
>      filename "linux-install/pxelinux.0";
>   }
> }
> 
> Now for DHCP this works great, the diskless box gets 203.  BUT when mythfe
> starts it doesn't have the right hostname (defaults to localhost).
> Therefore I lost all my settings in Mythfrontend.
> 
> So, how do i set the hostname to 'mythfe' when the box graps an IP.
> 
You need to add the following clause to your subnet declaration:

use-host-decl-names true;

Note that this is the exact opposite to this clause:

get-lease-hostnames true;

which is what you need for dynamically-added hosts, rather than static leases (I 
run both types). If you have one of the above set in your global parameters, put 
the other in your subnet clause, or vice versa, as required.

-- 

Mike Perkins



More information about the mythtv-users mailing list