Lines Matching +full:sw +full:- +full:mode
2 # SPDX-License-Identifier: GPL-2.0
7 # +----------------+
9 # | | | sw
11 # +---+-------+----+
13 # +---+-------+----+
17 # +----------------+
25 sw="sw-$(mktemp -u XXXXXX)"
26 host="ns-$(mktemp -u XXXXXX)"
30 ip netns del $sw
36 $@ | grep fe80 | grep -qv tentative
41 $@ | grep -q 'state UP'
46 ip netns add $sw
49 ip -n $host link add veth0 type veth peer name veth0 netns $sw
50 ip -n $host link add veth1 type veth peer name veth1 netns $sw
52 ip -n $sw link add br0 type bridge
53 ip -n $sw link set br0 up
54 sw_lladdr=$(ip -n $sw addr show br0 | awk '/fe80/{print $2}' | cut -d'/' -f1)
56 slowwait 2 wait_lladdr_dad ip -n $sw addr show br0
58 ip -n $host link add bond0 type bond mode 1 ns_ip6_target ${sw_lladdr} \
61 ip -n $host addr add fe80::beef/64 dev bond0
62 ip -n $host link set bond0 up
63 ip -n $host link set veth0 master bond0
64 ip -n $host link set veth1 master bond0
66 ip -n $sw link set veth0 master br0
67 ip -n $sw link set veth1 master br0
68 ip -n $sw link set veth0 up
69 ip -n $sw link set veth1 up
71 slowwait 5 wait_bond_up ip -n $host link show bond0
74 if ip -n $host link show bond0 | grep -q LOWER_UP; then