-
Notifications
You must be signed in to change notification settings - Fork 12
Developer guide: Comparing two DHCP configs
drkitty edited this page Feb 19, 2015
·
7 revisions
Before doing this, make sure the DHCP build directories are properly set.
- Build the
dhcpd.conf.data
file in the staging area by runningmanage.py dhcp_build
. - Compare that file to the Maintain config by running
manage.py dhcpd_compare2 $FILE1 $FILE2
. The differences will be printed to stdout. On my workstation this takes a little over an hour.
Here's an example diff produced by dhcpd_compare2
:
subnet 10.0.0.0 netmask 255.0.0.0 {
+pool {
+ range 10.4.0.0 10.4.100.0;
+}
}
-class "class1" {
- match hardware;
-}
-subclass "class1" 1:01:23:45:67:89:ab;
-subclass "class2" 1:01:23:45:67:89:ab;
+class "class3" {
+ match hardware;
+}
+subclass "class3" 1:55:55:55:55:55:55;
group { # group1
-host foo.oregonstate.edu {
- hardware ethernet 01:23:45:67:89:ab;
-}
+host glub.oregonstate.edu {
+ hardware ethernet 55:55:55:55:55:55;
+}
}
group { # group2
+option SUNW.install-server-ip-address 10.193.54.2;
}
Things only in the first file:
- class
class1
- subclass in
class2
for hardware address01:23:45:67:89:ab
- host
foo.oregonstate.edu
Things only in the second file:
- pool with IP range
10.4.0.0
–10.4.100.0
- class
class3
- host
glub.oregonstate.edu
- parameter
SUNW.install-server-ip-address 10.193.54.2
ingroup2