# Generated by DRBL.
# Do NOT modify this file unless you know what you are doing!
default-lease-time 300;
max-lease-time 300;
option subnet-mask 255.255.255.0;
option domain-name-servers 8.8.8.8, DNS, Domain:, ~., 8.8.8.8;
option domain-name "
edu.tw";
ddns-update-style none;
server-name drbl;
allow booting;
allow bootp;
# For Raspberry Pi
# Ref:
https://www.raspberrypi.org/forums/viewtopic.php?t=209247#
https://tools.ietf.org/html/rfc2132option vendor-specific-info code 43 = string; # Server - RFC 2132, 8.4
option param-request-list code 55 = string; # Client - RFC 2132, 9.8
option vendor-class-identifier code 60 = string; # Client - RFC 2132, 9.13
option rpi-tftp-server code 66 = text; # Server - RFC 2132, 9.4
# Ref: Dynamic Host Configuration Protocol (DHCP) Options for the
# Intel Preboot eXecution Environment (PXE)
#
https://tools.ietf.org/html/rfc4578#
https://tools.ietf.org/html/rfc5071option arch code 93 = unsigned integer 16; # Client - RFC 4578, 2.1
option space pxelinux;
#option pxelinux.magic code 208 = string; # Server - RFC 5071, 3.2
#option pxelinux.configfile code 209 = text; # Server - RFC 5071, 4.2
#option pxelinux.pathprefix code 210 = text; # Server - RFC 5071, 5.2
#option pxelinux.reboottime code 211 = unsigned integer 32; # Server - RFC 5071, 6.2
site-option-space "pxelinux";
if exists dhcp-parameter-request-list {
# Always send the PXELINUX options (specified in hexadecimal, i.e.: 208=0xd0, 209=0xd1, etc.)
option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,d0,d1,d2,d3);
}
# Ref:
#
http://www.syslinux.org/wiki/index.php/PXELINUX#
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=720589# //NOTE// From DRBL 2.15, bootia32.efi and bootx64.efi could be the one from
# (1) syslinux (scripts/sbin/prepare-files-for-PXE-client)
# or
# (2) grub (drbl-gen-grub-efi-nb)
# Ref:
http://ipxe.org/cfg/platform. Thanks to Danny Russ for providing this.
if option arch = 00:00 {
# Intel x86PC or
# Raspberry Pi, which should not declare itself as an Intel x86PC.
# Ref:
https://kiljan.org/2019/11/16/arch-linux-arm-network-boot-on-raspberry-pi-4/ # We will overwrite it later in the class "raspberrypi".
filename "lpxelinux.0";
} else if option arch = 00:06 {
# EFI IA32
filename "bootia32.efi";
} else if option arch = 00:07 or
option arch = 00:09 {
# EFI BC or EFI x86-64
filename "bootx64.efi";
} else if option arch = 00:0a {
# armv7 (arm 32 bit)
filename "bootarm.efi";
} else if option arch = 00:0b or
option arch = 00:16 {
# aarch64 (arm 64 bit)
# Rockpro64 (
https://www.pine64.org/rockpro64) uses 00:16
filename "bootaa64.efi";
} else {
# Default to Intel x86PC
filename "lpxelinux.0";
}
class "raspberrypi" {
# Raspberry Pi, which should not declare itself as an Intel x86PC.
# However, we still can identify it by some methods.
# Ref:
https://kiljan.org/2019/11/16/arch-linux-arm-network-boot-on-raspberry-pi-4/ match if (
(
# Parameter list from Pi 3B ROM and old bootcode.bin
binary-to-ascii(10,8,",",option param-request-list) =
"43,60,67,128,129,130,131,132,133,134,135,66"
# Parameter list from Pi 3B+ ROM and newer bootcode.bin
or binary-to-ascii(10,8,",",option param-request-list) =
"43,60,67,128,129,130,131,132,133,134,135,66,1,3"
# Parameter list from Pi 4B EEPROM boot code (2019-10-16)
or binary-to-ascii(10,8,",",option param-request-list) =
"1,3,43,60,66,67,128,129,130,131,132,133,134,135"
)
and option vendor-class-identifier = "PXEClient:Arch:00000:UNDI:002001"
and option arch = 00:00 # Architecture: Intel x86PC
and (
substring(hardware,1,3) = b8:27:eb # Pi Foundation OUI listing
or substring(hardware,1,3) = dc:a6:32 # Raspberry Pi Trading Ltd OUI listing
)
);
# There are extra 3 spaces in the end for vendor-specific-info, due to a bug in bootrom for Raspberry Pi <= 3
# No need for Raspberry Pi 4, but it is OK to have that.
# Ref:
https://www.raspberrypi.org/documentation/hardware/raspberrypi/bootmodes/net.md option vendor-specific-info "Raspberry Pi Boot ";
# bootcode.bin is not used on the Raspberry Pi 4, because it has been replaced by boot code in the onboard EEPROM.
# Older model needs that.
# Ref:
https://www.raspberrypi.org/documentation/configuration/boot_folder.md filename "bootcode.bin";
}
## Uncomment the following "if block" when you have some buggy PXE NIC card (such as annoying sis900 NIC). Remember to modify the MAC vendor prefix and restart dhcpd service!!!
## This is a workround for some network card with BAD PXE code in firmware.
## It will only affect those clients with MAC vendor prefix you assigned.
## Ref:
http://syslinux.zytor.com/archives/2005-August/005640.html#if substring (option vendor-class-identifier, 0, 3) = "PXE" {
# # **************************************************************
# # ***MODIFY*** the MAC vendor prefix of client network card here.
# # **************************************************************
# # For annoying sis900 network card, maybe it is 00:07:95, 00:0C:6E...
# if substring (hardware, 1, 3) = 00:0C:6E {
# # sis900.zpxe is specially for sis900 NIC, you can download it from
# #
http://rom-o-matic.net/etherboot/etherboot-5.4.4/contrib/rom-o-matic# filename = "sis900.zpxe";
# }
#}
# Uncomment the following to get the debug/verbose messages in system log. The messages like the following will be shown:
# PXEClient:Arch:00009:UNDI:003016
# Begin of log command
#log ( info, vendor-class-identifier ) ;
# End of log command
# Uncomment the following to get the debug/verbose messages in system log. The messages like the following will be shown:
# Client 0:c:29:1d:9a:d1 with arch 0:7 requests 1:2:3:4:5:6:c:d:f:11:12:16:17:1c:28:29:2a:2b:32:33:36:3a:3b:3c:42:43:61:80:81:82:83:84:85:86:87 - PXEClient:Arch:00007:UNDI:003016 - no dhcp-client-id
# Client 0:c:29:e5:a4:2 with arch 0:0 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
# Client 0:c:29:3b:34:fb with arch 0:0 requests 1:3:6:c:f:1c:28:29:2a - DRBLClient - no dhcp-client-id
# Begin of log command
#log(info, concat("Client ",
# binary-to-ascii(16, 8, ":", substring(hardware, 1, 6)),
# " with arch ",
# binary-to-ascii(16, 8, ":", option arch),
# " 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"))
# );
# End of log command
# This class 'DRBL-Client' defines 3 kind of clients: PXE, Etherboot (1st stage) or DRBL client (2nd stage, i.e. in network initrd/initramfs (mkpxeinitrd-net)) to lease IP address. This will only affect 'range' statement only, not the 'host' statement.
# Note! The following line(s) in the pool statement: 'allow members of "DRBL-Client";' is/are commented to disable this mechanism by default.
# If you do want to use this mechanism, uncomment all 'allow members of "DRBL-Client";', then only PXE, etherboot and DRBL client can lease IP address from this DHCP service.
# ///NOTE/// In summary, two cases you can turn on this mechanism:
# (1) This DRBL server is not used as a clonezilla server.
# (2) This DRBL server is used as a Clonezilla server, with the following conditions:
# (a) 'range' statement is used in this DRBL service.
# (b) There is an existing DHCP service which can provide IP address leases to the restored OS (either GNU/inux or MS Windows) in the client. Otherwise if you uncomment 'allow members of "DRBL-Client";', restored OS won't be able to lease IP address.
# The DRBL client class: PXE, Etherboot or DRBL client
class "DRBL-Client" {
match if
(substring(option vendor-class-identifier, 0, 9) = "PXEClient") or
(substring(option vendor-class-identifier, 0, 9) = "Etherboot") or
(substring(option vendor-class-identifier, 0, 10) = "DRBLClient") ;
}
# If you want to use special port for DHCP service, edit here:
# For more info, ref:
http://drbl.sourceforge.net/faq/index.php#path=./2_System&entry=37_coexist_with_existing_dhcp.faq# local-port 1067;
# remote-port 1068;
subnet 192.168.23.0 netmask 255.255.255.0 {
option subnet-mask 255.255.255.0;
option routers 192.168.23.12;
option rpi-tftp-server "192.168.23.12";
next-server 192.168.23.12;
host st-192-168-23-101 {
hardware ethernet f44d30ec529b;
fixed-address 192.168.23.101;
# option host-name "st-192-168-23-101";
}
host st-192-168-23-102 {
hardware ethernet f44d30ec532e;
fixed-address 192.168.23.102;
# option host-name "st-192-168-23-102";
}
host st-192-168-23-103 {
hardware ethernet f44d30ec4d69;
fixed-address 192.168.23.103;
# option host-name "st-192-168-23-103";
}
host st-192-168-23-104 {
hardware ethernet f44d30ec509b;
fixed-address 192.168.23.104;
# option host-name "st-192-168-23-104";
}
host st-192-168-23-105 {
hardware ethernet f44d30eba53f;
fixed-address 192.168.23.105;
# option host-name "st-192-168-23-105";
}
host st-192-168-23-106 {
hardware ethernet f44d30ec8d30;
fixed-address 192.168.23.106;
# option host-name "st-192-168-23-106";
}
host st-192-168-23-107 {
hardware ethernet f44d30ec501d;
fixed-address 192.168.23.107;
# option host-name "st-192-168-23-107";
}
host st-192-168-23-108 {
hardware ethernet f44d30ec4ea4;
fixed-address 192.168.23.108;
# option host-name "st-192-168-23-108";
}
host st-192-168-23-109 {
hardware ethernet f44d30ec508c;
fixed-address 192.168.23.109;
# option host-name "st-192-168-23-109";
}
host st-192-168-23-110 {
hardware ethernet f44d30ec4d50;
fixed-address 192.168.23.110;
# option host-name "st-192-168-23-110";
}
host st-192-168-23-111 {
hardware ethernet f44d30ec5390;
fixed-address 192.168.23.111;
# option host-name "st-192-168-23-111";
}
host st-192-168-23-112 {
hardware ethernet f44d30ec5415;
fixed-address 192.168.23.112;
# option host-name "st-192-168-23-112";
}
host st-192-168-23-113 {
hardware ethernet f44d30ec591e;
fixed-address 192.168.23.113;
# option host-name "st-192-168-23-113";
}
host st-192-168-23-114 {
hardware ethernet f44d30ec4d3e;
fixed-address 192.168.23.114;
# option host-name "st-192-168-23-114";
}
host st-192-168-23-115 {
hardware ethernet f44d30ec583b;
fixed-address 192.168.23.115;
# option host-name "st-192-168-23-115";
}
host st-192-168-23-116 {
hardware ethernet f44d30ec51b0;
fixed-address 192.168.23.116;
# option host-name "st-192-168-23-116";
}
host st-192-168-23-117 {
hardware ethernet f44d30ec4eef;
fixed-address 192.168.23.117;
# option host-name "st-192-168-23-117";
}
host st-192-168-23-118 {
hardware ethernet f44d30ec53f5;
fixed-address 192.168.23.118;
# option host-name "st-192-168-23-118";
}
host st-192-168-23-119 {
hardware ethernet f44d30ec55a4;
fixed-address 192.168.23.119;
# option host-name "st-192-168-23-119";
}
host st-192-168-23-120 {
hardware ethernet f44d30ec57b6;
fixed-address 192.168.23.120;
# option host-name "st-192-168-23-120";
}
host st-192-168-23-121 {
hardware ethernet f44d30ec526c;
fixed-address 192.168.23.121;
# option host-name "st-192-168-23-121";
}
host st-192-168-23-122 {
hardware ethernet f44d30ec8aca;
fixed-address 192.168.23.122;
# option host-name "st-192-168-23-122";
}
host st-192-168-23-123 {
hardware ethernet f44d30eba2da;
fixed-address 192.168.23.123;
# option host-name "st-192-168-23-123";
}
host st-192-168-23-124 {
hardware ethernet f44d30ec5930;
fixed-address 192.168.23.124;
# option host-name "st-192-168-23-124";
}
host st-192-168-23-125 {
hardware ethernet 94c69190fb1b;
fixed-address 192.168.23.125;
# option host-name "st-192-168-23-125";
}
host st-192-168-23-126 {
hardware ethernet f44d30ec540b;
fixed-address 192.168.23.126;
# option host-name "st-192-168-23-126";
}
host st-192-168-23-127 {
hardware ethernet f44d30ec5130;
fixed-address 192.168.23.127;
# option host-name "st-192-168-23-127";
}
host st-192-168-23-128 {
hardware ethernet f44d30ec53d5;
fixed-address 192.168.23.128;
# option host-name "st-192-168-23-128";
}
host st-192-168-23-129 {
hardware ethernet f44d30ec5310;
fixed-address 192.168.23.129;
# option host-name "st-192-168-23-129";
}
host st-192-168-23-130 {
hardware ethernet f44d30ed721b;
fixed-address 192.168.23.130;
# option host-name "st-192-168-23-130";
}
host st-192-168-23-131 {
hardware ethernet F44D30EC8C09;
fixed-address 192.168.23.131;
# option host-name "st-192-168-23-131";
}
}
Alber Yang 在 2021年4月24日 星期六下午9:27:52 [UTC+8] 的信中寫道: