Home
last modified time | relevance | path

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

12

/Linux-v5.10/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.sh22 ns1="ns1-$rndh"
25 for netns in "$ns1" "$ns2";do
40 ip link add ns1eth$i netns "$ns1" type veth peer name ns2eth$i netns "$ns2"
41 ip -net "$ns1" addr add 10.0.$i.1/24 dev ns1eth$i
42 ip -net "$ns1" addr add dead:beef:$i::1/64 dev ns1eth$i nodad
43 ip -net "$ns1" link set ns1eth$i up
58 for netns in "$ns1" "$ns2"; do
80 for netns in "$ns1" "$ns2";do
290 count=`ip netns exec $ns1 nstat -as | grep MPTcpExtMPJoinSynRx | awk '{print $2}'`
312 count=`ip netns exec $ns1 nstat -as | grep MPTcpExtMPJoinAckRx | awk '{print $2}'`
[all …]
Dsimult_flows.sh5 ns1="ns1-$rndh"
29 for netns in "$ns1" "$ns2" "$ns3";do
59 for i in "$ns1" "$ns2" "$ns3";do
64 ip link add ns1eth1 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
65 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth2 netns "$ns2"
68 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth1
69 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth1 nodad
70 ip -net "$ns1" link set ns1eth1 up mtu 1500
71 ip -net "$ns1" route add default via 10.0.1.2
72 ip -net "$ns1" route add default via dead:beef:1::2
[all …]
Dmptcp_connect.sh115 ns1="ns1-$rndh"
129 for netns in "$ns1" "$ns2" "$ns3" "$ns4";do
147 for i in "$ns1" "$ns2" "$ns3" "$ns4";do
157 ip link add ns1eth2 netns "$ns1" type veth peer name ns2eth1 netns "$ns2"
161 ip -net "$ns1" addr add 10.0.1.1/24 dev ns1eth2
162 ip -net "$ns1" addr add dead:beef:1::1/64 dev ns1eth2 nodad
164 ip -net "$ns1" link set ns1eth2 up
165 ip -net "$ns1" route add default via 10.0.1.2
166 ip -net "$ns1" route add default via dead:beef:1::2
612 for sender in "$ns1" "$ns2" "$ns3" "$ns4";do
[all …]
/Linux-v5.10/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
115 sleep 1 | ip netns exec ${ns1} nc -w 2 10.0.1.2 $port > /dev/null &
117 check_for_helper "$ns1" "ip $msg" $port
[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_queue.sh12 ns1="ns1-$sfx"
19 ip netns del ${ns1}
51 ip netns add ${ns1}
54 ip link add veth0 netns ${nsrouter} type veth peer name eth0 netns ${ns1} > /dev/null 2>&1
70 ip -net ${ns1} link set lo up
71 ip -net ${ns1} link set eth0 up
76 ip -net ${ns1} addr add 10.0.1.99/24 dev eth0
77 ip -net ${ns1} addr add dead:1::99/64 dev eth0
78 ip -net ${ns1} route add default via 10.0.1.1
79 ip -net ${ns1} route add default via dead:1::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
Dnft_flowtable.sh41 ip netns add ns1
62 ip link add veth0 netns nsr1 type veth peer name eth0 netns ns1
113 ip -net ns1 link set eth0 mtu $omtu
200 if ! ip netns exec ns1 ping -c 1 -q 10.0.2.99 > /dev/null; then
316 if test_tcp_forwarding ns1 ns2; then
347 if test_tcp_forwarding_nat ns1 ns2; then
364 ip netns exec ns1 sysctl net.ipv4.ip_no_pmtu_disc=0 > /dev/null
367 if test_tcp_forwarding_nat ns1 ns2; then
413 if test_tcp_forwarding ns1 ns2; then
/Linux-v5.10/tools/testing/selftests/bpf/
Dtest_xdp_vlan.sh56 ip netns del ns1 2> /dev/null
126 ip netns del ns1 2> /dev/null
144 ip netns add ns1
154 ip link set veth1 netns ns1
162 ip netns exec ns1 ethtool -K veth1 rxvlan off
167 ip netns exec ns1 ethtool -K veth1 txvlan off
173 ip netns exec ns1 ip addr add ${IPADDR1}/24 dev veth1
174 ip netns exec ns1 ip link set veth1 up
185 ip netns exec ns1 ip link set lo up
202 ip netns exec ns1 ip link set $DEVNS1 $XDP_MODE object $FILE section $XDP_PROG
[all …]
Dtest_xdp_meta.sh13 ip netns del ns1 2> /dev/null
24 ip netns add ns1
31 ip link set veth1 netns ns1
34 ip netns exec ns1 ip addr add 10.1.1.11/24 dev veth1
37 ip netns exec ns1 tc qdisc add dev veth1 clsact
40 ip netns exec ns1 tc filter add dev veth1 ingress bpf da obj test_xdp_meta.o sec t
43 ip netns exec ns1 ip link set dev veth1 xdp obj test_xdp_meta.o sec x
46 ip netns exec ns1 ip link set dev veth1 up
49 ip netns exec ns1 ping -c 1 10.1.1.22
Dtest_tc_tunnel.sh10 readonly ns1="${ns_prefix}1"
28 ip netns add "${ns1}"
31 ip link add dev veth1 mtu 1500 netns "${ns1}" type veth \
34 ip netns exec "${ns1}" ethtool -K veth1 tso off
36 ip -netns "${ns1}" link set veth1 up
39 ip -netns "${ns1}" -4 addr add "${ns1_v4}/24" dev veth1
41 ip -netns "${ns1}" -6 addr add "${ns1_v6}/64" dev veth1 nodad
45 ip -netns "${ns1}" -4 route flush table main
46 ip -netns "${ns1}" -6 route flush table main
47 ip -netns "${ns1}" -4 route add "${ns2_v4}" mtu 1458 dev veth1
[all …]
Dtest_xdp_redirect.sh20 ip netns add ns1
23 ip link add veth1 index 111 type veth peer name veth11 netns ns1
28 ip -n ns1 link set dev veth11 up
31 ip -n ns1 addr add 10.1.1.11/24 dev veth11
39 ip netns del ns1 2> /dev/null
55 ip -n ns1 link set veth11 $xdpmode obj xdp_dummy.o sec xdp_dummy &> /dev/null
60 ip netns exec ns1 ping -c 1 10.1.1.22 &> /dev/null
Dtest_xdp_veth.sh32 ip netns del ns1 2> /dev/null
80 ip netns add ns1
84 ip link add veth1 index 111 type veth peer name veth11 netns ns1
92 ip -n ns1 addr add 10.1.1.11/24 dev veth11
95 ip -n ns1 link set dev veth11 up
110 ip -n ns1 link set dev veth11 xdp obj xdp_dummy.o sec xdp_dummy
116 ip netns exec ns1 ping -c 1 -W 1 10.1.1.33
Dtest_lwt_seg6local.sh44 ip netns del ns1 2> /dev/null
55 ip netns add ns1
70 ip link set veth1 netns ns1
81 ip netns exec ns1 ip link set dev veth1 up
94 ip netns exec ns1 ip -6 addr add fb00::12/16 dev veth1 scope link
95 ip netns exec ns1 ip -6 route add fb00::21 dev veth1 scope link
111 ip netns exec ns1 ip -6 addr add fb00::1/16 dev lo
112 ip netns exec ns1 ip -6 route add fb00::6 dev veth1 via fb00::21
130 ip netns exec ns1 sysctl net.ipv6.conf.all.forwarding=1 > /dev/null
141 ip netns exec ns1 bash -c "echo 'foobar' | nc -w0 -6 -u -p 2121 -s fb00::1 fb00::6 7330"
Dtest_tcp_check_syncookie.sh31 ip netns exec ns1 "$@"
36 ip netns add ns1
50 ip netns del ns1 2>/dev/null || :
/Linux-v5.10/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-v5.10/tools/testing/selftests/kvm/lib/
Dtest_util.c75 int64_t ns1 = timespec_to_ns(ts1); in timespec_add() local
77 return timespec_add_ns((struct timespec){0}, ns1 + ns2); in timespec_add()
82 int64_t ns1 = timespec_to_ns(ts1); in timespec_sub() local
84 return timespec_add_ns((struct timespec){0}, ns1 - ns2); in timespec_sub()
/Linux-v5.10/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 …]
Dvxlan_bridge_1d.sh227 ip netns add ns1
228 ip link set dev v2 netns ns1
229 in_ns ns1 \
235 ip netns exec ns1 ip link set dev v2 netns 1
236 ip netns del ns1
277 r1_mac=$(in_ns ns1 mac_get w2)
609 in_ns ns1 \
689 in_ns ns1 $MZ w2 -c 1 -p 64 -a $mac -b ff:ff:ff:ff:ff:ff -B $dst \
721 in_ns ns1 $MZ w2 -c 1 -p 64 -a $mac -b ff:ff:ff:ff:ff:ff -B $dst \
749 in_ns ns1 $MZ w2 -c 1 -p 64 -a $mac -b ff:ff:ff:ff:ff:ff -B $dst \
[all …]
Dvxlan_symmetric.sh433 ip netns add ns1
434 ip link set dev v2 netns ns1
435 in_ns ns1 ns_init
440 ip netns exec ns1 ip link set dev v2 netns 1
441 ip netns del ns1
466 local h1_ns_mac=$(in_ns ns1 mac_get w2)
467 local h2_ns_mac=$(in_ns ns1 mac_get w4)
472 in_ns ns1 __l2_vni_init $h1_mac $h2_mac 10.1.1.101 10.1.2.101 10.0.0.1
496 local vlan4001_ns_mac=$(in_ns ns1 mac_get vlan4001)
500 in_ns ns1 __l3_vni_init $vlan4001_mac 10.0.0.1 10.1.1.101 10.1.2.101
/Linux-v5.10/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()
/Linux-v5.10/tools/testing/selftests/net/
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-v5.10/Documentation/networking/
Dipvlan.rst145 | | NS:ns0 | | NS:ns1 | |
156 (a) Create two network namespaces - ns0, ns1::
159 ip netns add ns1
169 ip link set dev ipvl1 netns ns1
171 (d) Now switch to the namespace (ns0 or ns1) to configure the slave devices
182 - For ns1::
184 (1) ip netns exec ns1 bash

12