Home
last modified time | relevance | path

Searched refs:ns1 (Results 1 – 25 of 53) sorted by relevance

123

/linux-6.12.1/tools/testing/selftests/net/
Dtest_vxlan_mdb.sh258 local ns1=$1; shift
264 ip link set dev veth0 netns $ns1 name veth0
267 setup_common_ns $ns1 $local_addr1
328 local ns1=$1; shift
335 run_cmd "bridge -n $ns1 mdb add dev vx0 port vx0 $grp_key permanent dst $vtep_ip src_vni 10010"
337 run_cmd "bridge -n $ns1 -d -s mdb get dev vx0 $grp_key src_vni 10010"
340 run_cmd "bridge -n $ns1 mdb replace dev vx0 port vx0 $grp_key permanent dst $vtep_ip src_vni 10010"
342 run_cmd "bridge -n $ns1 -d -s mdb get dev vx0 $grp_key src_vni 10010"
345 run_cmd "bridge -n $ns1 mdb del dev vx0 port vx0 $grp_key dst $vtep_ip src_vni 10010"
347 run_cmd "bridge -n $ns1 -d -s mdb get dev vx0 $grp_key src_vni 10010"
[all …]
Dtest_vxlan_nolocalbypass.sh100 setup_ns ns1
102 ip -n $ns1 address add 192.0.2.1/32 dev lo
103 ip -n $ns1 address add 198.51.100.1/32 dev lo
105 ip -n $ns1 link add name vx0 up type vxlan id 100 local 198.51.100.1 \
107 ip -n $ns1 link add name vx1 up type vxlan id 100 dstport 4790
112 cleanup_ns $ns1
123 run_cmd "bridge -n $ns1 fdb add $dmac dev vx0 self static dst 192.0.2.1 port 4790"
125 run_cmd "tc -n $ns1 qdisc add dev vx1 clsact"
126 …run_cmd "tc -n $ns1 filter add dev vx1 ingress pref 1 handle 101 proto all flower src_mac $smac ds…
128 run_cmd "tc -n $ns1 qdisc add dev lo clsact"
[all …]
/linux-6.12.1/tools/testing/selftests/net/mptcp/
Dmptcp_join.sh27 ns1=""
98 mptcp_lib_ns_init ns1 ns2
101 for netns in "$ns1" "$ns2"; do
119 ip link add ns1eth$i netns "$ns1" type veth peer name ns2eth$i netns "$ns2"
120 ip -net "$ns1" addr add 10.0.$i.1/24 dev ns1eth$i
121 ip -net "$ns1" addr add dead:beef:$i::1/64 dev ns1eth$i nodad
122 ip -net "$ns1" link set ns1eth$i up
138 tc -n $ns1 qdisc add dev ns1eth$i root netem rate 20mbit delay 1ms
147 mptcp_lib_ns_exit "${ns1}" "${ns2}"
331 for netns in "$ns1" "$ns2"; do
[all …]
Dsimult_flows.sh11 ns1=""
45 mptcp_lib_ns_exit "${ns1}" "${ns2}" "${ns3}"
71 mptcp_lib_ns_init ns1 ns2 ns3
73 ip link add ns1eth1 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
74 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth2 netns "$ns2"
77 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth1
78 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth1 nodad
79 ip -net "$ns1" link set ns1eth1 up mtu 1500
80 ip -net "$ns1" route add default via 10.0.1.2
81 ip -net "$ns1" route add default via dead:beef:1::2
[all …]
Dpm_netlink.sh31 ns1=""
39 mptcp_lib_ns_exit "${ns1}"
47 mptcp_lib_ns_init ns1
63 ip -n "${ns1}" mptcp limits
65 ip netns exec "${ns1}" ./pm_nl_ctl limits
75 mptcp_lib_pm_nl_get_endpoint "${ns1}" "${@}"
83 ip -n "${ns1}" mptcp endpoint change "${addr}" "${flags}"
85 ip netns exec "${ns1}" ./pm_nl_ctl set "${addr}" flags "${flags}"
91 mptcp_lib_pm_nl_set_limits "${ns1}" "${@}"
96 mptcp_lib_pm_nl_add_endpoint "${ns1}" "${@}"
[all …]
Duserspace_pm.sh53 ns1=""
110 mptcp_lib_ns_exit "${ns1}" "${ns2}"
120 mptcp_lib_ns_init ns1 ns2
121 for i in "$ns1" "$ns2" ;do
128 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
131 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2
132 ip -net "$ns1" addr add 10.0.2.1/24 dev ns1eth2
133 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 nodad
134 ip -net "$ns1" addr add dead:beef:2::1/64 dev ns1eth2 nodad
135 ip -net "$ns1" link set ns1eth2 up
[all …]
Dmptcp_connect.sh129 ns1=""
145 mptcp_lib_ns_exit "${ns1}" "${ns2}" "${ns3}" "${ns4}"
161 mptcp_lib_ns_init ns1 ns2 ns3 ns4
168 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
172 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2
173 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 nodad
175 ip -net "$ns1" link set ns1eth2 up
176 ip -net "$ns1" route add default via 10.0.1.2
177 ip -net "$ns1" route add default via dead:beef:1::2
210 for i in "$ns1" "$ns2" "$ns3" "$ns4";do
[all …]
Dmptcp_sockopt.sh21 ns1=""
67 mptcp_lib_ns_init ns1 ns2 ns_sbox
71 ip link add ns1eth$i netns "$ns1" type veth peer name ns2eth$i netns "$ns2"
72 ip -net "$ns1" addr add 10.0.$i.1/24 dev ns1eth$i
73 ip -net "$ns1" addr add dead:beef:$i::1/64 dev ns1eth$i nodad
74 ip -net "$ns1" link set ns1eth$i up
83 mptcp_lib_pm_nl_add_endpoint "${ns1}" "10.0.${i}.1" flags signal
84 mptcp_lib_pm_nl_add_endpoint "${ns1}" "dead:beef:${i}::1" flags signal
90 mptcp_lib_pm_nl_set_limits "${ns1}" 8 8
93 add_mark_rules $ns1 1
[all …]
/linux-6.12.1/tools/testing/selftests/net/hsr/
Dhsr_ping.sh34 do_ping "$ns1" 100.64.0.2
39 do_ping "$ns1" 100.64.0.3
43 do_ping "$ns1" dead:beef:1::2
44 do_ping "$ns1" dead:beef:1::3
71 do_ping_long "$ns1" 100.64.0.2
72 do_ping_long "$ns1" dead:beef:1::2
73 do_ping_long "$ns1" 100.64.0.3
74 do_ping_long "$ns1" dead:beef:1::3
91 do_ping_long "$ns1" 100.64.0.3 &
105 do_ping_long "$ns1" 100.64.0.2
[all …]
Dhsr_redbox.sh12 do_ping "${ns1}" 100.64.0.2
19 do_ping "${ns1}" 100.64.0.3
20 do_ping "${ns1}" 100.64.0.41
22 do_ping "${ns1}" 100.64.0.51
34 do_ping_long "${ns1}" 100.64.0.3
35 do_ping_long "${ns1}" 100.64.0.41
37 do_ping_long "${ns1}" 100.64.0.51
75 ip link add ns1eth1 netns "${ns1}" type veth peer name ns2eth1 netns "${ns2}"
76 ip link add ns1eth2 netns "${ns1}" type veth peer name ns2eth2 netns "${ns2}"
83 ip -n "${ns1}" link set ns1eth1 up
[all …]
/linux-6.12.1/tools/testing/selftests/net/netfilter/
Dnft_conntrack_helper.sh21 ip netns pids "$ns1" | xargs kill 2>/dev/null
23 ip netns del "$ns1"
29 setup_ns ns1 ns2
31 if ! ip link add veth0 netns "$ns1" type veth peer name veth0 netns "$ns2" > /dev/null 2>&1;then
36 ip -net "$ns1" link set veth0 up
39 ip -net "$ns1" addr add 10.0.1.1/24 dev veth0
40 ip -net "$ns1" addr add dead:1::1/64 dev veth0 nodad
120 ip netns exec "$ns1" socat -u -4 STDIN TCP:10.0.1.2:"$port" < /dev/null > /dev/null
122 check_for_helper "$ns1" "ip $msg" "$port" "$autoassign"
129 ip netns exec "$ns1" conntrack -F 2> /dev/null
[all …]
Dnft_fib.sh24 setup_ns nsrouter ns1 ns2
105 load_ruleset "$ns1"
108 if ! ip link add veth0 netns "$nsrouter" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1; th…
122 ip -net "$ns1" link set eth0 up
125 ip -net "$ns1" addr add 10.0.1.99/24 dev eth0
126 ip -net "$ns1" addr add dead:1::99/64 dev eth0 nodad
127 ip -net "$ns1" route add default via 10.0.1.1
128 ip -net "$ns1" route add default via dead:1::1
139 if ! ip netns exec "$ns1" ping -c 1 -q "$daddr4" > /dev/null; then
141 echo "FAIL: ${ns1} cannot reach $daddr4, ret $ret" 1>&2
[all …]
Dnft_nat.sh17 ip netns pids "$ns1" | xargs kill 2>/dev/null
30 setup_ns ns0 ns1 ns2
32 if ! ip link add veth0 netns "$ns0" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1;then
58 do_config "$ns1" 1
143 for i in "$ns0" "$ns1" "$ns2" ;do
181 bad_counter "$ns0" ns1$dir "$expect" "test_local_dnat6 1"
197 if ! ip netns exec "$ns1" nft list counter inet filter "ns0${dir}" | grep -q "$expect";then
198 bad_counter "$ns1" ns0$dir "$expect" "test_local_dnat6 3"
212 test $lret -eq 0 && echo "PASS: ipv6 ping to $ns1 was $family NATted to $ns2"
272 if ! ip netns exec "$ns1" nft list counter inet filter ns0${dir} | grep -q "$expect";then
[all …]
Dipvs.sh59 setup_ns ns0 ns1 ns2
61 ip link add veth01 netns "${ns0}" type veth peer name veth10 netns "${ns1}"
63 ip link add veth12 netns "${ns1}" type veth peer name veth21 netns "${ns2}"
73 ip netns exec "${ns1}" ip link set veth10 up
74 ip netns exec "${ns1}" ip addr add "${gip_v4}/24" dev veth10
75 ip netns exec "${ns1}" ip link set veth12 up
76 ip netns exec "${ns1}" ip addr add "${dip_v4}/24" dev veth12
124 ip netns exec "${ns1}" sysctl -qw net.ipv4.ip_forward=1
125 ip netns exec "${ns1}" ipvsadm -A -t "${vip_v4}:${port}" -s rr
126 ip netns exec "${ns1}" ipvsadm -a -t "${vip_v4}:${port}" -r "${rip_v4}:${port}"
[all …]
Dbridge_brouter.sh23 setup_ns nsbr ns1 ns2
27 if ! ip link add veth0 netns "$nsbr" type veth peer name eth0 netns "$ns1"; then
47 ip -net "$ns1" link set eth0 up
49 ip -net "$ns1" addr add 10.0.0.11/24 dev eth0
64 if ip netns exec "$ns1" ping -q -c 1 10.0.0.12 -W 0.5 > /dev/null 2>&1; then
76 if ! ip netns exec "$ns1" ping -q -c 1 10.0.0.12 > /dev/null; then
81 echo "PASS: ${ns1}/${ns2} connectivity with active broute rule"
85 if ! ip netns exec "$ns1" ping -q -c 1 10.0.0.12 > /dev/null; then
93 if ip netns exec "$ns1" ping -q -c 1 10.0.0.12 -W 0.5 > /dev/null 2>&1; then
106 echo "PASS: ${ns1}/${ns2} connectivity with active broute rule and bridge forward drop"
[all …]
Dnft_queue.sh15 ip netns pids "$ns1" | xargs kill 2>/dev/null
34 setup_ns ns1 ns2 ns3 nsrouter
46 if ! ip link add veth0 netns "$nsrouter" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1; th…
65 ip -net "$ns1" link set eth0 up
69 ip -net "$ns1" addr add 10.0.1.99/24 dev eth0
70 ip -net "$ns1" addr add dead:1::99/64 dev eth0 nodad
71 ip -net "$ns1" route add default via 10.0.1.1
72 ip -net "$ns1" route add default via dead:1::1
151 if ! ip netns exec "$ns1" ping -c 1 -q 10.0.2.99 > /dev/null; then
155 if ! ip netns exec "$ns1" ping -c 1 -q dead:2::99 > /dev/null; then
[all …]
Dnft_zones_many.sh22 setup_ns ns1
33 ip netns exec "$ns1" nft -f /dev/stdin<<EOF
51 ip netns exec "$ns1" sysctl -q net.netfilter.nf_conntrack_udp_timeout=3600
63 ) | ip netns exec "$ns1" nft -f /dev/stdin
78 …dd if=/dev/zero bs=8k count=1000 2>/dev/null | ip netns exec "$ns1" socat -u STDIN UDP:127.0.0.1:1…
91 count=$(ip netns exec "$ns1" conntrack -C)
97 ip netns exec "$ns1" conntrack -S 1>&2
111 ip netns exec "$ns1" conntrack -F >/dev/null 2>/dev/null
120 ip netns exec "$ns1" conntrack -I -s 1.1.1.1 -d 2.2.2.2 --protonum 6 \
123 ip netns exec "$ns1" conntrack -I -s 1.1.1.1 -d 2.2.2.2 --protonum 6 \
[all …]
Dconntrack_tcp_unreplied.sh22 ip netns pids "$ns1" | xargs kill 2>/dev/null
51 setup_ns ns1 ns2
54 ip -net "$ns1" link add name veth1 type veth peer name veth2
55 ip -net "$ns1" link set netns "$ns2" dev veth2
57 ip -net "$ns1" link set up dev lo
59 ip -net "$ns1" link set up dev veth1
68 ip netns exec "$ns1" nft -f - <<EOF
77 ip -net "$ns1" addr add 10.11.11.1/24 dev veth1
78 ip -net "$ns1" route add 10.99.99.99 via 10.11.11.2
81 ip netns exec "$ns1" ping -q -c 2 10.11.11.2 >/dev/null || exit 1
[all …]
Dnft_flowtable.sh31 setup_ns ns1 ns2 nsr1 nsr2
34 ip netns pids "$ns1" | xargs kill 2>/dev/null
48 ip link add veth0 netns "$nsr1" type veth peer name eth0 netns "$ns1"
101 ip -net "$ns1" link set eth0 mtu "$omtu"
130 for ns in "$ns1" "$ns2";do
141 ip -net "$ns1" addr add 10.0.1.99/24 dev eth0
143 ip -net "$ns1" route add default via 10.0.1.1
145 ip -net "$ns1" addr add dead:1::99/64 dev eth0 nodad
147 ip -net "$ns1" route add default via dead:1::1
207 if ! ip netns exec "$ns1" ping -c 1 -q 10.0.2.99 > /dev/null; then
[all …]
Dnft_tproxy_udp.sh34 ip netns pids "$ns1" | xargs kill 2>/dev/null
46 setup_ns ns1 ns2 ns3 nsrouter
48 if ! ip link add veth0 netns "$nsrouter" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1; th…
67 ip -net "$ns1" link set eth0 up
71 ip -net "$ns1" addr add 10.0.1.99/24 dev eth0
72 ip -net "$ns1" addr add dead:1::99/64 dev eth0 nodad
73 ip -net "$ns1" route add default via 10.0.1.1
74 ip -net "$ns1" route add default via dead:1::1
92 if ! ip netns exec "$ns1" ping -c 1 -q 10.0.2.99 > /dev/null; then
96 if ! ip netns exec "$ns1" ping -c 1 -q dead:2::99 > /dev/null; then
[all …]
Dnft_tproxy_tcp.sh34 ip netns pids "$ns1" | xargs kill 2>/dev/null
46 setup_ns ns1 ns2 ns3 nsrouter
48 if ! ip link add veth0 netns "$nsrouter" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1; th…
67 ip -net "$ns1" link set eth0 up
71 ip -net "$ns1" addr add 10.0.1.99/24 dev eth0
72 ip -net "$ns1" addr add dead:1::99/64 dev eth0 nodad
73 ip -net "$ns1" route add default via 10.0.1.1
74 ip -net "$ns1" route add default via dead:1::1
92 if ! ip netns exec "$ns1" ping -c 1 -q 10.0.2.99 > /dev/null; then
96 if ! ip netns exec "$ns1" ping -c 1 -q dead:2::99 > /dev/null; then
[all …]
Dnft_synproxy.sh11 setup_ns nsr ns1 ns2
16 ip netns pids "$ns1" | xargs kill 2>/dev/null
24 ip link add veth0 netns "$nsr" type veth peer name eth0 netns "$ns1"
38 for n in $ns1 $ns2; do
41 ip -net "$ns1" addr add 10.0.1.99/24 dev eth0
43 ip -net "$ns1" route add default via 10.0.1.1
47 if ! ip netns exec "$ns1" ping -c 1 -q 10.0.2.99 > /dev/null; then
48 echo "ERROR: $ns1 cannot reach $ns2" 1>&2
53 echo "ERROR: $ns2 cannot reach $ns1" 1>&2
88 if ! ip netns exec "$ns1" timeout 5 iperf3 -c 10.0.2.99 -n $((1 * 1024 * 1024)) > /dev/null; then
Drpath.sh36 ns1="ns1-$sfx"
38 trap "ip netns del $ns1; ip netns del $ns2" EXIT
42 ip netns add "$ns1"
49 ip -net "$ns1" link add v0 type veth peer name v0 netns "$ns2"
50 ip -net "$ns1" link set v0 up; ip -net "$ns2" link set v0 up
51 ip -net "$ns1" a a 192.168.23.2/24 dev v0
53 ip -net "$ns1" a a fec0:23::2/64 dev v0 nodad
59 ip -net "$ns1" a a 192.168.42.2/24 dev v0
61 ip -net "$ns1" a a fec0:42::2/64 dev v0 nodad
136 netns_ping "$ns1" -I v0 192.168.42.1 && \
[all …]
Dnf_nat_edemux.sh23 setup_ns ns1 ns2
27 ip link set netns "$ns1" dev veth1
30 ip netns exec "$ns1" ip link set up dev lo
31 ip netns exec "$ns1" ip link set up dev veth1
32 ip netns exec "$ns1" ip addr add 192.168.1.1/24 dev veth1
39 ip netns exec "$ns1" socat -u TCP-LISTEN:5201,fork OPEN:/dev/null,wronly=1 &
71 ip netns exec "$ns1" iptables -t nat -A PREROUTING -p tcp --dport 5202 -j REDIRECT --to-ports 5201
72 ip netns exec "$ns1" iptables -t nat -A PREROUTING -p tcp --dport 5203 -j REDIRECT --to-ports 5201
/linux-6.12.1/tools/testing/selftests/bpf/
Dtest_tc_tunnel.sh11 readonly ns1="${ns_prefix}1"
29 ip netns add "${ns1}"
32 ip link add dev veth1 mtu 1500 netns "${ns1}" type veth \
35 ip netns exec "${ns1}" ethtool -K veth1 tso off
37 ip -netns "${ns1}" link set veth1 up
40 ip -netns "${ns1}" -4 addr add "${ns1_v4}/24" dev veth1
42 ip -netns "${ns1}" -6 addr add "${ns1_v6}/64" dev veth1 nodad
46 ip -netns "${ns1}" -4 route flush table main
47 ip -netns "${ns1}" -6 route flush table main
48 ip -netns "${ns1}" -4 route add "${ns2_v4}" mtu 1450 dev veth1
[all …]

123