в конфиг свича добавляете:
Код:
config dhcp_relay add ipif System 10.90.90.254
config dhcp_relay option_82 state enable
enable dhcp_relay
в конфиг сервера пишите:
Код:
authoritative;
ddns-update-style none;
default-lease-time 3600;
max-lease-time 3600;
min-lease-time 3600;
one-lease-per-client on;
deny duplicates;
deny bootp;
ping-check off;
option arp-cache-timeout 3600;
option netbios-node-type 1;
include "/usr/local/etc/dhcp/conf/1.0.class";
include "/usr/local/etc/dhcp/conf/2.0.class";
include "/usr/local/etc/dhcp/conf/3.0.class";
shared-network "clients" {
subnet 10.90.90.0 netmask 255.255.255.0 { }
subnet 192.168.1.0 netmask 255.255.255.0 {
option routers 192.168.1.1;
option domain-name-servers 192.168.1.1;
include "/usr/local/etc/dhcp/conf/1.0.subnet";
}
subnet 192.168.2.0 netmask 255.255.255.0 {
option routers 192.168.2.1;
option domain-name-servers 192.168.2.1;
include "/usr/local/etc/dhcp/conf/2.0.subnet";
}
subnet 192.168.3.0 netmask 255.255.255.0 {
option routers 192.168.3.1;
option domain-name-servers 192.168.3.1;
include "/usr/local/etc/dhcp/conf/3.0.subnet";
}
}
файл /usr/local/etc/dhcp/conf/1.0.class выглядит так:
Код:
# host template
#class "10.90.90.x:y" { match if concat(binary-to-ascii(10, 8, ".", packet(24, 4)), ":", binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1))) = "10.90.90.x:y"; }
class "10.90.90.10:1" { match if concat(binary-to-ascii(10, 8, ".", packet(24, 4)), ":", binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1))) = "10.90.90.10:1"; }
class "10.90.90.10:2" { match if concat(binary-to-ascii(10, 8, ".", packet(24, 4)), ":", binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1))) = "10.90.90.10:2"; }
class "10.90.90.10:3" { match if concat(binary-to-ascii(10, 8, ".", packet(24, 4)), ":", binary-to-ascii(10, 8, "", suffix(option agent.circuit-id, 1))) = "10.90.90.10:3"; }
файл /usr/local/etc/dhcp/conf/1.0.subnet выглядит так:
Код:
# host template
#pool { range 192.168.1.z; allow members of "10.90.90.x:y"; } # %username%
pool { range 192.168.1.5; allow members of "10.90.90.10:1"; } # Vasya
pool { range 192.168.1.6; allow members of "10.90.90.10:2"; } # Petya
pool { range 192.168.1.7; allow members of "10.90.90.10:3"; } # Sasha
остальные файлы your.network.class/subnet выглядят аналогично ...
запускаете и смотрите (-: