Find the answer to your Linux question:
Results 1 to 2 of 2
Hi all! I'm working with development on diskless clients and these PXE-boot off of a SLES server. The thing is that it's not always the same clients booting and to ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2007
    Posts
    2

    match partial dhcp-client-identifier option


    Hi all!

    I'm working with development on diskless clients and these PXE-boot off of a SLES server. The thing is that it's not always the same clients booting and to complicate matters more there are two different hardware versions right now, so I want one version to boot one linux and the other to boot another linux. All this must be controlled by the dhcp client-identifier option which, in the new version is unique for every client, except for the 4 first bytes.

    example:
    client 1 with HW A sends CID "fooA bootme"
    client 2 with HW A sends CID "fooA biteme1"

    I've tried:
    if substring (option dhcp-client-identifier, 1, 4) = "fooA"
    and
    if substring (option dhcp-client-identifier, 0, 4) = 66:6F:6F:41
    with no success.

    how can I match the "fooA" part with dhcp-client-identifier option to make client 1 and 2 boot the same linux?

    Please help!

  2. #2
    Just Joined!
    Join Date
    Nov 2007
    Posts
    2
    Solution:

    dhcpd.conf:

    option domain-name "exapmple.com";
    ddns-update-style none;
    default-lease-time 14400;
    option local-option97 code 97 = string;

    group {
    #----HWA----
    if substring (option local-option97, 1, 4) = "fooA" {
    filename "fooA/pxelinux.0";
    next-server <IP>;
    }

    # ----HWB----
    if substring (option local-option97, 0, 5) = 00:66:6f:6f:42 {
    filename "fooB/pxelinux.0";
    next-server <IP>;
    }

    subnet <IP> netmask <mask> {
    range <IP> <IP>;
    max-lease-time 172800;
    default-lease-time 14400;
    }
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •