Customized log info for ACK/INFORM w/ Apple Netboot

Greg Fuller gfuller at oswego.edu
Fri Feb 29 14:01:15 UTC 2008


We have configured our ISC DHCP server to allow Apple Netboot to
function using our existing ISC DHCP servers.  So far it appears to be
working well handing out the TFTP server address, kernel files and OS
location.  We used the method located below to get things up and working
without much trouble (Ubuntu Gutsy w/ ISC DHCP and AFTPD in our test
environmnet for those interested):
 
https://www.math.ohio-state.edu/wiki/administration/macosx/netboot/bsdp_
with_isc_dhcp
 
The whole Netboot process is outlined at this website, which also
includes packet sniffs from the DHCP/BSDP transactions:
 
http://www.bombich.com/mactips/bootpd.html
 
What I'd like to be able to do is to mimic the same type of logs
messages that true Apple Netboot would create on an OSX server running
Netboot.  Netboot servers create log messages similar to the following
in their system syslog file (and also DHCP info also):
 

bootpd[27240]: BSDP DISCOVER [en0] 1,0:16:cb:ca:7b:35 arch=i386
sysid=MacBookPro1,1
bootpd[27240]: BSDP INFORM [en0] 1,0:16:cb:ca:7b:35 arch=i386
sysid=MacBookPro1,1
bootpd[27240]: NetBoot: [1,0:16:cb:ca:7b:35] BSDP ACK[LIST] sent
10.0.1.32 pktsize 300
bootpd[27240]: BSDP INFORM [en0] 1,0:16:cb:ca:7b:35 arch=i386
sysid=MacBookPro1,1
bootpd[27240]: NetBoot: [1,0:16:cb:ca:7b:35] BSDP ACK[SELECT] sent
10.0.1.32 pktsize 381

 
I know I'm going to be able to totally replicate it, but I'd like to get
very similar log messages to appear for the DISCOVER, INFORM, ACK
message types.

I am able to get log information into syslog for the DISCOVER message
type without any problems.  Using the following log() statement within
an if statement checking the dhcp-message-type=1.

if (option dhcp-message-type=1) {	#DISCOVER
	option vendor-encapsulated-options 08:04:81:00:00:09;
	log (info, concat("BSDP DISCOVER: ",
binary-to-ascii(16,8,":",hardware), " arch=", substring(option
vendor-calss-identifier,10,3), " sysid=", substring(option
vendor-class-identifier,14,14)));
}

 
But I am not able to get anything for a INFORM or ACK message type.  If
place the following in the global scope to try to log an ACK, I do not
get any new output in my log file:

if (option dhcp-message-type=5) {
	log (info, concat("Netboot: [",
binary-to-ascii(16,8,":",hardware), "] BSDP ACK[LIST] sent"));
} 
if (option dhcp-message-type=8) {
	log (info, concat("BSDP INFORM: [",
binary-to-ascii(16,8,":",hardware), "]));
}



Not sure why it isn't logging anything for the above INFORM and ACK
line.  Any idea why INFORM and ACK won't log (other than the default
syslog DHCPACK/INFORM messages?
 


This is what we are using for the Apple Netboot stuff that works, but
doesn't have any of the logging enabled in it.  


class "AppleNBI-i386" {
	match if substring (option vendor-class-identifier, 0, 14) =
"AAPLBSDPC/i386";
	option dhcp-parameter-request-list 1,3,17,43,60;
	if (option dhcp-message-type = 1) { option
vendor-class-identifier "AAPLBSDPC/i386"; }
	if (option dhcp-message-type = 1) { option
vendor-encapsulated-options 08:04:81:00:00:67; }
	filename "macnbi/i386/booter";
	option root-path "http://192.168.79.1/System.dmg";
}


class "AppleNBI-ppc" {
	match if substring (option vendor-class-identifier, 0, 13) =
"AAPLBSDPC/ppc";
	option dhcp-parameter-request-list 1,3,6,12,15,17,43,53,54,60;
	filename "macnbi/ppc/booter";
	option vendor-class-identifier "AAPLBSDPC";
	if (option dhcp-message-type = 1) {
		option vendor-encapsulated-options 08:04:81:00:00:09;
	}
	elsif (option dhcp-message-type = 8) {
		option vendor-encapsulated-options
01:01:02:08:04:81:00:00:09;
	}
	else {
		option vendor-encapsulated-options
00:01:02:03:04:05:06:07;
	}
		option root-path "http://192.168.79.1/System.dmg";
	}



--greg


Gregory A. Fuller - CCNA 
Network Manager 
State University of New York at Oswego 
Phone: (315) 312-5750 
http://www.oswego.edu/~gfuller



More information about the dhcp-users mailing list