1231858Sbz# $FreeBSD$ 2231858Sbz 3231858SbzThis directory holds scripts and a support program for multiple test cases 4231858Sbzexercising multi-IP FIBs. At this time only IPv6 test cases are provided. 5231858Sbz 6231858SbzMakefile 7231858Sbzreflect.c 8231858Sbz 9231858Sbz Makefile just builds reflect, a program to echo data on a TCP or UDP 10231858Sbz socket in very simplistic ways. It has a couple of options to provide 11231858Sbz an address or port, a FIB to bind to or a FIB to add to a reflected 12231858Sbz message as well as some "magic" keyword handling to let the intiators 13231858Sbz control it. 14231858Sbz 15231858Sbzinitiator.sh and reflector.sh 16231858Sbz 17231858Sbz intiator.sh runs two local test cases, one which shows a documented 18231858Sbz limitation. 19231858Sbz 20231858Sbz All further tests are either exercising the sending or receiving of 21231858Sbz ICMP6, TCP or UDP packets with multiple FIBs. initiator.sh and 22231858Sbz reflector.sh must run on two different nodes both having a network 23231858Sbz interface in the same broadcast domain (be it cross-over or on a 24231858Sbz bridge/switch). The tests will use the IPv6 benchmarking working 25231858Sbz group (BMWG) prefix. The prefix is hard coded into some tests. 26231858Sbz Control messages will synchronize reflector with initiator. The 27231858Sbz reflector needs the reflect binary. Apart from that the scripts 28231858Sbz depend on ping6, netcat, awk, tr and ipfw. The interface to use can 29231858Sbz be set from the environment. The commands can be run like: 30231858Sbz 31231858Sbz env IFACE=ifname sh intiator.sh 32231858Sbz env IFACE=ifname sh reflector.sh 33231858Sbz 34231858Sbz Both scripts also support a DEBUG environment variable for additional 35231858Sbz output. A special value of 42 will enable sh(1) xtrace printing. 36231858Sbz 37231858Sbz The output format is modeled after Test::Harness Perl as used in 38232114Sbz tools/regression/ but not always compliant following the test case name. 39231858Sbz 40231858Sbz NOTE: at the time of writing reflector.sh can trigger kernel races 41231858Sbz unrelated to multi-FIB test leading to a panic(9). "delay" calls 42231858Sbz are used to mitigate the problem some but are not always good enough. 43231858Sbz It is suggested to run one test case at a time manually disabling 44231858Sbz the others in both scripts. 45231858Sbz 46231858Sbzforwarding.sh 47231858Sbz 48231858Sbz forwarding.sh tests FIBs in the forwarding path, making sure that 49231858Sbz packets tagged on input are leaving on the correct FIB. 50231858Sbz The script must be run on three nodes with both edge nodes (left 51231858Sbz and right) being connected to the middle node on separate interfaces. 52231858Sbz 53231858Sbz The script operates on the same principles and requirements as the 54231858Sbz two afore described ones. Environment options equally apply, with 55231858Sbz the middle node also taking an IFACEFAR variable to name the interface 56231858Sbz to the right. See the ASCII art at the beginning of the script for 57231858Sbz details. The script needs to be told which node it is running with 58231858Sbz the first argument: 59231858Sbz 60231858Sbz env IFACE=ifname sh forwarding.sh left 61231858Sbz env IFACE=leftifname IFACEFAR=rightifname sh forwarding.sh middle 62231858Sbz env IFACE=ifname sh forwarding.sh right 63231858Sbz 64231858Sbz# end 65