Peter Stange <[EMAIL PROTECTED]> writes:

> Hello,
> 
> with the UNDI we make a DHCP request and get an IP-address and much
> more. A little bit later we start the MS Client TCP/IP protocol
> stack (DisableDHCP=1) and I think we make DHCP request once
> more.

This is correct for PXE boots.  Floppy and CD-based installs only
invoke DHCP once, of course.

> With the ipconfig.exe programm, it's a part of MS Client, I see a
> lot of IP-infos like gateway, netmask and so on,

Yes, and "net diag /status" will give you the MAC address.  The next
release of Unattended uses these programs to capture the IP address
and MAC address, making them available as [_meta] variables so you can
dispatch on them for customizations.

> but no hostname.

Part of the problem here is the notion of "hostname".

As far as I know, the MS Client ignores the DHCP client hostname
option.  It uses the COMPUTERNAME= setting in net\system.ini to assign
the NetBIOS name.  The DHCP client hostname, NetBIOS name, and DNS
name are technically all distinct.  Modern systems usually try to make
them the same, but the MS Client only understands the NetBIOS name and
only sets it from the system.ini file.

The purpose of a tool like bpbatch.exe, which you mention below, is to
use the information in the DHCP response to make substitutions in
files like system.ini before starting things like the MS Client.

But bpbatch does not work in ordinary DOS, and even if it did, it
would only work for PXE boots.  So to avoid name clashes (which
NetBIOS cannot tolerate), I put the COMPUTERNAME= setting at the very
end of system.ini, and I made autoexec.bat append a random number to
system.ini before starting the MS Client.  It is not pretty, but it is
simple and it mostly works.  Actually, I hate it, because I hate
things that "mostly work".  But I do not know of any decent
alternative.

> I will use the hostname as an identifier for the
> winnt/udf=id,[udf-file] switch. So it is possible for me to have
> only one unattended.txt and one unattended.udf for all clients.

This would be nice.  But is it really so bad to use the IP address
instead?

> At 3com there is the bppatch.exe (MBA Utils) program for reading all
> IP-infos, but I get an error message, something like it "this
> programm must run from within a tcp/ip boot image file".

Yeah, I think they just want you to buy their product.

However, bppatch.exe is just calling public APIs in the PXE/UNDI
stack.  It has been a while since I read the Intel PXE spec, but it
does document a call to get the original DHCP reply packet.  Someone
skilled in writing DOS apps (which I am not) could use that call to
obtain all the information returned by the DHCP server.

Basically, you would need code to:

  1) Locate the PXE+ structure to learn the entry point to the
     PXE/UNDI stack.

  2) Call the "get DHCP reply packet" function (whose exact name I
     forget).

  3) Parse the DHCP packet to pull out the interesting information,
     like the client hostname option.

This is probably about a weekend's worth of work for someone with the
right skills.

> I will use the hostname entry sended by the DHCP server. One chance
> is to use "nslookup.exe IP-Addr DNS-Server" to resolve the hostname.
> I didn't find a nslookup.exe or hostname.exe program for this
> environment. d-|

Yes, this would solve your problem in a different way, by querying the
DNS instead of using the DHCP client hostname option.  DNS resolution
is a complex algorithm, so perhaps there is no implementation for DOS
with MS Client.  But it is so important... So maybe there is.  But I
do not know of it.

 - Pat


-------------------------------------------------------
This SF.net email is sponsored by: Scholarships for Techies!
Can't afford IT training? All 2003 ictp students receive scholarships.
Get hands-on training in Microsoft, Cisco, Sun, Linux/UNIX, and more.
www.ictp.com/training/sourceforge.asp
_______________________________________________
unattended-info mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/unattended-info

Reply via email to