Advertisement
Guest User

Untitled

a guest
Jun 11th, 2014
344
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.72 KB | None | 0 0
  1. cat global.template
  2. option domain-name "inet";
  3. option domain-name-servers 193.107.128.8;
  4. default-lease-time 3600;
  5. max-lease-time 43200;
  6. authoritative;
  7. ddns-update-style none;
  8. log-facility local7;
  9. one-lease-per-client true;
  10. deny duplicates;
  11. shared-network inet {
  12.  
  13. {SUBNETS}
  14.  
  15. subnet 192.168.168.0 netmask 255.255.255.0 {
  16. }
  17.  
  18. subnet 10.123.0.0 netmask 255.255.248.0 {
  19. default-lease-time 3600;
  20. option domain-name "citynet";
  21. option subnet-mask 255.255.248.0;
  22. option domain-name-servers 193.107.128.8;
  23. option routers 10.123.0.1;
  24.  
  25. pool {
  26. range 10.123.0.100 10.123.0.254;
  27. {DENYMEMBERS}
  28. }
  29.  
  30. log(info, "==");
  31. if exists agent.remote-id {
  32. set clip = binary-to-ascii(10,8,".",leased-address);
  33. set clremote = binary-to-ascii(16,8,"",option agent.remote-id);
  34. set clcircuit = binary-to-ascii(10,8,"",option agent.circuit-id);
  35.  
  36. log( info,concat("*Leased IP: ",clip, " SWITCH: ",clremote," PORT: ",clcircuit ," (with opt82)") );
  37. } else {
  38. set clhw = concat (
  39. suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,1,1))),2), ":",
  40. suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,2,1))),2), ":",
  41. suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,3,1))),2), ":",
  42. suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,4,1))),2), ":",
  43. suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,5,1))),2), ":",
  44. suffix (concat ("0", binary-to-ascii (16, 8, "", substring(hardware,6,1))),2)
  45. );
  46.  
  47. log( info,concat("*Leased IP: ",binary-to-ascii(10,8,".",leased-address), " MAC: ", clhw," (without opt82)") );
  48. }
  49. log(info, "==");
  50.  
  51.  
  52. }
  53.  
  54. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement