[gPXE] DHCP Client ID in gPXE 1.0.0?

Geert Stappers stappers at stappers.nl
Wed Mar 17 04:11:14 EDT 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Op 20100317 om 15:17 schreef Steven Shiau:
> Hi,
> Is DHCP client ID of gPXE different from that of etherboot and PXE?
> It looks different. I did a test about this, and the machine got a 
> different IP address if gPXE, instead of Etherboot or PXE, was used to boot.
> This is how I tested it:
> 1. In the dhcpd.conf of dhcp3-server (3.1.1-6+lenny4) on my Debian Lenny 
> box, the following lines were added:
> ====================================================
> log(info, concat("Client ",
>          binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
>          " requests ",
>          binary-to-ascii(16, 8, ":", option dhcp-parameter-request-list),
>          " - ",
>          pick-first-value(option vendor-class-identifier, "no vendor-id"),
>          " - ",
>          pick-first-value(option dhcp-client-identifier, "no dhcp-client-id"))
>     );
> ====================================================
> Then I tried to boot the same client via gPXE 1.0.0, Etherboot 5.4.4, 
> and PXE respectively. The results are:
> 
> A. Result for gPXE 1.0.0 (gpxe-1.0.0-gpxe.iso file was got from 
> http://rom-o-matic.net/gpxe/gpxe-1.0.0/contrib/rom-o-matic, the default 
> values were used)
> The log file showed:
> ==================================================
> Mar 17 14:57:23 drbldbn dhcpd: Client 0:50:56:1:1:1 requests 1:3:6:7:c:f:11:2b:3c:42:43:af:cb - PXEClient:Arch:00000:UNDI:002001 - ^A
> Mar 17 14:57:23 drbldbn dhcpd: DHCPDISCOVER from 00:50:56:01:01:01 via vmnet1
> Mar 17 14:57:24 drbldbn dhcpd: DHCPOFFER on 192.168.120.2 to 00:50:56:01:01:01 via vmnet1
> ==================================================
> //NOTE// In the DHCP client ID part, you can see there is "^A", i.e.  it's not empty.


FWIW:  ^A  is "ascii" for 0x1   ( ^@ is 0x0, commonly used as "end of string" )

> B. Result for etherboot 5.4.4 (eb-5.4.4-pcnet32.iso file was got from 
> http://rom-o-matic.net/etherboot/etherboot-5.4.4/contrib/rom-o-matic, 
> the default values were used)
> ==================================================
> Mar 17 15:02:59 drbldbn dhcpd: Client 0:50:56:1:1:1 requests 1:3:c:2b - Etherboot-5.4 - no dhcp-client-id
> Mar 17 15:02:59 drbldbn dhcpd: DHCPDISCOVER from 00:50:56:01:01:01 via vmnet1
> Mar 17 15:02:59 drbldbn dhcpd: DHCPOFFER on 192.168.120.1 to 00:50:56:01:01:01 via vmnet1
> ==================================================
> Here you can see the DHCP client ID is empty, so in the server's log 
> file "no dhcp-client-id" was printed.
> 
> C. Results for PXE (the PXE function in VMWare workstation 6.5).
> ==================================================
> Mar 17 15:04:23 drbldbn dhcpd: Client 0:50:56:1:1:1 requests 1:2:3:5:6:b:c:d:f:10:11:12:2b:36:3c:43:80:81:82:83:84:85:86:87 - PXEClient:Arch:00000:UNDI:002001 - no dhcp-client-id
> Mar 17 15:04:23 drbldbn dhcpd: DHCPDISCOVER from 00:50:56:01:01:01 via vmnet1
> Mar 17 15:04:23 drbldbn dhcpd: DHCPOFFER on 192.168.120.1 to 00:50:56:01:01:01 via vmnet1
> ==================================================
> Again, here you can see the DHCP client ID is empty, so in the server's 
> log file "no dhcp-client-id" was printed.
> 
> 
> So apparently that for gPXE, the DHCP Client ID is not the same with 
> that of Etherboot or PXE. Is that done on purpose? Is there any method I 
> can try to make it the same with that of Etherboot or PXE? Otherwise the 
> gPXE client will request an IP address first, and after booting into 
> GNU/Linux, the same machine will request another, different IP address 
> (since the DHCP client ID normally is empty for GNU/Linux). Sometimes 
> this is really annoying.


Euh, I think there is something else going on.

It is _not_ "the same machine requests /another/ IP address",
but "the same requests /again an/ IP address".

The DHCP Server has not seen a DHCPRELEASE from the "bootROM Request",
so the DHCP Server has to provide another IP address for another Request.


My advice:
 Assign in the DHCP server an IP-address to MAC-address of the machine.


Groeten
Geert Stappers

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkugjqIACgkQOSINbgwa/7sZ4wCgxcSujdREGu+MWZsRSD3VQaZ6
4SoAmweZB+mxubzQ7ZR8avwWL7a1h7is
=qx60
-----END PGP SIGNATURE-----


More information about the gPXE mailing list