Lines Matching full:ip
17 IP="ip -netns ns1"
18 NS_EXEC="ip netns exec ns1"
54 ip netns add ns1
55 ip netns set ns1 auto
56 $IP link set dev lo up
57 ip netns exec ns1 sysctl -qw net.ipv4.ip_forward=1
58 ip netns exec ns1 sysctl -qw net.ipv6.conf.all.forwarding=1
60 $IP link add dummy0 type dummy
61 $IP link set dev dummy0 up
62 $IP address add 198.51.100.1/24 dev dummy0
63 $IP -6 address add 2001:db8:1::1/64 dev dummy0
70 $IP link del dev dummy0 &> /dev/null
71 ip netns del ns1
72 ip netns del ns2 &> /dev/null
80 addr=$($IP -6 -br addr show dev ${dev} | \
105 $IP route get fibmatch 198.51.100.2 &> /dev/null
107 $IP -6 route get fibmatch 2001:db8:1::2 &> /dev/null
111 $IP link del dev dummy0
115 $IP route get fibmatch 198.51.100.2 &> /dev/null
117 $IP -6 route get fibmatch 2001:db8:1::2 &> /dev/null
132 $IP link add dummy1 type dummy
133 $IP link set dev dummy1 up
134 $IP address add 192.0.2.1/24 dev dummy1
135 $IP -6 address add 2001:db8:2::1/64 dev dummy1
137 $IP route add 203.0.113.0/24 \
140 $IP -6 route add 2001:db8:3::/64 \
146 $IP route get fibmatch 203.0.113.1 &> /dev/null
148 $IP -6 route get fibmatch 2001:db8:3::1 &> /dev/null
152 $IP link del dev dummy0
156 $IP route get fibmatch 203.0.113.1 &> /dev/null
159 $IP -6 route get fibmatch 2001:db8:3::1 &> /dev/null
164 $IP link del dev dummy1
168 $IP -6 route get fibmatch 2001:db8:3::1 &> /dev/null
188 $IP route get fibmatch 198.51.100.2 &> /dev/null
190 $IP -6 route get fibmatch 2001:db8:1::2 &> /dev/null
194 $IP link set dev dummy0 down
198 $IP route get fibmatch 198.51.100.2 &> /dev/null
200 $IP -6 route get fibmatch 2001:db8:1::2 &> /dev/null
211 $IP route get fibmatch 203.0.113.1 \
214 $IP -6 route get fibmatch 2001:db8:3::1 \
218 $IP route get fibmatch 203.0.113.1 \
221 $IP -6 route get fibmatch 2001:db8:3::1 \
225 $IP route get fibmatch 203.0.113.1 | \
228 $IP -6 route get fibmatch 2001:db8:3::1 | \
232 $IP route get fibmatch 203.0.113.1 | \
235 $IP -6 route get fibmatch 2001:db8:3::1 | \
248 $IP link add dummy1 type dummy
249 $IP link set dev dummy1 up
251 $IP address add 192.0.2.1/24 dev dummy1
252 $IP -6 address add 2001:db8:2::1/64 dev dummy1
254 $IP route add 203.0.113.0/24 \
257 $IP -6 route add 2001:db8:3::/64 \
263 $IP route get fibmatch 203.0.113.1 &> /dev/null
266 $IP -6 route get fibmatch 2001:db8:3::1 &> /dev/null
270 $IP link set dev dummy0 down
277 $IP link set dev dummy0 up
278 $IP link set dev dummy1 down
285 $IP link set dev dummy0 down
289 $IP route get fibmatch 203.0.113.1 &> /dev/null
291 $IP -6 route get fibmatch 2001:db8:3::1 &> /dev/null
294 $IP link del dev dummy1
313 $IP link set dev dummy0 carrier on
317 $IP route get fibmatch 198.51.100.1 &> /dev/null
319 $IP -6 route get fibmatch 2001:db8:1::1 &> /dev/null
322 $IP route get fibmatch 198.51.100.1 | \
325 $IP -6 route get fibmatch 2001:db8:1::1 | \
330 $IP link set dev dummy0 carrier off
335 $IP route get fibmatch 198.51.100.1 &> /dev/null
337 $IP -6 route get fibmatch 2001:db8:1::1 &> /dev/null
340 $IP route get fibmatch 198.51.100.1 | \
343 $IP -6 route get fibmatch 2001:db8:1::1 | \
348 $IP address add 192.0.2.1/24 dev dummy0
349 $IP -6 address add 2001:db8:2::1/64 dev dummy0
353 $IP route get fibmatch 192.0.2.1 &> /dev/null
355 $IP -6 route get fibmatch 2001:db8:2::1 &> /dev/null
358 $IP route get fibmatch 192.0.2.1 | \
361 $IP -6 route get fibmatch 2001:db8:2::1 | \
378 $IP link set dev dummy0 carrier on
382 $IP route get fibmatch 198.51.100.2 &> /dev/null
384 $IP -6 route get fibmatch 2001:db8:1::2 &> /dev/null
387 $IP route get fibmatch 198.51.100.2 | \
390 $IP -6 route get fibmatch 2001:db8:1::2 | \
395 $IP link set dev dummy0 carrier off
400 $IP route get fibmatch 198.51.100.2 &> /dev/null
402 $IP -6 route get fibmatch 2001:db8:1::2 &> /dev/null
405 $IP route get fibmatch 198.51.100.2 | \
408 $IP -6 route get fibmatch 2001:db8:1::2 | \
413 $IP address add 192.0.2.1/24 dev dummy0
414 $IP -6 address add 2001:db8:2::1/64 dev dummy0
418 $IP route get fibmatch 192.0.2.2 &> /dev/null
420 $IP -6 route get fibmatch 2001:db8:2::2 &> /dev/null
423 $IP route get fibmatch 192.0.2.2 | \
426 $IP -6 route get fibmatch 2001:db8:2::2 | \
447 ip netns add ns2
448 ip netns set ns2 auto
450 ip -netns ns2 link set dev lo up
452 $IP link add name veth1 type veth peer name veth2
453 $IP link set dev veth2 netns ns2
454 $IP address add 192.0.2.1/24 dev veth1
455 ip -netns ns2 address add 192.0.2.1/24 dev veth2
456 $IP link set dev veth1 up
457 ip -netns ns2 link set dev veth2 up
459 $IP link set dev lo address 52:54:00:6a:c7:5e
460 $IP link set dev veth1 address 52:54:00:6a:c7:5e
461 ip -netns ns2 link set dev lo address 52:54:00:6a:c7:5e
462 ip -netns ns2 link set dev veth2 address 52:54:00:6a:c7:5e
465 ip netns exec ns2 tc qdisc add dev lo parent root handle 1: fq_codel
466 ip netns exec ns2 tc filter add dev lo parent 1: protocol arp basic \
468 ip netns exec ns2 tc filter add dev lo parent 1: protocol ip basic \
475 $NS_EXEC tc filter add dev veth1 ingress protocol ip basic \
482 $NS_EXEC tc filter add dev lo parent 1: protocol ip basic \
486 ip netns exec ns2 tc qdisc add dev veth2 ingress
487 ip netns exec ns2 tc filter add dev veth2 ingress protocol arp basic \
489 ip netns exec ns2 tc filter add dev veth2 ingress protocol ip basic \
495 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.rp_filter=1
496 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.accept_local=1
497 ip netns exec ns2 sysctl -qw net.ipv4.conf.all.route_localnet=1
500 run_cmd "ip netns exec ns2 ping -w1 -c1 192.0.2.1"
503 run_cmd "ip netns exec ns2 ping -w1 -c1 127.0.0.1"
512 # run 'ip route add' with given spec
527 cmd="$IP route add vrf $vrf $pfx $gw $dev"
621 $IP -4 rule add pref 32765 table local
622 $IP -4 rule del pref 0
623 $IP -6 rule add pref 32765 table local
624 $IP -6 rule del pref 0
626 $IP link add red type vrf table 1
627 $IP link set red up
628 $IP -4 route add vrf red unreachable default metric 4278198272
629 $IP -6 route add vrf red unreachable default metric 4278198272
631 $IP link add veth0 type veth peer name veth1
632 $IP link set dev veth0 up
633 $IP address add 192.0.2.1/24 dev veth0
634 $IP -6 address add 2001:db8:51::1/64 dev veth0
636 $IP link set dev veth1 vrf red up
637 $IP address add 192.0.2.2/24 dev veth1
638 $IP -6 address add 2001:db8:51::2/64 dev veth1
640 $IP link add dummy1 type dummy
641 $IP link set dev dummy1 vrf red up
642 $IP address add 192.168.2.1/24 dev dummy1
643 $IP -6 address add 2001:db8:2::1/64 dev dummy1
651 $IP link del dev dummy1
652 $IP link del veth0
653 $IP link del red
664 $IP link add dummy1 type dummy
665 $IP link set dummy1 up
666 $IP -6 route add default dev dummy1
667 $IP -6 rule add table main suppress_prefixlength 0
669 $IP -6 rule del table main suppress_prefixlength 0
670 $IP link del dummy1
720 # tricky way to convert output to 1-line without ip's
750 run_cmd "$IP -6 ro flush ${pfx}"
753 out=$($IP -6 ro ls match ${pfx})
759 run_cmd "$IP -6 ro add ${pfx} ${nh}"
782 out=$($IP -6 ro ls match ${pfx} | sed -e 's/ pref medium//')
788 $IP li del red 2>/dev/null
789 $IP li del dummy1 2>/dev/null
790 $IP li del veth1 2>/dev/null
791 $IP li del veth3 2>/dev/null
804 ip netns add ns2
805 ip netns set ns2 auto
806 ip -netns ns2 link set dev lo up
807 ip netns exec ns2 sysctl -qw net.ipv4.ip_forward=1
808 ip netns exec ns2 sysctl -qw net.ipv6.conf.all.forwarding=1
810 $IP li add veth1 type veth peer name veth2
811 $IP li add veth3 type veth peer name veth4
813 $IP li set veth1 up
814 $IP li set veth3 up
815 $IP li set veth2 netns ns2 up
816 $IP li set veth4 netns ns2 up
817 ip -netns ns2 li add dummy1 type dummy
818 ip -netns ns2 li set dummy1 up
820 $IP -6 addr add 2001:db8:101::1/64 dev veth1 nodad
821 $IP -6 addr add 2001:db8:103::1/64 dev veth3 nodad
822 $IP addr add 172.16.101.1/24 dev veth1
823 $IP addr add 172.16.103.1/24 dev veth3
825 ip -netns ns2 -6 addr add 2001:db8:101::2/64 dev veth2 nodad
826 ip -netns ns2 -6 addr add 2001:db8:103::2/64 dev veth4 nodad
827 ip -netns ns2 -6 addr add 2001:db8:104::1/64 dev dummy1 nodad
829 ip -netns ns2 addr add 172.16.101.2/24 dev veth2
830 ip -netns ns2 addr add 172.16.103.2/24 dev veth4
831 ip -netns ns2 addr add 172.16.104.1/24 dev dummy1
845 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
847 run_cmd "$IP -6 ro add 2001:db8:104::/64 via 2001:db8:103::2"
850 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
852 run_cmd "$IP -6 ro add 2001:db8:104::/64 dev veth3"
855 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
857 run_cmd "$IP -6 ro add unreachable 2001:db8:104::/64"
863 run_cmd "$IP -6 ro append 2001:db8:104::/64 via 2001:db8:103::2"
873 run_cmd "$IP -6 ro add 2001:db8:104::/64 nexthop via 2001:db8:101::2 nexthop via 2001:db8:103::2"
878 run_cmd "$IP -6 ro add 2001:db8:104::/64 via 2001:db8:103::2 metric 512"
881 run_cmd "$IP -6 ro add 2001:db8:104::/64 via 2001:db8:103::3 metric 256"
886 run_cmd "$IP -6 ro del 2001:db8:104::/64 metric 512"
900 run_cmd "$IP -6 ro replace 2001:db8:104::/64 via 2001:db8:103::2"
907 …run_cmd "$IP -6 ro replace 2001:db8:104::/64 nexthop via 2001:db8:101::3 nexthop via 2001:db8:103:…
914 run_cmd "$IP -6 ro replace 2001:db8:104::/64 nexthop via 2001:db8:103::2"
920 run_cmd "$IP -6 ro replace 2001:db8:104::/64 via 2001:db8:104::2"
931 # - note use of change versus replace since ip adds NLM_F_CREATE
934 run_cmd "$IP -6 ro change 2001:db8:105::/64 via 2001:db8:101::2"
942 …run_cmd "$IP -6 ro replace 2001:db8:104::/64 nexthop via 2001:db8:101::3 nexthop via 2001:db8:103:…
948 run_cmd "$IP -6 ro replace 2001:db8:104::/64 via 2001:db8:101::3"
954 run_cmd "$IP -6 ro replace 2001:db8:104::/64 nexthop via 2001:db8:101::3"
960 run_cmd "$IP -6 ro replace 2001:db8:104::/64 dev veth1"
966 …run_cmd "$IP -6 ro replace 2001:db8:104::/64 nexthop via 2001:db8:111::3 nexthop via 2001:db8:103:…
972 …run_cmd "$IP -6 ro replace 2001:db8:104::/64 nexthop via 2001:db8:101::3 nexthop via 2001:db8:113:…
978 …run_cmd "$IP -6 ro change 2001:db8:105::/64 nexthop via 2001:db8:101::3 nexthop via 2001:db8:103::…
996 run_cmd "$IP -6 route flush 2001:db8:102::/64"
999 run_cmd "$IP -6 route add 2001:db8:102::/64 dsfield 0x04 via 2001:db8:101::2"
1016 ip addr help 2>&1 | grep -q metric
1037 $IP li add dummy1 type dummy
1038 $IP li add dummy2 type dummy
1039 $IP li set dummy1 up
1040 $IP li set dummy2 up
1043 run_cmd "$IP -6 addr add dev dummy1 2001:db8:104::1/64"
1044 run_cmd "$IP -6 addr add dev dummy2 2001:db8:104::2/64"
1051 run_cmd "$IP -6 addr flush dev dummy1"
1052 run_cmd "$IP -6 addr add dev dummy1 2001:db8:104::1/64 metric 257"
1059 run_cmd "$IP -6 addr flush dev dummy2"
1060 run_cmd "$IP -6 addr add dev dummy2 2001:db8:104::2/64 metric 258"
1066 run_cmd "$IP -6 addr del dev dummy1 2001:db8:104::1/64 metric 257"
1074 run_cmd "$IP -6 addr change dev dummy2 2001:db8:104::2/64 metric 259"
1083 run_cmd "ip netns exec ns1 sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1"
1084 run_cmd "$IP li set dev dummy2 down"
1087 out=$($IP -6 ro ls match 2001:db8:104::/64)
1094 run_cmd "$IP li set dev dummy2 up"
1104 run_cmd "$IP -6 addr flush dev dummy2"
1105 run_cmd "$IP -6 addr add dev dummy2 2001:db8:104::1 peer 2001:db8:104::2 metric 260"
1114 run_cmd "$IP -6 addr change dev dummy2 2001:db8:104::1 peer 2001:db8:104::3 metric 261"
1122 $IP li del dummy1
1123 $IP li del dummy2
1139 run_cmd "$IP -6 ro add 2001:db8:111::/64 via 2001:db8:101::2 mtu 1400"
1151 run_cmd "$IP -6 ro add 2001:db8:112::/64 via 2001:db8:101::2 mtu 1400"
1152 run_cmd "$IP -6 ro append 2001:db8:112::/64 via 2001:db8:103::2"
1162 run_cmd "$IP -6 ro add 2001:db8:113::/64 via 2001:db8:101::2"
1163 run_cmd "$IP -6 ro append 2001:db8:113::/64 via 2001:db8:103::2 mtu 1400"
1171 run_cmd "$IP -6 ro del 2001:db8:113::/64 via 2001:db8:101::2"
1180 …run_cmd "$IP -6 ro add 2001:db8:115::/64 mtu 1400 nexthop via 2001:db8:101::2 nexthop via 2001:db8…
1188 $IP -6 ro add 2001:db8:104::/64 via 2001:db8:101::2 mtu 1300
1189 run_cmd "ip netns exec ns1 ${ping6} -w1 -c1 -s 1500 2001:db8:104::1"
1192 run_cmd "$IP -6 ro add 2001:db8:114::/64 via 2001:db8:101::2 congctl lock foo"
1212 run_cmd "$IP ro flush ${pfx}"
1215 out=$($IP ro ls match ${pfx})
1221 run_cmd "$IP ro add ${pfx} ${nh}"
1244 out=$($IP ro ls match ${pfx})
1257 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
1259 run_cmd "$IP ro add 172.16.104.0/24 via 172.16.103.2"
1262 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
1264 run_cmd "$IP ro add 172.16.104.0/24 dev veth3"
1267 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
1269 run_cmd "$IP ro add unreachable 172.16.104.0/24"
1275 run_cmd "$IP ro prepend 172.16.104.0/24 via 172.16.103.2"
1282 run_cmd "$IP ro append 172.16.104.0/24 via 172.16.103.2"
1287 run_cmd "$IP ro append 172.16.104.0/24 dev veth3"
1292 run_cmd "$IP ro append unreachable 172.16.104.0/24"
1296 run_cmd "$IP ro flush 172.16.104.0/24"
1297 run_cmd "$IP ro add unreachable 172.16.104.0/24"
1298 run_cmd "$IP ro append 172.16.104.0/24 via 172.16.103.2"
1302 run_cmd "$IP ro flush 172.16.104.0/24"
1303 run_cmd "$IP ro add unreachable 172.16.104.0/24"
1304 run_cmd "$IP ro append 172.16.104.0/24 dev veth3"
1314 run_cmd "$IP ro add 172.16.104.0/24 nexthop via 172.16.101.2 nexthop via 172.16.103.2"
1319 run_cmd "$IP ro add 172.16.104.0/24 via 172.16.103.2 metric 512"
1322 run_cmd "$IP ro add 172.16.104.0/24 via 172.16.103.3 metric 256"
1327 run_cmd "$IP ro del 172.16.104.0/24 metric 512"
1341 run_cmd "$IP ro replace 172.16.104.0/24 via 172.16.103.2"
1348 run_cmd "$IP ro replace 172.16.104.0/24 nexthop via 172.16.101.3 nexthop via 172.16.103.2"
1355 run_cmd "$IP ro replace unreachable 172.16.104.0/24"
1362 run_cmd "$IP ro replace 172.16.104.0/24 nexthop via 172.16.103.2"
1368 run_cmd "$IP ro replace 172.16.104.0/24 via 2001:db8:104::2"
1379 # - note use of change versus replace since ip adds NLM_F_CREATE
1382 run_cmd "$IP ro change 172.16.105.0/24 via 172.16.101.2"
1390 run_cmd "$IP ro replace 172.16.104.0/24 nexthop via 172.16.101.3 nexthop via 172.16.103.3"
1396 run_cmd "$IP ro replace 172.16.104.0/24 via 172.16.101.3"
1402 run_cmd "$IP ro replace 172.16.104.0/24 nexthop via 172.16.101.3"
1408 run_cmd "$IP ro replace unreachable 172.16.104.0/24"
1414 run_cmd "$IP ro replace 172.16.104.0/24 nexthop via 172.16.111.3 nexthop via 172.16.103.3"
1420 run_cmd "$IP ro replace 172.16.104.0/24 nexthop via 172.16.101.3 nexthop via 172.16.113.3"
1426 run_cmd "$IP ro change 172.16.105.0/24 nexthop via 172.16.101.3 nexthop via 172.16.103.3"
1443 run_cmd "ip addr add 10.0.0.1/32 dev lo"
1444 run_cmd "ip netns add test-ns"
1445 run_cmd "ip link add veth-outside type veth peer name veth-inside"
1446 run_cmd "ip link add vrf-100 type vrf table 1100"
1447 run_cmd "ip link set veth-outside master vrf-100"
1448 run_cmd "ip link set veth-inside netns test-ns"
1449 run_cmd "ip link set veth-outside up"
1450 run_cmd "ip link set vrf-100 up"
1451 run_cmd "ip route add 10.1.1.1/32 dev veth-outside table 1100"
1452 run_cmd "ip netns exec test-ns ip link set veth-inside up"
1453 run_cmd "ip netns exec test-ns ip addr add 10.1.1.1/32 dev veth-inside"
1454 run_cmd "ip netns exec test-ns ip route add 10.0.0.1/32 dev veth-inside"
1455 run_cmd "ip netns exec test-ns ip route add default via 10.0.0.1"
1456 run_cmd "ip netns exec test-ns ping 10.0.0.1 -c 1 -i 1"
1457 run_cmd "ip link delete vrf-100"
1468 run_cmd "$IP route flush 172.16.102.0/24"
1471 run_cmd "$IP route add 172.16.102.0/24 dsfield 0x01 via 172.16.101.2"
1474 run_cmd "$IP route add 172.16.102.0/24 dsfield 0x02 via 172.16.101.2"
1477 run_cmd "$IP route add 172.16.102.0/24 dsfield 0x03 via 172.16.101.2"
1481 run_cmd "$IP route add 172.16.102.0/24 via 172.16.101.2"
1484 run_cmd "$IP route add 172.16.102.0/24 dsfield 0x10 via 172.16.103.2"
1487 $IP route get fibmatch 172.16.102.1 dsfield 0x10 | \
1491 $IP route get fibmatch 172.16.102.1 dsfield 0x11 | \
1495 $IP route get fibmatch 172.16.102.1 dsfield 0x12 | \
1499 $IP route get fibmatch 172.16.102.1 dsfield 0x13 | \
1504 $IP route get fibmatch 172.16.102.1 dsfield 0x14 | \
1508 $IP route get fibmatch 172.16.102.1 dsfield 0x15 | \
1512 $IP route get fibmatch 172.16.102.1 dsfield 0x16 | \
1516 $IP route get fibmatch 172.16.102.1 dsfield 0x17 | \
1521 $IP route get fibmatch 172.16.102.1 dsfield 0x00 | \
1525 $IP route get fibmatch 172.16.102.1 dsfield 0x01 | \
1529 $IP route get fibmatch 172.16.102.1 dsfield 0x02 | \
1533 $IP route get fibmatch 172.16.102.1 dsfield 0x03 | \
1562 $IP li add dummy1 type dummy
1563 $IP li add dummy2 type dummy
1564 $IP li set dummy1 up
1565 $IP li set dummy2 up
1568 run_cmd "$IP addr add dev dummy1 172.16.104.1/24"
1569 run_cmd "$IP addr add dev dummy2 172.16.104.2/24"
1576 run_cmd "$IP addr flush dev dummy1"
1577 run_cmd "$IP addr add dev dummy1 172.16.104.1/24 metric 257"
1584 run_cmd "$IP addr flush dev dummy2"
1585 run_cmd "$IP addr add dev dummy2 172.16.104.2/24 metric 258"
1591 run_cmd "$IP addr del dev dummy1 172.16.104.1/24 metric 257"
1599 run_cmd "$IP addr change dev dummy2 172.16.104.2/24 metric 259"
1608 run_cmd "$IP li set dev dummy2 down"
1611 out=$($IP ro ls match 172.16.104.0/24)
1618 run_cmd "$IP li set dev dummy2 up"
1627 run_cmd "$IP addr flush dev dummy2"
1628 run_cmd "$IP addr add dev dummy2 172.16.104.0/24 metric 259"
1629 run_cmd "$IP addr change dev dummy2 172.16.104.0/24 metric 260"
1637 run_cmd "$IP addr flush dev dummy2"
1638 run_cmd "$IP addr add dev dummy2 172.16.104.1/32 peer 172.16.104.2 metric 260"
1646 run_cmd "$IP addr change dev dummy2 172.16.104.1/32 peer 172.16.104.3 metric 261"
1654 $IP li del dummy1
1655 $IP li del dummy2
1668 run_cmd "$IP ro add 172.16.111.0/24 via 172.16.101.2 mtu 1400"
1677 run_cmd "$IP ro add 172.16.112.0/24 mtu 1400 nexthop via 172.16.101.2 nexthop via 172.16.103.2"
1685 $IP ro add 172.16.104.0/24 via 172.16.101.2 mtu 1300
1686 run_cmd "ip netns exec ns1 ping -w1 -c1 -s 1500 172.16.104.1"
1689 run_cmd "$IP ro add 172.16.111.0/24 via 172.16.101.2 congctl lock foo"
1703 $IP li add dummy1 type dummy
1704 $IP li set dummy1 up
1705 $IP li add dummy2 type dummy
1706 $IP li set dummy2 up
1707 $IP li add red type vrf table 1111
1708 $IP li set red up
1709 $IP ro add vrf red unreachable default
1710 $IP li set dummy2 vrf red
1712 $IP addr add dev dummy1 172.16.104.1/24
1713 $IP addr add dev dummy1 172.16.104.11/24
1714 $IP addr add dev dummy1 172.16.104.12/24
1715 $IP addr add dev dummy1 172.16.104.13/24
1716 $IP addr add dev dummy2 172.16.104.1/24
1717 $IP addr add dev dummy2 172.16.104.11/24
1718 $IP addr add dev dummy2 172.16.104.12/24
1719 $IP route add 172.16.105.0/24 via 172.16.104.2 src 172.16.104.11
1720 $IP route add 172.16.106.0/24 dev lo src 172.16.104.12
1721 $IP route add table 0 172.16.107.0/24 via 172.16.104.2 src 172.16.104.13
1722 $IP route add vrf red 172.16.105.0/24 via 172.16.104.2 src 172.16.104.11
1723 $IP route add vrf red 172.16.106.0/24 dev lo src 172.16.104.12
1729 $IP addr del dev dummy2 172.16.104.11/24
1730 $IP ro ls vrf red | grep -q 172.16.105.0/24
1733 $IP ro ls | grep -q 172.16.105.0/24
1736 $IP addr add dev dummy2 172.16.104.11/24
1737 $IP route add vrf red 172.16.105.0/24 via 172.16.104.2 src 172.16.104.11
1739 $IP addr del dev dummy1 172.16.104.11/24
1740 $IP ro ls | grep -q 172.16.105.0/24
1743 $IP ro ls vrf red | grep -q 172.16.105.0/24
1750 $IP addr del dev dummy2 172.16.104.12/24
1751 $IP ro ls vrf red | grep -q 172.16.106.0/24
1754 $IP ro ls | grep -q 172.16.106.0/24
1757 $IP addr add dev dummy2 172.16.104.12/24
1758 $IP route add vrf red 172.16.106.0/24 dev lo src 172.16.104.12
1760 $IP addr del dev dummy1 172.16.104.12/24
1761 $IP ro ls | grep -q 172.16.106.0/24
1764 $IP ro ls vrf red | grep -q 172.16.106.0/24
1771 $IP addr del dev dummy1 172.16.104.13/24
1772 $IP ro ls | grep -q 172.16.107.0/24
1775 $IP li del dummy1
1776 $IP li del dummy2
1794 run_cmd "$IP ro add 172.16.104.0/24 via inet6 2001:db8:101::2"
1801 run_cmd "ip netns exec ns1 ping -w1 -c1 172.16.104.1"
1804 run_cmd "$IP ro del 172.16.104.0/24 via inet6 2001:db8:101::2"
1814 …run_cmd "$IP ro add 172.16.104.0/24 nexthop via inet6 2001:db8:101::2 dev veth1 nexthop via 172.16…
1821 …run_cmd "$IP ro del 172.16.104.0/24 nexthop via 172.16.103.2 dev veth3 nexthop via inet6 2001:db8:…
1824 …run_cmd "$IP ro del 172.16.104.0/24 nexthop via inet6 2001:db8:101::2 dev veth1 nexthop via 172.16…
1830 …run_cmd "$IP ro add 172.16.104.0/24 nexthop via 172.16.103.2 dev veth3 nexthop via inet6 2001:db8:…
1837 …run_cmd "$IP ro del 172.16.104.0/24 nexthop via inet6 2001:db8:101::2 dev veth1 nexthop via 172.16…
1840 …run_cmd "$IP ro del 172.16.104.0/24 nexthop via 172.16.103.2 dev veth3 nexthop via inet6 2001:db8:…
1892 ip netns exec ns2 socat UDP4-LISTEN:54321,fork $tmp_file &
1896 $IP rule add pref 100 ipproto udp sport 12345 dport 54321 table 123
1897 $IP route add table 123 172.16.101.0/24 dev veth1
1901 $IP route add unreachable 172.16.101.2/32
1926 $IP route del unreachable 172.16.101.2/32
1927 $IP route del table 123 172.16.101.0/24 dev veth1
1928 $IP rule del pref 100
1950 ip netns exec ns2 socat UDP6-LISTEN:54321,fork $tmp_file &
1954 $IP -6 rule add pref 100 ipproto udp sport 12345 dport 54321 table 123
1955 $IP -6 route add table 123 2001:db8:101::/64 dev veth1
1959 $IP -6 route add unreachable 2001:db8:101::2/128
1984 $IP -6 route del unreachable 2001:db8:101::2/128
1985 $IP -6 route del table 123 2001:db8:101::/64 dev veth1
1986 $IP -6 rule del pref 100
1996 ip neigh help 2>&1 | grep -q 'ip neigh get'
2017 run_cmd "$IP neigh add 192.0.2.111 lladdr 00:11:22:33:44:55 nud perm dev dummy0"
2018 run_cmd "$IP neigh add 192.0.2.255 lladdr 00:11:22:33:44:55 nud perm dev dummy0"
2020 run_cmd "$IP neigh get 192.0.2.111 dev dummy0"
2021 run_cmd "$IP neigh get 192.0.2.255 dev dummy0"
2023 run_cmd "$IP address add 192.0.2.1/24 broadcast 192.0.2.111 dev dummy0"
2025 run_cmd "$IP neigh add 203.0.113.111 nud failed dev dummy0"
2026 run_cmd "$IP neigh add 203.0.113.255 nud failed dev dummy0"
2028 run_cmd "$IP neigh get 203.0.113.111 dev dummy0"
2029 run_cmd "$IP neigh get 203.0.113.255 dev dummy0"
2031 run_cmd "$IP address add 203.0.113.1/24 broadcast 203.0.113.111 dev dummy0"
2034 run_cmd "$IP neigh get 192.0.2.111 dev dummy0"
2037 run_cmd "$IP neigh get 192.0.2.255 dev dummy0"
2040 run_cmd "$IP neigh get 203.0.113.111 dev dummy0"
2043 run_cmd "$IP neigh get 203.0.113.255 dev dummy0"
2080 PEER_CMD="ip netns exec ${PEER_NS}"
2090 if [ ! -x "$(command -v ip)" ]; then
2091 echo "SKIP: Could not run test without ip tool"
2095 ip route help 2>&1 | grep -q fibmatch