Converting from Solaris's DHCPd?

Sten Carlsen stenc at s-carlsen.dk
Sun Sep 12 15:55:12 UTC 2010


 At some point reading this post I got the feeling you would move the
host statements around in your file.

Be warned: that will not accomplish anything but trouble, host
statements ARE global, wherever they are placed in the file.

One thing that might come closer to solving your issue might be classes
and sub-classes.

I think - define all options for the class and use a sub-class statement
to place each host in the correct class at this moment. Examples are in
the archives.

I have never tried this but many seem to have it working.


On 12/09/10 16:56, Kyle McDonald wrote:
> Hi Glenn,
>
> On 9/12/2010 9:03 AM, Glenn Satchell wrote:
> > In ISC dhcpd you can
> define options within different scopes, for example at a host,
> group, pool, subnet, class or global scope. All requests that
> are included in that scope inherit the options and settings.
> Generally this gives a very flexible approach. Is this the sort
> of thing you were expecting?
>
> >
>
>
>
> I've seen this. I think what ypu're describing is that I can make a
> group for booting and installing RHEL5u3, define the options for
> RHEL5u3 in that group, then list all the hosts I want to actually
> install RHEL5u3 in that group? Then repeat for SLES11, Solaris 10, etc?
>
> That's close I suppose but not quite it. It might be OK for the linux
> installs since there a few less permutations, But for the Solaris ones
> ugh!
>
> I really prefer to only keep each setting in one place, so I can't
> miss any of them when I need to change it. So currently I use a
> hierarchy of macros like this:
> (Psuedo code here - Sun's syntax is not that easy to read.)
>
> INST_Solaris_s10u8_X64_a
>   {
>     GrubMenu   /tftp/Solaris_S10u8_X64_a  # This menu uses port A for
> the console
>     include INST_Solaris_s10u8_X64        # note no _a
>   }
>
> INST_Solaris_s10u8_X64_b
>   {
>     GrubMenu   /tftp/Solaris_S10u8_X64_b  # This menu uses port B
> kernel console
>     include INST_Solaris_s10u8_X64        # note no _b
>   }
>
> INST_Solaris_s10u8_X64_v
>   {
>     GrubMenu   /tftp/Solaris_S10u8_X64_v  # This menu uses VGA for the
> kernel console
>     include INST_Solaris_s10u8_X64        # note no _v
>   }
>
> INST_Solaris_s10u8_X64
>   {
>     ...Sun Options specific to s10u8 for X64
>     include INST_Solaris_s10u8            # note no _X64
>   }
>
> INST_Solaris_s10u8_SPARC
>   {
>     ...Sun Options specific to s10u8 for SPARC
>     include INST_Solaris_s10u8            # note no _SPARC
>   }
>
> INST_Solaris_s10u8
>   {
>     ...Sun Options specific to s10u8 for all Archs.
>     include INST_Solaris_s10              # note no u8
>   }
>
> INST_Solaris_s10
>   {
>     ...Sun Options specific to s10 for all updates... None of these at
> the moment.
>     include INST_Solaris_Common
>   }
>
> INST_Solaris_Common
>   {
>     ...Sun Options common to all Solaris installs
>     include INST_Common
>   }
>
> INST_Common
>   {
>     ... PXE and other options common to all installs
>   }
>
> I have parts of the pattern above repeated for many OS's like:
>
> Solaris 10 all updates, Solaris NV and OpenSolaris many builds both
> X64 and SPARC.
> RHEL4, 5 and 6 all updates, both X32 and X64
> SLES9, 10 and 11, all updates, both X32 and X64
> Ditto for CentOS, Oracle Linux, Fedora, Ubuntu, etc.
>
> This pattern may seem like a lot of work, but the best part is that
> when defining a host I only have to select the right top level macro
> (like INST_Linux_SLES11_X64-b) for it. We update which OS is going to
> be installed on which hosts all the time.
>
> If I group the hosts by OS to install, then I'll need to move the
> whole Host record between
> groups. That's not impossible to do, but it's less straight forward
> than just switching a hosts' macro from INST_RHEL5u4_X64-a to
> INST_SLES11ga_X32-a.
>
>
> In ISC DHCP, can whole config files be included at any level? I mean
> can I do this:
>
> host foo {
>   hardware ethernet xx:xx:xx:xx:xx:xx;
>   fixed-address 192.168.x.y;
>   include /some/dir/Linux/RHEL5/u3/X64-a
> }
>
> host bar {
>   hardware ethernet xx:xx:xx:xx:xx:xx;
>   fixed-address 192.168.x.y;
>   include /some/dir/Linux/SLES11/ga/X32-a
> }
>
> I think I could make do with something like this if it'll work.
>
>   -Kyle
>
>
>
>
> _______________________________________________
> dhcp-users mailing list
> dhcp-users at lists.isc.org
> https://lists.isc.org/mailman/listinfo/dhcp-users

-- 
Best regards

Sten Carlsen

No improvements come from shouting:

       "MALE BOVINE MANURE!!!" 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/dhcp-users/attachments/20100912/ede91eb7/attachment.html>


More information about the dhcp-users mailing list