]> git.ipfire.org Git - people/ms/network.git/commitdiff
nitsi: Add tests for ip-tunnels in GRE mode
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 Sep 2018 15:23:44 +0000 (16:23 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 17 Sep 2018 15:23:44 +0000 (16:23 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
Makefile.am
test/nitsi/test/zone/ip-tunnel/gre4/recipe [new file with mode: 0644]
test/nitsi/test/zone/ip-tunnel/gre4/settings [new file with mode: 0644]
test/nitsi/test/zone/ip-tunnel/gre6/recipe [new file with mode: 0644]
test/nitsi/test/zone/ip-tunnel/gre6/settings [new file with mode: 0644]

index 30d7faed832394032016dd44e98980c2d0f73923..e40e33225bb679445761819cd9d5dfa1ac249929 100644 (file)
@@ -603,6 +603,8 @@ NITSI_TESTS = \
        test/nitsi/test/raw-device-get-by-mac \
        test/nitsi/test/zone-new-bridge \
        test/nitsi/test/zone-port-attach-bridge \
+       test/nitsi/test/zone/ip-tunnel/gre6 \
+       test/nitsi/test/zone/ip-tunnel/gre4 \
        test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4 \
        test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6 \
        test/nitsi/test/vpn/ipsec/n2n/vti/ipv6-via-ipv4 \
@@ -621,6 +623,10 @@ EXTRA_DIST += \
        test/nitsi/test/zone-new-bridge/settings.in \
        test/nitsi/test/zone-port-attach-bridge/recipe \
        test/nitsi/test/zone-port-attach-bridge/settings.in \
+       test/nitsi/test/zone/ip-tunnel/gre6/recipe \
+       test/nitsi/test/zone/ip-tunnel/gre6/settings \
+       test/nitsi/test/zone/ip-tunnel/gre4/recipe \
+       test/nitsi/test/zone/ip-tunnel/gre4/settings \
        test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/recipe \
        test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv4/settings \
        test/nitsi/test/vpn/ipsec/n2n/vti/ipv4-via-ipv6/recipe \
diff --git a/test/nitsi/test/zone/ip-tunnel/gre4/recipe b/test/nitsi/test/zone/ip-tunnel/gre4/recipe
new file mode 100644 (file)
index 0000000..b19b021
--- /dev/null
@@ -0,0 +1,18 @@
+include: setup
+include: phase1
+
+# This test creates a GRE tunnel which connects Alice and Bob with each other
+
+# Alice
+alice: network zone new upl1 ip-tunnel --mode=gre --peer=192.168.100.102
+alice: network zone upl1 config new static 169.254.0.1/30
+
+# Bob
+bob: network zone new upl1 ip-tunnel --mode=gre --peer=192.168.100.101
+bob: network zone upl1 config new static 169.254.0.2/30
+
+all: network status
+
+# Ping the remote sites
+alice: ping -c5 169.254.0.2
+bob: ping -c5 169.254.0.1
diff --git a/test/nitsi/test/zone/ip-tunnel/gre4/settings b/test/nitsi/test/zone/ip-tunnel/gre4/settings
new file mode 100644 (file)
index 0000000..ea52ba7
--- /dev/null
@@ -0,0 +1,2 @@
+[GENERAL]
+name = IP Tunnel (GRE) over IPv4
diff --git a/test/nitsi/test/zone/ip-tunnel/gre6/recipe b/test/nitsi/test/zone/ip-tunnel/gre6/recipe
new file mode 100644 (file)
index 0000000..99ee309
--- /dev/null
@@ -0,0 +1,18 @@
+include: setup
+include: phase1
+
+# This test creates a GRE tunnel which connects Alice and Bob with each other
+
+# Alice
+alice: network zone new upl1 ip-tunnel --mode=gre --peer=2001:db8:100::102
+alice: network zone upl1 config new static 169.254.0.1/30
+
+# Bob
+bob: network zone new upl1 ip-tunnel --mode=gre --peer=2001:db8:100::101
+bob: network zone upl1 config new static 169.254.0.2/30
+
+all: network status
+
+# Ping the remote sites
+alice: ping -c5 169.254.0.2
+bob: ping -c5 169.254.0.1
diff --git a/test/nitsi/test/zone/ip-tunnel/gre6/settings b/test/nitsi/test/zone/ip-tunnel/gre6/settings
new file mode 100644 (file)
index 0000000..1b238cf
--- /dev/null
@@ -0,0 +1,2 @@
+[GENERAL]
+name = IP Tunnel (GRE) over IPv6