From: Michael Tremer Date: Sat, 15 Sep 2018 21:57:09 +0000 (+0100) Subject: nitsi: Add phase1 X-Git-Tag: 010~105 X-Git-Url: http://git.ipfire.org/?p=network.git;a=commitdiff_plain;h=ae7a79dae0518a09d68eb201f3cae9f07bc6e9ed nitsi: Add phase1 This is supposed to be a good base to build on for any test that needs a working layer 2 and some IP addresses on the network to reach any other machines Signed-off-by: Michael Tremer --- diff --git a/Makefile.am b/Makefile.am index 1f2dac64..36885083 100644 --- a/Makefile.am +++ b/Makefile.am @@ -599,6 +599,7 @@ CLEANFILES += \ NITSI_TESTS = \ test/nitsi/test/hello-world \ test/nitsi/test/make-check \ + test/nitsi/test/phase1 \ test/nitsi/test/raw-device-get-by-mac \ test/nitsi/test/zone-new-bridge \ test/nitsi/test/zone-port-attach-bridge diff --git a/test/nitsi/include/phase1 b/test/nitsi/include/phase1 new file mode 100644 index 00000000..8679131e --- /dev/null +++ b/test/nitsi/include/phase1 @@ -0,0 +1,32 @@ +# The file contains some basic setup that creates two zones +# and a couple of ports + +# This contains the basic network configuration for all vpn-tests +include: ../include/alice-port-vars +include: ../include/bob-port-vars + +# Create an uplink zone +all: network zone new upl0 bridge +all: network zone upl0 port attach ${p_net1} + +# Create a local zone +all: network zone new net0 bridge + +# Attach a dummy port to net0 +all: network port new dummy +all: network zone net0 port attach d0 + +# Add IP addresses for Alice +alice: network zone upl0 config new static 192.168.100.101/24 +alice: network zone upl0 config new static 2001:db8:100::101/64 +alice: network zone net0 config new static 192.168.200.1/24 +alice: network zone net0 config new static 2001:db8:200::1/64 + +# Add IP addresses for Bob +bob: network zone upl0 config new static 192.168.100.102/24 +bob: network zone upl0 config new static 2001:db8:100::102/64 +bob: network zone net0 config new static 192.168.201.1/24 +bob: network zone net0 config new static 2001:db8:201::1/64 + +# Print what has been brought up +all: network status diff --git a/test/nitsi/test/phase1/recipe b/test/nitsi/test/phase1/recipe new file mode 100644 index 00000000..61e27f3c --- /dev/null +++ b/test/nitsi/test/phase1/recipe @@ -0,0 +1,6 @@ +include: ../../include/setup +include: ../../include/phase1 + +# Let Alice ping Bob +alice: ping -c 5 192.168.100.102 +alice: ping6 -c 5 2001:db8:100::102 diff --git a/test/nitsi/test/phase1/settings b/test/nitsi/test/phase1/settings new file mode 100644 index 00000000..4757c7ad --- /dev/null +++ b/test/nitsi/test/phase1/settings @@ -0,0 +1,3 @@ +[GENERAL] +name = Validate Phase 1 +description = This test checks if phase 1 can be brought up