summaryrefslogtreecommitdiff
path: root/testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc
diff options
context:
space:
mode:
Diffstat (limited to 'testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc')
-rw-r--r--testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc/dhcpd.conf14
-rw-r--r--testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc/dnsmasq.conf7
-rwxr-xr-xtesting/tests/ikev2/dhcp-dynamic/hosts/venus/etc/init.d/dhcpd24
3 files changed, 45 insertions, 0 deletions
diff --git a/testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc/dhcpd.conf b/testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc/dhcpd.conf
new file mode 100644
index 000000000..2176af702
--- /dev/null
+++ b/testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc/dhcpd.conf
@@ -0,0 +1,14 @@
+# 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;
+}
diff --git a/testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc/dnsmasq.conf b/testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc/dnsmasq.conf
new file mode 100644
index 000000000..2d35dfd64
--- /dev/null
+++ b/testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc/dnsmasq.conf
@@ -0,0 +1,7 @@
+interface=eth0
+dhcp-range=10.1.0.50,10.1.0.60,255.255.0.0,10.1.255.255
+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-dynamic/hosts/venus/etc/init.d/dhcpd b/testing/tests/ikev2/dhcp-dynamic/hosts/venus/etc/init.d/dhcpd
new file mode 100755
index 000000000..4044dcc35
--- /dev/null
+++ b/testing/tests/ikev2/dhcp-dynamic/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 $?
+}