System information
Configuring BGP
12-39
You can change an administrative distance if you know that another protocol provides
a better route than that learned via EBGP or if you want IBGP to show preference for
internal routes.
To set the following three administrative distance types, use the distance bgp
command:
• external — for BGP external routes learned from a neighbor external to the AS.
• internal — for BGP internal routes learned from another BGP router within the
same AS.
• local — for local BGP routes that are networks listed with the network
command, often as back doors for that router or for networks that are
redistributed from another process.
To set the external, internal, and local administrative distances for a BGP router, use
the distance bgp command in Router BGP Configuration mode, as shown below:
MOT(config-bgp)#distance bgp [<external-distance> <internal-distance>
<local-distance>]
where:
external-distance is the administrative distance for routes external to the AS;
range is 1 to 255; default is 20.
internal-distance is the distance for routes internal to the AS; range is 1 to 255;
default is 200.
local-distance is the administrative distance for local routes; range is 1 to 255;
default is 200.
Example
In the following example, internal routes are preferable to those learned through the
IGP. The administrative distance values are set accordingly: 20 for routes external and
internal to AS 100 and 200 for local routes.
Note: Changing the administrative distance of BGP internal routes is danger-
ous and is not recommended. It can cause the accumulation of routing table
inconsistencies that can break routing within an AS and between ASs.