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