Добрый день.
Бьюсь с option 82 + ICS DHCP
Опции с коммутатора приходят, но выдается не тот адрес.
Вот конфиг
local-address 10.0.0.40;if exists agent.circuit-id
{
log (
info, concat( " Lease for ",
binary-to-ascii (10, 8, ".", leased-address),
" Swith port: ",
binary-to-ascii (10, 8, ".", option agent.circuit-id),
" Switch MAC: ",
binary-to-ascii (16, 8, ":", suffix ( option agent.remote-id, 6)),
" Switch IP: ",
binary-to-ascii(10, 8, ".", packet(24, 4)),
" VLAN: ",
binary-to-ascii (10, 16, "", substring( option agent.circuit-id, 2, 2)),
" MAC on the port: ",
binary-to-ascii (16, 8, ":", substring(hardware, 1, 7))
)
);
}
# Office
subnet 10.0.125.0 netmask 255.255.255.0 {
class "office" {
match if binary-to-ascii (10 , 16 , "" , substring( option agent.circuit-id , 2 , 2)) ="4000";
}
option dhcp-server-identifier 10.0.0.40;
option domain-name-servers 93.170.56.131;
authoritative;
deny client-updates;
allow unknown-clients;
ddns-updates on;
ddns-rev-domainname "office.local";
option routers 10.0.125.1;
pool {
range 10.0.125.3 10.0.125.254;
allow members of "office";
}
}
# 10.0.0.0
subnet 10.0.0.0 netmask 255.255.255.0 {
deny unknown-clients;
pool {
range 10.0.0.250 10.0.0.250;
}
}
key 123 {
secret 8972349289347892739472983749;
algorithm hmac-md5;
}
в логе появляется что клиент получает адрес, но не из той подсети, которая нужна
вот кусок лога
Jun 19 11:44:13 localhost dhcpd: Lease for 10.0.0.250 Swith port: 0.4.15.160.0.3 Switch MAC: 2d:31:38:2d:30:64 Switch IP: 10.0.0.4 VLAN: 4000 MAC on the port: 0:c:42:12:91:be
Jun 19 11:44:13 localhost dhcpd: DHCPREQUEST for 10.0.0.250 from 00:0c:42:12:91:be (router router) via 10.0.0.4
Jun 19 11:44:13 localhost dhcpd: DHCPACK on 10.0.0.250 to 00:0c:42:12:91:be (router router) via 10.0.0.4