/linux/tools/testing/selftests/net/forwarding/ |
H A D | fib_offload_lib.sh | 1 # SPDX-License-Identifier: GPL-2.0 9 local route=$1; shift 13 ip -n $ns -j -p -$family route show $route \ 14 | jq -e '.[]["flags"] | contains(["trap"])' &> /dev/null 17 if [[ $ret -ne 0 ]]; then 31 local route=$1; shift 34 busywait 5000 __fib_trap_check $ns $family "$route" $should_fail 40 local route=$1; shift 43 fib_trap_check $ns 4 "$route" $should_fail 49 local route=$1; shift [all …]
|
H A D | router_multipath.sh | 2 # SPDX-License-Identifier: GPL-2.0 10 vrf_create "vrf-h1" 11 ip link set dev $h1 master vrf-h1 13 ip link set dev vrf-h1 up 14 ip link set dev $h1 up 19 ip route add 198.51.100.0/24 vrf vrf-h1 nexthop via 192.0.2.1 20 ip route add 2001:db8:2::/64 vrf vrf-h1 nexthop via 2001:db8:1::1 25 ip route del 2001:db8:2::/64 vrf vrf-h1 26 ip route del 198.51.100.0/24 vrf vrf-h1 32 vrf_destroy "vrf-h1" [all …]
|
H A D | router_broadcast.sh | 2 # SPDX-License-Identifier: GPL-2.0 10 vrf_create "vrf-h1" 11 ip link set dev $h1 master vrf-h1 13 ip link set dev vrf-h1 up 14 ip link set dev $h1 up 18 ip route add 198.51.100.0/24 vrf vrf-h1 nexthop via 192.0.2.1 19 ip route add 198.51.200.0/24 vrf vrf-h1 nexthop via 192.0.2.1 24 ip route del 198.51.200.0/24 vrf vrf-h1 25 ip route del 198.51.100.0/24 vrf vrf-h1 30 vrf_destroy "vrf-h1" [all …]
|
H A D | router_mpath_nh.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # +-------------------------+ 9 # +-------------------|-----+ 11 # +-------------------|----------------------+ 20 # +--|--------------------|------------------+ 22 # +--|--------------------|------------------+ 30 # +-------------------|----------------------+ 32 # +-------------------|-----+ 37 # +-------------------------+ 55 vrf_create "vrf-h1" [all …]
|
H A D | router_nh.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # +-------------------------+ +-------------------------+ 9 # +-------------------|-----+ +-------------------|-----+ 11 # +-------------------|----------------------------|-----+ 16 # +------------------------------------------------------+ 29 vrf_create "vrf-h1" 30 ip link set dev $h1 master vrf-h1 32 ip link set dev vrf-h1 up 33 ip link set dev $h1 up 38 ip route add 198.51.100.0/24 vrf vrf-h1 nexthop via 192.0.2.1 [all …]
|
H A D | router_vid_1.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # +--------------------+ +----------------------+ 13 # +------------------|-+ +-|--------------------+ 15 # +------------------|-------------------------|--------------------+ 24 # +-----------------------------------------------------------------+ 35 vrf_create "vrf-h1" 36 ip link set dev vrf-h1 up 38 ip link set dev $h1 up 39 vlan_create $h1 1 vrf-h1 192.0.2.2/24 2001:db8:1::2/64 41 ip route add 198.51.100.0/24 vrf vrf-h1 nexthop via 192.0.2.1 [all …]
|
H A D | tc_flower_router.sh | 2 # SPDX-License-Identifier: GPL-2.0 13 ip route add 192.0.2.0/24 vrf v$h1 nexthop via 192.0.1.2 14 ip route add 192.0.3.0/24 vrf v$h1 nexthop via 192.0.1.2 19 ip route del 192.0.3.0/24 vrf v$h1 20 ip route del 192.0.2.0/24 vrf v$h1 29 ip route add 192.0.1.0/24 vrf v$h2 nexthop via 192.0.2.2 30 ip route add 192.0.3.0/24 vrf v$h2 nexthop via 192.0.2.2 35 ip route del 192.0.3.0/24 vrf v$h2 36 ip route del 192.0.1.0/24 vrf v$h2 45 ip route add 192.0.1.0/24 vrf v$h3 nexthop via 192.0.3.2 [all …]
|
H A D | router_mpath_nh_res.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # +-------------------------+ 9 # +-------------------|-----+ 11 # +-------------------|----------------------+ 20 # +--|--------------------|------------------+ 22 # +--|--------------------|------------------+ 30 # +-------------------|----------------------+ 32 # +-------------------|-----+ 37 # +-------------------------+ 53 vrf_create "vrf-h1" [all …]
|
H A D | router_bridge_1d.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # +---------------------------------------------+ +----------------------+ 12 # +--------------|------------------------------+ +--|-------------------+ 14 # +--------------|----------------------------------------|-------------------+ 21 # | +---|------------------------------+ +---|------------------------------+ | 26 # | +----------------------------------+ +----------------------------------+ | 27 # +---------------------------------------------------------------------------+ 44 ip -4 route add 192.0.2.128/28 vrf v$h1 nexthop via 192.0.2.2 45 ip -4 route add 192.0.2.144/28 vrf v$h1 nexthop via 192.0.2.18 46 ip -6 route add 2001:db8:2::/64 vrf v$h1 nexthop via 2001:db8:1::2 [all …]
|
H A D | router_bridge_vlan.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # +------------------------------------------------+ +----------------------+ 9 # | | .-----------------' | | | 2001:db8:2::2/64 | 12 # +----|-------------------------------------------+ +--|-------------------+ 14 # +----|--------------------------------------------------|-------------------+ 16 # | +--|-------------------------------+ + $swp2 | 26 # | +----------------------------------+ | 27 # +---------------------------------------------------------------------------+ 50 ip -4 route add 192.0.2.128/28 vrf v$h1 nexthop via 192.0.2.2 51 ip -6 route add 2001:db8:2::/64 vrf v$h1 nexthop via 2001:db8:1::2 [all …]
|
H A D | mirror_gre_changes.sh | 2 # SPDX-License-Identifier: GPL-2.0 104 ip link set dev $tundev up 109 log_test "$what: tunnel down/up" 124 # After setting the device up, wait for neighbor to get resolved so that 126 ip link set dev $swp3 up 128 ping -c 1 -I $swp3 $remote_ip &>/dev/null 133 log_test "$what: egress down/up" 177 # and verify it works for the follow-up tests. 190 local route=$1; shift 198 ip route del $route dev $edev [all …]
|
H A D | router.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # +--------------------+ +----------------------+ 11 # +------------------|-+ +-|--------------------+ 13 # +------------------|-------------------------|--------------------+ 20 # +-----------------------------------------------------------------+ 45 vrf_create "vrf-h1" 46 ip link set dev $h1 master vrf-h1 48 ip link set dev vrf-h1 up 49 ip link set dev $h1 up 54 ip route add 198.51.100.0/24 vrf vrf-h1 nexthop via 192.0.2.1 [all …]
|
/linux/tools/testing/selftests/bpf/ |
H A D | test_lwt_ip_encap.sh |
|
H A D | test_lwt_seg6local.sh |
|
/linux/tools/testing/selftests/net/ |
H A D | vrf_route_leaking.sh | 2 # SPDX-License-Identifier: GPL-2.0 13 # +----+ .253 +----+ .253 +----+ 14 # | h1 |-------------------| r1 |-------------------| h2 | 15 # +----+ .1 +----+ .2 +----+ 20 # Route from h1 to h2 and back goes through r1, incoming vrf blue has a route 21 # to the outgoing vrf red for the n2 network and red has a route back to n1. 38 # and VRF route leaking was initialy reported. The MTU test isn't done here 39 # because of the lack of a return route in the red VRF. 42 # .253 +----+ .253 43 # +----| r1 |----+ [all …]
|
H A D | lwt_dst_cache_ref_loop.sh | 2 # SPDX-License-Identifier: GPL-2.0+ 7 # ------- 18 # - ila_lwt (output only) 19 # - ioam6_iptunnel (output only) 20 # - rpl_iptunnel (both input and output) 21 # - seg6_iptunnel (both input and output) 37 ip -netns $tmp_node link set veth0 up &>/dev/null 40 ip -netns $tmp_node link set veth1 up &>/dev/null 49 lsmod 2>/dev/null | grep -q "ila" 53 ip -netns $tmp_node route add 2001:db8:1::/64 \ [all …]
|
H A D | route_localnet.sh | 2 # SPDX-License-Identifier: GPL-2.0 6 readonly PEER_NS="ns-peer-$(mktemp -u XXXXXX)" 10 ip -netns "${PEER_NS}" link set dev lo up 12 ip link set dev veth0 up 15 # Enable route_localnet and delete useless route 127.0.0.0/8. 16 sysctl -w net.ipv4.conf.veth0.route_localnet=1 17 ip netns exec "${PEER_NS}" sysctl -w net.ipv4.conf.veth1.route_localnet=1 18 ip route del 127.0.0.0/8 dev lo table local 19 ip netns exec "${PEER_NS}" ip route del 127.0.0.0/8 dev lo table local 22 ip link set dev veth0 up [all …]
|
H A D | bareudp.sh | 2 # SPDX-License-Identifier: GPL-2.0 14 # is assigned an IPv4 and an IPv6 address. A host-route allows a veth to 20 # For IPv4 and IPv6 reachability tests, the route simply sets the peer's 27 # +---- [all...] |
H A D | pmtu.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 # Check that route PMTU values match expectations, and that initial device MTU 9 # - pmtu_ipv4 10 # Set up two namespaces, A and B, with two paths between them over routers 14 # .---- [all...] |
/linux/tools/testing/selftests/drivers/net/mlxsw/ |
H A D | vxlan.sh | 2 # SPDX-License-Identifier: GPL-2.0 45 ip link set dev $swp1 up 46 ip link set dev $swp2 up 91 ip link add name vxlan0 up type vxlan id 10 nolearning $UDPCSUM_FLAFS \ 99 log_test "vxlan device - valid configuration" 108 ip link add name vxlan0 up type vxlan id 10 nolearning $UDPCSUM_FLAFS \ 116 log_test "vxlan device with a vlan-aware bridge" 125 ip link add name vxlan0 up type vxlan id 10 nolearning $UDPCSUM_FLAFS \ 141 ip link add name dummy1 up type dummy 143 ip link add name vxlan0 up type vxlan id 10 nolearning $UDPCSUM_FLAFS \ [all …]
|
H A D | fib.sh | 2 # SPDX-License-Identifier: GPL-2.0 100 ip -n $ns link add name dummy1 type dummy 101 ip -n $ns link set dev dummy1 up 103 ip -n $ns route add table local 192.0.2.1/32 dev dummy1 105 check_err $? "Local table route not in hardware when should" 107 ip -n $ns route add table main 192.0.2.1/32 dev dummy1 109 check_err $? "Main table route in hardware when should not" 112 check_err $? "Local table route was replaced when should not" 115 ip -n $ns route add table main 192.0.2.2/32 dev dummy1 117 check_err $? "Main table route not in hardware when should" [all …]
|
/linux/Documentation/networking/ |
H A D | vrf.rst | 1 .. SPDX-License-Identifier: GPL-2.0 11 routing and forwarding domains (aka VRFs, VRF-lite to be specific) in the 12 Linux network stack. One use case is the multi-tenancy problem where each 30 ------ 31 A VRF device is created with an associated route table. Network interfaces 34 +-----------------------------+ 35 | vrf-blue | ===> route table 10 36 +-----------------------------+ 38 +------+ +------+ +-------------+ 40 +------+ +------+ +-------------+ [all …]
|
/linux/tools/testing/selftests/drivers/net/netdevsim/ |
H A D | fib.sh | 2 # SPDX-License-Identifier: GPL-2.0 111 ip -n testns1 link add name dummy1 type dummy 112 ip -n testns1 link set dev dummy1 up 114 devlink -N testns1 resource set $DEVLINK_DEV path IPv4/fib size 10 115 devlink -N testns1 dev reload $DEVLINK_DEV 118 ip -n testns1 route add 192.0.2.${lsb}/32 dev dummy1 \ 122 log_test "IPv4 error path - add" 124 ip -n testns1 link del dev dummy1 133 ip -n testns1 link add name dummy1 type dummy 134 ip -n testns1 link set dev dummy1 up [all …]
|
/linux/samples/bpf/ |
H A D | tc_l2_redirect.sh | 2 # SPDX-License-Identifier: GPL-2.0 4 [[ -z $TC ]] && TC='tc' 5 [[ -z $IP ]] && IP='ip' 21 $IP link set dev ve1 up 22 $IP link set dev ve2 up 28 $IP -n ns1 link set dev lo up 29 $IP -n ns1 link set dev vens1 up 30 $IP -n ns1 addr add 10.1.1.101/24 dev vens1 31 $IP -n ns1 addr add 2401:db01::65/64 dev vens1 nodad 32 $IP -n ns1 route add default via 10.1.1.1 dev vens1 [all …]
|
/linux/tools/testing/selftests/net/netfilter/ |
H A D | conntrack_icmp_related.sh | 3 # check that ICMP df-needed/pkttoobig icmp are set are set as related 8 # nsclient1 -> nsrouter1 -> nsrouter2 -> nsclient2 9 # MTU 1500, except for nsrouter2 <-> nsclient2 link (1280). 15 # nat of "established" icmp-echo "connection". 19 if ! nft --version > /dev/null 2>&1;then 40 ip -net "$ns" link set "$dev" up 41 ip -net "$ns" addr add "192.168.$i.2/24" dev "$dev" 42 ip -net "$ns" addr add "dead:$i::2/64" dev "$dev" nodad 52 if ! ip netns exec "$ns" nft list counter inet filter "$name" | grep -q "$expect"; then 81 ip -net "$nsrouter1" link set eth1 up [all …]
|