#/etc/dhcpd.conf
local-address 10.7.1.107;
lease-file-name "/var/lib/dhcp3/dhcpd.leases";
one-lease-per-client true;
ddns-update-style none;
default-lease-time 172800;
max-lease-time 172800;
authoritative;
#authoritative;
log-facility local5;
if exists agent.circuit-id
{
log ( info, concat( "Lease for ", binary-to-ascii (10, 8, ".", leased-address), " is connected to interface ",
binary-to-ascii (10, 8, "/", suffix ( option agent.circuit-id, 2)), " (add 1 to port number!), VLAN ",
binary-to-ascii (10, 16, "", substring( option agent.circuit-id, 2, 2)), " on switch ",
binary-to-ascii(16, 8, ":", substring( option agent.remote-id, 2, 6))
,"IP" ,binary-to-ascii(10, 8, ".", packet(24, 4)) ));
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)));
}
option classes-static-route-ms code 249 = array of unsigned integer 8;
option classes-static-route code 121 = array of unsigned integer 8;
option domain-name-servers 192.168.1.1, 10.7.1.1;
include "/etc/dhcp3/dhcp_networks.conf";
#/etc/dhcp3/dhcp_networks.conf
shared-network Test {
subnet 10.7.1.0 netmask 255.255.255.0{}
###Клиентский айпишник:
subnet 10.20.114.0 netmask 255.255.255.0 {
option routers 10.20.114.1;
option subnet-mask 255.255.255.0;
option broadcast-address 10.20.114.255;
option classes-static-route-ms 8,10,10,20,114,1,16,192,168,10,20,114,1;
option classes-static-route 8,10,10,20,114,1,16,192,168,10,20,114,1;
include "/etc/dhcp3/10_7_1_33.conf";
}
#/etc/dhcp3/10_7_1_33.conf
#
class "24@10_7_1_33" {match if option agent.remote-id = 0:6:00:22:B0:50:9B:83 and option agent.circuit-id = 0:4:00:0A:0:18;}
pool {range 10.20.114.49; allow members of "24@10_7_1_33";}
pool {range 10.20.114.50; allow members of "24@10_7_1_33";}
Опоздал :)