CLI Guide

Layer 3 Routing Commands 1279
Command History
Introduced in version 6.2.0.1 firmware.
Example
To set the preference value of the BGP route to 100.0.0.0/8 from neighbor
10.1.1.1, use the following distance command:
(R1) (Config)# ip prefix-list pfx-list1 permit 100.0.0.0/8
(R1) (Config)# router bgp 1
(R1) (Config-router)# distance 25 10.1.1.1 0.0.0.0 pfx-list1
To set the preference value to 12 for all BGP routes from neighbor 10.1.1.1,
use the following distance command:
(R1) (Config-router)# distance 12 10.1.1.1 0.0.0.0
To set the preference value of all routes within 100.0.0.0/8 from any neighbor,
use the following distance command:
(R1) (Config)# ip prefix-list pfx-list2 permit 100.0.0.0/8 ge 8
(R1) (Config)# router bgp 1
(R1) (Config-router)#distance 25 0.0.0.0 255.255.255.255 pfx-list2
distance bgp (BGP Router Configuration)
Use this command to set the preference (also known as administrative
distance) of BGP routes.
Syntax
distance bgp external-distance internal-distance local-distance
no distance bgp
external-distance—The preference value for routes learned from external
peers. The range is 1 to 255.
internal-distance—The preference value for routes learned from internal
peers. The range is 1 to 255.
local-distance—The preference value for locally-originated routes. The
range is 1 to 255.
Default Configuration
external-distance—20
internal-distance—200