From owner-freebsd-i386@FreeBSD.ORG Mon Jan 12 03:20:41 2004 Return-Path: Delivered-To: freebsd-i386@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BAFA416A4CE for ; Mon, 12 Jan 2004 03:20:41 -0800 (PST) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9963C43D64 for ; Mon, 12 Jan 2004 03:20:14 -0800 (PST) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i0CBKEFR089422 for ; Mon, 12 Jan 2004 03:20:14 -0800 (PST) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.10/8.12.10/Submit) id i0CBKEAi089421; Mon, 12 Jan 2004 03:20:14 -0800 (PST) (envelope-from gnats) Resent-Date: Mon, 12 Jan 2004 03:20:14 -0800 (PST) Resent-Message-Id: <200401121120.i0CBKEAi089421@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-i386@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Danny Braniss Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2BD2816A4CE for ; Mon, 12 Jan 2004 03:10:35 -0800 (PST) Received: from cs.huji.ac.il (cs.huji.ac.il [132.65.16.30]) by mx1.FreeBSD.org (Postfix) with ESMTP id B082043D45 for ; Mon, 12 Jan 2004 03:10:33 -0800 (PST) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32] ident=exim) by cs.huji.ac.il with esmtp id 1Afzxm-0007IG-VX; Mon, 12 Jan 2004 13:10:30 +0200 Received: from danny by pampa.cs.huji.ac.il with local (Exim 4.12) id 1Afzxm-000CTl-00; Mon, 12 Jan 2004 13:10:30 +0200 Message-Id: Date: Mon, 12 Jan 2004 13:10:30 +0200 From: Danny Braniss To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: danny@cs.huji.ac.il Subject: i386/61239: bootp enhancement, places the dhcp tags into the X-BeenThere: freebsd-i386@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: Danny Braniss List-Id: I386-specific issues for FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2004 11:20:41 -0000 >Number: 61239 >Category: i386 >Synopsis: bootp enhancement, places the dhcp tags into the >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-i386 >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Jan 12 03:20:13 PST 2004 >Closed-Date: >Last-Modified: >Originator: Danny Braniss >Release: FreeBSD 4.9-STABLE i386 >Organization: >Environment: System: FreeBSD pampa 4.9-STABLE FreeBSD 4.9-STABLE #10: Sun Nov 16 14:13:37 IST 2003 danny@dev:/r+d/obj/r+d/4.9/src/sys/HUJI i386 diskless boot via PXE >Description: This is still unfinished ... The changes to lib/libstand/bootp.c were promped for the following reasons: o- need to configure many different disk/data-less clients. o- simplify management. o- allow some form of central control Changes: 1: When the pxeboot card first send out a dhcp request, it adds a vendor specific id/class (PXEClient) so that the dhcp daemon can identify the request as comming from a pxe-aware program, eg: from dhcpd.conf class "pxeclients" { option PXE.mtftp-ip 0.0.0.0; match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; } Note: the above 'tricks' the PXE-boot not to go and mess with the proxy-dhcpd/mftp. I modified lib/libstand/bootp.c to send "FreeBSD" instead of the default "PXEClient" and so: option FBSD.kernel code 1 = text; option FBSD.kernel_options code 3 = text; option FBSD.kernelname code 2 = text; option FBSD.usr-ip code 4 = ip-address; option FBSD.usr-path code 5 = text; class "freebsd" { # Production - uses fs-02 option FBSD.kernel "kernel"; match if substring (option vendor-class-identifier, 0, 8) = "FreeBSD"; option root-path "1.1.1.1:/roots/FreeBSD/i386-4.4"; vendor-option-space FBSD; } 2: places all the tags received in the kernel environment eg: kenv |grep dhcp dhcp.dhcp-lease-time="0000012c" dhcp.dhcp-message-type="05" dhcp.dhcp-rebinding-time="00000106" dhcp.dhcp-renewal-time="00000096" dhcp.dhcp-server-identifier="132.65.16.17" dhcp.domain-name="cs.huji.ac.il" dhcp.domain-name-servers="132.65.16.10,132.65.16.8" dhcp.host-name="foo" dhcp.root-path="132.65.16.100:/c/2" dhcp.routers="132.65.16.1" dhcp.subnet-mask="255.255.0.0" dhcp.tags="053:054:051:001:003:006:012:017:058:059:015:043:" >How-To-Repeat: >Fix: ftp://ftp.cs.huji.ac.il/users/danny/freebsd/diskless-boot/bootp.c >Release-Note: >Audit-Trail: >Unformatted: kernel environment