Lines Matching +full:link +full:- +full:name
2 # SPDX-License-Identifier: GPL-2.0
4 # +---------------------------+ +------------------------------+
5 # | vrf-h1 | | vrf-h2 |
9 # +----|----------------------+ +----|-------------------------+
11 # +----|--------------------------------------------|-------------------------+
13 # | +--|--------------------------------------------|-----------------------+ |
24 # | +-----------------------------------+-----------------------------------+ |
26 # | +-----------------------------------|-----------------------------------+ |
28 # | | +--------------------------------+--------------------------------+ | |
33 # | | + vlan10-v (macvlan) vlan20-v (macvlan) + | |
36 # | | vrf-green | |
37 # | +-----------------------------------------------------------------------+ |
41 # +----|----------------------------------------------------------------------+
43 # +----|--------------------------------------------------------+
44 # | | vrf-spine |
53 # +----|--------------------------------------------------------+
55 # +----|----------------------------------------------------------------------+
59 # | +-----------------------------------------------------------------------+ |
60 # | | vrf-green | |
61 # | | + vlan10-v (macvlan) vlan20-v (macvlan) + | |
68 # | | +--------------------------------+--------------------------------+ | |
70 # | +-----------------------------------|-----------------------------------+ |
72 # | +-----------------------------------+-----------------------------------+ |
83 # | +--|------------------------------------------|-------------------------+ |
86 # | +--|----------------------+ +--|-------------------------+ |
87 # | | | vrf-h1 | | | vrf-h2 | |
91 # | +-------------------------+ +----------------------------+ |
92 # +---------------------------------------------------------------------------+
112 ip link set dev $if_name master $vrf_name
113 ip link set dev $vrf_name up
114 ip link set dev $if_name up
121 export -f hx_create
134 ip link set dev $if_name down
140 hx_create "vrf-h1" $h1 10.1.1.101 10.1.1.1
145 hx_destroy "vrf-h1" $h1 10.1.1.101 10.1.1.1
150 hx_create "vrf-h2" $h2 10.1.2.101 10.1.2.1
155 hx_destroy "vrf-h2" $h2 10.1.2.101 10.1.2.1
160 ip link add name br1 type bridge vlan_filtering 1 vlan_default_pvid 0 \
164 ip link set dev br1 address $(mac_get $swp1)
165 ip link set dev br1 up
167 ip link set dev $rp1 up
171 ip link add name vx10 type vxlan id 1000 \
174 ip link set dev vx10 up
176 ip link set dev vx10 master br1
179 ip link add name vx20 type vxlan id 2000 \
182 ip link set dev vx20 up
184 ip link set dev vx20 master br1
187 ip link set dev $swp1 master br1
188 ip link set dev $swp1 up
191 ip link set dev $swp2 master br1
192 ip link set dev $swp2 up
198 vrf_create "vrf-green"
199 ip link set dev vrf-green up
201 ip link add link br1 name vlan10 up master vrf-green type vlan id 10
203 ip link add link vlan10 name vlan10-v up master vrf-green \
205 ip address add 10.1.1.1/24 dev vlan10-v
207 ip link add link br1 name vlan20 up master vrf-green type vlan id 20
209 ip link add link vlan20 name vlan20-v up master vrf-green \
211 ip address add 10.1.2.1/24 dev vlan20-v
220 sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0
221 sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0
234 ip link del dev vlan20
236 ip link del dev vlan10
238 vrf_destroy "vrf-green"
243 ip link set dev $swp2 down
244 ip link set dev $swp2 nomaster
247 ip link set dev $swp1 down
248 ip link set dev $swp1 nomaster
251 ip link set dev vx20 nomaster
253 ip link set dev vx20 down
254 ip link del dev vx20
257 ip link set dev vx10 nomaster
259 ip link set dev vx10 down
260 ip link del dev vx10
264 ip link set dev $rp1 down
266 ip link set dev br1 down
267 ip link del dev br1
272 vrf_create "vrf-spine"
273 ip link set dev $rp2 master vrf-spine
274 ip link set dev v1 master vrf-spine
275 ip link set dev vrf-spine up
276 ip link set dev $rp2 up
277 ip link set dev v1 up
282 ip route add 10.0.0.1/32 vrf vrf-spine nexthop via 192.0.2.1
283 ip route add 10.0.0.2/32 vrf vrf-spine nexthop via 192.0.3.1
288 ip route del 10.0.0.2/32 vrf vrf-spine nexthop via 192.0.3.1
289 ip route del 10.0.0.1/32 vrf vrf-spine nexthop via 192.0.2.1
294 ip link set dev v1 down
295 ip link set dev $rp2 down
296 vrf_destroy "vrf-spine"
301 hx_create "vrf-h1" w2 10.1.1.102 10.1.1.1
303 export -f ns_h1_create
307 hx_create "vrf-h2" w4 10.1.2.102 10.1.2.1
309 export -f ns_h2_create
313 ip link add name br1 type bridge vlan_filtering 1 vlan_default_pvid 0 \
315 ip link set dev br1 up
317 ip link set dev v2 up
321 ip link add name vx10 type vxlan id 1000 \
324 ip link set dev vx10 up
326 ip link set dev vx10 master br1
329 ip link add name vx20 type vxlan id 2000 \
332 ip link set dev vx20 up
334 ip link set dev vx20 master br1
337 ip link set dev w1 master br1
338 ip link set dev w1 up
341 ip link set dev w3 master br1
342 ip link set dev w3 up
348 vrf_create "vrf-green"
349 ip link set dev vrf-green up
351 ip link add link br1 name vlan10 up master vrf-green type vlan id 10
353 ip link add link vlan10 name vlan10-v up master vrf-green \
355 ip address add 10.1.1.1/24 dev vlan10-v
357 ip link add link br1 name vlan20 up master vrf-green type vlan id 20
359 ip link add link vlan20 name vlan20-v up master vrf-green \
361 ip address add 10.1.2.1/24 dev vlan20-v
370 sysctl_set net.ipv4.conf.vlan10-v.rp_filter 0
371 sysctl_set net.ipv4.conf.vlan20-v.rp_filter 0
373 export -f ns_switch_create
377 ip link add name w1 type veth peer name w2
378 ip link add name w3 type veth peer name w4
380 ip link set dev lo up
386 export -f ns_init
391 ip link set dev v2 netns ns1
397 ip netns exec ns1 ip link set dev v2 netns 1
419 export -f macs_populate
450 ip link add name v1 type veth peer name v2
463 ip link del dev v1
475 ping_test $h1 10.1.2.101 ": local->local vid 10->vid 20"
476 ping_test $h1 10.1.1.102 ": local->remote vid 10->vid 10"
477 ping_test $h2 10.1.2.102 ": local->remote vid 20->vid 20"
478 ping_test $h1 10.1.2.102 ": local->remote vid 10->vid 20"
479 ping_test $h2 10.1.1.102 ": local->remote vid 20->vid 10"
510 ip link set dev vx10 type bridge_slave neigh_suppress on
521 $ARPING -I $h1 -fqb -c 1 -w 1 10.1.1.102
534 $ARPING -I $h1 -fqb -c 1 -w 1 10.1.1.102
546 ip link set dev vx10 type bridge_slave neigh_suppress off
548 $ARPING -I $h1 -fqb -c 1 -w 1 10.1.1.102
560 $ARPING -I $h1 -fqb -c 1 -w 1 10.1.1.102