Home
last modified time | relevance | path

Searched full:netns (Results 1 – 25 of 505) sorted by relevance

12345678910>>...21

/linux/tools/testing/selftests/net/
H A Dvlan_hw_filter.sh4 readonly NETNS="ns-$(mktemp -u XXXXXX)"
17 ip netns add ${NETNS}
21 ip netns del $NETNS 2>/dev/null
41 ip netns exec ${NETNS} ip link add bond0 type bond mode 0
42 ip netns exec ${NETNS} ip link add bond_slave_1 type veth peer veth2
43 ip netns exec ${NETNS} ip link set bond_slave_1 master bond0
44 ip netns exec ${NETNS} ethtool -K bond0 rx-vlan-filter off
45 ip netns exec ${NETNS} ip link add link bond_slave_1 name bond_slave_1.0 type vlan id 0
46 ip netns exec ${NETNS} ip link add link bond0 name bond0.0 type vlan id 0
47 ip netns exec ${NETNS} ip link set bond_slave_1 nomaster
[all …]
H A Dip_defrag.sh11 readonly NETNS="ns-$(mktemp -u XXXXXX)"
14 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…
[all …]
H A Dnetns-name.sh34 ip -netns $NS link set dev $nsim netns $test_ns ||
35 fail "Can't perform a netns move"
36 ip -netns $test_ns link show dev $nsim >> /dev/null ||
43 ip -netns $test_ns link add name $DEV type dummy
44 ip -netns $NS link add name $DEV type dummy || fail
45 ip -netns $NS link set dev $DEV netns $test_ns 2> /dev/null &&
46 fail "Performed a netns move with a name conflict"
47 ip -netns $test_ns link show dev $DEV >> /dev/null || fail "Device not found after move"
48 ip -netns $NS link del $DEV || fail
49 ip -netns $test_ns link del $DEV || fail
[all …]
H A Dicmp_redirect.sh101 addr=$(ip -netns $ns -6 -br addr show dev ${dev} | \
130 ip -netns ${ns} link add ${VRF} type vrf table ${VRF_TABLE}
131 ip -netns ${ns} link set ${VRF} up
132 ip -netns ${ns} route add vrf ${VRF} unreachable default metric 8192
133 ip -netns ${ns} -6 route add vrf ${VRF} unreachable default metric 8192
135 ip -netns ${ns} addr add 127.0.0.1/8 dev ${VRF}
136 ip -netns ${ns} -6 addr add ::1 dev ${VRF} nodad
138 ip -netns ${ns} ru del pref 0
139 ip -netns ${ns} ru add pref 32765 from all lookup local
140 ip -netns
[all...]
H A Drps_default_mask.sh13 readonly NETNS="ns-${TAG}"
16 ip netns add "${NETNS}"
17 ip -netns "${NETNS}" link set lo up
22 ip netns del $NETNS
28 local netns=$2
32 [ -n "$netns" ] && cmd="ip netns exe
[all...]
H A Dlwt_dst_cache_ref_loop.sh29 echo "SKIP: Cannot create netns."
33 ip link add name veth0 netns $tmp_node type veth \
34 peer name veth1 netns $tmp_node &>/dev/null
37 ip -netns $tmp_node link set veth0 up &>/dev/null
40 ip -netns $tmp_node link set veth1 up &>/dev/null
53 ip -netns $tmp_node route add 2001:db8:1::/64 \
58 ip -netns $tmp_node route add 2001:db8:2::/64 \
62 ip -netns $tmp_node route add 2001:db8:3::/64 \
65 ip -netns $tmp_node route add 2001:db8:4::/64 \
68 ip -netns $tmp_node -6 route 2>/dev/null | grep -q "encap ila"
[all …]
H A Dbig_tcp_tunnels.sh33 ip netns add "$SERVER_NS"
34 ip netns add "$CLIENT_NS"
35 ip -netns "$SERVER_NS" link add link1 type veth peer name link0 netns "$CLIENT_NS"
37 ip -netns "$CLIENT_NS" link set link0 up
38 ip -netns "$CLIENT_NS" addr replace "$CLIENT_IP4/24" dev link0
39 ip -netns "$CLIENT_NS" addr replace "$CLIENT_IP6/112" dev link0 nodad
40 ip -netns "$CLIENT_NS" link set link0 \
43 ip -netns "$SERVER_NS" link set link1 up
44 ip -netns "
[all...]
H A Dvrf_route_leaking.sh165 ip -netns "${ns}" rule del pref 0
166 ip -netns "${ns}" rule add pref 32765 from all lookup local
167 ip -netns "${ns}" -6 rule del pref 0
168 ip -netns "${ns}" -6 rule add pref 32765 from all lookup local
177 ip -netns "${ns}" link add "${vrf}" type vrf table "${table}"
178 ip -netns "${ns}" link set "${vrf}" up
179 ip -netns "${ns}" route add vrf "${vrf}" unreachable default metric 8192
180 ip -netns "${ns}" -6 route add vrf "${vrf}" unreachable default metric 8192
182 ip -netns "${ns}" addr add 127.0.0.1/8 dev "${vrf}"
183 ip -netns "
[all...]
H A Dlink_netns.py8 from lib.py import NetNS, NetNSEnter
17 with NetNS() as ns1, NetNS() as ns2:
23 ip(f"netns set {ns2} {LINK_NETNSID}", ns=str(ns1))
24 ip(f"link add netns {ns1} link-netnsid {LINK_NETNSID} dummy1 type dummy")
25 ip(f"link add netns {ns1} dummy2 type dummy", ns=str(ns2))
41 with NetNS() as ns1, NetNS() as ns2:
53 ip(f"netns set {net1} {LINK_NETNSID}", ns=net1)
57 ip(f"netns set {net2} {LINK_NETNSID2}", ns=net1)
87 def validate_link_netns(netns, ifname, link_netnsid) -> bool: argument
88 link_info = ip(f"-d link show dev {ifname}", ns=netns, json=True)
[all …]
H A Dbind_bhash.sh5 readonly NETNS="ns-$(mktemp -u XXXXXX)"
39 ip netns add "${NETNS}"
40 ip -netns "${NETNS}" link add veth0 type veth peer name veth1
41 ip -netns "${NETNS}" link set lo up
42 ip -netns "${NETNS}" link set veth0 up
43 ip -netns "${NETNS}" link set veth1 up
46 ip -netns "${NETNS}" addr add $addr_v6 nodad dev veth0
48 ip -netns "${NETNS}" addr add $addr_v4 dev lo
53 ip netns del "${NETNS}"
62 ip netns exec "${NETNS}" sh -c \
[all …]
H A Damt.sh16 # | LISTENER netns |
28 # | . GATEWAY netns |
48 # | RELAY netns . |
72 # | SOURCE netns |
89 ip netns delete "${ns}" 2>/dev/null || true
102 ip netns add "${LISTENER}" || exit_cleanup
103 ip netns add "${GATEWAY}" || exit_cleanup "${LISTENER}"
104 ip netns add "${RELAY}" || exit_cleanup "${LISTENER}" "${GATEWAY}"
105 ip netns add "${SOURCE}" || exit_cleanup "${LISTENER}" "${GATEWAY}" \
119 ip -netns "${ns}" link set dev lo up
[all …]
H A Dl2tp.sh45 out=$(eval ip netns exec ${ns} ${cmd} 2>&1)
69 ip -netns ${ns} addr add dev lo ${addr}
72 ip -netns ${ns} -6 addr add dev lo ${addr6}
75 ip -netns ${ns} ro add unreachable default metric 8192
76 ip -netns ${ns} -6 ro add unreachable default metric 8192
78 ip netns exec ${ns} sysctl -qw net.ipv4.ip_forward=1
79 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.keep_addr_on_down=1
80 ip netns exec ${ns} sysctl -qw net.ipv6.conf.all.forwarding=1
81 ip netns exec ${ns} sysctl -qw net.ipv6.conf.default.forwarding=1
82 ip netns exe
[all...]
H A Dveth.sh30 ip netns del $ns 2>/dev/null
40 ip netns add $ns
47 ip link set dev veth$ns netns $BASE$ns up
59 local flag=`ip netns exec $BASE$target ethtool -k veth$target |\
89 ifindex=`ip netns exec $BASE$target cat /sys/class/net/veth$target/ifindex`
90 out=`ip netns exec $BASE$target "$YNL" --family netdev --do dev-get \
118 local cur_rx=`ip netns exec $BASE$target ethtool -l $dev |\
120 local cur_tx=`ip netns exec $BASE$target ethtool -l $dev |\
122 local cur_combined=`ip netns exec $BASE$target ethtool -l $dev |\
137 ip netns exe
[all...]
H A Dtest_vxlan_under_vrf.sh13 # | vm-1 netns | | vm-2 netns |
39 # | hv-1 netns | | hv-2 netns |
68 # Setup "Hypervisors" simulated with netns
73 ip link set veth-hv-$id netns ${hv[$id]}
74 ip -netns ${hv[$id]} link set veth-hv-$id name veth0
76 ip -netns ${hv[$id]} link add vrf-underlay type vrf table 1
77 ip -netns ${hv[$id]} link set vrf-underlay up
78 ip -netns ${hv[$id]} addr add 172.16.0.$id/24 dev veth0
79 ip -netns ${hv[$id]} link set veth0 up
81 ip -netns ${hv[$id]} link add br0 type bridge
[all …]
/linux/tools/testing/selftests/bpf/
H A Dtest_lwt_ip_encap.sh
H A Dtest_lwt_seg6local.sh
H A Dtest_xdp_vlan.sh
H A Dtest_tc_tunnel.sh
H A Dtest_tunnel.sh
/linux/tools/testing/selftests/bpf/prog_tests/
H A 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/tools/testing/selftests/net/netfilter/
H A Dipvs.sh61 ip link add veth01 netns "${ns0}" type veth peer name veth10 netns "${ns1}"
62 ip link add veth02 netns "${ns0}" type veth peer name veth20 netns "${ns2}"
63 ip link add veth12 netns "${ns1}" type veth peer name veth21 netns "${ns2}"
65 ip netns exec "${ns0}" ip link set veth01 up
66 ip netns exec "${ns0}" ip link set veth02 up
67 ip netns exec "${ns0}" ip link add br0 type bridge
68 ip netns exec "${ns0}" ip link set veth01 master br0
69 ip netns exec "${ns0}" ip link set veth02 master br0
70 ip netns exec "${ns0}" ip link set br0 up
71 ip netns exec "${ns0}" ip addr add "${cip_v4}/24" dev br0
[all …]
H A Dnft_queue.sh18 ip netns pids "$ns1" | xargs kill 2>/dev/null
19 ip netns pids "$ns2" | xargs kill 2>/dev/null
20 ip netns pids "$nsrouter" | xargs kill 2>/dev/null
49 if ! ip link add veth0 netns "$nsrouter" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1; then
53 ip link add veth1 netns "$nsrouter" type veth peer name eth0 netns "$ns2"
54 ip link add veth2 netns "$nsrouter" type veth peer name eth0 netns "$ns3"
92 ip netns exe
[all...]
H A Dnft_nat.sh16 ip netns pids "$ns0" | xargs kill 2>/dev/null
17 ip netns pids "$ns1" | xargs kill 2>/dev/null
18 ip netns pids "$ns2" | xargs kill 2>/dev/null
32 if ! ip link add veth0 netns "$ns0" type veth peer name eth0 netns "$ns1" > /dev/null 2>&1;then
36 ip link add veth1 netns "$ns0" type veth peer name eth0 netns "$ns2"
69 ip netns exec "$ns" nft list counter inet filter "$counter" 1>&2
77 if ! ip netns exec "$ns" nft list counter inet filter ns0in | grep -q "packets 1 bytes 84";then
82 if ! ip netns exe
[all...]
/linux/tools/testing/selftests/drivers/net/bonding/
H A Dbond-arp-interval-causes-panic.sh12 ip netns delete server || true
13 ip netns delete client || true
25 ip netns add "server"
26 ip netns add "client"
27 ip -n client link add eth0 type veth peer name eth0 netns server
28 ip netns exec server ip link set dev eth0 up
29 ip netns exec server ip addr add ${server_ip4}/24 dev eth0
31 ip netns exec client ip link add dev bond0 down type bond mode 1 \
33 ip netns exec client ip link set dev eth0 master bond0
34 ip netns exec client ip link set dev bond0 up
[all …]
/linux/tools/testing/selftests/drivers/net/netdevsim/
H A Dpeer.sh30 ip netns add nssv
31 ip netns add nscl
38 ip link set $NSIM_DEV_1_NAME netns nssv
39 ip link set $NSIM_DEV_2_NAME netns nscl
41 ip netns exec nssv ip addr add '192.168.1.1/24' dev $NSIM_DEV_1_NAME
42 ip netns exec nscl ip addr add '192.168.1.2/24' dev $NSIM_DEV_2_NAME
44 ip netns exec nssv ip link set dev $NSIM_DEV_1_NAME up
45 ip netns exec nscl ip link set dev $NSIM_DEV_2_NAME up
51 ip netns del nscl
52 ip netns del nssv
[all …]

12345678910>>...21