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