Friday, May 30, 2008

BGP distance command's 3 arguments

In BGP configuration mode, the distance command has 3 arguments:

R6(config-router)#distance bgp ?
<1-255> Distance for routes external to the AS

R6(config-router)#distance bgp 13 ?
<1-255> Distance for routes internal to the AS

R6(config-router)#distance bgp 13 26 ?
<1-255> Distance for local routes

R6(config-router)#distance bgp 13 26

External BGP and Internal BGP routes are easy enough to understand, but what exactly is the third option "local routes" for and when do you see it?

Here is an example:

R1#show run
!
interface Loopback10
ip address 10.10.10.1 255.255.255.0
!
interface Loopback11
ip address 11.11.11.11 255.255.255.0
!
router bgp 65000
no synchronization
distance bgp 13 26 8
network 10.10.10.0 mask 255.255.255.0
aggregate-address 10.0.0.0 254.0.0.0
!
R1#show ip route

C 172.12.15.0 is directly connected, Serial1/1
C 172.12.123.0 is directly connected, Serial1/0
10.0.0.0/24 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, Loopback10
11.0.0.0/24 is subnetted, 1 subnets
C 11.11.11.0 is directly connected, Loopback11
B 10.0.0.0/7 [8/0] via 0.0.0.0, 00:02:02, Null0

The null route gets the "local route" distance when you configure aggregate routes.

Do you know any other scenarios?

1 comment:

  1. Another local route is the BGP Backdoor route. For example if you use the command "network 10.1.0.0 mask 255.255.0.0 backdoor" that route will have the AD of whatever you defined in as the distance of a local route.

    You can find more details at http://kemot-net.com/routing/bgp/bgp-modifying-the-ad-of-backdoor-networks

    ReplyDelete

Note: Only a member of this blog may post a comment.