Today I had the pleasure to change 150 of our 200 DHCP pools. We had to extend it with an extra option (yea, this was quicker to make the changes by hand instead of writing/figuring out a way to do it by scripting) . When I was done I wanted to ‘quickly’ check my work for (human) errors and came up with the following “quick” check:
#
#$ FTTH XXX customers XXXX
#
subnet 77.x.x.128 netmask 255.255.255.128 {
option subnet-mask 255.255.255.128;
option broadcast-address 77.x.x.255;
option routers 77.x.x.129;
option domain-name "xxxxxxxxx.xx";
option domain-name-servers x.x.x.x, x.x.x.x;
option 6rd 17 41 0x2a02 0x80c0 0xfe00 0 0 0 0 0 x.x.x.2;
pool {
allow members of "max-lease-per-service";
max-lease-time 1810;
default-lease-time 1810;
deny dynamic bootp clients;
range 77.x.x.130 77.x.x.254;
}
}
The 6rd line is the one we added. I wanted to check if specific (networkid/17) pools we all had an 6rd line:
Normally I use grep, so i glanced at the man page and came up with:
Continue reading »