START sys/net/mpath 2024-03-05T21:40:16Z ==== busy-rdomains ==== # Check if rdomains are busy. ==== multipath ==== /sbin/sysctl net.inet.ip.multipath=1 net.inet.ip.multipath: 0 -> 1 /sbin/sysctl net.inet6.ip6.multipath=1 net.inet6.ip6.multipath: 0 -> 1 ==== ifconfig ==== # Destroy interfaces. /sbin/ifconfig lo11 rdomain 11 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:0 delete host fc00::11:0:0: gateway fc00::11:0: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.0 delete host 10.11.0.0: gateway 10.0.11.0: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:1 delete host fc00::11:0:0: gateway fc00::11:1: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.1 delete host 10.11.0.0: gateway 10.0.11.1: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:2 delete host fc00::11:0:0: gateway fc00::11:2: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.2 delete host 10.11.0.0: gateway 10.0.11.2: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:3 delete host fc00::11:0:0: gateway fc00::11:3: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.3 delete host 10.11.0.0: gateway 10.0.11.3: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:4 delete host fc00::11:0:0: gateway fc00::11:4: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.4 delete host 10.11.0.0: gateway 10.0.11.4: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:5 delete host fc00::11:0:0: gateway fc00::11:5: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.5 delete host 10.11.0.0: gateway 10.0.11.5: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:6 delete host fc00::11:0:0: gateway fc00::11:6: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.6 delete host 10.11.0.0: gateway 10.0.11.6: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:7 delete host fc00::11:0:0: gateway fc00::11:7: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.7 delete host 10.11.0.0: gateway 10.0.11.7: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:8 delete host fc00::11:0:0: gateway fc00::11:8: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.8 delete host 10.11.0.0: gateway 10.0.11.8: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:9 delete host fc00::11:0:0: gateway fc00::11:9: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.9 delete host 10.11.0.0: gateway 10.0.11.9: not in table *** Error 1 in target 'unconfig' (ignored) /sbin/ifconfig lo11 -inet -inet6 /sbin/ifconfig lo11 destroy rm -f stamp-ifconfig # Create and configure loopback interfaces. /sbin/ifconfig lo11 rdomain 11 /sbin/ifconfig lo11 inet 10.0.0.1/8 /sbin/ifconfig lo11 inet 10.0.0.11 alias /sbin/ifconfig lo11 inet 10.0.11.0 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.0 add host 10.11.0.0: gateway 10.0.11.0 /sbin/ifconfig lo11 inet 10.0.11.1 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.1 add host 10.11.0.0: gateway 10.0.11.1 /sbin/ifconfig lo11 inet 10.0.11.2 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.2 add host 10.11.0.0: gateway 10.0.11.2 /sbin/ifconfig lo11 inet 10.0.11.3 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.3 add host 10.11.0.0: gateway 10.0.11.3 /sbin/ifconfig lo11 inet 10.0.11.4 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.4 add host 10.11.0.0: gateway 10.0.11.4 /sbin/ifconfig lo11 inet 10.0.11.5 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.5 add host 10.11.0.0: gateway 10.0.11.5 /sbin/ifconfig lo11 inet 10.0.11.6 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.6 add host 10.11.0.0: gateway 10.0.11.6 /sbin/ifconfig lo11 inet 10.0.11.7 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.7 add host 10.11.0.0: gateway 10.0.11.7 /sbin/ifconfig lo11 inet 10.0.11.8 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.8 add host 10.11.0.0: gateway 10.0.11.8 /sbin/ifconfig lo11 inet 10.0.11.9 alias /sbin/route -n -T 11 add -inet -blackhole -mpath -host 10.11.0.0 10.0.11.9 add host 10.11.0.0: gateway 10.0.11.9 /sbin/ifconfig lo11 inet6 fc00::11 alias /sbin/ifconfig lo11 inet6 fc00::11:0 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:0 add host fc00::11:0:0: gateway fc00::11:0 /sbin/ifconfig lo11 inet6 fc00::11:1 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:1 add host fc00::11:0:0: gateway fc00::11:1 /sbin/ifconfig lo11 inet6 fc00::11:2 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:2 add host fc00::11:0:0: gateway fc00::11:2 /sbin/ifconfig lo11 inet6 fc00::11:3 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:3 add host fc00::11:0:0: gateway fc00::11:3 /sbin/ifconfig lo11 inet6 fc00::11:4 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:4 add host fc00::11:0:0: gateway fc00::11:4 /sbin/ifconfig lo11 inet6 fc00::11:5 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:5 add host fc00::11:0:0: gateway fc00::11:5 /sbin/ifconfig lo11 inet6 fc00::11:6 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:6 add host fc00::11:0:0: gateway fc00::11:6 /sbin/ifconfig lo11 inet6 fc00::11:7 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:7 add host fc00::11:0:0: gateway fc00::11:7 /sbin/ifconfig lo11 inet6 fc00::11:8 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:8 add host fc00::11:0:0: gateway fc00::11:8 /sbin/ifconfig lo11 inet6 fc00::11:9 alias /sbin/route -n -T 11 add -inet6 -blackhole -mpath -host fc00::11:0:0 fc00::11:9 add host fc00::11:0:0: gateway fc00::11:9 # Wait until IPv6 addresses are no longer tentative. for i in `jot 50`; do if ! /sbin/ifconfig lo11 | fgrep -q tentative; then break; fi; sleep .1; done ! /sbin/ifconfig lo11 | fgrep tentative ==== run-netcat ==== # count UDP IPv6 packets used with multipath routes rm -f netstat.log /usr/bin/nc -4 -V11 -u -z -s10.0.11.0 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/nc -4 -V11 -u -z -s10.0.11.1 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/nc -4 -V11 -u -z -s10.0.11.2 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/nc -4 -V11 -u -z -s10.0.11.3 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/nc -4 -V11 -u -z -s10.0.11.4 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/nc -4 -V11 -u -z -s10.0.11.5 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/nc -4 -V11 -u -z -s10.0.11.6 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/nc -4 -V11 -u -z -s10.0.11.7 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/nc -4 -V11 -u -z -s10.0.11.8 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/nc -4 -V11 -u -z -s10.0.11.9 10.11.0.0 discard Connection to 10.11.0.0 9 port [udp/discard] succeeded! /usr/bin/netstat -T11 -f inet -rn >netstat.log ==== run-netstat ==== # check route distribution of IPv4 packets awk 'BEGIN{ mpath = uses = used = maxuse = 0; } /^10.11.0.0 /{ if ($3 == "UGHSBP") mpath++; if ($5 > 0) used++; if ($5 > max) max = $5; uses += $5; } END{ print "mpath "mpath", uses "uses", max "max", used "used; if (mpath != 10) { print "not 10 mpath: " mpath; exit 1; } if (uses != 10) { print "not 10 uses: " uses; exit 1; } if (max > 5) { print "max more than 5: " max; exit 1; } if (used < 5) { print "used less than 5: " used; exit 1; } }' netstat.log mpath 10, uses 10, max 2, used 7 ==== run-netcat6 ==== # count UDP IPv6 packets used with multipath routes rm -f netstat6.log /usr/bin/nc -6 -V11 -u -z -sfc00::11:0 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/nc -6 -V11 -u -z -sfc00::11:1 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/nc -6 -V11 -u -z -sfc00::11:2 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/nc -6 -V11 -u -z -sfc00::11:3 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/nc -6 -V11 -u -z -sfc00::11:4 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/nc -6 -V11 -u -z -sfc00::11:5 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/nc -6 -V11 -u -z -sfc00::11:6 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/nc -6 -V11 -u -z -sfc00::11:7 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/nc -6 -V11 -u -z -sfc00::11:8 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/nc -6 -V11 -u -z -sfc00::11:9 fc00::11:0:0 discard Connection to fc00::11:0:0 9 port [udp/discard] succeeded! /usr/bin/netstat -T11 -f inet6 -rn >netstat6.log ==== run-netstat6 ==== # check route distribution of IPv6 packets awk 'BEGIN{ mpath = used = uses = max = 0; } /^fc00::11:0:0 /{ if ($3 == "UGHSBP") mpath++; if ($5 > 0) used++; if ($5 > max) max = $5; uses += $5; } END{ print "mpath "mpath", uses "uses", max "max", used "used; if (mpath != 10) { print "not 10 mpath: " mpath; exit 1; } if (uses != 10) { print "not 10 uses: " uses; exit 1; } if (max > 5) { print "max more than 5: " max; exit 1; } if (used < 5) { print "used less than 5: " used; exit 1; } }' netstat6.log mpath 10, uses 10, max 10, used 1 max more than 5: 10 *** Error 1 in . (Makefile:162 'run-netstat6') EXPECTED_FAIL ==== singlepath ==== /sbin/sysctl net.inet.ip.multipath=0 net.inet.ip.multipath: 1 -> 0 /sbin/sysctl net.inet6.ip6.multipath=0 net.inet6.ip6.multipath: 1 -> 0 ==== unconfig ==== # Destroy interfaces. /sbin/ifconfig lo11 rdomain 11 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:0 delete host fc00::11:0:0: gateway fc00::11:0 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.0 delete host 10.11.0.0: gateway 10.0.11.0 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:1 delete host fc00::11:0:0: gateway fc00::11:1 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.1 delete host 10.11.0.0: gateway 10.0.11.1 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:2 delete host fc00::11:0:0: gateway fc00::11:2 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.2 delete host 10.11.0.0: gateway 10.0.11.2 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:3 delete host fc00::11:0:0: gateway fc00::11:3 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.3 delete host 10.11.0.0: gateway 10.0.11.3 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:4 delete host fc00::11:0:0: gateway fc00::11:4 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.4 delete host 10.11.0.0: gateway 10.0.11.4 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:5 delete host fc00::11:0:0: gateway fc00::11:5 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.5 delete host 10.11.0.0: gateway 10.0.11.5 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:6 delete host fc00::11:0:0: gateway fc00::11:6 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.6 delete host 10.11.0.0: gateway 10.0.11.6 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:7 delete host fc00::11:0:0: gateway fc00::11:7 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.7 delete host 10.11.0.0: gateway 10.0.11.7 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:8 delete host fc00::11:0:0: gateway fc00::11:8 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.8 delete host 10.11.0.0: gateway 10.0.11.8 /sbin/route -n -T 11 delete -inet6 -host fc00::11:0:0 fc00::11:9 delete host fc00::11:0:0: gateway fc00::11:9 /sbin/route -n -T 11 delete -inet -host 10.11.0.0 10.0.11.9 delete host 10.11.0.0: gateway 10.0.11.9 /sbin/ifconfig lo11 -inet -inet6 /sbin/ifconfig lo11 destroy rm -f stamp-ifconfig XFAIL sys/net/mpath *** Error 1 in . (Makefile:162 'run-netstat6')