Как вы уже наверно поняли пытаюсь раздавать ip по порту комутатора, сделал следущее:
1) Поставил ISC-DHCP из портов, компилил с USE_SOCKETS
Код: Выделить всё
dhcpd -v
Internet Systems Consortium DHCP Server V3.0.5
....
Код: Выделить всё
dhcpd_enable="YES"
dhcpd_conf="/usr/local/etc/dhcpd.conf"
dhcpd_ifaces="eth0"
Код: Выделить всё
ddns-update-style none;
default-lease-time 600;
max-lease-time 7200;
log-facility local7;
local-address 192.168.2.50;
if exists agent.circuit-id
{
log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".", leased-address),
" raw option-82 info is CID: ", binary-to-ascii (10, 8, ".", option agent.circuit-id), " AID: ",
binary-to-ascii(16, 8, ".", option agent.remote-id)));
}
subnet 192.168.2.0 netmask 255.255.255.0 {
deny unknown-clients;
}
subnet 192.168.1.0 netmask 255.255.255.0 {
class "port-12" {
match if binary-to-ascii (10, 8, "", suffix( option agent.circuit-id, 1)) = "12";
}
pool {
range 192.168.1.12;
allow members of "port-12";
}
}
Код: Выделить всё
/usr/local/etc/rc.d/isc-dhcpd start
Код: Выделить всё
netstat -an
...........
udp4 0 0 192.168.2.50.67 *.*
...........
Код: Выделить всё
DES-3028:4#show dhcp_relay
Command: show dhcp_relay
DHCP/BOOTP Relay Status : Enabled
DHCP/BOOTP Hops Count Limit : 4
DHCP/BOOTP Relay Time Threshold : 0
DHCP Relay Agent Information Option 82 State : Enabled
DHCP Relay Agent Information Option 82 Check : Disabled
DHCP Relay Agent Information Option 82 Policy : Replace
Interface Server 1 Server 2 Server 3 Server 4
------------ --------------- --------------- --------------- --------------
System 192.168.2.50
/var/log/dhcpd.log
Код: Выделить всё
Jul 21 22:38:59 gate dhcpd: Lease for 192.168.2.40 raw option-82 info is CID: 0.4.0.1.0.12 AID: 0.6.0.1c.f0.9e.66.6b
Jul 21 22:38:59 gate dhcpd: DHCPDISCOVER from 00:16:e6:32:df:da via 192.168.2.100: unknown client
Вообще есть предположение что я не верно оформил class в dhcpd.conf , ну как уже только не пробывал, со всех форумов конфиги брал, чтто тока не делал ... руки опускаются
