Date: Tue, 12 Mar 2002 12:37:17 -0800 (PST) From: Doug Ambrisko <ambrisko@ambrisko.com> To: Luigi Rizzo <rizzo@icir.org> Cc: net@FreeBSD.ORG Subject: Re: bootp tags used in FreeBSD ? Message-ID: <200203122037.g2CKbH609035@ambrisko.com> In-Reply-To: <20020311232650.E48429@iguana.icir.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Luigi Rizzo writes:
| Hi,
| does anyone have up-to-date information on which bootp/dhcp
| tags are used by FreeBSD ?
| I am asking because of two reasons:
|
| + I would like to pass some info from the bootp/dhcp server
| to userland, so they can be used at runtime to customize
| system's behaviour (specific example: I have ~100 clients
| in different labs booting from the same server, where
| configuration should be lab-specific but not host-specific.
| A bootp server could easily pass the "domain" each host
| belong to. I know I could derive this info using the hostname
| as a search key, but this would involve an additional configuration
| file...).
|
| + I was going to fix the bootptab manpage and i see that there are
| several vendor tags used in bootpc_subr and in etherboot
| which are not documented. Even worse, some of those tags are
| not consistent across different systems, and even etherboot
| and bootpc_subr.c have different ideas on T129 and T130
I'd suggest look at isc-dhcp 3 and get dhclient working in a netboot
environment so you can deal with "vendor-class-identifier".
Then just have it do the right things without more over loading
of common things and then run into a collision which there are several.
For example here are parts of my dhcpd.conf file;
option etherboot-freebsd-howto code 132 = integer 32;
option etherboot-kernel-env code 133 = string;
option etherboot-menu-count code 176 = integer 8;
option etherboot-menu-config code 160 = string;
option etherboot-menu-1 code 192 = string;
option etherboot-menu-2 code 193 = string;
option etherboot-menu-3 code 194 = string;
option etherboot-menu-4 code 195 = string;
option etherboot-menu-5 code 196 = string;
option etherboot-menu-6 code 197 = string;
option freebsd-swap-path code 128 = string;
option dhcp-vendor-identifier code 60 = string;
option load-control code 160 = string;
class "etherboot" {
match if substring (option vendor-class-identifier, 0, 9) = "Etherboot";
option etherboot-menu-count 5;
option etherboot-menu-config "timeout=30:default=192:";
option etherboot-menu-1 "BSD:::/tftpboot/kernel.bsd:";
option etherboot-menu-2 "DOS:::/tftpboot/netdos:";
option etherboot-menu-3 "TEST:::/tftpboot/kernel.test:";
option etherboot-menu-4 "DISK:::/dev/hda";
option etherboot-menu-5 "GRUB:::/tftpboot/nbgrub";
option etherboot-menu-6 "PXE:::/tftpboot/pxeboot";
option etherboot-kernel-env "hw.ata.wc=1";
# option etherboot-freebsd-howto 0x00001002; # serial & single
option etherboot-freebsd-howto 0x00001000; # serial
# option etherboot-freebsd-howto 0x00001800; # serial & verbose
}
class "pxe" {
match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
# filename "/tftpboot/pxeboot";
}
class "ambit-load" {
match if option dhcp-vendor-identifier = "Load";
option root-path "ftp://192.168.99.254/ambit-1.5.43-am";
option load-control "stuff that only this cares";
}
Then in my dhclient.conf (version 3)
option load-control code 160 = string;
send vendor-class-identifier "Load";
request subnet-mask, broadcast-address, time-offset, routers,
domain-name, domain-name-servers, host-name, root-path, option-160;
and then dhclient-exit-hooks do what I need with the parameters
passed.
I also have a fully working proxyDHCP & bootserver functionality so
I can do menus, DOS boots etc via PXE compliant roms via patches
to isc-dhcp that are on the net.
Now I don't have to worry about bpBatch, Etherboot, PXE, FreeBSD, Linux
all fighting over the same parameter and making the packet to big.
BTW it would be nice to add a Vendor Indentifier to the kernel DHCP
request to filter out just those things.
I think jdp was working on making dhclient not kill the network when
run from a netbooted environment. I forget the status of that.
Doug A.
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200203122037.g2CKbH609035>
