6.2. ネットワークブート用の DHCPv4 サーバーの設定
サーバー上で DHCP バージョン 4 (DHCPv4) サービスを有効にし、ネットワークブート機能を提供できるようにします。
前提条件
- IPv4 プロトコルを介したネットワークインストールを準備中である。
サーバーのネットワークアドレスがわかっている。
次の例では、サーバーには次の設定のネットワークインターフェイス
enp1s0があります。- IPv4 アドレス
- 192.168.124.2/24
- IPv4 ゲートウェイおよび DNS サーバー
- 192.168.124.1
手順
DHCP サーバーをインストールします。
# dnf install keaDHCPv4 サーバーをセットアップします。
/etc/kea/kea-dhcp4.confファイルに次の設定を入力します。アドレスはネットワークカードと一致するように置き換えます。{ "Dhcp4": { "interfaces-config": { "interfaces": [ "enp1s0" ] }, "subnet4": [ { "id": 1, "subnet": "192.168.124.0/24", "pools": [ { "pool": "192.168.124.100 - 192.168.124.200" } ], "option-data": [ { "space": "dhcp4", "name": "routers", "code": 3, "data": "192.168.124.10" }, { "space": "dhcp4", "name": "domain-name-servers", "code": 6, "data": "192.168.124.10" } ] } ], "client-classes": [ { "name": "uefi PXE Clients", "test": "substring(option[60].hex,0,9) == 'PXEClient' and option[93].hex == 0x0007", "next-server": "192.168.124.2", "boot-file-name": "/uefi/BOOT/BOOTX64.EFI" }, { "name": "bios PXE Clients", "test": "substring(option[60].hex,0,9) == 'PXEClient' and option[93].hex == 0x0000", "next-server": "192.168.124.2", "boot-file-name": "syslinux/pxelinux.0" }, { "name": "uefi HTTP Clients", "test": "substring(option[60].hex,0,10) == 'HTTPClient' and option[93].hex == 0x0007", "option-data": [ { "space": "dhcp4", "name": "vendor-class-identifier", "code": 60, "data": "HTTPClient" } ], "next-server": "192.168.124.2", "boot-file-name": "http://192.168.124.2/uefi/BOOT/BOOTX64.EFI" } ] } }DHCPv4 サービスを起動します。
# systemctl enable --now kea-dhcp4