This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
appnote:premature [2018/01/05 16:51] stappers created, copy of dhcpd with premature header, work in progress |
appnote:premature [2018/07/05 21:36] mcb30 |
||
---|---|---|---|
Line 7: | Line 7: | ||
Please don't link to this premature page | Please don't link to this premature page | ||
- | ====== Using ISC dhcpd ====== | + | ====== Using dnsmasq ====== |
- | [[http://www.isc.org/software/dhcp|ISC dhcpd]] is the default DHCP server on most Linux distributions. It can easily be configured to support iPXE. | + | [[http://thekelleys.org.uk/dnsmasq/doc.html|dnsmasq]] provides network infrastructure for small networks: DNS, DHCP, router advertisement and network boot. |
+ | It can be configured to support iPXE. | ||
- | ISC dhcpd is configured using the file ''/etc/dhcpd.conf''. You can instruct iPXE to boot using the ''filename'' directive: | + | Dnsmasq is configured using the file ''/etc/dnsmasq.conf''. You can instruct iPXE to boot using the ''dhcp-boot'' directive: |
- | filename "pxelinux.0"; | + | dhcp-boot=pxelinux.0 |
or | or | ||
- | filename "http://boot.ipxe.org/demo/boot.php"; | + | dhcp-boot=http://boot.ipxe.org/demo/boot.php |
- | To boot from a SAN, you must use the ''option root-path'' directive instead of ''filename'': | ||
- | filename ""; | ||
- | option root-path "iscsi:iscsi.example.com::::iqn.1992-01.com.example.iscsi:target"; | ||
- | or | + | ===== TFTP server ===== |
- | filename ""; | + | Work in progress WIP FIXME text to ADD |
- | option root-path "aoe:e0.0"; | + | |
===== PXE chainloading ===== | ===== PXE chainloading ===== | ||
- | {{ :clipart:chain.jpeg?200x96|A chain}} | + | {{ :clipart:chain.jpeg?200x120|A chain}} |
- | To use [[:howto:chainloading|PXE chainloading]], you need to set up ISC dhcpd to hand out [[http://boot.ipxe.org/undionly.kpxe|undionly.kpxe]] to legacy PXE clients, and then hand out the "real" boot configuration only to iPXE clients. You can do this by telling ISC dhcpd to use different configurations based on the DHCP user class: | + | To use [[:howto:chainloading|PXE chainloading]], you need to set up ISC dhcpd to hand out [[http://boot.ipxe.org/undionly.kpxe|undionly.kpxe]] to legacy PXE clients, and then hand out the "real" boot configuration only to iPXE clients. You can do this by telling dnsmasq to use different configurations based on the DHCP user class: |
- | if exists user-class and option user-class = "iPXE" { | + | dhcp-boot=undionly.kpxe |
- | filename "http://my.web.server/real_boot_script.php"; | + | dhcp-match=set:iPXE,175 |
- | } else { | + | dhcp-boot=tag:iPXE,http://my.web.server/real_boot_script.php |
- | filename "undionly.kpxe"; | + | |
- | } | + | |
- | This will ensure that the iPXE image (''undionly.kpxe'') is handed out only when the DHCP request comes from a legacy PXE client. Once iPXE has been loaded, the DHCP server will direct it to boot from ''%%http://my.web.server/real_boot_script.php%%''. You should replace ''%%filename "http://my.web.server/real_boot_script.php"%%'' with whatever you want iPXE to boot from. For example, if you want to chainload into iPXE and then boot from an iSCSI target, you could use: | + | This will ensure that the iPXE image (''undionly.kpxe'') is handed out only when the DHCP request comes from a legacy PXE client. Once iPXE has been loaded, the DHCP server will direct it to boot from ''%%http://my.web.server/real_boot_script.php%%''. You should replace ''%%filename "http://my.web.server/real_boot_script.php"%%'' with whatever you want iPXE to boot from. |
- | if exists user-class and option user-class = "iPXE" { | ||
- | filename ""; | ||
- | option root-path "iscsi:iscsi.example.com::::iqn.1992-01.com.example.iscsi:target"; | ||
- | } else { | ||
- | filename "undionly.kpxe"; | ||
- | } | ||
===== iPXE-specific options ===== | ===== iPXE-specific options ===== | ||
There are several DHCP options that are specific to iPXE and that are not recognised by the standard ISC dhcpd installation. To add support for these options, place the following at the start of your ''/etc/dhcpd.conf'': | There are several DHCP options that are specific to iPXE and that are not recognised by the standard ISC dhcpd installation. To add support for these options, place the following at the start of your ''/etc/dhcpd.conf'': | ||
+ | |||
+ | Work in progress WIP FIXME text to REMOVE | ||
option space ipxe; | option space ipxe; | ||
Line 96: | Line 87: | ||
option ipxe.sdi code 40 = unsigned integer 8; | option ipxe.sdi code 40 = unsigned integer 8; | ||
option ipxe.nfs code 41 = unsigned integer 8; | option ipxe.nfs code 41 = unsigned integer 8; | ||
+ | |||
+ | Work in progress WIP FIXME text to REMOVE | ||
+ | |||
+ | ===== Proxy DHCP ===== | ||
+ | |||
+ | Work in progress WIP FIXME text to ADD | ||
+ | |||
+ | dhcp-range=proxy | ||
===== Speeding up DHCP ===== | ===== Speeding up DHCP ===== | ||
+ | |||
+ | Work in progress WIP FIXME | ||
The PXE specification requires iPXE to wait for replies from a ProxyDHCP server before booting. If you are not using a ProxyDHCP server, then this creates an unnecessary delay of several seconds. You can eliminate this delay using: | The PXE specification requires iPXE to wait for replies from a ProxyDHCP server before booting. If you are not using a ProxyDHCP server, then this creates an unnecessary delay of several seconds. You can eliminate this delay using: | ||
- | option ipxe.no-pxedhcp 1; | + | option ipxe.no-pxedhcp 1; FIXME |
(Do not do this if you **are** using a ProxyDHCP server; it will cause iPXE to ignore whatever the ProxyDHCP server sends!) | (Do not do this if you **are** using a ProxyDHCP server; it will cause iPXE to ignore whatever the ProxyDHCP server sends!) | ||
===== Testing for specific features ===== | ===== Testing for specific features ===== | ||
+ | |||
+ | FIXME | ||
You can use the feature indicator options to determine whether or not iPXE supports a specific feature. For example, | You can use the feature indicator options to determine whether or not iPXE supports a specific feature. For example, |