doc: Update VRF documentation metric
Two things: 1) Update examples to show usage of metric 2) Discuss reasoning for using such a high metric. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com> Acked-by: David Ahern <dsa@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
9854d758f7
commit
17c918840f
@ -71,7 +71,12 @@ Setup
|
|||||||
ip ru add iif vrf-blue table 10
|
ip ru add iif vrf-blue table 10
|
||||||
|
|
||||||
3. Set the default route for the table (and hence default route for the VRF).
|
3. Set the default route for the table (and hence default route for the VRF).
|
||||||
ip route add table 10 unreachable default
|
ip route add table 10 unreachable default metric 4278198272
|
||||||
|
|
||||||
|
This high metric value ensures that the default unreachable route can
|
||||||
|
be overridden by a routing protocol suite. FRRouting interprets
|
||||||
|
kernel metrics as a combined admin distance (upper byte) and priority
|
||||||
|
(lower 3 bytes). Thus the above metric translates to [255/8192].
|
||||||
|
|
||||||
4. Enslave L3 interfaces to a VRF device.
|
4. Enslave L3 interfaces to a VRF device.
|
||||||
ip link set dev eth1 master vrf-blue
|
ip link set dev eth1 master vrf-blue
|
||||||
@ -256,7 +261,7 @@ older form without it.
|
|||||||
|
|
||||||
For example:
|
For example:
|
||||||
$ ip route show vrf red
|
$ ip route show vrf red
|
||||||
prohibit default
|
unreachable default metric 4278198272
|
||||||
broadcast 10.2.1.0 dev eth1 proto kernel scope link src 10.2.1.2
|
broadcast 10.2.1.0 dev eth1 proto kernel scope link src 10.2.1.2
|
||||||
10.2.1.0/24 dev eth1 proto kernel scope link src 10.2.1.2
|
10.2.1.0/24 dev eth1 proto kernel scope link src 10.2.1.2
|
||||||
local 10.2.1.2 dev eth1 proto kernel scope host src 10.2.1.2
|
local 10.2.1.2 dev eth1 proto kernel scope host src 10.2.1.2
|
||||||
@ -282,7 +287,7 @@ older form without it.
|
|||||||
ff00::/8 dev red metric 256 pref medium
|
ff00::/8 dev red metric 256 pref medium
|
||||||
ff00::/8 dev eth1 metric 256 pref medium
|
ff00::/8 dev eth1 metric 256 pref medium
|
||||||
ff00::/8 dev eth2 metric 256 pref medium
|
ff00::/8 dev eth2 metric 256 pref medium
|
||||||
|
unreachable default dev lo metric 4278198272 error -101 pref medium
|
||||||
|
|
||||||
8. Route Lookup for a VRF
|
8. Route Lookup for a VRF
|
||||||
|
|
||||||
@ -331,7 +336,7 @@ function vrf_create
|
|||||||
ip link add ${VRF} type vrf table ${TBID}
|
ip link add ${VRF} type vrf table ${TBID}
|
||||||
|
|
||||||
if [ "${VRF}" != "mgmt" ]; then
|
if [ "${VRF}" != "mgmt" ]; then
|
||||||
ip route add table ${TBID} unreachable default
|
ip route add table ${TBID} unreachable default metric 4278198272
|
||||||
fi
|
fi
|
||||||
ip link set dev ${VRF} up
|
ip link set dev ${VRF} up
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user