summaryrefslogtreecommitdiff
path: root/testing/tests/ikev2/dhcp-static-client-id/hosts/venus
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tests/ikev2/dhcp-static-client-id/hosts/venus')
-rw-r--r--testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/dhcpd.conf25
-rw-r--r--testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/dnsmasq.conf9
-rwxr-xr-xtesting/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/init.d/dhcpd24
3 files changed, 58 insertions, 0 deletions
diff --git a/testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/dhcpd.conf b/testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/dhcpd.conf
new file mode 100644
index 000000000..44ee681b6
--- /dev/null
+++ b/testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/dhcpd.conf
@@ -0,0 +1,25 @@
+# dhcpd configuration file
+
+ddns-update-style none;
+
+subnet 10.1.0.0 netmask 255.255.0.0 {
+ option domain-name "strongswan.org";
+ option domain-name-servers 10.1.0.20;
+ option netbios-name-servers 10.1.0.10;
+ option routers 10.1.0.1;
+ option broadcast-address 10.1.255.255;
+ next-server 10.1.0.20;
+
+ range 10.1.0.50 10.1.0.60;
+}
+
+host carol {
+ option dhcp-client-identifier "carol@strongswan.org";
+ fixed-address 10.1.0.30;
+}
+
+host dave {
+ option dhcp-client-identifier "dave@strongswan.org";
+ fixed-address 10.1.0.40;
+}
+
diff --git a/testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/dnsmasq.conf b/testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/dnsmasq.conf
new file mode 100644
index 000000000..5672236a0
--- /dev/null
+++ b/testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/dnsmasq.conf
@@ -0,0 +1,9 @@
+interface=eth0
+dhcp-range=10.1.0.50,10.1.0.60,255.255.0.0,10.1.255.255
+dhcp-host=id:carol@strongswan.org,10.1.0.30
+dhcp-host=id:dave@strongswan.org,10.1.0.40
+dhcp-option=option:router,10.1.0.1
+dhcp-option=option:dns-server,10.1.0.20
+dhcp-option=option:netbios-ns,10.1.0.10
+dhcp-option=option:domain-name,strongswan.org
+log-dhcp
diff --git a/testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/init.d/dhcpd b/testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/init.d/dhcpd
new file mode 100755
index 000000000..4044dcc35
--- /dev/null
+++ b/testing/tests/ikev2/dhcp-static-client-id/hosts/venus/etc/init.d/dhcpd
@@ -0,0 +1,24 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+opts="start stop"
+
+depend() {
+ need net
+ need logger
+}
+
+start() {
+ ebegin "Starting DHCP server"
+ start-stop-daemon --start --quiet --exec /usr/sbin/dhcpd
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping DHCP server"
+ start-stop-daemon --stop --quiet --pidfile /var/run/dhcpd.pid
+ rm -f /var/state/dhcp/dhcpd.leases
+ touch /var/state/dhcp/dhcpd.leases
+ eend $?
+}