[Kea-users] pxe booting
Andrew Meyer
andrewm659 at yahoo.com
Mon Apr 1 17:17:32 UTC 2024
Hello,I'm in the process of switching my ISC-DHCPd server running on RaspberrryPi and CentOS/RHEL to KEA. However i'm having trouble with getting PXE boot configured with this. I am using vmwarre / Proxmox for virtual machines and cobbler to do installations.
I am using these sites as reference for pxe boot config but it doesn't seem to be working.
https://www.growse.com/2018/08/29/pxe-booting-a-raspberry-pi.html
https://forum.ipxe.org/showthread.php?tid=7986
https://superuser.com/questions/1805388/pxe-boot-esxi-8-on-intel-nuc-12
https://lists.isc.org/pipermail/kea-users/2022-February/003353.html
Here is what I have configured in the current isc-dhcpd setup for pxe boot.
allow booting;
allow bootp;
always-broadcast on;
# class "vmware" { match if binary-to-ascii(16,8,":",substring(hardware, 1, 2)) = "00:29:1b"; }
class "pxeclients" { match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; next-server 10.1.2.3; if option arch = 00:06 { filename "grub/grub-x86.efi"; } else if option arch = 00:07 { filename "grub/grub-x86_64.efi"; } else if option arch = 00:09 { filename "grub/grub-x86_64.efi"; } else { filename "pxelinux.0"; }}
if exists user-class and option user-class = "iPXE" {
filename "http://10.1.2.3/cblr/svc/op/gpxe/system/[system]" ;
} elsif option arch != 00:00 {
filename "gpxe/snponly.efi" ;
} else {
filename "gpxe/undionly.kpxe" ;
}
}
Here is what I put in my kea-dhcpd4.conf {
"Dhcp4": {
"client-classes": [
{
"name": "XClient_iPXE",
"test": "substring(option[77].hex,0,4) == 'iPXE'",
"boot-file-name": "http://<ServerIP>:<ServerPort>/<path>/<PHPfile>"
},
{
"name": "UEFI-32-1",
"test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00006'",
"boot-file-name": "ipxe/i386/ipxe.efi"
},
{
"name": "UEFI-32-2",
"test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00002'",
"boot-file-name": "ipxe/i386/ipxe.efi"
},
{
"name": "UEFI-64-1",
"test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00007'",
"boot-file-name": "ipxe/x86_64/ipxe.efi"
},
{
"name": "UEFI-64-2",
"test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00008'",
"boot-file-name": "ipxe/x86_64/ipxe.efi"
},
{
"name": "UEFI-64-3",
"test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00009'",
"boot-file-name": "ipxe/x86_64/ipxe.efi"
},
{
"name": "Legacy",
"test": "substring(option[60].hex,0,20) == 'PXEClient:Arch:00000'",
"boot-file-name": "ipxe/undionly.kpxe"
}
],
"interfaces-config": { "interfaces": [] },
"control-socket": {
"socket-type": "unix",
"socket-name": "/run/kea/kea4-ctrl-socket"
},
"lease-database": {
"type": "memfile",
"lfc-interval": 3600,
"name": "/var/lib/kea/kea-leases4.csv"
},
"expired-leases-processing": {
"reclaim-timer-wait-time": 10,
"flush-reclaimed-timer-wait-time": 25,
"hold-reclaimed-time": 3600,
"max-reclaim-leases": 100,
"max-reclaim-time": 250,
"unwarned-reclaim-cycles": 5
},
"valid-lifetime": 600,
"max-valid-lifetime": 7200,
"subnet4": [
{
"id": 1,
"subnet": "10.150.1.0/24",
"next-server": "10.150.10.17",
"boot-file-name": "/pxeboot/pxelinux.0",
"pools": [ { "pool": "10.150.1.100 - 10.150.1.200" } ],
"option-data": [
{
"name": "routers",
"data": "10.150.1.2"
},
{
"name": "domain-name-servers",
"data": "10.150.10.20, 10.150.20.10, 1.1.1.1"
},
{
"name": "domain-name",
"code": 15,
"data": "example.net"
},
{
"name": "domain-search",
"data": "example.net, example.co"
}
],
"reservations": [ { "hw-address": "1a:1b:1c:1d:1e:1f", "ip-address": "10.150.1.180", "option-data": [ { "name": "domain-name-servers", "data": "10.150.10.20, 1.1.1.1" } ] } ]
},
{
"id": 2,
"subnet": "10.150.10.0/23",
"next-server": "10.150.10.17",
"boot-file-name": "/home/nfs/export/pxelinux.0",
"pools": [ { "pool": "10.150.10.100 - 10.150.11.200" } ],
"option-data": [
{
"name": "routers",
"data": "10.150.10.1"
},
{
"name": "domain-name-servers",
"data": "10.150.10.20, 10.150.20.10, 1.1.1.1"
},
{
"name": "domain-name",
"code": 15,
"data": "example.net"
},
{
"name": "domain-search",
"data": "example.net, example.co"
}
],
"reservations": [
{
"hw-address": "1a:1b:1c:1d:1e:1f",
"ip-address": "10.150.10.180",
"option-data": [
{
"name": "domain-name-servers",
"data": "10.150.10.20, 1.1.1.1"
}
]
}
]
},
{
"id": 3,
"subnet": "10.150.100.0/24",
"pools": [ { "pool": "10.150.100.10 - 10.150.100.250" } ],
"option-data": [
{
"name": "routers",
"data": "10.150.100.1"
},
{
"name": "domain-name-servers",
"data": "10.150.10.20, 10.150.20.10, 1.1.1.1"
},
{
"name": "domain-name",
"code": 15,
"data": "example.net"
},
{
"name": "domain-search",
"data": "example.net, example.co"
}
],
"reservations": [
{
"hw-address": "1a:1b:1c:1d:1e:1f",
"ip-address": "10.150.100.180",
"option-data": [
{
"name": "domain-name-servers",
"data": "10.150.10.20, 1.1.1.1"
}
]
}
]
},
{
"id": 4,
"subnet": "10.150.20.0/24",
"next-server": "10.150.10.17",
"boot-file-name": "/home/nfs/export/pxelinux.0",
"pools": [ { "pool": "10.150.20.100 - 10.150.20.200" } ],
"option-data": [
{
"name": "routers",
"data": "10.150.20.1"
},
{
"name": "domain-name-servers",
"data": "10.150.10.20, 10.150.20.10, 1.1.1.1"
},
{
"name": "domain-name",
"code": 15,
"data": "example.net"
},
{
"name": "domain-search",
"data": "example.net, example.co"
}
],
"reservations": [
{
"hw-address": "1a:1b:1c:1d:1e:1f",
"ip-address": "10.150.20.180",
"option-data": [
{
"name": "domain-name-servers",
"data": "10.150.10.20, 1.1.1.1"
}
]
}
]
}
],
"loggers": [
{
"name": "kea-dhcp4",
"output_options": [
{
"output": "/tmp/kea-dhcp4.log",
"maxsize": 1048576,
"maxver": 8
}
],
"severity": "INFO"
},
{
"name": "kea-dhcp4.packets",
"output_options": [
{
"output": "/tmp/kea-dhcp4-packets.log",
"maxver": 10
}
],
"severity": "DEBUG",
"debuglevel": 99
}
]
}
}
Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/kea-users/attachments/20240401/be259943/attachment-0001.htm>
More information about the Kea-users
mailing list