2 # SPDX-License-Identifier: GPL-2.0
4 # +--------------------+ +----------------------+
7 # | $h1.1 + | | + $h2.1 |
8 # | 192.0.2.2/24 | | | | 198.51.100.2/24 |
9 # | 2001:db8:1::2/64 | | | | 2001:db8:2::2/64 |
13 # +------------------|-+ +-|--------------------+
15 # +------------------|-------------------------|--------------------+
20 # | $rp1.1 + + $rp2.1 |
21 # | 192.0.2.1/24 198.51.100.1/24 |
22 # | 2001:db8:1::1/64 2001:db8:2::1/64 |
24 # +-----------------------------------------------------------------+
36 ip link
set dev vrf-h1 up
38 ip link
set dev
$h1 up
39 vlan_create
$h1 1 vrf-h1
192.0.2.2/24 2001:db8
:1::2/64
41 ip route add
198.51.100.0/24 vrf vrf-h1 nexthop via
192.0.2.1
42 ip route add
2001:db8
:2::/64 vrf vrf-h1 nexthop via
2001:db8
:1::1
47 ip route del
2001:db8
:2::/64 vrf vrf-h1
48 ip route del
198.51.100.0/24 vrf vrf-h1
51 ip link
set dev
$h1 down
53 ip link
set dev vrf-h1 down
60 ip link
set dev vrf-h2 up
62 ip link
set dev
$h2 up
63 vlan_create
$h2 1 vrf-h2
198.51.100.2/24 2001:db8
:2::2/64
65 ip route add
192.0.2.0/24 vrf vrf-h2 nexthop via
198.51.100.1
66 ip route add
2001:db8
:1::/64 vrf vrf-h2 nexthop via
2001:db8
:2::1
71 ip route del
2001:db8
:1::/64 vrf vrf-h2
72 ip route del
192.0.2.0/24 vrf vrf-h2
75 ip link
set dev
$h2 down
77 ip link
set dev vrf-h2 down
83 ip link
set dev
$rp1 up
84 ip link add link
$rp1 name
$rp1.1 up
type vlan id
1
86 ip address add
192.0.2.1/24 dev
$rp1.1
87 ip address add
2001:db8
:1::1/64 dev
$rp1.1
89 ip link
set dev
$rp2 up
90 ip link add link
$rp2 name
$rp2.1 up
type vlan id
1
92 ip address add
198.51.100.1/24 dev
$rp2.1
93 ip address add
2001:db8
:2::1/64 dev
$rp2.1
98 ip address del
2001:db8
:2::1/64 dev
$rp2.1
99 ip address del
198.51.100.1/24 dev
$rp2.1
101 ip link del dev
$rp2.1
102 ip link
set dev
$rp2 down
104 ip address del
2001:db8
:1::1/64 dev
$rp1.1
105 ip address del
192.0.2.1/24 dev
$rp1.1
107 ip link del dev
$rp1.1
108 ip link
set dev
$rp1 down
145 ping_test
$h1.1
198.51.100.2
150 ping6_test
$h1.1
2001:db8
:2::2