1 2This directory holds scripts and a support program for multiple test cases 3exercising multi-IP FIBs. At this time only IPv6 test cases are provided. 4 5Makefile 6reflect.c 7 8 Makefile just builds reflect, a program to echo data on a TCP or UDP 9 socket in very simplistic ways. It has a couple of options to provide 10 an address or port, a FIB to bind to or a FIB to add to a reflected 11 message as well as some "magic" keyword handling to let the intiators 12 control it. 13 14initiator.sh and reflector.sh 15 16 intiator.sh runs two local test cases, one which shows a documented 17 limitation. 18 19 All further tests are either exercising the sending or receiving of 20 ICMP6, TCP or UDP packets with multiple FIBs. initiator.sh and 21 reflector.sh must run on two different nodes both having a network 22 interface in the same broadcast domain (be it cross-over or on a 23 bridge/switch). The tests will use the IPv6 benchmarking working 24 group (BMWG) prefix. The prefix is hard coded into some tests. 25 Control messages will synchronize reflector with initiator. The 26 reflector needs the reflect binary. Apart from that the scripts 27 depend on ping6, netcat, awk, tr and ipfw. The interface to use can 28 be set from the environment. The commands can be run like: 29 30 env IFACE=ifname sh intiator.sh 31 env IFACE=ifname sh reflector.sh 32 33 Both scripts also support a DEBUG environment variable for additional 34 output. A special value of 42 will enable sh(1) xtrace printing. 35 36 The output format is modeled after Test::Harness Perl as used in 37 tools/regression/ but not always compliant following the test case name. 38 39 NOTE: at the time of writing reflector.sh can trigger kernel races 40 unrelated to multi-FIB test leading to a panic(9). "delay" calls 41 are used to mitigate the problem some but are not always good enough. 42 It is suggested to run one test case at a time manually disabling 43 the others in both scripts. 44 45forwarding.sh 46 47 forwarding.sh tests FIBs in the forwarding path, making sure that 48 packets tagged on input are leaving on the correct FIB. 49 The script must be run on three nodes with both edge nodes (left 50 and right) being connected to the middle node on separate interfaces. 51 52 The script operates on the same principles and requirements as the 53 two afore described ones. Environment options equally apply, with 54 the middle node also taking an IFACEFAR variable to name the interface 55 to the right. See the ASCII art at the beginning of the script for 56 details. The script needs to be told which node it is running with 57 the first argument: 58 59 env IFACE=ifname sh forwarding.sh left 60 env IFACE=leftifname IFACEFAR=rightifname sh forwarding.sh middle 61 env IFACE=ifname sh forwarding.sh right 62 63# end 64