virtual-ip-override scenario added
authorAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 25 May 2007 09:22:42 +0000 (09:22 -0000)
committerAndreas Steffen <andreas.steffen@strongswan.org>
Fri, 25 May 2007 09:22:42 +0000 (09:22 -0000)
testing/tests/ikev2/virtual-ip-override/description.txt [new file with mode: 0644]
testing/tests/ikev2/virtual-ip-override/evaltest.dat [new file with mode: 0644]
testing/tests/ikev2/virtual-ip-override/hosts/carol/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ikev2/virtual-ip-override/hosts/dave/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ikev2/virtual-ip-override/hosts/moon/etc/ipsec.conf [new file with mode: 0755]
testing/tests/ikev2/virtual-ip-override/posttest.dat [new file with mode: 0644]
testing/tests/ikev2/virtual-ip-override/pretest.dat [new file with mode: 0644]
testing/tests/ikev2/virtual-ip-override/test.conf [new file with mode: 0644]

diff --git a/testing/tests/ikev2/virtual-ip-override/description.txt b/testing/tests/ikev2/virtual-ip-override/description.txt
new file mode 100644 (file)
index 0000000..adb6550
--- /dev/null
@@ -0,0 +1,7 @@
+The roadwarriors <b>carol</b> and <b>dave</b> both set up a connection to gateway <b>moon</b>.
+The roadwarriors each unilaterally define a static virtual IP using the <b>leftsourceip</b>
+parameter. In order to detect potential address conflicts, the roadwarriors send
+their virtual IPs embedded in a configuration payload to <b>moon</b> for verification.
+In our scenario <b>carol</b> and <b>dave</b> both request the same IP address.
+These requests are overridden by gateway <b>moon</b> which assigns a
+distinct virtual IP to each road warrior.
diff --git a/testing/tests/ikev2/virtual-ip-override/evaltest.dat b/testing/tests/ikev2/virtual-ip-override/evaltest.dat
new file mode 100644 (file)
index 0000000..5216a53
--- /dev/null
@@ -0,0 +1,13 @@
+moon::ipsec statusall::rw.*ESTABLISHED.*carol@strongswan.org::YES
+moon::ipsec statusall::rw.*ESTABLISHED.*dave@strongswan.org::YES
+carol::ipsec statusall::home.*INSTALLED::YES
+dave::ipsec statusall::home.*INSTALLED::YES
+moon::cat /var/log/daemon.log::peer requested virtual IP PH_IP_CAROL1::YES
+moon::cat /var/log/daemon.log::peer requested virtual IP PH_IP_DAVE1::NO
+moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_CAROL1 to peer::YES
+moon::cat /var/log/daemon.log::assigning virtual IP PH_IP_DAVE1 to peer::YES
+carol::ip addr list dev eth0::PH_IP_CAROL1::YES
+carol::ip route list dev eth0::src PH_IP_CAROL1::YES
+dave::ip addr list dev eth0::PH_IP_DAVE1::YES
+dave::ip route list dev eth0::src PH_IP_DAVE1::YES
+
diff --git a/testing/tests/ikev2/virtual-ip-override/hosts/carol/etc/ipsec.conf b/testing/tests/ikev2/virtual-ip-override/hosts/carol/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..c9867c7
--- /dev/null
@@ -0,0 +1,24 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+       crlcheckinterval=180
+       strictcrlpolicy=no
+       plutostart=no
+
+conn %default
+       ikelifetime=60m
+       keylife=20m
+       rekeymargin=3m
+       keyingtries=1
+       keyexchange=ikev2
+
+conn home
+       left=PH_IP_CAROL
+       leftsourceip=PH_IP_CAROL1
+       leftcert=carolCert.pem
+       leftid=carol@strongswan.org
+       leftfirewall=yes
+       right=PH_IP_MOON
+       rightsubnet=10.1.0.0/16
+       rightid=@moon.strongswan.org
+       auto=add
diff --git a/testing/tests/ikev2/virtual-ip-override/hosts/dave/etc/ipsec.conf b/testing/tests/ikev2/virtual-ip-override/hosts/dave/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..98dd992
--- /dev/null
@@ -0,0 +1,24 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+       crlcheckinterval=180
+       strictcrlpolicy=no
+       plutostart=no
+
+conn %default
+       ikelifetime=60m
+       keylife=20m
+       rekeymargin=3m
+       keyingtries=1
+       keyexchange=ikev2
+
+conn home
+       left=PH_IP_DAVE
+       leftsourceip=PH_IP_CAROL1
+       leftcert=daveCert.pem
+       leftid=dave@strongswan.org
+       leftfirewall=yes
+       right=PH_IP_MOON
+       rightsubnet=10.1.0.0/16
+       rightid=@moon.strongswan.org
+       auto=add
diff --git a/testing/tests/ikev2/virtual-ip-override/hosts/moon/etc/ipsec.conf b/testing/tests/ikev2/virtual-ip-override/hosts/moon/etc/ipsec.conf
new file mode 100755 (executable)
index 0000000..bafd1b1
--- /dev/null
@@ -0,0 +1,31 @@
+# /etc/ipsec.conf - strongSwan IPsec configuration file
+
+config setup
+       crlcheckinterval=180
+       strictcrlpolicy=no
+       plutostart=no
+
+conn %default
+       ikelifetime=60m
+       keylife=20m
+       rekeymargin=3m
+       keyingtries=1
+       keyexchange=ikev2
+       left=PH_IP_MOON
+       leftsubnet=10.1.0.0/16
+       leftsourceip=PH_IP_MOON1
+       leftcert=moonCert.pem
+       leftid=@moon.strongswan.org
+       leftfirewall=yes
+
+conn rw-carol
+       right=%any
+       rightid=carol@strongswan.org
+       rightsourceip=PH_IP_CAROL1
+       auto=add
+
+conn rw-dave
+       right=%any
+       rightid=dave@strongswan.org
+       rightsourceip=PH_IP_DAVE1
+       auto=add
diff --git a/testing/tests/ikev2/virtual-ip-override/posttest.dat b/testing/tests/ikev2/virtual-ip-override/posttest.dat
new file mode 100644 (file)
index 0000000..8fe4cc4
--- /dev/null
@@ -0,0 +1,5 @@
+moon::ipsec stop
+carol::ipsec stop
+moon::/etc/init.d/iptables stop 2> /dev/null
+carol::/etc/init.d/iptables stop 2> /dev/null
+dave::/etc/init.d/iptables stop 2> /dev/null
diff --git a/testing/tests/ikev2/virtual-ip-override/pretest.dat b/testing/tests/ikev2/virtual-ip-override/pretest.dat
new file mode 100644 (file)
index 0000000..5ec37aa
--- /dev/null
@@ -0,0 +1,9 @@
+moon::/etc/init.d/iptables start 2> /dev/null
+carol::/etc/init.d/iptables start 2> /dev/null
+dave::/etc/init.d/iptables start 2> /dev/null
+carol::ipsec start
+dave::ipsec start
+moon::ipsec start
+carol::sleep 1 
+carol::ipsec up home
+dave::ipsec up home
diff --git a/testing/tests/ikev2/virtual-ip-override/test.conf b/testing/tests/ikev2/virtual-ip-override/test.conf
new file mode 100644 (file)
index 0000000..01c94f7
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/bash
+#
+# This configuration file provides information on the
+# UML instances used for this test
+
+# All UML instances that are required for this test
+#
+UMLHOSTS="alice moon carol winnetou dave"
+
+# Corresponding block diagram
+#
+DIAGRAM="a-m-c-w-d.png"
+
+# UML instances on which tcpdump is to be started
+#
+TCPDUMPHOSTS=""
+
+# UML instances on which IPsec is started
+# Used for IPsec logging purposes
+#
+IPSECHOSTS="moon carol dave"