Home
last modified time | relevance | path

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

12

/linux-6.1.9/tools/testing/selftests/net/mptcp/
Dpm_netlink.sh27 ns1="ns1-$rndh"
34 ip netns del $ns1
45 ip netns add $ns1 || exit $ksft_skip
46 ip -net $ns1 link set lo up
47 ip netns exec $ns1 sysctl -q net.mptcp.enabled=1
71 check "ip netns exec $ns1 ./pm_nl_ctl dump" "" "defaults addr list"
72 check "ip netns exec $ns1 ./pm_nl_ctl limits" "accept 0
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
[all …]
Dmptcp_join.sh18 ns1=""
65 ns1="ns1-$rndh"
69 for netns in "$ns1" "$ns2"; do
93 ip link add ns1eth$i netns "$ns1" type veth peer name ns2eth$i netns "$ns2"
94 ip -net "$ns1" addr add 10.0.$i.1/24 dev ns1eth$i
95 ip -net "$ns1" addr add dead:beef:$i::1/64 dev ns1eth$i nodad
96 ip -net "$ns1" link set ns1eth$i up
112 tc -n $ns1 qdisc add dev ns1eth$i root netem rate 20mbit delay 1
122 for netns in "$ns1" "$ns2"; do
219 for netns in "$ns1" "$ns2"; do
[all …]
Dsimult_flows.sh5 ns1="ns1-$rndh"
31 for netns in "$ns1" "$ns2" "$ns3";do
62 for i in "$ns1" "$ns2" "$ns3";do
69 ip link add ns1eth1 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
70 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth2 netns "$ns2"
73 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth1
74 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth1 nodad
75 ip -net "$ns1" link set ns1eth1 up mtu 1500
76 ip -net "$ns1" route add default via 10.0.1.2
77 ip -net "$ns1" route add default via dead:beef:1::2
[all …]
Dmptcp_sockopt.sh36 ns1="ns1-$rndh"
40 for netns in "$ns1" "$ns2" "$ns_sbox";do
49 ip link add ns1eth$i netns "$ns1" type veth peer name ns2eth$i netns "$ns2"
50 ip -net "$ns1" addr add 10.0.$i.1/24 dev ns1eth$i
51 ip -net "$ns1" addr add dead:beef:$i::1/64 dev ns1eth$i nodad
52 ip -net "$ns1" link set ns1eth$i up
61 ip netns exec $ns1 ./pm_nl_ctl add 10.0.$i.1 flags signal
62 ip netns exec $ns1 ./pm_nl_ctl add dead:beef:$i::1 flags signal
68 ip netns exec $ns1 ./pm_nl_ctl limits 8 8
71 add_mark_rules $ns1 1
[all …]
Duserspace_pm.sh37 ns1="ns1-$rndh"
69 for netns in "$ns1" "$ns2" ;do
77 for i in "$ns1" "$ns2" ;do
87 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
90 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2
91 ip -net "$ns1" addr add 10.0.2.1/24 dev ns1eth2
92 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 nodad
93 ip -net "$ns1" addr add dead:beef:2::1/64 dev ns1eth2 nodad
94 ip -net "$ns1" link set ns1eth2 up
143 ip netns exec "$ns1" ./pm_nl_ctl events >> "$server_evts" 2>&1 &
[all …]
Dmptcp_connect.sh123 ns1="ns1-$rndh"
138 for netns in "$ns1" "$ns2" "$ns3" "$ns4";do
159 for i in "$ns1" "$ns2" "$ns3" "$ns4";do
169 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
173 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2
174 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 nodad
176 ip -net "$ns1" link set ns1eth2 up
177 ip -net "$ns1" route add default via 10.0.1.2
178 ip -net "$ns1" route add default via dead:beef:1::2
211 for i in "$ns1" "$ns2" "$ns3" "$ns4";do
[all …]
/linux-6.1.9/tools/testing/selftests/netfilter/
Dnft_conntrack_helper.sh12 ns1="ns1-$sfx"
18 ip netns del ${ns1}
48 ip netns add ${ns1}
51 ip link add veth0 netns ${ns1} type veth peer name veth0 netns ${ns2} > /dev/null 2>&1
57 ip -net ${ns1} link set lo up
58 ip -net ${ns1} link set veth0 up
63 ip -net ${ns1} addr add 10.0.1.1/24 dev veth0
64 ip -net ${ns1} addr add dead:1::1/64 dev veth0
136 sleep 1 | ip netns exec ${ns1} nc -w 2 10.0.1.2 $port > /dev/null &
139 check_for_helper "$ns1" "ip $msg" $port $autoassign
[all …]
Dnft_fib.sh10 ns1="ns1-$sfx"
19 ip netns del ${ns1}
53 ip netns add ${ns1}
130 load_ruleset ${ns1}
133 ip link add veth0 netns ${nsrouter} type veth peer name eth0 netns ${ns1} > /dev/null 2>&1
149 ip -net ${ns1} link set lo up
150 ip -net ${ns1} link set eth0 up
155 ip -net ${ns1} addr add 10.0.1.99/24 dev eth0
156 ip -net ${ns1} addr add dead:1::99/64 dev eth0
157 ip -net ${ns1} route add default via 10.0.1.1
[all …]
Dnft_nat.sh13 ns1="ns1-$sfx"
41 ip netns add "$ns1"
43 echo "SKIP: Could not create net namespace $ns1"
53 ip link add veth0 netns "$ns0" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1
207 cnt=$(ip netns exec "$ns0" nft list counter inet filter ns1${dir} | grep -q "$expect")
209 bad_counter "$ns0" ns1$dir "$expect" "test_local_dnat6 1"
226 cnt=$(ip netns exec "$ns1" nft list counter inet filter ns0${dir} | grep -q "$expect")
228 bad_counter "$ns1" ns0$dir "$expect" "test_local_dnat6 3"
243 test $lret -eq 0 && echo "PASS: ipv6 ping to $ns1 was $family NATted to $ns2"
287 cnt=$(ip netns exec "$ns0" nft list counter inet filter ns1${dir} | grep -q "$expect")
[all …]
Dipvs.sh70 ip netns add ns1
73 ip link add veth01 netns ns0 type veth peer name veth10 netns ns1
75 ip link add veth12 netns ns1 type veth peer name veth21 netns ns2
85 ip netns exec ns1 ip link set lo up
86 ip netns exec ns1 ip link set veth10 up
87 ip netns exec ns1 ip addr add ${gip_v4}/24 dev veth10
88 ip netns exec ns1 ip link set veth12 up
89 ip netns exec ns1 ip addr add ${dip_v4}/24 dev veth12
141 ip netns exec ns1 sysctl -qw net.ipv4.ip_forward=1
142 ip netns exec ns1 ipvsadm -A -t ${vip_v4}:${port} -s rr
[all …]
Dnft_flowtable.sh18 ns1="ns1-$sfx"
45 ip netns add $ns1
50 ip netns del $ns1
64 ip link add veth0 netns $nsr1 type veth peer name eth0 netns $ns1
114 ip -net $ns1 link set eth0 mtu $omtu
135 for ns in $ns1 $ns2;do
147 ip -net $ns1 addr add 10.0.1.99/24 dev eth0
149 ip -net $ns1 route add default via 10.0.1.1
151 ip -net $ns1 addr add dead:1::99/64 dev eth0
153 ip -net $ns1 route add default via dead:1::1
[all …]
Dconntrack_tcp_unreplied.sh13 ns1="ns1-$sfx"
29 ip netns pids $ns1 | xargs kill 2>/dev/null
32 ip netns del $ns1
58 ip netns add $ns1 || exit 1
65 ip -net $ns1 link add name veth1 type veth peer name veth2
66 ip -net $ns1 link set netns $ns2 dev veth2
68 ip -net $ns1 link set up dev lo
70 ip -net $ns1 link set up dev veth1
79 ip netns exec $ns1 iptables -A INPUT -m state --state established,related -j ACCEPT
81 ip -net $ns1 addr add 10.11.11.1/24 dev veth1
[all …]
Dnft_queue.sh12 ns1="ns1-$sfx"
19 ip netns pids ${ns1} | xargs kill 2>/dev/null
23 ip netns del ${ns1}
55 ip netns add ${ns1}
58 ip link add veth0 netns ${nsrouter} type veth peer name eth0 netns ${ns1} > /dev/null 2>&1
74 ip -net ${ns1} link set lo up
75 ip -net ${ns1} link set eth0 up
80 ip -net ${ns1} addr add 10.0.1.99/24 dev eth0
81 ip -net ${ns1} addr add dead:1::99/64 dev eth0
82 ip -net ${ns1} route add default via 10.0.1.1
[all …]
Dnft_synproxy.sh11 ns1="ns1-$rnd" # iperf client
28 ip netns add $ns1
32 ip netns pids $ns1 | xargs kill 2>/dev/null
34 ip netns del $ns1
42 ip link add veth0 netns $nsr type veth peer name eth0 netns $ns1
56 for n in $ns1 $ns2; do
60 ip -net $ns1 addr add 10.0.1.99/24 dev eth0
62 ip -net $ns1 route add default via 10.0.1.1
66 if ! ip netns exec $ns1 ping -c 1 -q 10.0.2.99 > /dev/null; then
67 echo "ERROR: $ns1 cannot reach $ns2" 1>&2
[all …]
Dnf_nat_edemux.sh12 ns1="ns1-$sfx"
17 ip netns del $ns1
39 ip netns add "$ns1"
41 echo "SKIP: Could not create net namespace $ns1"
51 ip link set netns $ns1 dev veth1
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
63 ip netns exec $ns1 iperf3 -s > /dev/null 2>&1 &
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
116 netns_ping "$ns1" -I v0 192.168.42.1 && \
[all …]
Dbridge_brouter.sh27 ip netns add ns1
30 ip link add veth0 netns ns0 type veth peer name eth0 netns ns1
72 ip netns exec ns1 ping -q -c 1 10.0.0.12 > /dev/null 2>&1
87 ip netns exec ns1 ping -q -c 1 10.0.0.12 > /dev/null
97 ip netns exec ns1 ping -q -c 1 10.0.0.12 > /dev/null
106 ip netns exec ns1 ping -q -c 1 10.0.0.12 > /dev/null 2>&1
126 ip netns exec ns1 ping -c 1 -q 10.0.0.12 > /dev/null
Dconntrack_vrf.sh40 ns1="ns1-$sfx"
45 ip netns pids $ns1 | xargs kill 2>/dev/null
47 ip netns del $ns0 $ns1
67 ip netns add "$ns1"
75 ip link add veth0 netns "$ns0" type veth peer name veth0 netns "$ns1" > /dev/null 2>&1
92 ip -net $ns1 li set veth0 up
95 ip -net $ns1 addr add $IP1/$PFXL dev veth0
97 ip netns exec $ns1 iperf3 -s > /dev/null 2>&1&
129 ip netns exec $ns1 ping -W 1 -c 1 -I veth0 $IP0 > /dev/null
/linux-6.1.9/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 …]
Dtest_xdp_redirect_multi.sh130 ip netns exec ${NS[1]} tcpdump -i veth0 -nn -l -e &> ${LOG_DIR}/ns1-1_${mode}.log &
131 ip netns exec ${NS[2]} tcpdump -i veth0 -nn -l -e &> ${LOG_DIR}/ns1-2_${mode}.log &
132 ip netns exec ${NS[3]} tcpdump -i veth0 -nn -l -e &> ${LOG_DIR}/ns1-3_${mode}.log &
144 [ $(grep -cF "who-has 192.0.2.254" ${LOG_DIR}/ns1-1_${mode}.log) -eq 4 ] && \
147 [ $(grep -cF "who-has 192.0.2.254" ${LOG_DIR}/ns1-2_${mode}.log) -eq 2 ] && \
150 [ $(grep -cF "who-has 192.0.2.254" ${LOG_DIR}/ns1-3_${mode}.log) -eq 2 ] && \
155 [ $(grep -c "ICMP echo request" ${LOG_DIR}/ns1-1_${mode}.log) -eq 4 ] && \
158 [ $(grep -c "ICMP echo request" ${LOG_DIR}/ns1-2_${mode}.log) -eq 4 ] && \
161 [ $(grep -c "ICMP echo request" ${LOG_DIR}/ns1-3_${mode}.log) -eq 4 ] && \
166 [ $(grep -c "ICMP6, echo request" ${LOG_DIR}/ns1-1_${mode}.log) -eq 4 ] && \
[all …]
/linux-6.1.9/samples/bpf/
Dtc_l2_redirect.sh16 $IP netns add ns1
24 $IP link set dev vens1 netns ns1
27 $IP -n ns1 link set dev lo up
28 $IP -n ns1 link set dev vens1 up
29 $IP -n ns1 addr add 10.1.1.101/24 dev vens1
30 $IP -n ns1 addr add 2401:db01::65/64 dev vens1 nodad
31 $IP -n ns1 route add default via 10.1.1.1 dev vens1
32 $IP -n ns1 route add default via 2401:db01::1 dev vens1
72 $IP netns delete ns1 >& /dev/null
108 $IP netns exec ns1 ping -c1 10.10.1.102 >& /dev/null
[all …]
/linux-6.1.9/tools/testing/selftests/net/forwarding/
Dvxlan_asymmetric.sh390 ip netns add ns1
391 ip link set dev v2 netns ns1
392 in_ns ns1 ns_init
397 ip netns exec ns1 ip link set dev v2 netns 1
398 ip netns del ns1
423 local h1_ns_mac=$(in_ns ns1 mac_get w2)
424 local h2_ns_mac=$(in_ns ns1 mac_get w4)
429 in_ns ns1 macs_populate $h1_mac $h2_mac 10.1.1.101 10.1.2.101 10.0.0.1
493 ip neigh replace 10.1.1.102 lladdr $(in_ns ns1 mac_get w2) nud noarp \
495 ip neigh replace 10.1.2.102 lladdr $(in_ns ns1 mac_get w4) nud noarp \
[all …]
/linux-6.1.9/tools/testing/selftests/net/
Dgre_gso.sh53 ip netns add ns1
54 ip netns set ns1 auto
59 ip link set veth1 netns ns1
73 ip netns del ns1
148 a2=$(get_linklocal veth0 ns1)
Dtraceroute.sh95 local ns1=$1
104 ip netns exec ${ns1} ip li add ${ns1_dev} type veth peer name tmp
105 ip netns exec ${ns1} ip li set ${ns1_dev} up
106 ip netns exec ${ns1} ip li set tmp netns ${ns2} name ${ns2_dev}
110 ip netns exec ${ns1} ip addr add dev ${ns1_dev} ${ns1_addr}
118 ip netns exec ${ns1} ip addr add dev ${ns1_dev} ${ns1_addr6}
/linux-6.1.9/tools/testing/selftests/clone3/
Dclone3_set_tid.c156 pid_t pid, ns1, ns2, ns3, ns_pid; in main() local
355 &ns3, &ns2, &ns1); in main()
360 ns1 = ns2 = ns3 = 0; in main()
385 if (ns3 == pid && ns2 == 42 && ns1 == 1) in main()
388 ns3, ns2, ns1); in main()
392 ns3, ns2, ns1); in main()

12