Lines Matching full:route
100 echo "Single path route test"
105 $IP route get fibmatch 198.51.100.2 &> /dev/null
107 $IP -6 route get fibmatch 2001:db8:1::2 &> /dev/null
115 $IP route get fibmatch 198.51.100.2 &> /dev/null
116 log_test $? 2 "IPv4 fibmatch - no route"
117 $IP -6 route get fibmatch 2001:db8:1::2 &> /dev/null
118 log_test $? 2 "IPv6 fibmatch - no route"
127 echo "Multipath route test"
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
156 $IP route get fibmatch 203.0.113.1 &> /dev/null
157 log_test $? 2 "IPv4 - multipath route removed on delete"
159 $IP -6 route get fibmatch 2001:db8:3::1 &> /dev/null
160 # In IPv6 we do not flush the entire multipath route.
168 $IP -6 route get fibmatch 2001:db8:3::1 &> /dev/null
169 log_test $? 2 "IPv6 - no route"
188 $IP route get fibmatch 198.51.100.2 &> /dev/null
190 $IP -6 route get fibmatch 2001:db8:1::2 &> /dev/null
197 echo " Route deleted on 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 | \
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
289 $IP route get fibmatch 203.0.113.1 &> /dev/null
291 $IP -6 route get fibmatch 2001:db8:3::1 &> /dev/null
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 | \
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 | \
352 echo " Route to local address with carrier down"
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 | \
373 echo "Single path route carrier test"
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 | \
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 | \
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 | \
473 # run 'ip route add' with given spec
488 cmd="$IP route add vrf $vrf $pfx $gw $dev"
556 add_rt "VRF route, gateway can be local address in default VRF" 0 \
560 add_rt "VRF route, gateway can not be a local address" 2 \
562 add_rt "VRF route, gateway can not be a local addr with device" 2 \
589 $IP -4 route add vrf red unreachable default metric 4278198272
590 $IP -6 route add vrf red unreachable default metric 4278198272
627 $IP -6 route add default dev dummy1
640 # Tests on route add and replace
674 printf "\nNo route entry found\n"
687 printf " Unexpected route entry. Have:\n"
697 # add route for a prefix, flushing any existing routes first
722 echo "Failed to add initial route for test."
727 # add initial route - used in replace route tests
797 # assumption is that basic add of a single path route works
804 echo "IPv6 route add / append tests"
806 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
809 log_test $? 2 "Attempt to add duplicate route - gw"
811 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
814 log_test $? 2 "Attempt to add duplicate route - dev only"
816 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
819 log_test $? 2 "Attempt to add duplicate route - reject route"
821 # route append with same prefix adds a new route
826 log_test $? 0 "Append nexthop to existing route - gw"
831 log_test $? 0 "Add multipath route"
835 log_test $? 2 "Attempt to add duplicate multipath route"
837 # insert of a second route without append but different metric
845 log_test $rc 0 "Route add with different metrics"
853 log_test $rc 0 "Route delete with metric"
879 # route replace fails - invalid nexthop
891 # replace non-existent route
896 log_test $? 2 "Single path - replace of non-existent route"
925 # route replace fails - invalid nexthop 1
931 # route replace fails - invalid nexthop 2
937 # multipath non-existent route
940 log_test $? 2 "Multipath - replace of non-existent route"
946 echo "IPv6 route replace tests"
978 echo "IPv6 prefix route tests"
1030 # verify prefix route removed on down
1039 log_test $rc 0 "Prefix route removed on link down"
1041 # verify prefix route re-inserted with assigned metric
1048 log_test $rc 0 "Prefix route with metric on link up"
1057 log_test $? 0 "Set metric with peer route on local side"
1059 log_test $? 0 "Set metric with peer route on peer side"
1093 log_test $rc 0 "Single path route with mtu metric"
1106 log_test $rc 0 "Multipath route via 2 single routes with mtu metric on first"
1108 # second route is coalesced to first to make a multipath route.
1117 log_test $rc 0 "Multipath route via 2 single routes with mtu metric on 2nd"
1134 log_test $rc 0 "Multipath route with mtu metric"
1138 log_test $? 0 "Using route with mtu metric"
1146 # add route for a prefix, flushing any existing routes first
1171 echo "Failed to add initial route for test."
1176 # add initial route - used in replace route tests
1196 # assumption is that basic add of a single path route works
1203 echo "IPv4 route add / append tests"
1205 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
1208 log_test $? 2 "Attempt to add duplicate route - gw"
1210 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
1213 log_test $? 2 "Attempt to add duplicate route - dev only"
1215 # route add same prefix - fails with EEXISTS b/c ip adds NLM_F_EXCL
1218 log_test $? 2 "Attempt to add duplicate route - reject route"
1221 # - adds a new route; does NOT convert existing route to ECMP
1227 # route append with same prefix adds a new route
1232 log_test $? 0 "Append nexthop to existing route - gw"
1237 log_test $? 0 "Append nexthop to existing route - dev only"
1242 log_test $? 0 "Append nexthop to existing route - reject route"
1248 log_test $? 0 "Append nexthop to existing reject route - gw"
1254 log_test $? 0 "Append nexthop to existing reject route - dev only"
1259 log_test $? 0 "add multipath route"
1263 log_test $? 2 "Attempt to add duplicate multipath route"
1265 # insert of a second route without append but different metric
1273 log_test $rc 0 "Route add with different metrics"
1281 log_test $rc 0 "Route delete with metric"
1305 log_test $? 0 "Single path with reject route"
1314 # route replace fails - invalid nexthop
1326 # replace non-existent route
1331 log_test $? 2 "Single path - replace of non-existent route"
1358 log_test $? 0 "Multipath with reject route"
1360 # route replace fails - invalid nexthop 1
1366 # route replace fails - invalid nexthop 2
1372 # multipath non-existent route
1375 log_test $? 2 "Multipath - replace of non-existent route"
1381 echo "IPv4 route replace tests"
1387 # checks that cached input route on VRF port is deleted
1399 run_cmd "ip route add 10.1.1.1/32 dev veth-outside table 1100"
1402 run_cmd "ip netns exec test-ns ip route add 10.0.0.1/32 dev veth-inside"
1403 run_cmd "ip netns exec test-ns ip route add default via 10.0.0.1"
1408 log_test $? 0 "Cached route removed from VRF port device"
1427 echo "IPv4 prefix route tests"
1479 # verify prefix route removed on down
1487 log_test $rc 0 "Prefix route removed on link down"
1489 # verify prefix route re-inserted with assigned metric
1496 log_test $rc 0 "Prefix route with metric on link up"
1516 log_test $rc 0 "Set metric of address with peer route"
1524 log_test $rc 0 "Modify metric and peer address for peer route"
1536 echo "IPv4 route add / append tests"
1546 log_test $rc 0 "Single path route with mtu metric"
1555 log_test $rc 0 "Multipath route with mtu metric"
1559 log_test $? 0 "Using route with mtu metric"
1570 echo "IPv4 delete address route tests"
1588 $IP route add 172.16.105.0/24 via 172.16.104.2 src 172.16.104.11
1589 $IP route add vrf red 172.16.105.0/24 via 172.16.104.2 src 172.16.104.11
1592 # removing address from device in vrf should only remove route from vrf table
1595 log_test $? 1 "Route removed from VRF when source address deleted"
1598 log_test $? 0 "Route in default VRF not removed"
1601 $IP route add vrf red 172.16.105.0/24 via 172.16.104.2 src 172.16.104.11
1605 log_test $? 1 "Route removed in default VRF when source address deleted"
1608 log_test $? 0 "Route in VRF is not removed by address delete"
1621 echo "IPv4 route with IPv6 gateway tests"
1627 # single path route
1631 log_test $rc 0 "Single path route with IPv6 gateway"
1637 log_test $rc 0 "Single path route with IPv6 gateway - ping"
1641 log_test $rc 0 "Single path route delete"
1651 log_test $rc 0 "Multipath route add - v6 nexthop then v4"
1657 log_test $? 2 " Multipath route delete - nexthops in wrong order"
1660 log_test $? 0 " Multipath route delete exact match"
1667 log_test $rc 0 "Multipath route add - v4 nexthop then v6"
1673 log_test $? 2 " Multipath route delete - nexthops in wrong order"
1676 log_test $? 0 " Multipath route delete exact match"
1729 # Add a FIB rule and a route that will direct our connection to the
1732 $IP route add table 123 172.16.101.0/24 dev veth1
1734 # Add an unreachable route to the main table that will block our
1736 $IP route add unreachable 172.16.101.2/32
1761 $IP route del unreachable 172.16.101.2/32
1762 $IP route del table 123 172.16.101.0/24 dev veth1
1787 # Add a FIB rule and a route that will direct our connection to the
1790 $IP -6 route add table 123 2001:db8:101::/64 dev veth1
1792 # Add an unreachable route to the main table that will block our
1794 $IP -6 route add unreachable 2001:db8:101::2/128
1819 $IP -6 route del unreachable 2001:db8:101::2/128
1820 $IP -6 route del table 123 2001:db8:101::/64 dev veth1
1875 ip route help 2>&1 | grep -q fibmatch