Home
last modified time | relevance | path

Searched refs:netns (Results 1 – 25 of 153) sorted by relevance

1234567

/Linux-v6.1/tools/testing/selftests/bpf/
Dtest_lwt_ip_encap.sh111 ip netns add "${NS1}"
112 ip netns add "${NS2}"
113 ip netns add "${NS3}"
116 ip netns exec ${NS1} sysctl -wq net.ipv4.conf.all.rp_filter=0
117 ip netns exec ${NS2} sysctl -wq net.ipv4.conf.all.rp_filter=0
118 ip netns exec ${NS3} sysctl -wq net.ipv4.conf.all.rp_filter=0
119 ip netns exec ${NS1} sysctl -wq net.ipv4.conf.default.rp_filter=0
120 ip netns exec ${NS2} sysctl -wq net.ipv4.conf.default.rp_filter=0
121 ip netns exec ${NS3} sysctl -wq net.ipv4.conf.default.rp_filter=0
124 ip netns exec ${NS1} sysctl -wq net.ipv6.conf.all.accept_dad=0
[all …]
Dtest_lwt_seg6local.sh50 ip netns del ${NS1} 2> /dev/null
51 ip netns del ${NS2} 2> /dev/null
52 ip netns del ${NS3} 2> /dev/null
53 ip netns del ${NS4} 2> /dev/null
54 ip netns del ${NS5} 2> /dev/null
55 ip netns del ${NS6} 2> /dev/null
61 ip netns add ${NS1}
62 ip netns add ${NS2}
63 ip netns add ${NS3}
64 ip netns add ${NS4}
[all …]
Dtest_xdp_vlan.sh61 ip netns del ${NS1} 2> /dev/null
62 ip netns del ${NS2} 2> /dev/null
131 ip netns del ${NS1} 2> /dev/null
132 ip netns del ${NS2} 2> /dev/null
149 ip netns add ${NS1}
150 ip netns add ${NS2}
159 ip link set veth1 netns ${NS1}
160 ip link set veth2 netns ${NS2}
167 ip netns exec ${NS1} ethtool -K veth1 rxvlan off
168 ip netns exec ${NS2} ethtool -K veth2 rxvlan off
[all …]
Dtest_tc_tunnel.sh28 ip netns add "${ns1}"
29 ip netns add "${ns2}"
31 ip link add dev veth1 mtu 1500 netns "${ns1}" type veth \
32 peer name veth2 mtu 1500 netns "${ns2}"
34 ip netns exec "${ns1}" ethtool -K veth1 tso off
36 ip -netns "${ns1}" link set veth1 up
37 ip -netns "${ns2}" link set veth2 up
39 ip -netns "${ns1}" -4 addr add "${ns1_v4}/24" dev veth1
40 ip -netns "${ns2}" -4 addr add "${ns2_v4}/24" dev veth2
41 ip -netns "${ns1}" -6 addr add "${ns1_v6}/64" dev veth1 nodad
[all …]
/Linux-v6.1/tools/testing/selftests/netfilter/
Dipvs.sh69 ip netns add ns0
70 ip netns add ns1
71 ip netns add ns2
73 ip link add veth01 netns ns0 type veth peer name veth10 netns ns1
74 ip link add veth02 netns ns0 type veth peer name veth20 netns ns2
75 ip link add veth12 netns ns1 type veth peer name veth21 netns ns2
77 ip netns exec ns0 ip link set veth01 up
78 ip netns exec ns0 ip link set veth02 up
79 ip netns exec ns0 ip link add br0 type bridge
80 ip netns exec ns0 ip link set veth01 master br0
[all …]
Dnf_nat_edemux.sh17 ip netns del $ns1
18 ip netns del $ns2
39 ip netns add "$ns1"
47 ip netns add $ns2
51 ip link set netns $ns1 dev veth1
52 ip link set netns $ns2 dev veth2
54 ip netns exec $ns1 ip link set up dev lo
55 ip netns exec $ns1 ip link set up dev veth1
56 ip netns exec $ns1 ip addr add 192.168.1.1/24 dev veth1
58 ip netns exec $ns2 ip link set up dev lo
[all …]
Dnft_nat.sh18 for i in 0 1 2; do ip netns del ns$i-"$sfx";done
33 ip netns add "$ns0"
41 ip netns add "$ns1"
47 ip netns add "$ns2"
53 ip link add veth0 netns "$ns0" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1
58 ip link add veth1 netns "$ns0" type veth peer name eth0 netns "$ns2"
86 ip netns exec $ns nft list counter inet filter $counter 1>&2
94 cnt=$(ip netns exec $ns nft list counter inet filter ns0in | grep -q "packets 1 bytes 84")
99 cnt=$(ip netns exec $ns nft list counter inet filter ns0out | grep -q "packets 1 bytes 84")
106 cnt=$(ip netns exec $ns nft list counter inet filter ns0in6 | grep -q "$expect")
[all …]
/Linux-v6.1/tools/testing/selftests/net/
Dvrf_route_leaking.sh177 ip netns del $ns 2>/dev/null
185 ip -netns "${ns}" rule del pref 0
186 ip -netns "${ns}" rule add pref 32765 from all lookup local
187 ip -netns "${ns}" -6 rule del pref 0
188 ip -netns "${ns}" -6 rule add pref 32765 from all lookup local
197 ip -netns "${ns}" link add "${vrf}" type vrf table "${table}"
198 ip -netns "${ns}" link set "${vrf}" up
199 ip -netns "${ns}" route add vrf "${vrf}" unreachable default metric 8192
200 ip -netns "${ns}" -6 route add vrf "${vrf}" unreachable default metric 8192
202 ip -netns "${ns}" addr add 127.0.0.1/8 dev "${vrf}"
[all …]
Dicmp_redirect.sh121 addr=$(ip -netns $ns -6 -br addr show dev ${dev} | \
146 ip netns del $ns 2>/dev/null
154 ip -netns ${ns} link add ${VRF} type vrf table ${VRF_TABLE}
155 ip -netns ${ns} link set ${VRF} up
156 ip -netns ${ns} route add vrf ${VRF} unreachable default metric 8192
157 ip -netns ${ns} -6 route add vrf ${VRF} unreachable default metric 8192
159 ip -netns ${ns} addr add 127.0.0.1/8 dev ${VRF}
160 ip -netns ${ns} -6 addr add ::1 dev ${VRF} nodad
162 ip -netns ${ns} ru del pref 0
163 ip -netns ${ns} ru add pref 32765 from all lookup local
[all …]
Damt.sh86 ip netns delete "${ns}" 2>/dev/null || true
94 ip netns add "${LISTENER}" || exit_cleanup
95 ip netns add "${GATEWAY}" || exit_cleanup "${LISTENER}"
96 ip netns add "${RELAY}" || exit_cleanup "${LISTENER}" "${GATEWAY}"
97 ip netns add "${SOURCE}" || exit_cleanup "${LISTENER}" "${GATEWAY}" \
111 ip -netns "${ns}" link set dev lo up
118 ip link set l_gw netns "${LISTENER}" up
119 ip link set gw_l netns "${GATEWAY}" up
120 ip link set gw_relay netns "${GATEWAY}" up
121 ip link set relay_gw netns "${RELAY}" up
[all …]
Dioam6.sh198 ip netns add ioam-tmp-node
199 ip link add name veth0 netns ioam-tmp-node type veth \
200 peer name veth1 netns ioam-tmp-node
202 ip -netns ioam-tmp-node link set veth0 up
203 ip -netns ioam-tmp-node link set veth1 up
205 ip -netns ioam-tmp-node ioam namespace add 0
208 ip -netns ioam-tmp-node ioam namespace show | grep -q "namespace 0"
215 ip netns del ioam-tmp-node || true
219 ip -netns ioam-tmp-node route add db02::/64 encap ioam6 mode inline \
223 ip -netns ioam-tmp-node -6 route | grep -q "encap ioam6"
[all …]
Dtest_vxlan_under_vrf.sh53 ip netns del $ns 2>/dev/null || true
69 ip netns add hv-$hv
70 ip link set veth-hv-$hv netns hv-$hv
71 ip -netns hv-$hv link set veth-hv-$hv name veth0
73 ip -netns hv-$hv link add vrf-underlay type vrf table 1
74 ip -netns hv-$hv link set vrf-underlay up
75 ip -netns hv-$hv addr add 172.16.0.$hv/24 dev veth0
76 ip -netns hv-$hv link set veth0 up
78 ip -netns hv-$hv link add br0 type bridge
79 ip -netns hv-$hv link set br0 up
[all …]
Dbareudp.sh127 ip netns delete "${ns}" 2>/dev/null || true
143 ip netns add "${NS0}" || exit_cleanup
144 ip netns add "${NS1}" || exit_cleanup "${NS0}"
145 ip netns add "${NS2}" || exit_cleanup "${NS0}" "${NS1}"
146 ip netns add "${NS3}" || exit_cleanup "${NS0}" "${NS1}" "${NS2}"
176 ip -netns "${NS}" link set dev "${DEV}" up
177 ip -netns "${NS}" address add dev "${DEV}" "${LOCAL_IP4}" peer "${PEER_IP4}"
178 ip -netns "${NS}" address add dev "${DEV}" "${LOCAL_IP6}" peer "${PEER_IP6}" nodad
192 ip -netns "${ns}" link set dev lo up
195 ip link add name veth01 netns "${NS0}" type veth peer name veth10 netns "${NS1}"
[all …]
Dfib_nexthop_multiprefix.sh75 ip netns del ${ns} 2>/dev/null
77 ip netns add ${ns}
78 ip -netns ${ns} addr add 127.0.0.1/8 dev lo
79 ip -netns ${ns} link set lo up
81 ip netns exec ${ns} sysctl -q -w net.ipv6.conf.all.keep_addr_on_down=1
84 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=0
87 ip netns exec $ns sysctl -q -w net.ipv4.ip_forward=1
88 ip netns exec $ns sysctl -q -w net.ipv6.conf.all.forwarding=1
111 ip -netns h${i} li add eth0 type veth peer name r1h${i}
112 ip -netns h${i} li set eth0 up
[all …]
Dtraceroute.sh49 out=$(eval ip netns exec ${ns} ${cmd} 2>&1)
72 ip netns add ${ns}
74 ip netns exec ${ns} ip link set lo up
76 ip netns exec ${ns} ip addr add dev lo ${addr}
79 ip netns exec ${ns} ip -6 addr add dev lo ${addr6}
82 ip netns exec ${ns} ip ro add unreachable default metric 8192
83 ip netns exec ${ns} ip -6 ro add unreachable default metric 8192
85 ip netns exec ${ns} sysctl -qw net.ipv4.ip_forward=1
86 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1
87 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.forwarding=1
[all …]
Dip_defrag.sh14 ip netns add "${NETNS}"
15 ip -netns "${NETNS}" link set lo up
17 ip netns exec "${NETNS}" sysctl -w net.ipv4.ipfrag_high_thresh=9000000 >/dev/null 2>&1
18 ip netns exec "${NETNS}" sysctl -w net.ipv4.ipfrag_low_thresh=7000000 >/dev/null 2>&1
19 ip netns exec "${NETNS}" sysctl -w net.ipv4.ipfrag_time=1 >/dev/null 2>&1
21 ip netns exec "${NETNS}" sysctl -w net.ipv6.ip6frag_high_thresh=9000000 >/dev/null 2>&1
22 ip netns exec "${NETNS}" sysctl -w net.ipv6.ip6frag_low_thresh=7000000 >/dev/null 2>&1
23 ip netns exec "${NETNS}" sysctl -w net.ipv6.ip6frag_time=1 >/dev/null 2>&1
25 …ip netns exec "${NETNS}" sysctl -w net.netfilter.nf_conntrack_frag6_high_thresh=9000000 >/dev/null…
26 …ip netns exec "${NETNS}" sysctl -w net.netfilter.nf_conntrack_frag6_low_thresh=7000000 >/dev/null…
[all …]
Darp_ndisc_untracked_subnets.sh26 ip netns del ${HOST_NS}
27 ip netns del ${ROUTER_NS}
31 ip netns del ${HOST_NS_V6}
32 ip netns del ${ROUTER_NS_V6}
40 ip netns add ${ROUTER_NS}
41 ip netns add ${HOST_NS}
47 ip netns exec ${ROUTER_NS} ip link add name ${ROUTER_INTF} \
50 ip netns exec ${ROUTER_NS} ip link set dev ${ROUTER_INTF} up
51 ip netns exec ${ROUTER_NS} ip link set dev ${HOST_INTF} netns ${HOST_NS}
53 ip netns exec ${HOST_NS} ip link set dev ${HOST_INTF} up
[all …]
Dl2tp.sh60 out=$(eval ip netns exec ${ns} ${cmd} 2>&1)
83 ip netns add ${ns}
85 ip -netns ${ns} link set lo up
87 ip -netns ${ns} addr add dev lo ${addr}
90 ip -netns ${ns} -6 addr add dev lo ${addr6}
93 ip -netns ${ns} ro add unreachable default metric 8192
94 ip -netns ${ns} -6 ro add unreachable default metric 8192
96 ip netns exec ${ns} sysctl -qw net.ipv4.ip_forward=1
97 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1
98 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.forwarding=1
[all …]
Dsrv6_end_dt46_l3vpn_test.sh254 for ns in $(ip netns show | grep -E 'rt-*|hs-*'); do
255 ip netns del ${ns} || true
265 ip netns add ${nsname}
266 ip link set veth-rt-${rt} netns ${nsname}
267 ip -netns ${nsname} link set veth-rt-${rt} name veth0
269 ip netns exec ${nsname} sysctl -wq net.ipv6.conf.all.accept_dad=0
270 ip netns exec ${nsname} sysctl -wq net.ipv6.conf.default.accept_dad=0
272 ip -netns ${nsname} addr add ${IPv6_RT_NETWORK}::${rt}/64 dev veth0 nodad
273 ip -netns ${nsname} link set veth0 up
274 ip -netns ${nsname} link set lo up
[all …]
Dunicast_extensions.sh73 ip netns exec foo-ns timeout 2 ping -c 1 $2 || return 1
74 ip netns exec bar-ns timeout 2 ping -c 1 $1 || return 1
107 echo 1 | ip netns exec router-ns tee /proc/sys/net/ipv4/ip_forward
109 ip netns exec foo-ns timeout 2 ping -c 1 $2 || return 1
110 ip netns exec foo-ns timeout 2 ping -c 1 $4 || return 1
111 ip netns exec bar-ns timeout 2 ping -c 1 $3 || return 1
112 ip netns exec bar-ns timeout 2 ping -c 1 $1 || return 1
124 ip netns add foo-ns
125 ip netns add bar-ns
126 ip link add foo netns foo-ns type veth peer name bar netns bar-ns
[all …]
Dsrv6_end_dt6_l3vpn_test.sh224 for ns in $(ip netns show | grep -E 'rt-*|hs-*'); do
225 ip netns del ${ns} || true
235 ip netns add ${nsname}
236 ip link set veth-rt-${rt} netns ${nsname}
237 ip -netns ${nsname} link set veth-rt-${rt} name veth0
239 ip netns exec ${nsname} sysctl -wq net.ipv6.conf.all.accept_dad=0
240 ip netns exec ${nsname} sysctl -wq net.ipv6.conf.default.accept_dad=0
242 ip -netns ${nsname} addr add ${IPv6_RT_NETWORK}::${rt}/64 dev veth0 nodad
243 ip -netns ${nsname} link set veth0 up
244 ip -netns ${nsname} link set lo up
[all …]
/Linux-v6.1/tools/testing/selftests/net/mptcp/
Dpm_netlink.sh34 ip netns del $ns1
45 ip netns add $ns1 || exit $ksft_skip
47 ip netns exec $ns1 sysctl -q net.mptcp.enabled=1
75 ip netns exec $ns1 ./pm_nl_ctl add 10.0.1.1
76 ip netns exec $ns1 ./pm_nl_ctl add 10.0.1.2 flags subflow dev lo
77 ip netns exec $ns1 ./pm_nl_ctl add 10.0.1.3 flags signal,backup
85 ip netns exec $ns1 ./pm_nl_ctl del 2
91 ip netns exec $ns1 ./pm_nl_ctl add 10.0.1.3
94 ip netns exec $ns1 ./pm_nl_ctl add 10.0.1.4 flags signal
98 ip netns exec $ns1 ./pm_nl_ctl add 10.0.1.$i flags signal >/dev/null 2>&1
[all …]
Dmptcp_sockopt.sh22 ip netns exec $ns $t -A OUTPUT -p tcp --syn -m mark --mark $m -j ACCEPT
25 ip netns exec $ns $t -A OUTPUT -p tcp --tcp-flags RST RST -m mark --mark 0 -j ACCEPT
27 ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark $m -j ACCEPT
28 ip netns exec $ns $t -A OUTPUT -p tcp -m mark --mark 0 -j DROP
40 for netns in "$ns1" "$ns2" "$ns_sbox";do
41 ip netns add $netns || exit $ksft_skip
42 ip -net $netns link set lo up
43 ip netns exec $netns sysctl -q net.mptcp.enabled=1
44 ip netns exec $netns sysctl -q net.ipv4.conf.all.rp_filter=0
45 ip netns exec $netns sysctl -q net.ipv4.conf.default.rp_filter=0
[all …]
/Linux-v6.1/tools/testing/selftests/bpf/prog_tests/
Dflow_dissector_reattach.c21 static __u32 query_attached_prog_id(int netns) in query_attached_prog_id() argument
27 err = bpf_prog_query(netns, BPF_FLOW_DISSECTOR, 0, NULL, in query_attached_prog_id()
37 static bool prog_is_attached(int netns) in prog_is_attached() argument
39 return query_attached_prog_id(netns) > 0; in prog_is_attached()
90 static void test_prog_attach_prog_attach(int netns, int prog1, int prog2) in test_prog_attach_prog_attach() argument
99 CHECK_FAIL(query_attached_prog_id(netns) != query_prog_id(prog1)); in test_prog_attach_prog_attach()
107 CHECK_FAIL(query_attached_prog_id(netns) != query_prog_id(prog2)); in test_prog_attach_prog_attach()
113 CHECK_FAIL(query_attached_prog_id(netns) != query_prog_id(prog2)); in test_prog_attach_prog_attach()
119 CHECK_FAIL(prog_is_attached(netns)); in test_prog_attach_prog_attach()
122 static void test_link_create_link_create(int netns, int prog1, int prog2) in test_link_create_link_create() argument
[all …]
/Linux-v6.1/tools/testing/selftests/drivers/net/bonding/
Dbond-arp-interval-causes-panic.sh12 ip netns delete server || true
13 ip netns delete client || true
28 ip netns add "server"
29 ip link set dev link1_2 netns server up name eth0
30 ip netns exec server ip addr add ${server_ip4}/24 dev eth0
32 ip netns add "client"
33 ip link set dev link1_1 netns client down name eth0
34 ip netns exec client ip link add dev bond0 down type bond mode 1 \
36 ip netns exec client ip link set dev eth0 down master bond0
37 ip netns exec client ip link set dev bond0 up
[all …]

1234567