From: Michael Tremer Date: Mon, 17 Sep 2018 15:23:44 +0000 (+0100) Subject: nitsi: Add tests for ip-tunnels in GRE mode X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8c929286482ea881e131f64b75dcae00b15e3d04;p=people%2Fstevee%2Fnetwork.git nitsi: Add tests for ip-tunnels in GRE mode Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 30d7faed..e40e3322 100644 --- a/Makefile.am +++ b/Makefile.am @@ -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 index 00000000..b19b021f --- /dev/null +++ b/test/nitsi/test/zone/ip-tunnel/gre4/recipe @@ -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 index 00000000..ea52ba73 --- /dev/null +++ b/test/nitsi/test/zone/ip-tunnel/gre4/settings @@ -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 index 00000000..99ee3096 --- /dev/null +++ b/test/nitsi/test/zone/ip-tunnel/gre6/recipe @@ -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 index 00000000..1b238cf2 --- /dev/null +++ b/test/nitsi/test/zone/ip-tunnel/gre6/settings @@ -0,0 +1,2 @@ +[GENERAL] +name = IP Tunnel (GRE) over IPv6