5 open NAMES, "switches.txt"
6 or die "switches.txt: $!";
9 /87\.76\.(\d+\.\d+)\s+(\d+)\s+(\S+)/ or next;
18 # Autogenerated by make-dhcpd.pl. Do not edit manually!
20 option domain-name "tg07.gathering.org";
21 option domain-name-servers 87.76.254.2, 87.76.255.2;
23 ddns-update-style interim;
26 # dnssec-keygen -a HMAC-MD5 -b 128 -n HOST DHCP_UPDATER
28 algorithm HMAC-MD5.SIG-ALG.REG.INT;
29 secret F388UOhaIIKHRH9TDE5PTA==;
32 default-lease-time 14400;
36 subnet 87.76.254.0 netmask 255.255.255.0 {
40 subnet 87.76.255.0 netmask 255.255.255.0 {
43 zone 0.194.in-addr.arpa. {
51 my $domain = $net->{name};
53 my ($netmask, $numpc);
54 if ($net->{netmask} == 24) {
55 $netmask = "255.255.255.0";
57 } elsif ($net->{netmask} == 25) {
58 $netmask = "255.255.255.128";
60 } elsif ($net->{netmask} == 26) {
61 $netmask = "255.255.255.192";
64 die "Unknown netmask /" . $net->{netmask};
67 $net->{net} =~ /(\d+)\.(\d+)/ or die "Unknown net $net";
68 my ($majorsubnet,$minorsubnet) = ($1,$2);
70 # FIXME: Should use Net::CIDR
71 my $gw = "87.76.$majorsubnet." . ($minorsubnet + 1);
72 my $rangestart = "87.76.$majorsubnet." . ($minorsubnet + 10);
73 my $rangeend = "87.76.$majorsubnet." . ($minorsubnet + $numpc - 2);
76 zone $domain.tg07.gathering.org. {
80 subnet 87.76.$net->{net} netmask $netmask {
84 range $rangestart $rangeend;
85 option domain-name "$domain.tg07.gathering.org";
86 ddns-domainname "$domain.tg07.gathering.org";
87 ignore client-updates;