2 # SPDX-License-Identifier: GPL-2.0
16 ip link
set dev
$h1 master vrf-h1
18 ip link
set dev vrf-h1 up
19 ip link
set dev
$h1 up
21 ip address add
192.0.2.2/24 dev
$h1
22 ip address add
2001:db8
:1::2/64 dev
$h1
24 ip route add
198.51.100.0/24 vrf vrf-h1 nexthop via
192.0.2.1
25 ip route add
2001:db8
:2::/64 vrf vrf-h1 nexthop via
2001:db8
:1::1
30 ip route del
2001:db8
:2::/64 vrf vrf-h1
31 ip route del
198.51.100.0/24 vrf vrf-h1
33 ip address del
2001:db8
:1::2/64 dev
$h1
34 ip address del
192.0.2.2/24 dev
$h1
36 ip link
set dev
$h1 down
43 ip link
set dev
$h2 master vrf-h2
45 ip link
set dev vrf-h2 up
46 ip link
set dev
$h2 up
48 ip address add
198.51.100.2/24 dev
$h2
49 ip address add
2001:db8
:2::2/64 dev
$h2
51 ip route add
192.0.2.0/24 vrf vrf-h2 nexthop via
198.51.100.1
52 ip route add
2001:db8
:1::/64 vrf vrf-h2 nexthop via
2001:db8
:2::1
57 ip route del
2001:db8
:1::/64 vrf vrf-h2
58 ip route del
192.0.2.0/24 vrf vrf-h2
60 ip address del
2001:db8
:2::2/64 dev
$h2
61 ip address del
198.51.100.2/24 dev
$h2
63 ip link
set dev
$h2 down
69 ip link
set dev
$rp1 up
70 ip link
set dev
$rp2 up
72 tc qdisc add dev
$rp2 clsact
74 ip address add
192.0.2.1/24 dev
$rp1
75 ip address add
2001:db8
:1::1/64 dev
$rp1
77 ip address add
198.51.100.1/24 dev
$rp2
78 ip address add
2001:db8
:2::1/64 dev
$rp2
83 ip address del
2001:db8
:2::1/64 dev
$rp2
84 ip address del
198.51.100.1/24 dev
$rp2
86 ip address del
2001:db8
:1::1/64 dev
$rp1
87 ip address del
192.0.2.1/24 dev
$rp1
89 tc qdisc del dev
$rp2 clsact
91 ip link
set dev
$rp2 down
92 ip link
set dev
$rp1 down
97 # Create the nexthops as AF_INET6, so that IPv4 and IPv6 routes could
99 ip
-6 nexthop add id
101 dev
$rp1
100 ip
-6 nexthop add id
102 dev
$rp2
102 ip route replace
192.0.2.0/24 nhid
101
103 ip route replace
2001:db8
:1::/64 nhid
101
104 ip route replace
198.51.100.0/24 nhid
102
105 ip route replace
2001:db8
:2::/64 nhid
102
116 rp1mac
=$
(mac_get
$rp1)
144 ping_test
$h1 198.51.100.2
149 ping6_test
$h1 2001:db8
:2::2