DHCP-сервер находится в другой сети. Я поднял виртуальную машину Linux, есть два интерфейса. Ошибка DHCPDISCOVER PACKET_NAK_0001.
На виртуальной машине Linux я выполняю команды:
dhcrelay ip_dhcp -i name_interface
dhclient -v name_interface -s ip_dhcp
Пример конфигурации, которую я отправляю через "curl":
{
"command": "config-set",
"service": [
"dhcp4"
],
"arguments": {
"Dhcp4": {
"option-def": [
{
"name": "configRevision",
"code": 254,
"type": "string",
"space": "dhcp4"
}
],
"interfaces-config": {
"interfaces": [
"*"
],
"dhcp-socket-type": "udp"
},
"control-socket": {
"socket-type": "unix",
"socket-name": "/tmp/kea-dhcp4-ctrl.sock"
},
"lease-database": {
"type": "postgresql",
"host": "host",
"name": "name",
"user": "name",
"password": "pass",
"port": 5432,
"lfc-interval": 600
},
"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": 3600,
"authoritative": true,
"hooks-libraries": [
{
"library": "/usr/local/lib/hooks/libdhcp_lease_cmds.so"
},
{
"library": "/usr/local/lib/hooks/libdhcp_stat_cmds.so"
}
],
"option-data": [
{
"name": "configRevision",
"code": 254,
"data": "1",
"always-send": false
},
{
"name": "domain-name-servers",
"data": "<IP>, <IP>",
"always-send": true
},
{
"name": "time-servers",
"data": "<IP>",
"always-send": true
},
{
"name": "ntp-servers",
"data": "<IP>",
"always-send": true
},
{
"name": "domain-name",
"data": "<DOMAIN>",
"always-send": true
},
{
"name": "dhcp-server-identifier",
"data": "<IP>"
}
],
"shared-networks": [
{
"name": "Zone 1",
"relay": {
"ip-addresses": [
"172.100.100.100",
"<IP>",
"<IP>",
"<IP>"
]
},
"option-data": [],
"subnet4": [
{
"id": 1314,
"subnet": "172.100.100.99/23",
"option-data": [
{
"name": "routers",
"data": "172.100.100.100"
}
],
"pools": [
{
"pool": "172.100.100.130-172.100.100.254",
"client-class": "UNKNOWN"
}
],
"valid-lifetime": 86400,
"reservations": []
}
]
}
]
}
}
Ожидаемый результат: Успешная выдача IP-адреса.
Фактический результат: ОШИБКА [kea-dhcp4.bad-packages / 26218] DHCP4_PACKET_NAK_0001 [hwtype = 1], cid = [нет информации], tid = 0x23acf436:не удалось выбрать подсеть для входящего пакета, src 172.100.100.100, введите DHCPDISCOVER