| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- option domain-name "lan.local";
- option domain-name-servers <NS1>, <NS2>;
- default-lease-time 28800;
- max-lease-time 86400;
- ddns-update-style none;
- ddns-updates off;
- one-lease-per-client true;
- authoritative;
- allow booting;
- allow bootp;
- log-facility local7;
- option log-servers <STAT>;
- option ntp-servers <NTP>;
- use-host-decl-names off;
- ping-check false;
- on commit {
- set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
- set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
- set ClientHostName = pick-first-value(option host-name,"undef");
- execute("/opt/Eye/scripts/dhcp-hook.sh", "add", ClientIP, ClientMac, ClientHostName);
- }
- on release {
- set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
- set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
- execute("/opt/Eye/scripts/dhcp-hook.sh", "del", ClientIP, ClientMac);
- }
- on expiry {
- set ClientIP = binary-to-ascii(10, 8, ".", leased-address);
- set ClientMac = binary-to-ascii(16, 8, ":", substring(hardware, 1, 6));
- execute("/opt/Eye/scripts/dhcp-hook.sh", "del", ClientIP, ClientMac);
- }
- log (info, concat("DHCPDLOG - ",binary-to-ascii(10, 8, ".", leased-address)," - ",pick-first-value(option host-name,"undef")," - ",binary-to-ascii (16, 8, ":", substring(hardware, 1, 7))," - at switch - ",binary-to-ascii(16,8,":",suffix(option agent.remote-id,6))," - vlan - ",binary-to-ascii(10,16,"",substring(suffix(option agent.circuit-id,4),0,2))," - port - ",binary-to-ascii(10,8,"",suffix (option agent.circuit-id, 1))," - via - ",binary-to-ascii(10,8,".",packet (24,4))));
- # WPAD definition
- option wpad code 252 = text;
- # Suppress WPAD activity - no cache, no DNS.
- option wpad "\n\000";
- option space MSFT;
- #release ip if shutdown
- option MSFT.release-on-shutdown code 2 = unsigned integer 32;
- class "MSFT" {
- match if substring(option vendor-class-identifier, 0, 4) = "MSFT";
- # They put 252 on the DHCPINFORM's, but not on the DHCPREQUEST's
- # PRL. So we over-ride the PRL to include 252 = 0xFC, which will also
- # suppress the DHCPINFORMS!
- option dhcp-parameter-request-list =
- concat(option dhcp-parameter-request-list, fc);
- # Make DHCP work on dual boot machines (Linux & Windows2000)
- # Microsoft proprietary stuff:
- send fqdn.server-update true;
- send fqdn.no-client-update true;
- vendor-option-space MSFT;
- option MSFT.release-on-shutdown 1;
- }
- shared-network "company" {
- #office
- subnet 192.168.1.0 netmask 255.255.255.0 {
- option routers 192.168.1.1;
- authoritative;
- include "/etc/dhcp/stat/192.168.1.0.conf";
- }
- }
|