[syslinux] [PATCH] MAC Address Ranges

Gene Cumm gene.cumm at gmail.com
Sun Mar 27 04:42:26 PDT 2011


On Sat, Mar 26, 2011 at 23:32, Jason Hiatt <jason.hiatt at gmail.com> wrote:
> Hi all,
>
> I'm new here so bear with me.  I am working on a project at work where
> we are replacing 1000+ Dell servers.
> When a new Dell server is delivered to one of our remote offices it
> will PXE boot off of the existing Dell server and install openSuse and
> then configure itself.
> We also PXE boot windows PCs in the remote offices so we needed a way
> to assign a large range of MAC addresses to a specific config file.
> We have the MAC address ranges for all of the Dell servers that will
> be installed in the remote offices; so, now we can distribute a file
> called 01-BC-05-CD to all of the existing servers and be confident
> that the new servers will load the PXE config file that it's supposed
> to.
>
> The path below will take the client's MAC address and walk through
> (almost) all of the MAC address ranges.

Interesting idea.  I'd assume that you have one of three situations.
It's semi-automated (requires a user to choose the install option but
defaults to a local disk boot), you disable the PXE boot as a part of
the install, or PXE boot is after a local disk boot and the local disk
boot fails over properly to PXE.

I can think of another three ways to solve this:

1) Symlinks, although in this case it'd be rather unusable due to the
number needed (~16,000,000).

2) Reconfiguring your DHCP server to forcibly assign a config based on
MAC address.  At
http://syslinux.zytor.com/wiki/index.php/PXELINUX#Can_I_send_information_to_PXELINUX_via_special_options_in_the_DHCP_response.3F
there's an example that uses binary-to-ascii to set option 209 for
ISC-DHCPD.  This config is tried before attempting the search.

In one part specify:
option space pxelinux;
option pxelinux.configfile code 209 = text;

In another part specify:
site-option-space "pxelinux";
if ( substring (binary-to-ascii(16, 8, ":", substring(hardware, 1,
8)), offset, 9) = "1:bc:5:cd" ) {
    if exists dhcp-parameter-request-list {
        option dhcp-parameter-request-list = concat(option
dhcp-parameter-request-list,d1);
    }
    option pxelinux.configfile "pxelinux.cfg/01-BC-05-CD";
}


3) Having a first config that uses COM32 module(s) that evaluates
things like the MAC and proceeds to the next config based on that.
How it does so would be based on how you have configured your existing
environment.

On a side note, please be aware of
http://syslinux.zytor.com/wiki/index.php/Hardware_Compatibility#LOCALBOOT
as there have been some systems that misbehave.

Good luck.

-- 
-Gene




More information about the Syslinux mailing list