]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Test failover initial synchronization, etc.
authorTed Lemon <source@isc.org>
Wed, 18 Apr 2001 18:38:05 +0000 (18:38 +0000)
committerTed Lemon <source@isc.org>
Wed, 18 Apr 2001 18:38:05 +0000 (18:38 +0000)
tests/failover/dhcp-1.cf [new file with mode: 0644]
tests/failover/dhcp-2.cf [new file with mode: 0644]
tests/failover/new-failover [new file with mode: 0755]

diff --git a/tests/failover/dhcp-1.cf b/tests/failover/dhcp-1.cf
new file mode 100644 (file)
index 0000000..9e5f869
--- /dev/null
@@ -0,0 +1,89 @@
+authoritative;
+
+lease-file-name "dhcp-1.leases";
+pid-file-name "dhcp-1.pid";
+ddns-update-style none;
+local-port 50002;
+
+default-lease-time 600;
+max-lease-time 600;
+
+failover peer "foo" {
+  primary;
+  address 10.0.0.1;
+  port 519;
+  peer address 10.0.0.1;
+  peer port 520;
+  max-response-delay 7;
+  max-unacked-updates 10;
+  mclt 100;
+  hba ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:ff:
+      00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00;
+  load balance max seconds 2;
+}
+
+option space SUNW;
+option SUNW.root-mount-options code 1 = text;
+option SUNW.root-server-ip-address code 2 = ip-address;
+option SUNW.root-server-hostname code 3 = text;
+option SUNW.root-path-name code 4 = text;
+option SUNW.swap-server-ip-address code 5 = ip-address;
+option SUNW.swap-file-path code 6 = text;
+option SUNW.boot-file-path code 7 = text;
+option SUNW.posix-timezone-string code 8 = text;
+option SUNW.boot-read-size code 9 = unsigned integer 16;
+option SUNW.install-server-ip-address code 10 = ip-address;
+option SUNW.install-server-hostname code 11 = text;
+option SUNW.install-path code 12 = text;
+option SUNW.sysid-config-file-server code 13 = text;
+option SUNW.JumpStart-server code 14 = text;
+option SUNW.terminal-name code 15 = text;
+
+class "solaris-i86pc" {
+  match if option vendor-class-identifier = "SUNW.i86pc";
+  vendor-option-space SUNW;
+  option SUNW.boot-file-path "/platform/i86pc/kernel/unix";
+  option SUNW.root-path-name "/export/root/i86pc";
+}
+
+class "solaris-sun4u" {
+  match if option vendor-class-identifier = "SUNW.Ultra-5_10";
+  vendor-option-space SUNW;
+  option SUNW.install-path "/export/2/s581_sparc";
+  option SUNW.root-path-name "/export/2/s581_sparc/Solaris_8/Tools/Boot";
+}
+
+option domain-name "connectathon.org.";
+option SUNW.root-server-ip-address 172.16.113.1;
+option SUNW.root-server-hostname "sundhcp-server17-1";
+
+key FOO {
+  algorithm HMAC-MD5.SIG-ALG.REG.INT;
+  secret ABCD;
+}
+
+zone BISBEE.FUGUE.COM. {
+  primary 127.0.0.1;
+  key FOO;
+}
+
+zone 17.127.10.in-addr.arpa. {
+  primary 127.0.0.1;
+  key FOO;
+}
+
+zone 0.0.10.in-addr.arpa. {
+  primary 127.0.0.1;
+  key FOO;
+}
+
+subnet 10.0.0.0 netmask 255.255.255.0 {
+  pool {
+    deny dynamic bootp clients;
+    failover peer "foo";
+    range 10.0.0.10 10.0.0.200;
+  }
+  option routers 10.0.0.1;
+  option domain-name "bisbee.fugue.com";
+  option domain-name-servers 10.0.0.1;
+}
diff --git a/tests/failover/dhcp-2.cf b/tests/failover/dhcp-2.cf
new file mode 100644 (file)
index 0000000..33eb0f6
--- /dev/null
@@ -0,0 +1,88 @@
+authoritative;
+
+lease-file-name "dhcp-2.leases";
+pid-file-name "dhcp-2.pid";
+local-port 50000;
+
+ddns-update-style none;
+
+default-lease-time 600;
+max-lease-time 600;
+
+failover peer "foo" {
+  secondary;
+  address 10.0.0.1;
+  port 520;
+  peer address 10.0.0.1;
+  peer port 519;
+  max-response-delay 7;
+  max-unacked-updates 10;
+  mclt 100;
+  load balance max seconds 2;
+}
+
+option space SUNW;
+option SUNW.root-mount-options code 1 = text;
+option SUNW.root-server-ip-address code 2 = ip-address;
+option SUNW.root-server-hostname code 3 = text;
+option SUNW.root-path-name code 4 = text;
+option SUNW.swap-server-ip-address code 5 = ip-address;
+option SUNW.swap-file-path code 6 = text;
+option SUNW.boot-file-path code 7 = text;
+option SUNW.posix-timezone-string code 8 = text;
+option SUNW.boot-read-size code 9 = unsigned integer 16;
+option SUNW.install-server-ip-address code 10 = ip-address;
+option SUNW.install-server-hostname code 11 = text;
+option SUNW.install-path code 12 = text;
+option SUNW.sysid-config-file-server code 13 = text;
+option SUNW.JumpStart-server code 14 = text;
+option SUNW.terminal-name code 15 = text;
+
+class "solaris-i86pc" {
+  match if option vendor-class-identifier = "SUNW.i86pc";
+  vendor-option-space SUNW;
+  option SUNW.boot-file-path "/platform/i86pc/kernel/unix";
+  option SUNW.root-path-name "/export/root/i86pc";
+}
+
+class "solaris-sun4u" {
+  match if option vendor-class-identifier = "SUNW.Ultra-5_10";
+  vendor-option-space SUNW;
+  option SUNW.install-path "/export/2/s581_sparc";
+  option SUNW.root-path-name "/export/2/s581_sparc/Solaris_8/Tools/Boot";
+}
+
+option domain-name "connectathon.org.";
+option SUNW.root-server-ip-address 172.16.113.1;
+option SUNW.root-server-hostname "sundhcp-server17-1";
+
+key FOO {
+  algorithm HMAC-MD5.SIG-ALG.REG.INT;
+  secret ABCD;
+}
+
+zone BISBEE.FUGUE.COM. {
+  primary 127.0.0.1;
+  key FOO;
+}
+
+zone 17.127.10.in-addr.arpa. {
+  primary 127.0.0.1;
+  key FOO;
+}
+
+zone 0.0.10.in-addr.arpa. {
+  primary 127.0.0.1;
+  key FOO;
+}
+
+subnet 10.0.0.0 netmask 255.255.255.0 {
+  pool {
+    deny dynamic bootp clients;
+    failover peer "foo";
+    range 10.0.0.10 10.0.0.200;
+  }
+  option routers 10.0.0.1;
+  option domain-name "bisbee.fugue.com";
+  option domain-name-servers 10.0.0.1;
+}
diff --git a/tests/failover/new-failover b/tests/failover/new-failover
new file mode 100755 (executable)
index 0000000..5176985
--- /dev/null
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+foo=10
+while [ $foo -lt 100 ]; do
+  cat >>dhcp-1.leases <<~
+lease 10.0.0.$foo {
+  starts 4 2001/04/16 02:19:16;
+  ends 5 2001/04/18 02:29:16;
+  binding state active;
+  next binding state free;
+  hardware ethernet 08:00:46:06:6c:23;
+  uid "test-198";
+}
+~
+  foo=`expr $foo + 1`
+  cat >>dhcp-2.leases <<~
+lease 10.0.0.$foo {
+  starts 4 2001/04/16 02:19:16;
+  ends 5 2001/04/18 02:29:16;
+  binding state active;
+  next binding state free;
+  hardware ethernet 08:00:46:06:6c:23;
+  uid "test-198";
+}
+~
+  foo=`expr $foo + 1`
+done
+