Lines Matching full:ip

136 	addr=$(ip $ns -6 -br addr show dev ${dev} | \
159 ip netns exec ${n} sysctl -qw net.ipv4.ip_forward=1
160 ip netns exec ${n} sysctl -qw net.ipv4.fib_multipath_use_neigh=1
161 ip netns exec ${n} sysctl -qw net.ipv4.conf.default.ignore_routes_with_linkdown=1
162 ip netns exec ${n} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1
163 ip netns exec ${n} sysctl -qw net.ipv6.conf.all.forwarding=1
164 ip netns exec ${n} sysctl -qw net.ipv6.conf.default.forwarding=1
165 ip netns exec ${n} sysctl -qw net.ipv6.conf.default.ignore_routes_with_linkdown=1
166 ip netns exec ${n} sysctl -qw net.ipv6.conf.all.accept_dad=0
167 ip netns exec ${n} sysctl -qw net.ipv6.conf.default.accept_dad=0
181 IP="ip -netns $me"
184 $IP li add veth1 type veth peer name veth2
185 $IP li set veth1 up
186 $IP addr add 172.16.1.1/24 dev veth1
187 $IP -6 addr add 2001:db8:91::1/64 dev veth1 nodad
189 $IP li add veth3 type veth peer name veth4
190 $IP li set veth3 up
191 $IP addr add 172.16.2.1/24 dev veth3
192 $IP -6 addr add 2001:db8:92::1/64 dev veth3 nodad
194 $IP li set veth2 netns $peer up
195 ip -netns $peer addr add 172.16.1.2/24 dev veth2
196 ip -netns $peer -6 addr add 2001:db8:91::2/64 dev veth2 nodad
198 $IP li set veth4 netns $peer up
199 ip -netns $peer addr add 172.16.2.2/24 dev veth4
200 ip -netns $peer -6 addr add 2001:db8:92::2/64 dev veth4 nodad
202 ip -netns $remote li add veth5 type veth peer name veth6
203 ip -netns $remote li set veth5 up
204 ip -netns $remote addr add dev veth5 172.16.101.1/24
205 ip -netns $remote -6 addr add dev veth5 2001:db8:101::1/64 nodad
206 ip -netns $remote ro add 172.16.0.0/22 via 172.16.101.2
207 ip -netns $remote -6 ro add 2001:db8:90::/40 via 2001:db8:101::2
209 ip -netns $remote li set veth6 netns $peer up
210 ip -netns $peer addr add dev veth6 172.16.101.2/24
211 ip -netns $peer -6 addr add dev veth6 2001:db8:101::2/64 nodad
220 ip netns del ${ns} 2>/dev/null
263 out=$($IP nexthop ls ${nharg} 2>/dev/null)
275 out=$($IP nexthop bucket ${nharg} \
287 out=$($IP route ls match ${pfx} 2>/dev/null)
298 out=$($IP -6 route ls match ${pfx} 2>/dev/null | sed -e 's/pref medium//')
331 run_cmd "$IP nexthop add id $nhidstr via $ipstr$iter dev veth1"
347 run_cmd "$IP nexthop add id $grpidstr group $grpstr"
353 run_cmd "$IP nexthop list"
370 run_cmd "$IP nexthop add id 100 via $ipstr dev veth1"
371 run_cmd "$IP nexthop add id 1000 group 100 type resilient buckets $buckets"
372 run_cmd "$IP nexthop bucket list"
381 if out=$($IP -j route get "$pfx" | jq -re ".[0].dev"); then
403 mpid=`($IP monitor $mtype > $tmpfile & echo $!) 2>/dev/null`
426 $IP nexthop help 2>&1 | grep -q fdb
435 $IP nexthop help 2>&1 | grep -q resilient
456 run_cmd "$IP nexthop add id 61 via 2001:db8:91::2 fdb"
457 run_cmd "$IP nexthop add id 62 via 2001:db8:91::3 fdb"
458 run_cmd "$IP nexthop add id 102 group 61/62 fdb"
463 run_cmd "$IP nexthop get id 102"
468 run_cmd "$IP nexthop add id 63 via 2001:db8:91::4"
469 run_cmd "$IP nexthop add id 64 via 2001:db8:91::5"
470 run_cmd "$IP nexthop add id 103 group 63/64 fdb"
474 run_cmd "$IP nexthop add id 65 via 2001:db8:91::5 fdb"
475 run_cmd "$IP nexthop add id 66 via 2001:db8:91::6 fdb"
476 run_cmd "$IP nexthop add id 104 group 65/66"
480 run_cmd "$IP nexthop add id 67 blackhole fdb"
484 run_cmd "$IP nexthop add id 68 via 2001:db8:91::7 dev veth1 fdb"
488 run_cmd "$IP nexthop add id 68 via 2001:db8:91::7 onlink fdb"
492 run_cmd "$IP nexthop add id 69 encap mpls 101 via 2001:db8:91::8 dev veth1 fdb"
495 …run_cmd "$IP link add name vx10 type vxlan id 1010 local 2001:db8:91::9 remote 2001:db8:91::10 dst…
503 run_cmd "$IP -6 ro add 2001:db8:101::1/128 nhid 66"
506 run_cmd "$IP -6 ro add 2001:db8:101::1/128 nhid 103"
509 run_cmd "$IP nexthop del id 61"
513 run_cmd "$IP nexthop del id 102"
519 $IP link del dev vx10
536 run_cmd "$IP nexthop add id 12 via 172.16.1.2 fdb"
537 run_cmd "$IP nexthop add id 13 via 172.16.1.3 fdb"
538 run_cmd "$IP nexthop add id 102 group 12/13 fdb"
543 run_cmd "$IP nexthop get id 102"
548 run_cmd "$IP nexthop add id 14 via 172.16.1.2"
549 run_cmd "$IP nexthop add id 15 via 172.16.1.3"
550 run_cmd "$IP nexthop add id 103 group 14/15 fdb"
554 run_cmd "$IP nexthop add id 16 via 172.16.1.2 fdb"
555 run_cmd "$IP nexthop add id 17 via 172.16.1.3 fdb"
556 run_cmd "$IP nexthop add id 104 group 14/15"
560 run_cmd "$IP nexthop add id 18 blackhole fdb"
564 run_cmd "$IP nexthop add id 16 via 172.16.1.2 dev veth1 fdb"
568 run_cmd "$IP nexthop add id 16 via 172.16.1.2 onlink fdb"
572 run_cmd "$IP nexthop add id 17 encap mpls 101 via 172.16.1.2 dev veth1 fdb"
575 …run_cmd "$IP link add name vx10 type vxlan id 1010 local 10.0.0.1 remote 10.0.0.2 dstport 4789 nol…
583 run_cmd "$IP ro add 172.16.0.0/22 nhid 15"
586 run_cmd "$IP ro add 172.16.0.0/22 nhid 103"
589 run_cmd "$IP nexthop del id 12"
593 run_cmd "$IP nexthop del id 102"
599 $IP link del dev vx10
621 run_cmd "$IP nexthop add id 1 via ${gws["veth1"]} dev veth1"
622 run_cmd "$IP nexthop add id 2 via ${gws["veth3"]} dev veth3"
623 run_cmd "$IP nexthop add id 1001 group 1/2"
624 run_cmd "$IP ro add 172.16.101.0/24 nhid 1001"
639 run_cmd "$IP neigh add ${gws[$dev]} dev $dev nud failed"
644 run_cmd "$IP neigh del ${gws[$dev]} dev $dev"
648 run_cmd "$IP neigh add 172.16.1.2 dev veth1 nud incomplete"
649 run_cmd "$IP neigh add 172.16.2.2 dev veth3 nud incomplete"
650 run_cmd "$IP route get 172.16.101.1"
674 run_cmd "$IP nexthop add id 1 via ${gws["veth1"]} dev veth1"
675 run_cmd "$IP nexthop add id 2 via ${gws["veth3"]} dev veth3"
676 run_cmd "$IP nexthop add id 1001 group 1/2"
677 run_cmd "$IP ro add 2001:db8:101::/64 nhid 1001"
692 run_cmd "$IP neigh add ${gws[$dev]} dev $dev nud failed"
697 run_cmd "$IP neigh del ${gws[$dev]} dev $dev"
701 run_cmd "$IP neigh add 2001:db8:91::2 dev veth1 nud incomplete"
702 run_cmd "$IP neigh add 2001:db8:92::2 dev veth3 nud incomplete"
703 run_cmd "$IP route get 2001:db8:101::1"
721 run_cmd "$IP nexthop add id 52 via 2001:db8:91::2 dev veth1"
729 run_cmd "$IP nexthop get id 52"
733 run_cmd "$IP nexthop del id 52"
741 run_cmd "$IP nexthop add id 52 via 2001:db8:92::3"
745 run_cmd "$IP nexthop add id 53 via 2001:db8:3::3 dev veth1"
749 run_cmd "$IP nexthop add id 53 via 2001:db8:3::3 dev veth1 onlink"
754 run_cmd "$IP -6 nexthop add id 55 via 2001:db8:91::3 dev veth1"
755 run_cmd "$IP nexthop add id 56 via 2001:db8:91::4 dev veth1"
756 run_cmd "$IP nexthop add id 57 via 2001:db8:91::5 dev veth1"
757 run_cmd "$IP li set dev veth1 down"
770 run_cmd "$IP link set dev veth1 up"
771 run_cmd "$IP link add veth1.10 link veth1 up type vlan id 10"
772 run_cmd "$IP link add veth1.20 link veth1 up type vlan id 20"
773 run_cmd "$IP -6 addr add 2001:db8:91::1/64 dev veth1.10"
774 run_cmd "$IP -6 addr add 2001:db8:92::1/64 dev veth1.20"
775 run_cmd "$IP -6 neigh add 2001:db8:91::2 lladdr 00:11:22:33:44:55 dev veth1.10"
776 run_cmd "$IP -6 neigh add 2001:db8:92::2 lladdr 00:11:22:33:44:55 dev veth1.20"
777 run_cmd "$IP nexthop add id 100 via 2001:db8:91::2 dev veth1.10"
778 run_cmd "$IP nexthop add id 101 via 2001:db8:92::2 dev veth1.20"
779 run_cmd "$IP nexthop add id 102 group 100"
780 run_cmd "$IP route add 2001:db8:101::1/128 nhid 102"
783 …run_cmd "ip netns exec $me mausezahn -6 veth1.10 -B 2001:db8:101::1 -A 2001:db8:91::1 -c 5 -t tcp …
788 run_cmd "$IP nexthop replace id 102 group 101"
789 run_cmd "$IP route del 2001:db8:101::1/128"
792 run_cmd "$IP nexthop replace id 102 group 100/101"
799 run_cmd "$IP nexthop del id 102"
805 run_cmd "$IP nexthop del id 100"
809 timeout -s KILL 5 ip netns exec $me ip link del veth1.10 >/dev/null 2>&1
817 run_cmd "$IP link del veth1.20"
818 run_cmd "$IP nexthop flush"
832 run_cmd "$IP nexthop add id 61 via 2001:db8:91::2 dev veth1"
833 run_cmd "$IP nexthop add id 101 group 61"
837 run_cmd "$IP nexthop get id 101"
842 run_cmd "$IP nexthop del id 101"
846 $IP nexthop flush >/dev/null 2>&1
852 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
853 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
854 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
855 run_cmd "$IP nexthop add id 65 dev veth1"
856 run_cmd "$IP nexthop add id 102 group 62/63/64/65"
861 run_cmd "$IP nexthop del id 63"
866 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
867 run_cmd "$IP nexthop add id 103 group 62/63,2/64,3/65,4"
872 run_cmd "$IP nexthop del id 63"
877 run_cmd "$IP li set dev veth1 down"
884 run_cmd "$IP li set dev veth1 up"
886 $IP nexthop flush >/dev/null 2>&1
890 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
891 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
892 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
893 run_cmd "$IP nexthop add id 65 via 2001:db8:91::5 dev veth1"
895 run_cmd "$IP nexthop add id 72 via 2001:db8:92::2 dev veth3"
896 run_cmd "$IP nexthop add id 73 via 2001:db8:92::3 dev veth3"
897 run_cmd "$IP nexthop add id 74 via 2001:db8:92::4 dev veth3"
898 run_cmd "$IP nexthop add id 75 via 2001:db8:92::5 dev veth3"
902 run_cmd "$IP nexthop add id 104 group 62"
903 run_cmd "$IP nexthop add id 105 group 62"
907 run_cmd "$IP nexthop flush groups"
911 run_cmd "$IP nexthop add id 105 group 62/63/72/73/64"
912 run_cmd "$IP li set veth1 down"
916 run_cmd "$IP nexthop add id 106 group 105/74"
922 run_cmd "$IP -6 nexthop add id 31 blackhole"
923 run_cmd "$IP nexthop add id 107 group 31"
926 run_cmd "$IP nexthop add id 108 group 31/24"
935 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
936 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
937 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
938 run_cmd "$IP nexthop add id 65 via 2001:db8:91::5 dev veth1"
939 run_cmd "$IP nexthop add id 66 dev veth1"
941 run_cmd "$IP nexthop add id 103 group 62,1000"
944 run_cmd "$IP nexthop replace $GRP"
951 $IP nexthop flush >/dev/null 2>&1
972 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
973 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
974 run_cmd "$IP nexthop add id 102 group 62/63 type resilient buckets 2 idle_timer 0"
976 run_cmd "$IP nexthop del id 63"
984 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
985 run_cmd "$IP nexthop replace id 102 group 62/63 type resilient buckets 2 idle_timer 0"
993 $IP nexthop flush >/dev/null 2>&1
998 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
999 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1000 run_cmd "$IP nexthop add id 102 group 62,3/63,1 type resilient buckets 4 idle_timer 0"
1002 run_cmd "$IP nexthop del id 63"
1010 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1011 run_cmd "$IP nexthop replace id 102 group 62,3/63,1 type resilient buckets 4 idle_timer 0"
1022 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
1023 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1024 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
1025 run_cmd "$IP nexthop add id 65 via 2001:db8:91::5 dev veth1"
1026 run_cmd "$IP nexthop add id 66 dev veth1"
1028 run_cmd "$IP nexthop add id 103 group 62,1000 type resilient buckets 32"
1033 run_cmd "$IP nexthop replace $GRP"
1040 $IP nexthop flush >/dev/null 2>&1
1056 run_cmd "$IP nexthop add id 81 via 2001:db8:91::2 dev veth1"
1057 run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81"
1060 run_cmd "$IP ro delete 2001:db8:101::1/128 nhid 81"
1063 run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81"
1064 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1067 run_cmd "$IP nexthop add id 82 via 2001:db8:92::2 dev veth3"
1068 run_cmd "$IP nexthop add id 122 group 81/82"
1069 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 122"
1070 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1076 run_cmd "$IP -6 nexthop add id 83 blackhole"
1077 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 83"
1078 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1081 run_cmd "$IP nexthop replace id 83 via 2001:db8:91::2 dev veth1"
1082 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1085 run_cmd "$IP -6 nexthop replace id 83 blackhole"
1086 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1089 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 122"
1090 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1092 run_cmd "$IP nexthop replace id 122 group 83"
1093 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1096 run_cmd "$IP nexthop replace id 122 group 81/82"
1097 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1106 run_cmd "$IP -6 nexthop add id 85 dev veth1"
1107 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 85"
1111 run_cmd "$IP nexthop add id 123 group 81/85"
1112 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 123"
1119 run_cmd "$IP ro delete 2001:db8:101::1/128"
1120 run_cmd "$IP nexthop add id 84 via 172.16.1.1 dev veth1"
1121 run_cmd "$IP ro add 2001:db8:101::1/128 nhid 84"
1124 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 81"
1125 run_cmd "$IP nexthop replace id 81 via 172.16.1.1 dev veth1"
1128 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 122"
1129 run_cmd "$IP nexthop replace id 81 via 172.16.1.1 dev veth1"
1132 run_cmd "$IP nexthop add id 86 via 2001:db8:92::2 dev veth3"
1133 run_cmd "$IP nexthop add id 87 via 172.16.1.1 dev veth1"
1134 run_cmd "$IP nexthop add id 88 via 172.16.1.1 dev veth1"
1135 run_cmd "$IP nexthop add id 124 group 86/87/88"
1136 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 124"
1139 run_cmd "$IP nexthop del id 88"
1140 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 124"
1143 run_cmd "$IP nexthop del id 87"
1144 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 124"
1147 run_cmd "$IP ro delete 2001:db8:101::1/128"
1148 run_cmd "$IP nexthop add id 87 via 172.16.1.1 dev veth1"
1149 run_cmd "$IP nexthop add id 88 via 172.16.1.1 dev veth1"
1150 run_cmd "$IP nexthop replace id 124 group 86/87/88"
1151 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 124"
1154 run_cmd "$IP nexthop replace id 88 via 2001:db8:92::2 dev veth3"
1155 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 124"
1158 run_cmd "$IP nexthop replace id 87 via 2001:db8:92::2 dev veth3"
1159 run_cmd "$IP ro replace 2001:db8:101::1/128 nhid 124"
1162 $IP nexthop flush >/dev/null 2>&1
1167 run_cmd "$IP nexthop add id 86 via 2001:db8:91::2 dev veth1"
1168 run_cmd "$IP ro add 2001:db8:101::1/128 nhid 81"
1171 run_cmd "$IP ro add 2001:db8:101::2/128 nhid 86 from 2001:db8:91::1"
1175 run_cmd "$IP ro add 2001:db8:101::2/128 nhid 86 congctl lock foo"
1179 $IP nexthop flush >/dev/null 2>&1
1180 run_cmd "ip netns exec $me ip6tables -t mangle -I PREROUTING 1 -m rpfilter --invert -j DROP"
1181 run_cmd "$IP nexthop add id 91 via 2001:db8:91::2 dev veth1"
1182 run_cmd "$IP nexthop add id 92 via 2001:db8:92::2 dev veth3"
1183 run_cmd "$IP nexthop add id 93 group 91/92"
1184 run_cmd "$IP -6 ro add default nhid 91"
1185 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1187 run_cmd "$IP -6 ro replace default nhid 93"
1188 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 2001:db8:101::1"
1208 $IP nexthop flush >/dev/null 2>&1
1224 $IP nexthop flush >/dev/null 2>&1
1230 $IP nexthop del id 100
1231 $IP nexthop add id 100 via 2001:db8:91::2 dev veth1
1238 $IP nexthop replace id 102 group 100/101
1258 run_cmd "$IP nexthop add id 100 via 2001:db8:91::2 dev veth1"
1259 run_cmd "$IP nexthop add id 101 via 2001:db8:92::2 dev veth3"
1260 run_cmd "$IP nexthop add id 102 group 100/101"
1261 run_cmd "$IP route add 2001:db8:101::1 nhid 102"
1262 run_cmd "$IP route add 2001:db8:101::2 nhid 102"
1268 ip netns exec $me ping -f 2001:db8:101::1 >/dev/null 2>&1 &
1270 ip netns exec $me ping -f 2001:db8:101::2 >/dev/null 2>&1 &
1272ip netns exec $me mausezahn -6 veth1 -B 2001:db8:101::2 -A 2001:db8:91::1 -c 0 -t tcp "dp=1-1023, …
1286 $IP nexthop replace id 102 group 100/101 type resilient
1312 run_cmd "$IP nexthop add id 100 via 2001:db8:91::2 dev veth1"
1313 run_cmd "$IP nexthop add id 101 via 2001:db8:92::2 dev veth3"
1314 run_cmd "$IP nexthop add id 102 group 100/101 type resilient buckets 512 idle_timer 0"
1315 run_cmd "$IP route add 2001:db8:101::1 nhid 102"
1316 run_cmd "$IP route add 2001:db8:101::2 nhid 102"
1322 ip netns exec $me ping -f 2001:db8:101::1 >/dev/null 2>&1 &
1324 ip netns exec $me ping -f 2001:db8:101::2 >/dev/null 2>&1 &
1326 ip netns exec $me mausezahn -6 veth1 \
1350 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1358 run_cmd "$IP nexthop get id 12"
1362 run_cmd "$IP nexthop del id 12"
1370 run_cmd "$IP nexthop add id 12 via 172.16.2.3"
1374 run_cmd "$IP nexthop add id 13 via 172.16.3.2 dev veth1"
1378 run_cmd "$IP nexthop add id 13 via 172.16.3.2 dev veth1 onlink"
1383 run_cmd "$IP nexthop add id 15 via 172.16.1.3 dev veth1"
1384 run_cmd "$IP nexthop add id 16 via 172.16.1.4 dev veth1"
1385 run_cmd "$IP nexthop add id 17 via 172.16.1.5 dev veth1"
1386 run_cmd "$IP li set dev veth1 down"
1393 run_cmd "$IP li set dev veth1 up"
1394 run_cmd "$IP nexthop add id 12 via 172.16.1.3 dev veth1"
1396 run_cmd "$IP route add 172.16.101.1/32 nhid 12"
1397 run_cmd "$IP route delete 172.16.101.1/32 dev veth1"
1402 run_cmd "$IP route delete 172.16.101.1/32 nhid 12"
1403 run_cmd "$IP nexthop del id 12"
1405 run_cmd "$IP nexthop add id 21 via 172.16.1.6 dev veth1"
1406 run_cmd "$IP ro add 172.16.101.0/24 nhid 21"
1407 …run_cmd "$IP ro del 172.16.101.0/24 nexthop via 172.16.1.7 dev veth1 nexthop via 172.16.1.8 dev ve…
1410 run_cmd "$IP nexthop add id 22 via 172.16.1.6 dev veth1"
1411 run_cmd "$IP ro add 172.16.102.0/24 nhid 22"
1412 run_cmd "$IP ro del 172.16.102.0/24 dev veth1"
1415 run_cmd "$IP ro del 172.16.102.0/24 via 172.16.1.6"
1418 run_cmd "$IP ro del 172.16.102.0/24"
1431 run_cmd "$IP nexthop add id 11 via 172.16.1.2 dev veth1"
1432 run_cmd "$IP nexthop add id 101 group 11"
1436 run_cmd "$IP nexthop get id 101"
1441 run_cmd "$IP nexthop del id 101"
1445 $IP nexthop flush >/dev/null 2>&1
1449 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1450 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1451 run_cmd "$IP nexthop add id 14 via 172.16.1.4 dev veth1"
1452 run_cmd "$IP nexthop add id 15 via 172.16.1.5 dev veth1"
1453 run_cmd "$IP nexthop add id 102 group 12/13/14/15"
1458 run_cmd "$IP nexthop del id 13"
1463 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1464 run_cmd "$IP nexthop add id 103 group 12/13,2/14,3/15,4"
1469 run_cmd "$IP nexthop del id 13"
1474 run_cmd "$IP li set dev veth1 down"
1481 run_cmd "$IP li set dev veth1 up"
1483 $IP nexthop flush >/dev/null 2>&1
1487 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1488 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1489 run_cmd "$IP nexthop add id 14 via 172.16.1.4 dev veth1"
1490 run_cmd "$IP nexthop add id 15 via 172.16.1.5 dev veth1"
1492 run_cmd "$IP nexthop add id 22 via 172.16.2.2 dev veth3"
1493 run_cmd "$IP nexthop add id 23 via 172.16.2.3 dev veth3"
1494 run_cmd "$IP nexthop add id 24 via 172.16.2.4 dev veth3"
1495 run_cmd "$IP nexthop add id 25 via 172.16.2.5 dev veth3"
1499 run_cmd "$IP nexthop add id 104 group 12"
1500 run_cmd "$IP nexthop add id 105 group 12"
1504 run_cmd "$IP nexthop flush groups"
1508 run_cmd "$IP nexthop add id 105 group 12/13/22/23/14"
1509 run_cmd "$IP li set veth1 down"
1513 run_cmd "$IP nexthop add id 106 group 105/24"
1519 run_cmd "$IP nexthop add id 31 blackhole"
1520 run_cmd "$IP nexthop add id 107 group 31"
1523 run_cmd "$IP nexthop add id 108 group 31/24"
1543 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1544 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1545 run_cmd "$IP nexthop add id 102 group 12/13 type resilient buckets 2 idle_timer 0"
1547 run_cmd "$IP nexthop del id 13"
1555 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1556 run_cmd "$IP nexthop replace id 102 group 12/13 type resilient buckets 2 idle_timer 0"
1564 $IP nexthop flush >/dev/null 2>&1
1569 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1570 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1571 run_cmd "$IP nexthop add id 102 group 12,3/13,1 type resilient buckets 4 idle_timer 0"
1573 run_cmd "$IP nexthop del id 13"
1581 run_cmd "$IP nexthop add id 13 via 172.16.1.3 dev veth1"
1582 run_cmd "$IP nexthop replace id 102 group 12,3/13,1 type resilient buckets 4 idle_timer 0"
1597 run_cmd "$IP nexthop add id 11 via ${lladdr} dev veth1"
1599 run_cmd "$IP ro add 172.16.101.1/32 nhid 11"
1604 run_cmd "$IP nexthop add id 12 via 172.16.1.2 dev veth1"
1605 run_cmd "$IP nexthop add id 101 group 11/12"
1607 run_cmd "$IP ro replace 172.16.101.1/32 nhid 101"
1612 run_cmd "$IP ro replace 172.16.101.1/32 via inet6 ${lladdr} dev veth1"
1616 run_cmd "$IP ro replace 172.16.101.1/32 via inet6 2001:db8:50::1 dev veth1"
1629 run_cmd "$IP nexthop add id 21 via 172.16.1.2 dev veth1"
1630 run_cmd "$IP ro add 172.16.101.1/32 nhid 21"
1634 run_cmd "$IP ro delete 172.16.101.1/32 nhid 21"
1640 run_cmd "$IP nexthop add id 22 via 172.16.1.2 dev veth1"
1641 run_cmd "$IP ro add 172.16.101.1/32 nhid 22 scope host"
1644 run_cmd "$IP nexthop replace id 22 dev veth3"
1645 run_cmd "$IP ro add 172.16.101.1/32 nhid 22 scope host"
1646 run_cmd "$IP nexthop replace id 22 via 172.16.2.2 dev veth3"
1650 run_cmd "$IP ro add 172.16.101.2/32 nhid 22 congctl lock foo"
1656 run_cmd "$IP nexthop replace id 21 via 172.16.1.2 dev veth1"
1657 run_cmd "$IP ro replace 172.16.101.1/32 nhid 21"
1658 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1661 run_cmd "$IP nexthop replace id 22 via 172.16.2.2 dev veth3"
1662 run_cmd "$IP nexthop add id 122 group 21/22"
1663 run_cmd "$IP ro replace 172.16.101.1/32 nhid 122"
1664 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1667 run_cmd "$IP ro delete 172.16.101.1/32 nhid 122"
1672 run_cmd "$IP nexthop add id 501 via 172.16.1.2 dev veth1"
1673 run_cmd "$IP ro add default nhid 501"
1674 run_cmd "$IP ro add default via 172.16.1.3 dev veth1 metric 20"
1675 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1679 run_cmd "$IP ro del default nhid 501"
1680 run_cmd "$IP ro del default via 172.16.1.3 dev veth1 metric 20"
1681 run_cmd "$IP ro add default via 172.16.1.2 dev veth1 metric 20"
1682 run_cmd "$IP nexthop replace id 501 via 172.16.1.3 dev veth1"
1683 run_cmd "$IP ro add default nhid 501 metric 20"
1684 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1687 run_cmd "$IP nexthop delete nhid 501"
1688 run_cmd "$IP ro del default"
1693 run_cmd "$IP nexthop add id 23 blackhole"
1694 run_cmd "$IP ro replace 172.16.101.1/32 nhid 23"
1695 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1698 run_cmd "$IP nexthop replace id 23 via 172.16.1.2 dev veth1"
1699 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1702 run_cmd "$IP nexthop replace id 23 blackhole"
1703 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1706 run_cmd "$IP ro replace 172.16.101.1/32 nhid 122"
1707 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1709 run_cmd "$IP nexthop replace id 122 group 23"
1710 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1713 run_cmd "$IP nexthop replace id 122 group 21/22"
1714 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1723 run_cmd "$IP nexthop add id 85 dev veth1"
1724 run_cmd "$IP ro replace 172.16.101.1/32 nhid 85"
1728 run_cmd "$IP nexthop add id 123 group 21/85"
1729 run_cmd "$IP ro replace 172.16.101.1/32 nhid 123"
1738 run_cmd "$IP nexthop add id 24 via ${lladdr} dev veth1"
1740 run_cmd "$IP ro replace 172.16.101.1/32 nhid 24"
1741 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1744 $IP neigh sh | grep -q "${lladdr} dev veth1"
1747 $IP neigh sh | grep 'dev veth1'
1750 $IP neigh sh | grep -q "172.16.101.1 dev eth1"
1753 $IP neigh sh | grep 'dev veth1'
1757 run_cmd "$IP nexthop add id 25 via 172.16.1.2 dev veth1"
1758 run_cmd "$IP nexthop add id 101 group 24/25"
1760 run_cmd "$IP ro replace 172.16.101.1/32 nhid 101"
1765 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1768 run_cmd "$IP ro replace 172.16.101.1/32 via inet6 ${lladdr} dev veth1"
1769 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1772 $IP neigh sh | grep -q "${lladdr} dev veth1"
1775 $IP neigh sh | grep 'dev veth1'
1778 $IP neigh sh | grep -q "172.16.101.1 dev eth1"
1781 $IP neigh sh | grep 'dev veth1'
1784 run_cmd "$IP ro del 172.16.101.1/32 via inet6 ${lladdr} dev veth1"
1785 run_cmd "$IP -4 ro add default via inet6 ${lladdr} dev veth1"
1786 run_cmd "ip netns exec $me ping -c1 -w$PING_TIMEOUT 172.16.101.1"
1792 run_cmd "$IP nexthop add id 51 encap mpls 101 via 172.16.1.2 dev veth1"
1797 run_cmd "$IP nexthop add id 52 encap mpls 102 via inet6 2001:db8:91::2 dev veth1"
1813 $IP nexthop flush >/dev/null 2>&1
1829 $IP nexthop flush >/dev/null 2>&1
1837 IPE="ip netns exec $me"
1856 IPE="ip netns exec $me"
1876 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
1877 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1878 run_cmd "$IP nexthop add id 122 group 62/63"
1881 run_cmd "$IP -6 ro add 2001:db8:101::1/128 nhid 122"
1891 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
1893 run_cmd "$IP nexthop replace id 122 group 62/64"
1901 run_cmd "$IP -6 ro del 2001:db8:101::1/128 nhid 122"
1903 run_cmd "$IP nexthop add id 62 via 2001:db8:91::2 dev veth1"
1904 run_cmd "$IP nexthop add id 63 via 2001:db8:91::3 dev veth1"
1905 run_cmd "$IP nexthop add id 122 group 62/63"
1908 run_cmd "$IP -6 ro add 2001:db8:101::1/128 nhid 122"
1918 run_cmd "$IP nexthop add id 64 via 2001:db8:91::4 dev veth1"
1920 run_cmd "$IP nexthop replace id 122 group 62/64"
1926 run_cmd "$IP nexthop del id 122"
1947 run_cmd "$IP nexthop add id 21 via 172.16.1.2 dev veth1"
1948 run_cmd "$IP nexthop add id 22 via 172.16.1.2 dev veth1"
1949 run_cmd "$IP nexthop add id 122 group 21/22"
1952 run_cmd "$IP ro add 172.16.101.1/32 nhid 122"
1963 run_cmd "$IP nexthop add id 23 via 172.16.1.3 dev veth1"
1965 run_cmd "$IP nexthop replace id 122 group 21/23"
1972 run_cmd "$IP ro del 172.16.101.1/32 nhid 122"
1975 run_cmd "$IP ro add 172.16.101.1/32 nhid 122"
1986 run_cmd "$IP nexthop replace id 122 group 21/22"
1992 run_cmd "$IP nexthop del id 122"
2002 $IP nexthop del id 100
2003 $IP nexthop add id 100 via 172.16.1.2 dev veth1
2010 $IP nexthop replace id 102 group 100/101
2030 run_cmd "$IP nexthop add id 100 via 172.16.1.2 dev veth1"
2031 run_cmd "$IP nexthop add id 101 via 172.16.2.2 dev veth3"
2032 run_cmd "$IP nexthop add id 102 group 100/101"
2033 run_cmd "$IP route add 172.16.101.1 nhid 102"
2034 run_cmd "$IP route add 172.16.101.2 nhid 102"
2040 ip netns exec $me ping -f 172.16.101.1 >/dev/null 2>&1 &
2042 ip netns exec $me ping -f 172.16.101.2 >/dev/null 2>&1 &
2044ip netns exec $me mausezahn veth1 -B 172.16.101.2 -A 172.16.1.1 -c 0 -t tcp "dp=1-1023, flags=syn"…
2058 $IP nexthop replace id 102 group 100/101 type resilient
2084 run_cmd "$IP nexthop add id 100 via 172.16.1.2 dev veth1"
2085 run_cmd "$IP nexthop add id 101 via 172.16.2.2 dev veth3"
2086 run_cmd "$IP nexthop add id 102 group 100/101 type resilient buckets 512 idle_timer 0"
2087 run_cmd "$IP route add 172.16.101.1 nhid 102"
2088 run_cmd "$IP route add 172.16.101.2 nhid 102"
2094 ip netns exec $me ping -f 172.16.101.1 >/dev/null 2>&1 &
2096 ip netns exec $me ping -f 172.16.101.2 >/dev/null 2>&1 &
2098 ip netns exec $me mausezahn veth1 \
2116 run_cmd "$IP nexthop ls"
2119 run_cmd "$IP nexthop get id 1"
2122 run_cmd "$IP nexthop del id 1"
2125 run_cmd "$IP nexthop del id 1 group 1/2/3/4/5/6/7/8"
2129 run_cmd "$IP nexthop add id 1"
2133 $IP li set veth1 down
2134 run_cmd "$IP nexthop add id 1 dev veth1"
2138 $IP li set veth1 up
2139 ip -netns $peer li set veth2 down
2140 run_cmd "$IP nexthop add id 1 dev veth1"
2142 ip -netns $peer li set veth2 up
2145 run_cmd "$IP nexthop add id 1 dev veth1"
2149 run_cmd "$IP nexthop add id 1 dev veth3"
2153 run_cmd "$IP nexthop add id 2 blackhole"
2157 run_cmd "$IP nexthop replace id 2 blackhole dev veth1"
2162 run_cmd "$IP link set dev lo down"
2166 run_cmd "$IP link set dev lo up"
2169 run_cmd "$IP nexthop add id $((2**32-1)) blackhole"
2170 run_cmd "timeout 5 $IP nexthop"
2177 run_cmd "$IP nexthop add id 101 group 1"
2180 run_cmd "$IP nexthop add id 102 group 2"
2184 run_cmd "$IP nexthop add id 103 group 1/2"
2188 run_cmd "$IP nexthop replace id 2 dev veth3"
2189 run_cmd "$IP nexthop replace id 102 group 1/2"
2190 run_cmd "$IP nexthop replace id 2 blackhole"
2194 run_cmd "$IP nexthop add id 103 group 12"
2198 run_cmd "$IP nexthop add id 103 group 1/1"
2202 run_cmd "$IP nexthop replace id 2 group 1"
2206 run_cmd "$IP nexthop replace id 101 dev veth1"
2210 run_cmd "$IP nexthop add id 104 group 1 dev veth1"
2214 run_cmd "$IP nexthop add id 105 blackhole proto 99"
2215 run_cmd "$IP nexthop add id 106 blackhole proto 100"
2216 run_cmd "$IP nexthop add id 107 blackhole proto 99"
2217 run_cmd "$IP nexthop flush proto 99"
2221 run_cmd "$IP nexthop flush proto 100"
2224 run_cmd "$IP nexthop flush proto 100"
2227 run_cmd "$IP nexthop add id 104 group 1 blackhole"
2230 $IP nexthop flush >/dev/null 2>&1
2240 $IP -b $batch_file
2241 $IP nexthop flush >/dev/null 2>&1
2242 [[ $($IP nexthop | wc -l) -eq 0 ]]
2258 count=$($IP -j nexthop bucket ${nharg} ${selector} | jq length)
2280 run_cmd "$IP nexthop add id 1 dev veth1"
2286 run_cmd "$IP nexthop add id 101 group 1 type resilient buckets 8"
2289 run_cmd "$IP nexthop get id 101"
2294 run_cmd "$IP nexthop add id 102 group 1 type resilient
2296 run_cmd "$IP nexthop get id 102"
2301 run_cmd "$IP nexthop add id 103 group 1 type resilient buckets 0"
2308 run_cmd "$IP nexthop replace id 101 group 1 type resilient
2315 run_cmd "$IP nexthop replace id 101 group 1 type resilient idle_timer 512"
2321 run_cmd "$IP nexthop replace id 101 group 1 type resilient unbalanced_timer 256"
2327 run_cmd "$IP nexthop replace id 101 group 1 type resilient"
2333 run_cmd "$IP nexthop replace id 101 group 1"
2336 run_cmd "$IP nexthop replace id 101 group 1 type mpath"
2339 run_cmd "$IP nexthop replace id 101 group 1 type resilient buckets 1024"
2350 $IP nexthop flush >/dev/null 2>&1
2351 run_cmd "$IP nexthop add id 1 dev veth1"
2352 run_cmd "$IP nexthop add id 2 dev veth3"
2353 run_cmd "$IP nexthop add id 101 group 1/2 type resilient buckets 4"
2354 run_cmd "$IP nexthop add id 201 group 1/2"
2365 (( $($IP -j nexthop bucket list id 101 |
2378 run_cmd "$IP nexthop bucket list id 111"
2381 run_cmd "$IP nexthop bucket list id 201"
2384 run_cmd "$IP nexthop bucket list dev bla"
2387 run_cmd "$IP nexthop bucket list groups"
2390 run_cmd "$IP nexthop bucket list fdb"
2394 run_cmd "$IP nexthop add id $((2**32-1)) group 1/2 type resilient buckets 4"
2395 run_cmd "timeout 5 $IP nexthop bucket"
2405 run_cmd "$IP nexthop bucket get id 101 index 999"
2408 run_cmd "$IP nexthop bucket get id 201 index 0"
2411 run_cmd "$IP nexthop bucket get id 999 index 0"
2418 $IP nexthop flush >/dev/null 2>&1
2420 run_cmd "$IP nexthop add id 1 dev veth1"
2421 run_cmd "$IP nexthop add id 2 dev veth3"
2422 run_cmd "$IP nexthop add id 101
2431 run_cmd "$IP nexthop replace id 101
2439 run_cmd "$IP nexthop replace id 101
2442 run_cmd "$IP nexthop replace id 101
2449 $IP nexthop flush >/dev/null 2>&1
2503 if [ ! -x "$(command -v ip)" ]; then
2504 echo "SKIP: Could not run test without ip tool"
2508 ip help 2>&1 | grep -q nexthop
2514 out=$(ip nexthop ls 2>&1 | grep -q "Operation not supported")
2523 none) IP="ip -netns $peer"; setup; exit 0;;