Command:

distance bgp


Mode:

Router(config-router)#

Router(config-router-af)#


Syntax:

distance bgp external-distance internal-distance local-distance
no distance bgp

 

Syntax Description:

external-distance Administrative distance for BGP external routes. External routes are routes for which the best path is learned from a neighbor external to the autonomous system. Acceptable values are from 1 to 255. The default is 20. Routes with a distance of 255 are not installed in the routing table.
internal-distance Administrative distance for BGP internal routes. Internal routes are those routes that are learned from another BGP entity within the same autonomous system. Acceptable values are from 1 to 255. The default is 200. Routes with a distance of 255 are not installed in the routing table.
local-distance Administrative distance for BGP local routes. Local routes are those networks listed with a network router configuration command, often as back doors, for that router or for networks that are being redistributed from another process. Acceptable values are from 1 to 255. The default is 200. Routes with a distance of 255 are not installed in the routing table.

 

Command Description:

To allow the use of external, internal, and local administrative distances that could be a better route than other external, internal, or local routes to a node, use the distance bgp command in address family or router configuration mode. To return to the default values, use the no form of this command.

Defaults:

external-distance: 20

internal-distance: 200

local-distance: 200

An administrative distance is a rating of the trustworthiness of a routing information source, such as an individual router or a group of routers. Numerically, an administrative distance is a positive integer from 1 to 255. In general, the higher the value, the lower the trust rating. An administrative distance of 255 means the routing information source cannot be trusted at all and should be ignored.

Use this command if another protocol is known to be able to provide a better route to a node than was actually learned via external BGP (eBGP), or if some internal routes should be preferred by BGP.

The distance bgp command replaces the distance mbgp command.


Example:

In the following router configuration mode example, internal routes are known to be preferable to those learned through the Interior Gateway Protocol (IGP), so the administrative distance values are set accordingly:

Router(config)#router bgp 109
Router(config-router)#network 10.108.0.0
Router(config-router)#neighbor 192.168.6.6 remote-as 123
Router(config-router)#neighbor 172.16.1.1 remote-as 47
Router(config-router)#distance bgp 20 20 200

In the following address family configuration mode example, internal routes are known to be preferable to those learned through IGP, so the administrative distance values are set accordingly:

Router(config)#router bgp 109
Router(config-router)#neighbor 192.168.6.6 remote-as 123
Router(config-router)#neighbor 172.16.1.1 remote-as 47
Router(config-router)#address family ipv4 multicast
Router(config-router-af)#network 10.108.0.0
Router(config-router-af)#distance bgp 20 20 200
Router(config-router-af)#neighbor 192.168.6.6 activate
Router(config-router-af)#neighbor 172.16.1.1 activate


Misconceptions:

Changing the administrative distance of BGP internal routes is considered dangerous and is not recommended. One problem that can arise is the accumulation of routing table inconsistencies, which can break routing.


Related Commands:

None

� Cisco Systems, Inc. 2001, 2002, 2003
World Wide Education

Converted from CHM to HTML with chm2web Pro 2.85 (unicode)