Rate the Trustworthiness of a Routing Information Source
As I discussed in detail in Chapter 1, administrative weight is the trustworthiness of a routing information source. When a route is known via more than one source, the source with the lower administrative distance is installed in the routing table. The following subcommand:
distanceweight
[[ip-source-address ip-address-mask
] [access-list-number
]]
is used to specify administrative weight. Without the options, the command applies to all routes known via the routing protocol. Thus, in the following example, a distance of 10 is attached to all RIP-derived routes and a distance of 20 is attached to all EIGRP-derived routes:
hostname R ... router rip distance 10 ... router eigrp 109 distance 20
You can use the optional filters to attach an administrative weight to only the routes derived from routing sources that pass the filters. Thus, the distance command in the following code:
router rip network 11.0.0.0 distance 160 11.1.1.0 0.0.0.255
attaches a distance of 160 to RIP routes derived from sources in the
IP address range 11.1.1.0
through
11.1.1.255
. The use of the optional filters in the
distance command is discouraged; unless it is
carefully planned, it can cause problems with routing loops.
Get IP Routing now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.